A face number determination method and device, and electronic equipment

By placing a preset model in a preset scene, acquiring performance data, and using a benchmark frame rate to determine the target number of faces, the problem of long face number determination time in existing technologies is solved, and efficient and accurate face number determination is achieved.

CN115661289BActive Publication Date: 2026-06-05ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
Filing Date
2022-10-18
Publication Date
2026-06-05

Smart Images

  • Figure CN115661289B_ABST
    Figure CN115661289B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a face number determination method and device and electronic equipment, which are applied to the technical field of games. For each candidate face number, each performance data of a target device in a process of rendering a specified picture corresponding to the candidate face number by a vertex shader is obtained as a performance data group corresponding to the candidate face number; wherein the specified picture corresponding to each candidate face number is a picture in which a vertex shader is to be rendered based on each preset model having a sum of face numbers in a preset scene and corresponding to the candidate face number and the face number of the picture is the candidate face number; a target time consumption of the vertex shader is determined based on a preset reference frame rate and a maximum graphics card usage rate ratio; each target performance data group is determined; and a target face number of the target device is determined based on a maximum face number and a minimum face number in each candidate face number corresponding to each target performance data group. Compared with related technologies, the scheme provided by embodiments of the present application can improve the determination efficiency of the face number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game technology, and in particular to a method, apparatus, and electronic device for determining the number of faces. Background Technology

[0002] In game development, polygon count is the foundation for modeling various game models. Each game model can be composed of multiple polygons, which are typically referred to as the faces of the game model. In other words, the polygon count of a game model represents the number of polygons that make up that game model.

[0003] Generally, during game operation, the sum of the polygon counts of all game models included in the game screen is used as the polygon count of the game screen. The polygon count of the game screen directly affects the image quality and the smoothness of the game running on the device. Since different types of devices have different performance levels, the polygon count of the game screen may vary on different devices to achieve clearer image quality and smoother operation. Therefore, it is necessary to determine an appropriate polygon count for each device to ensure that the game runs with clearer image quality and smoother operation.

[0004] In related technologies, when determining the appropriate number of faces for a game screen for each device, multiple models with different numbers of faces can be created for each electronic device to construct multiple scenes with different numbers of faces. Then, multiple screens with different numbers of faces are created based on these multiple scenes. After that, general performance data such as the device's graphics card utilization, frame rate, and CPU (Central Processing Unit) utilization are collected during the rendering of each screen by the device's vertex shader. Then, the collected general performance data of the device are analyzed to determine the appropriate number of faces for the game screen for that device from the different number of faces.

[0005] However, in the aforementioned related technologies, when determining the appropriate number of faces for a game screen for each device, it is necessary to pre-create multiple screens for that device. Each screen requires the creation of its corresponding model first. Therefore, creating multiple screens requires a long planning time, resulting in a long time spent determining the appropriate number of faces for a game screen for each device, which is inefficient. Summary of the Invention

[0006] The purpose of this invention is to provide a method, apparatus, and electronic device for determining the number of faces of a target device, thereby reducing the time required to determine the number of faces and improving the efficiency of face determination. The specific technical solution is as follows:

[0007] In a first aspect, embodiments of the present invention provide a method for determining the number of faces, the method comprising:

[0008] For each candidate face number among a preset plurality of candidate face numbers, various performance data of the target device are obtained during the process of the vertex shader of the target device rendering a specified image corresponding to that candidate face number, and these data are used as a performance data set corresponding to that candidate face number; wherein, the specified image corresponding to each candidate face number is: an image determined based on the sum of the face numbers of the placed objects in the preset scene and the preset models corresponding to that candidate face number, and the face number to be rendered by the vertex shader is that candidate face number; the performance data set corresponding to each candidate face number includes: the vertex shader's execution time, the frame rate of the target device, and the percentage of GPU utilization of the vertex shader;

[0009] The target time for the vertex shader is determined based on the preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group.

[0010] Each target performance data group is determined to have a frame rate that is not less than the baseline frame rate and a time consumption that is less than the target time consumption.

[0011] The target number of the target device is determined based on the maximum and minimum number of facets among the candidate facets corresponding to each target performance data group.

[0012] Optionally, in one specific implementation, the specified screen corresponding to each candidate face count is: a screen obtained by placing each preset model with a face count summed to the candidate face count in the preset scene;

[0013] For each of the preset multiple candidate face counts, the following performance data of the target device are obtained during the process of the vertex shader of the target device rendering a specified image corresponding to that candidate face count:

[0014] For each of the preset multiple candidate face numbers, obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face in the specified image corresponding to that candidate face number.

[0015] Optionally, in one specific implementation, the specified screen corresponding to each candidate face number is: a screen obtained by placing a preset model with a preset face number in the preset scene, and the preset model is rendered a specified number of times for each face; the specified number of times is: the ratio of the candidate face number to the preset face number;

[0016] For each of the preset multiple candidate face counts, the following performance data of the target device are obtained during the process of the vertex shader of the target device rendering a specified image corresponding to that candidate face count:

[0017] For each of the preset candidate face numbers, obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face of the preset model according to the specified number of times.

[0018] Optionally, in one specific implementation, before obtaining various performance data of the target device during the process of rendering a specified image corresponding to that candidate face number in the vertex shader of the target device for each of the preset multiple candidate face numbers, the method further includes:

[0019] Multiple candidate face counts are determined, and using preset scenes and various preset models, the specified screen corresponding to each candidate face count is determined.

[0020] Optionally, in one specific implementation, the number of target devices is multiple; the method further includes:

[0021] Determine the minimum and maximum number of target faces for each target device;

[0022] According to a predetermined selection rule regarding the number of faces interval, each reference number of faces is selected within the range of the number of faces formed by the minimum and the maximum values;

[0023] The maximum value, the minimum value, and the number of reference surfaces are determined as the number of calibration surfaces for each target device.

[0024] Optionally, in one specific implementation, selecting each reference number of faces within the range of faces formed by the minimum and maximum values ​​according to a predetermined selection rule regarding the face number interval includes:

[0025] According to a preset step size, within the range of faces formed by the minimum and maximum values, select each reference face number.

[0026] Optionally, in one specific implementation, determining the target execution time of the vertex shader based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group includes:

[0027] Based on the preset baseline frame rate, calculate the baseline time required to render one frame.

[0028] Calculate the first product of the baseline latency and the reserved performance of the graphics card;

[0029] The first product is calculated and the second product of the maximum GPU utilization percentage included in each performance data group is used as the target time for the vertex shader.

[0030] In a second aspect, embodiments of the present invention provide a face count determination device, the device comprising:

[0031] The data acquisition module is used to acquire, for each of a preset plurality of candidate face counts, various performance data of the target device during the process of the vertex shader of the target device rendering a specified screen corresponding to that candidate face count, as a performance data set corresponding to that candidate face count; wherein, the specified screen corresponding to each candidate face count is: a screen determined based on the sum of the face counts placed in a preset scene and each preset model corresponding to that candidate face count, and the face count to be rendered by the vertex shader is that candidate face count; the performance data set corresponding to each candidate face count includes: the vertex shader's execution time, the frame rate of the target device, and the percentage of GPU utilization of the vertex shader;

[0032] The target time determination module is used to determine the target time of the vertex shader based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group.

[0033] The data group determination module is used to determine each target performance data group that includes a frame rate not less than the baseline frame rate and a time consumption difference from the target time consumption less than a preset difference threshold.

[0034] The target surface number determination module is used to determine the target surface number of the target device based on the maximum and minimum surface number among the candidate surface numbers corresponding to each target performance data group.

[0035] Optionally, in one specific implementation, the specified screen corresponding to each candidate face count is: a screen obtained by placing each preset model with a face count summed to the candidate face count in the preset scene;

[0036] The data acquisition module is specifically used for:

[0037] For each of the preset candidate face numbers, obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face of the preset model according to the specified number of times.

[0038] Optionally, in one specific implementation, the specified screen corresponding to each candidate face number is: a screen obtained by placing a preset model with a preset face number in the preset scene, and the preset model is rendered a specified number of times for each face; the specified number of times is: the ratio of the candidate face number to the preset face number;

[0039] The data acquisition module is specifically used for:

[0040] For each of the preset candidate face numbers, obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face of the preset model according to the specified number of times.

[0041] Optionally, in one specific implementation, the apparatus further includes:

[0042] The screen determination module is used to determine multiple candidate face counts before the data acquisition module, and to determine the specified screen corresponding to each candidate face count using a preset scene and various preset models.

[0043] Optionally, in one specific implementation, the number of target devices is multiple; the apparatus further includes:

[0044] The determination module is used to determine the minimum and maximum number of target faces for each target device.

[0045] The selection module is used to select each reference number of faces within the range of faces formed by the minimum and the maximum values, according to a predetermined selection rule regarding the face number interval;

[0046] The reference surface number determination module is used to determine the maximum value, the minimum value, and the number of reference surfaces as the number of calibration surfaces for each target device.

[0047] Optionally, in one specific implementation, the selection module is specifically used for:

[0048] According to a preset step size, within the range of faces formed by the minimum and maximum values, select each reference face number.

[0049] Optionally, in one specific implementation, the target time determination module is specifically used for:

[0050] Based on the preset baseline frame rate, calculate the baseline time required to render one frame.

[0051] Calculate the first product of the baseline latency and the reserved performance of the graphics card;

[0052] The first product is calculated and the second product of the maximum GPU utilization percentage included in each performance data group is used as the target time for the vertex shader.

[0053] Thirdly, embodiments of the present invention provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0054] Memory, used to store computer programs;

[0055] When a processor executes a program stored in memory, it implements the steps of any of the above method embodiments.

[0056] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above method embodiments.

[0057] Fifthly, embodiments of the present invention also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps of any of the above method embodiments.

[0058] Beneficial effects of the embodiments of the present invention:

[0059] As can be seen from the above, when determining the target number of faces of a target device by applying the solution provided in the embodiments of the present invention, multiple candidate face numbers can be determined first, and a preset scene and various preset models can be constructed. Thus, the specified screen corresponding to each candidate face number can be created by placing various preset models in the preset scene. The number of faces that the vertex shader of the target device needs to render when rendering the specified screen corresponding to each candidate face number is the candidate face number.

[0060] Therefore, for each candidate face count, various performance data of the target device can be obtained during the rendering of the specified image corresponding to that candidate face count by the vertex shader on the target device, and these performance data can be used as the performance data set corresponding to that candidate face count. Then, based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data set, the target vertex shader execution time can be determined. Thus, from the aforementioned performance data sets, target performance data sets can be identified that include a frame rate not less than the baseline frame rate and a difference between the execution time and the target execution time less than a preset difference threshold. Based on the maximum and minimum face counts among the candidate face counts corresponding to each target performance data set, the target face count of the target device can be determined.

[0061] Based on this, by applying the solution provided in the embodiments of the present invention, for a target device, multiple candidate face numbers can be used to create specified screens corresponding to different face numbers by placing various preset models in a pre-built preset model. In related technologies, when determining the number of faces using general performance data of a device, the accuracy of the determined face count is poor because such general performance data may be affected by various factors such as rendering effects and the execution logic order of the application. However, in the technical solution provided in this application, for any device, the performance data of the device's vertex shader is relatively stable and unaffected by other factors, thus the accuracy of the determined face count is higher. Furthermore, in related technologies, multiple models need to be created to construct multiple scenes, and then multiple frames corresponding to the multiple scenes are created using the constructed multiple scenes. In the process of creating each frame, the same model appearing in multiple frames needs to be created repeatedly. In the technical solution provided in this application, only a preset scene needs to be constructed in advance, and each preset model only needs to be constructed once, which can be reused when creating multiple specified frames. This greatly reduces the number of scenes and models that need to be constructed during the frame creation process, shortens the frame creation time, and consequently shortens the time spent determining the face count for each device, thus improving the efficiency of face count determination. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0063] Figure 1 A flowchart illustrating a method for determining the number of faces provided in an embodiment of the present invention;

[0064] Figure 2 A flowchart illustrating another method for determining the number of faces provided in an embodiment of the present invention;

[0065] Figure 3 A flowchart illustrating another method for determining the number of faces provided in an embodiment of the present invention;

[0066] Figure 4 This is a specific example diagram illustrating the acquisition of various performance data by the acquisition software provided in this embodiment of the invention;

[0067] Figure 5 This is a schematic diagram of the structure of a face count determination device provided in an embodiment of the present invention;

[0068] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0069] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of the present invention.

[0070] However, in the aforementioned related technologies, when determining the appropriate number of game screen faces for each device, it is necessary to pre-produce multiple screens for that device, and each screen requires a certain production time. Therefore, producing multiple screens requires a long planning time, resulting in a long time spent determining the appropriate number of game screen faces for each device, which is inefficient.

[0071] To address the aforementioned technical problems, embodiments of the present invention provide a method for determining the number of faces.

[0072] This method can be applied to scenarios where the number of faces of the screen of an application running on various devices can be used to determine the number of faces of the screen of the application running on the device. For example, determining the number of faces of the screen of a game running on a laptop, determining the number of faces of the VR interface running on a VR (Virtual Reality) device, etc.; and the aforementioned devices can be mobile phones, laptops, desktop computers, VR devices, AR (Augmented Reality) devices, etc.

[0073] The implementing entity of the technical solution provided in this application can be any type of electronic device capable of data processing, such as a server, mobile phone, or laptop computer. Furthermore, the electronic device implementing the technical solution provided in this application can determine the number of screen views of its own running application. For example, a desktop computer can collect its own performance data and determine the number of screen views of its running application. It can also determine the number of screen views of applications running on other electronic devices communicating with it. For example, the electronic device can acquire various performance data from other devices and determine the number of screen views of applications running on those devices. For clarity, the implementing entity of the technical solution provided in this application will be referred to as an electronic device.

[0074] Therefore, the embodiments of the present invention do not specifically limit the application scenarios and execution subjects of the method.

[0075] An embodiment of the present invention provides a method for determining the number of faces, which may include the following steps:

[0076] For each candidate face number among a preset plurality of candidate face numbers, various performance data of the target device are obtained during the process of the vertex shader of the target device rendering a specified image corresponding to that candidate face number, and these data are used as a performance data set corresponding to that candidate face number; wherein, the specified image corresponding to each candidate face number is: an image determined based on the sum of the face numbers of the placed objects in the preset scene and the preset models corresponding to that candidate face number, and the face number to be rendered by the vertex shader is that candidate face number; the performance data set corresponding to each candidate face number includes: the vertex shader's execution time, the frame rate of the target device, and the percentage of GPU utilization of the vertex shader;

[0077] The target time for the vertex shader is determined based on the preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group.

[0078] Each target performance data group is determined to have a frame rate that is not less than the baseline frame rate and a time consumption that is less than the target time consumption.

[0079] The target number of the target device is determined based on the maximum and minimum number of facets among the candidate facets corresponding to each target performance data group.

[0080] As can be seen from the above, when determining the target number of faces of a target device by applying the solution provided in the embodiments of the present invention, multiple candidate face numbers can be determined first, and a preset scene and various preset models can be constructed. Thus, the specified screen corresponding to each candidate face number can be created by placing various preset models in the preset scene. The number of faces that the vertex shader of the target device needs to render when rendering the specified screen corresponding to each candidate face number is the candidate face number.

[0081] Therefore, for each candidate face count, various performance data of the target device can be obtained during the rendering of the specified image corresponding to that candidate face count by the vertex shader on the target device, and these performance data can be used as the performance data set corresponding to that candidate face count. Then, based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data set, the target vertex shader execution time can be determined. Thus, from the aforementioned performance data sets, target performance data sets can be identified that include a frame rate not less than the baseline frame rate and a difference between the execution time and the target execution time less than a preset difference threshold. Based on the maximum and minimum face counts among the candidate face counts corresponding to each target performance data set, the target face count of the target device can be determined.

[0082] Based on this, by applying the solution provided in the embodiments of the present invention, for a target device, multiple candidate face numbers can be used to create specified screens corresponding to different face numbers by placing various preset models in a pre-built preset model. In related technologies, when determining the number of faces using general performance data of a device, the accuracy of the determined face count is poor because such general performance data may be affected by various factors such as rendering effects and the execution logic order of the application. However, in the technical solution provided in this application, for any device, the performance data of the device's vertex shader is relatively stable and unaffected by other factors, thus the accuracy of the determined face count is higher. Furthermore, in related technologies, multiple models need to be created to construct multiple scenes, and then multiple frames corresponding to the multiple scenes are created using the constructed multiple scenes. In the process of creating each frame, the same model appearing in multiple frames needs to be created repeatedly. In the technical solution provided in this application, only a preset scene needs to be constructed in advance, and each preset model only needs to be constructed once, which can be reused when creating multiple specified frames. This greatly reduces the number of scenes and models that need to be constructed during the frame creation process, shortens the frame creation time, and consequently shortens the time spent determining the face count for each device, thus improving the efficiency of face count determination.

[0083] The following, with reference to the accompanying drawings, provides a detailed description of a method for determining the number of faces provided by an embodiment of the present invention.

[0084] Figure 1 This is a flowchart illustrating a method for determining the number of faces provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the method may include the following steps S101-S104.

[0085] S101: For each of the preset multiple candidate face counts, obtain the various performance data of the target device during the process of the vertex shader of the target device rendering the specified screen corresponding to the candidate face count, and use it as the performance data group corresponding to the candidate face count.

[0086] The specified screen corresponding to each candidate face count is: a screen where the sum of the face counts of the preset models placed in the preset scene and the face count of each candidate face count are determined, and the face count to be rendered by the vertex shader is the candidate face count; the performance data set corresponding to each candidate face count includes: vertex shader execution time, target device frame rate, and vertex shader GPU utilization rate.

[0087] When determining the target number of faces for a target device, multiple candidate faces can be pre-set based on the device parameters, program data of the applications running on the device, image quality requirements, and model data of historical applications.

[0088] In the context of a device's application's screen, the polygon count refers to the sum of the polygon counts of all models within that screen, transmitted to the device's graphics card (GPU). Different screens can be obtained by placing different models within the same scene. Therefore, for a given scene, different screens can be achieved by increasing or decreasing the number of models included. Thus, by altering the number of models in a scene, the polygon count of the resulting screen can be changed, resulting in multiple screens with varying polygon counts.

[0089] Therefore, in order to save time in creating multiple different scenes, a preset scene and multiple preset models can be pre-built. In this way, by increasing or decreasing the number of preset models in the preset scene, the number of faces in the resulting scene can be changed. Thus, different scenes can be created using the aforementioned preset scene and preset models, thereby shortening the time required to create multiple different scenes.

[0090] Furthermore, when rendering each face in each frame, the vertex shader of the target device can determine the number of times to render each face based on the preset number of rendering passes for the vertex shader. For example, if the vertex shader of the target device has a rendering pass of 2, then the vertex shader of the target device will render each face twice when rendering each face in each frame; if the vertex shader of the target device has a rendering pass of 1, then the vertex shader of the target device will render each face once when rendering each face in each frame.

[0091] Since the number of rendering iterations of the vertex shader on the target device is adjustable, the number of faces to be rendered by the vertex shader can be changed without altering the image to be rendered. In this process, an image to be rendered can be created, and by increasing or decreasing the number of rendering iterations of the vertex shader on the target device, the number of times each face in that image is rendered can be changed. This allows for adjusting the number of faces to be rendered by the vertex shader, eliminating the need to create multiple different images and saving time compared to creating multiple separate images.

[0092] Based on this, in the technical solution provided in this application, the specified screen corresponding to each candidate face number can be: a screen determined based on the sum of the face numbers of each preset model placed in the preset scene and the candidate face number, and the face number to be rendered by the vertex shader is the candidate face number.

[0093] In other words, for each candidate face count, a specified image corresponding to that candidate face count can be obtained by placing each preset model with the sum of its face count and the corresponding face count in a preset scene. Based on the sum of the face counts of the preset models placed above and the number of times the vertex shader of the target device renders, the face count to be rendered by the vertex shader when rendering the specified image is the candidate face count.

[0094] For example, for a candidate face count of 100, you can place each preset model with a face count sum of 100 in a preset scene to obtain a specified image corresponding to the candidate face count. Furthermore, if you set the vertex shader of the target device to render 1 time, then when the vertex shader renders the specified image, the face count to be rendered will be 100.

[0095] For example, for a candidate face count of 100, you can place various preset models with a face count sum of 50 in a preset scene to obtain the specified image corresponding to the candidate face count. Furthermore, if the vertex shader of the target device is set to render 2 times, then when the vertex shader renders the specified image, the face count to be rendered is 100.

[0096] Alternatively, in one specific implementation, such as Figure 2 As shown, prior to step S101 above, the method for determining the number of faces provided in this embodiment of the invention may further include the following step S100:

[0097] S100: Determine multiple candidate face counts and, using preset scenes and various preset models, determine the specified screen corresponding to each candidate face count.

[0098] In this specific implementation, the electronic device can first determine the number of candidate faces.

[0099] Optionally, the electronic device can determine multiple candidate face counts based on the device parameters of the target device, the program data of the application running on the target device, the image quality requirements, and the model data of historical applications.

[0100] Optionally, the electronic device can acquire multiple candidate face counts input by the user in various ways.

[0101] In this way, after determining the above-mentioned number of candidate faces, the electronic device can determine the specified screen corresponding to each candidate face number based on the above-mentioned preset scene and each preset model.

[0102] Optionally, for each candidate number of faces, the electronic device can place various preset models with a sum of faces of that candidate number of faces in the preset scene to obtain the specified screen corresponding to that candidate number of faces.

[0103] Optionally, for each candidate number of faces, the electronic device can place a preset model with a preset number of faces in a preset scene to obtain a screen, and adjust the rendering count of the vertex shader of the target device to the ratio of the candidate number of faces to the preset number of faces. Thus, the screen obtained by placing a preset model with a preset number of faces in a preset scene, and the rendering count of each face of the preset model is the above ratio, is used as the designated screen corresponding to the candidate number of faces.

[0104] Optionally, in one specific implementation, the specified screen corresponding to each candidate face count is: a screen obtained by placing each preset model with a face count summed to the candidate face count in a preset scene; then step S101 above may include the following step 11:

[0105] Step 11: For each of the preset candidate face counts, obtain the performance data of the target device during the process of rendering each face in the specified image corresponding to that candidate face count using the vertex shader of the target device.

[0106] In this specific implementation, for each of the preset multiple candidate face counts, the sum of the face counts of each preset model is placed in the preset scene to obtain the screen where the sum of the face counts of the models is the candidate face count, thereby obtaining the specified screen corresponding to the candidate face count.

[0107] The number of faces in each of the aforementioned preset models can be the same or different. For example, the aforementioned preset models can be multiple models with the same specified number of faces; or, for example, the aforementioned preset models can be multiple models with different numbers of faces. Both are reasonable, and no specific restrictions are imposed on the aforementioned preset models in this embodiment of the invention.

[0108] For example, the preset model may include five 200,000-face models, four 100,000-face models, and six 50,000-face models; thus, when the number of candidate faces is 500,000, two 200,000-face models and one 100,000-face model can be placed in the preset scene; when the number of candidate faces is 700,000, three 200,000-face models, one 100,000-face model, and one 50,000-face model can be placed in the preset scene.

[0109] After determining the specified screen corresponding to each of the preset candidate face counts, since the number of faces in the specified screen is the candidate face count, the vertex shader of the target device only needs to render each face in the specified screen once. Thus, various performance data of the target device can be obtained during the process of the vertex shader of the target device rendering each face in the specified screen corresponding to the candidate face count.

[0110] Typically, the number of times the vertex shader renders for each frame can be adjusted. For a given frame corresponding to each candidate face count, the number of faces to be rendered by the vertex shader can be the product of the face count of the given frame and the number of times the vertex shader renders, and the product value is equal to the candidate face count.

[0111] Optionally, in one specific implementation, the specified image corresponding to each candidate face count is: an image obtained by placing a preset model with a preset face count in a preset scene, where each face of the preset model is rendered a specified number of times; the specified number of times is: the ratio of the candidate face count to the preset face count; then the above step S101 may include the following step 21:

[0112] Step 21: For each of the preset candidate face numbers, obtain the performance data of the target device during the process of the vertex shader of the target device rendering each face of the preset model a specified number of times.

[0113] In this specific implementation, for each of the preset candidate face numbers, a preset model with a preset face number can be placed in the preset scenario.

[0114] The preset number of faces can be set according to actual needs. For example, the preset number of faces can be the least common divisor of all candidate faces. That is, the number of faces for each candidate can be a multiple of the preset number of faces.

[0115] Subsequently, for each candidate face count, in order to ensure that the vertex shader of the target device renders the candidate face count when rendering the specified image corresponding to that candidate face count, the number of times the vertex shader renders each face in the aforementioned preset model can be adjusted. Specifically, when determining the candidate face count and the aforementioned preset face count, the ratio of the candidate face count to the preset face count can be calculated. This ratio can then be used as the specified number of times the vertex shader renders each face in the aforementioned preset model.

[0116] In other words, for each candidate face number, the specified number of times the vertex shader renders each face in the preset model can be determined based on the ratio of the candidate face number to the preset face number in the preset model.

[0117] For example, if the preset model has 50,000 preset faces, and the number of candidate faces is 50,000, the ratio of the preset face count to the number of candidate faces is 1. Then, the vertex shader of the target device renders each face in the preset image once. If the number of candidate faces is 200,000, the ratio of the preset face count to the number of candidate faces is 4. Then, the vertex shader of the target device renders each face in the preset image four times.

[0118] Thus, for each candidate face number, after determining the specified number of times the vertex shader renders each face in the aforementioned preset model, the vertex shader of the target device can render each face of the preset model in the aforementioned specified screen according to the specified number of times. Therefore, the execution subject of this embodiment of the invention can obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face of the preset model in the aforementioned specified screen according to the specified number of times, and then obtain the performance data group corresponding to each candidate face number.

[0119] As can be seen above, by adjusting the number of times the vertex shader renders each face according to the ratio of the preset face count to the candidate face count in the preset image, performance data of the vertex shader on the target device during the rendering of faces corresponding to each candidate face count can be collected without changing the preset model within the preset model. Furthermore, without altering the preset model within the preset model, the same image can be used to collect performance data sets corresponding to multiple candidate face counts for the target device. This shortens the production time for multiple different images, and consequently, reduces the face count determination cycle for the target device.

[0120] Optionally, when the execution subject of this embodiment of the invention is the target device, the target device can collect various performance data of the target device during the process of the vertex shader of the target device rendering the specified screen corresponding to the number of candidate faces, thereby obtaining the various performance data of the target device.

[0121] Optionally, when the execution subject of this embodiment of the invention is not the target device, the electronic device can obtain various performance data of the target device during the process of the vertex shader of the target device rendering the specified screen corresponding to the number of candidate faces by communicating with the target device.

[0122] Optionally, when the execution subject of this embodiment of the invention is not the target device described above, the electronic device can communicate with a server that can receive various performance data of the target device to obtain various performance data of the target device during the process of the vertex shader of the target device rendering the specified screen corresponding to the candidate number of faces, and thus obtain various performance data of the target device.

[0123] The performance data set corresponding to each candidate face number can include: vertex shader time, target device frame rate (FPS, frames per second), and the percentage of GPU utilization of the vertex shader.

[0124] The vertex shader time mentioned above is the total time taken for the vertex shader to render all faces in the specified image;

[0125] The frame rate of the target device is the frame rate of the game screen when the target device displays the specified screen. The frame rate is an important performance indicator used to measure whether the specified screen is stuttering.

[0126] The GPU usage percentage of the vertex shader mentioned above refers to the percentage of GPU usage occupied by the vertex shader during the rendering of each face of the model in the specified image.

[0127] For example, during the process of the graphics card rendering a specified screen of the application to the display device, the total time for the graphics card to render the specified screen is 100ms. Of this, the vertex shader takes 20ms to process the specified screen. Therefore, the vertex shader's time accounts for 20% of the total time of the graphics card, that is, the graphics card utilization rate of the vertex shader is 20%.

[0128] S102: Determine the target time for the vertex shader based on the preset baseline frame rate and the maximum GPU utilization percentage included in each performance data set;

[0129] Typically, before modeling the screen in an application, in order to ensure that the image quality presented when the application runs on the target device meets the expected standards, a baseline frame rate corresponding to the application can be pre-set based on the application's various parameters.

[0130] Therefore, optionally, the baseline frame rate for the application can be preset.

[0131] The baseline frame rate for an application can be calculated based on the application's pre-set minimum frame rate and the application's reserved consumption parameters.

[0132] Furthermore, the calibration frame rate of the aforementioned application can be a preset calibration frame rate that ensures the image quality of the application displayed on each device meets the requirements when the application is run on each device; the aforementioned reserved consumption parameter can be determined based on the various frame rates recorded when different devices run different images of the application and the calibration frame rate of the aforementioned application.

[0133] For example, for game A, the preset frame rate corresponding to the game is 30. For various devices with different performance, the frame rates (FPS) of each device are recorded when running game A in multiple different game scenarios such as single-player standing, single-player running, and multi-player standing. Then, based on the above-mentioned frame rate and multiple frame rates, the reserved consumption parameter corresponding to the game is determined to be 30%. Then, by calculating 30 / (1-30%) and truncating the decimal places of the calculation result, the base frame rate of 42 can be obtained.

[0134] The aforementioned baseline frame rate can be set according to the actual application's operating needs; it can be 30 frames or 60 frames, both of which are reasonable and are not specifically limited in this embodiment of the invention.

[0135] In this way, after obtaining multiple performance data sets of multiple candidate face counts, the maximum GPU utilization rate included in each of the above performance data sets can be determined. Therefore, based on the above-mentioned preset baseline frame rate and the determined maximum GPU utilization rate, the target time of the vertex shader can be determined.

[0136] Optionally, in one specific implementation, determining the target cost of the vertex shader based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group may include the following steps 41-43:

[0137] Step 41: Based on the preset baseline frame rate, calculate the baseline time required to render one frame;

[0138] Step 42: Calculate the first product of the baseline latency and the reserved performance of the graphics card;

[0139] Step 43: Calculate the first product and the second product of the maximum GPU utilization percentage included in each performance data set, as the target time for the vertex shader.

[0140] In this specific implementation, the target time of the vertex shader is used to characterize the time required for the vertex shader to render one frame. When determining the target time of the vertex shader based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group, the baseline time of each frame can be calculated first based on the preset baseline frame rate. Then, the first product of the baseline time and the reserved performance of the GPU can be calculated. Then, the second product of the first product and the maximum GPU utilization percentage included in each performance data group can be calculated. In this way, the obtained second product can be used as the target time of the vertex shader.

[0141] For example, the above process can be represented by the following formula:

[0142]

[0143] in, 65% is the time it takes for the graphics card to render one frame, measured in milliseconds; 65% is the reserved performance of the graphics card, which can reduce the impact of factors such as overheating-induced frequency throttling on the frame rate. The specific value of this reserved performance is calculated based on the historical data of the application and can be adjusted according to actual needs; the maximum graphics card utilization percentage is the maximum value among the graphics card utilization percentages in the above performance data groups.

[0144] S103: Determine each target performance data group whose included frame rate is not less than the baseline frame rate and whose included time difference with the target time is less than a preset difference threshold.

[0145] To ensure that the target number of faces on the determined target device meets the image quality requirements, the frame rate corresponding to the determined target number of faces can be no less than the aforementioned baseline frame rate. The target latency is determined based on the aforementioned baseline frame rate. Given that the target frame rate is no less than the aforementioned baseline frame rate, to meet the smoothness requirements when the device runs the application, the latency corresponding to the determined target number of faces should be close to the aforementioned determined target latency. Therefore, to measure the closeness of the latency in each performance data group corresponding to the multiple candidate face numbers to the target latency, a preset difference threshold can be set. Thus, if the difference between any latency and the target latency is less than the aforementioned preset difference threshold, it can be determined that the latency is close to the aforementioned target latency.

[0146] Based on this, after determining the target time of the vertex shader, based on the reference frame rate and the determined target time, in each of the target performance data groups, we can determine each target performance data group whose frame rate is not less than the reference frame rate and whose time difference with the target time is less than a preset difference threshold.

[0147] The aforementioned preset difference threshold can be set according to actual needs, such as 3 or 5, which are both reasonable and are not specifically limited in this embodiment of the invention.

[0148] S104: Determine the target number of the target device based on the maximum and minimum number of facets among the candidate facets corresponding to each target performance data group.

[0149] After determining each target performance data group, the number of candidate faces corresponding to each target performance data group can be determined. Then, the maximum and minimum number of faces among the candidate faces corresponding to each target performance data group can be determined, and the target number of the target device can be determined based on the maximum and minimum number of faces.

[0150] The maximum number of faces mentioned above is the maximum number of faces among the candidate faces that satisfy the condition that the frame rate in the corresponding target performance data set is not less than the baseline frame rate, and the difference between the time consumed in the corresponding target performance data set and the target time consumed is less than a preset difference threshold. This maximum number of faces can be used to limit the maximum number of faces of the model included in the application's screen. Furthermore, among the candidate faces, the difference between the time consumed in the target performance data set corresponding to the maximum number of faces and the target time consumed is the smallest, meaning that the time consumed in the target performance data set corresponding to the maximum number of faces is closest to the target time consumed. Thus, when the number of faces in the screen of the application running on the target device is the maximum number of faces, the model in the screen has more faces, the scene is more complex, and therefore, the screen presented by the target device is more refined.

[0151] The aforementioned minimum face count is the minimum face count among the candidate face counts that satisfy the condition that the frame rate in the corresponding target performance data set is not less than the aforementioned baseline frame rate, and the difference between the time consumed in the corresponding target performance data set and the target time consumed is less than a preset difference threshold. This minimum face count can be used to limit the minimum number of faces of the model included in the application's screen. Thus, when the number of faces in the screen of the application running on the target device is the aforementioned minimum face count, the target device runs the application more smoothly.

[0152] Based on this, each face count falling between the maximum and minimum face counts is defined as a face count that satisfies the following conditions: the frame rate in the corresponding performance data set is not less than the baseline frame rate, and the difference between the time consumed in the corresponding performance data set and the target time consumed is less than a preset difference threshold. Therefore, the target face count of the target device can be determined based on the maximum and minimum face counts.

[0153] Optionally, the range of face counts formed by the maximum and minimum face counts can be determined as the target face count range for the target device.

[0154] Optionally, the number of faces equal to the first difference between the maximum number of faces and the second difference between the minimum number of faces, i.e., the intermediate number of faces between the maximum number of faces and the minimum number of faces, can be determined as the target number of faces for the target device, so that when the target device is running, it can take into account both the frame rate of the screen and the time consumption of the vertex shader.

[0155] Optionally, the maximum number of faces mentioned above can be determined as the target number of faces for the target device. In this way, the number of faces in the screen of the application running on the target device will be the maximum number of faces mentioned above, making the scene in the screen more complex and the screen more refined.

[0156] Optionally, the minimum number of faces mentioned above can be determined as the target number of faces for the target device. In this way, the number of faces in the screen of the application running on the target device will be the minimum number of faces mentioned above, and the application will run more smoothly.

[0157] As can be seen from the above, by applying the solution provided in the embodiments of the present invention, for a target device, multiple candidate face numbers can be generated by placing various preset models in a pre-built preset model to create specified screens. In related technologies, when determining the number of faces using general performance data of a device, the accuracy of the determined face count is poor because such general performance data may be affected by various factors such as rendering effects and the execution logic order of the application. However, in the technical solution provided in this application, for any device, the performance data of the device's vertex shader is relatively stable and unaffected by other factors, thus the accuracy of the determined face count is higher. Furthermore, in related technologies, multiple models need to be created to construct multiple scenes, and then multiple frames corresponding to the multiple scenes are created using the constructed multiple scenes. In the process of creating each frame, the same model appearing in multiple frames needs to be created repeatedly. In the technical solution provided in this application, only a preset scene needs to be constructed in advance, and each preset model only needs to be constructed once, which can be reused when creating multiple specified frames. This greatly reduces the number of scenes and models that need to be constructed during the frame creation process, shortens the frame creation time, and consequently shortens the time spent determining the face count for each device, thus improving the efficiency of face count determination.

[0158] For any application to be modeled, since the application is designed for multiple devices, to improve its adaptability, the number of target faces for various target devices with different performance characteristics should be comprehensively considered when modeling the application. The baseline number of faces for constructing the application model should then be determined by combining the target face counts of each target device. Based on this, after determining the number of target faces for each target device, the baseline number of faces for the application model can be further determined.

[0159] Optionally, in one specific implementation, the number of the aforementioned target devices is multiple; such as... Figure 3 As shown, the method for determining the number of faces provided in this embodiment of the invention may further include the following steps S105-S107:

[0160] S105: Determine the minimum number of target faces for each target device and the maximum number of target faces for each target device;

[0161] S106: According to the predetermined selection rules regarding the number of faces interval, select each reference number of faces within the range of the minimum and maximum numbers of faces;

[0162] S107: Determine the maximum value, minimum value, and number of reference surfaces as the number of calibration surfaces for each target device.

[0163] In this specific implementation, each application can typically be deployed on multiple different types of devices. Therefore, when determining the number of faces of an application model, if there are multiple target devices corresponding to the application, the number of faces of each target device should be considered comprehensively.

[0164] Thus, for each target device, after determining the number of target faces of the target device using the above steps S101-S104, the minimum and maximum values ​​of the number of target faces among the multiple target devices can be determined.

[0165] Therefore, based on the aforementioned minimum and maximum values, a range of face counts formed by the aforementioned minimum and maximum values ​​can be determined. The minimum value is the smallest face count among all target face counts of each target device that satisfies the condition that the frame rate in the corresponding performance data set is not less than the aforementioned baseline frame rate, and the difference between the time consumed in the corresponding performance data set and the target time consumed is less than a preset difference threshold. The maximum value is the largest face count among all target face counts of each target device that satisfies the condition that the frame rate in the corresponding performance data set is not less than the aforementioned baseline frame rate, and the difference between the time consumed in the corresponding performance data set and the target time consumed is less than a preset difference threshold. Therefore, any face count within the range formed by the aforementioned minimum and maximum values ​​is a face count that satisfies the condition that the frame rate in the corresponding performance data set is not less than the aforementioned baseline frame rate, and the difference between the time consumed in the corresponding performance data set and the target time consumed is less than a preset difference threshold.

[0166] Based on this, the reference number of faces for the application can be determined within the above range. Considering that the device parameters of different devices are different and the user experience requirements are also different, multiple calibration faces can be selected when building the application model, and multiple application models corresponding to each calibration face can be built using the above multiple calibration faces.

[0167] In this way, when determining the number of calibration surfaces corresponding to the application, each number of surfaces can be selected within the range of the number of surfaces consisting of the minimum and maximum values, according to a predetermined selection rule for the number of surfaces interval, and the maximum, minimum and selected reference surfaces can be determined as the number of calibration surfaces for each target device.

[0168] In this way, for the same game, multiple application models with different face counts can be constructed according to the aforementioned determined face counts. Thus, when various devices run the game, they can select the corresponding application model according to their own performance parameters to balance the image quality, smoothness of operation, and user experience of the application.

[0169] Optionally, before running the game, the device can send its own performance parameters to the game server. The game server can then receive these performance parameters and provide the device with a game model that matches its performance parameters. The device can then receive and run the game model.

[0170] Optionally, the device stores multiple game models with different numbers of faces. Before running the game, the device can select a game model that matches its own performance parameters from among the multiple game models and run the game model.

[0171] In determining the face count of a game model, multiple game models with different face counts are constructed by comprehensively considering the face counts corresponding to various devices with different performance levels. Compared to constructing only one game model, this approach better caters to the operational needs of different devices, thereby improving the accuracy of face count specification and enhancing the user experience.

[0172] The aforementioned predetermined selection rule can be selected according to a preset step size or arbitrarily, both of which are reasonable and are not specifically limited in this embodiment of the invention.

[0173] Optionally, in one specific implementation, step S106 above may include the following step 31:

[0174] Step 31: Select the number of reference faces within the range of faces formed by the minimum and maximum values ​​according to the preset step size.

[0175] In this specific implementation, the number of reference surfaces can be selected within the range of the number of surfaces consisting of the minimum and maximum values, according to a preset step size.

[0176] The preset step size can be set according to actual needs, such as 200,000 or 350,000, which are all reasonable and are not specifically limited in this embodiment of the invention.

[0177] To facilitate understanding of the face number determination method provided in the embodiments of the present invention, the following is in conjunction with... Figure 4 Table 1 illustrates specific examples of embodiments of the present invention.

[0178] Before modeling the game model, the number of faces corresponding to the game model can be determined first. Then, multiple target devices can be identified, and for each target device, the face number determination method provided in this embodiment of the invention can be applied to determine the target face number range for that target device.

[0179] When determining the range of target faces for each target device, multiple candidate faces can be identified first, such as... Figure 4 As shown, the number of candidate faces is 820,000, 900,000, 1,000,000, 1,100,000, 1,220,000, 1,300,000, 1,420,000, 1,500,000, 1,720,000, 1,840,000, 1,900,000, 2,050,000, 2,240,000, 2,410,000, 2,600,000 and 2,850,000.

[0180] Table 1

[0181]

[0182]

[0183] Subsequently, for each candidate face count, a preset model can be placed in a preset scene to generate a specified image corresponding to that candidate face count. This allows the Snapdragon Profiler software to collect various performance data of the target device during the vertex shader rendering of the specified image with each candidate face count. These collected performance data are then used as performance data sets for that candidate face count, resulting in multiple performance data sets corresponding to the candidate face counts, as shown in Table 1. As shown in Table 1, the performance data may include FPS, vertex shader execution time (ms), and vertex shader GPU utilization percentage (%). Furthermore, the vertex shader utilization percentage is the same as the GPU utilization percentage of the vertex shader in this embodiment of the invention.

[0184] like Figure 4 As shown, Figure 4 This is the interface for collecting various performance data of the target device using the Snapdragon Profiler software.

[0185] Then, after determining the performance data groups corresponding to the above multiple candidate face counts, the target time of the vertex shader can be determined based on the preset baseline frame rate, the maximum GPU utilization percentage included in each performance data group, and the following formula.

[0186]

[0187] The baseline frame rate is 40 frames per second. As shown in Table 1, the maximum GPU utilization rate is 30%. Through calculation, the target time for the vertex shader can be determined to be 4.875ms.

[0188] After determining the target time, based on the performance data groups shown in Table 1, we can determine each target performance data group that includes a frame rate greater than the baseline frame rate and a time difference less than the target time.

[0189] The preset difference threshold is 0.5ms, which means that the time difference from the target time is less than the preset difference threshold is within the time range of 4.375ms and 5.375ms.

[0190] Based on the analysis of the various performance data sets shown in Table 1, it can be determined that the vertex shader execution time corresponding to candidate face counts of 1.5 million, 1.72 million, and 1.84 million faces is within the aforementioned time range. However, the FPS of the candidate face count of 1.84 million faces is 37, which is lower than the baseline frame rate, resulting in poor image quality. Therefore, it can be determined that the performance data sets corresponding to candidate face counts of 1.5 million and 1.72 million faces are the two target performance data sets for this target device.

[0191] Therefore, the target face number range of the target device can be determined as the face number range of 1.5 million to 1.72 million, which is composed of the maximum face number of 1.72 million and the minimum face number of 1.5 million in each candidate face number corresponding to the two target performance data groups. That is, when the base frame rate is 40 frames, the target face number range of the target device is 1.5 million to 1.72 million.

[0192] Based on the same inventive concept, and corresponding to the embodiments of the present invention provided above... Figure 1 The present invention provides a method for determining the number of faces, and also provides a device for determining the number of faces in this embodiment.

[0193] Figure 5 This is a schematic diagram of the structure of a face count determination device provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the device may include the following modules:

[0194] The data acquisition module 510 is used to acquire, for each of a preset plurality of candidate face counts, various performance data of the target device during the process of the vertex shader of the target device rendering a specified screen corresponding to that candidate face count, as a performance data set corresponding to that candidate face count; wherein, the specified screen corresponding to each candidate face count is: a screen determined based on the sum of the face counts placed in a preset scene and each preset model corresponding to that candidate face count, and the face count to be rendered by the vertex shader is that candidate face count; the performance data set corresponding to each candidate face count includes: the vertex shader's execution time, the frame rate of the target device, and the percentage of GPU utilization of the vertex shader;

[0195] The target time determination module 520 is used to determine the target time of the vertex shader based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group.

[0196] The data group determination module 530 is used to determine each target performance data group whose frame rate is not less than the reference frame rate and whose time consumption is less than the target time consumption.

[0197] The target surface number determination module 540 is used to determine the target surface number of the target device based on the maximum and minimum surface number among the candidate surface numbers corresponding to each target performance data group.

[0198] As can be seen from the above, by applying the solution provided in the embodiments of the present invention, for a target device, multiple candidate face numbers can be generated by placing various preset models in a pre-built preset model to create specified screens. In related technologies, when determining the number of faces using general performance data of a device, the accuracy of the determined face count is poor because such general performance data may be affected by various factors such as rendering effects and the execution logic order of the application. However, in the technical solution provided in this application, for any device, the performance data of the device's vertex shader is relatively stable and unaffected by other factors, thus the accuracy of the determined face count is higher. Furthermore, in related technologies, multiple models need to be created to construct multiple scenes, and then multiple frames corresponding to the multiple scenes are created using the constructed multiple scenes. In the process of creating each frame, the same model appearing in multiple frames needs to be created repeatedly. In the technical solution provided in this application, only a preset scene needs to be constructed in advance, and each preset model only needs to be constructed once, which can be reused when creating multiple specified frames. This greatly reduces the number of scenes and models that need to be constructed during the frame creation process, shortens the frame creation time, and consequently shortens the time spent determining the face count for each device, thus improving the efficiency of face count determination.

[0199] Optionally, in one specific implementation, the specified screen corresponding to each candidate face count is: a screen obtained by placing each preset model with a face count summed to the candidate face count in the preset scene;

[0200] The data acquisition module 510 is specifically used for:

[0201] For each of the preset candidate face numbers, obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face of the preset model according to the specified number of times.

[0202] Optionally, in one specific implementation, the specified image corresponding to each candidate face count is: an image obtained by placing a preset model with a preset face count in the preset scene, wherein each face of the preset model is rendered a specified number of times; the specified number of times is: the ratio of the candidate face count to the preset face count; the data acquisition module 510 is specifically used for:

[0203] For each of the preset candidate face numbers, obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face of the preset model according to the specified number of times.

[0204] Optionally, in one specific implementation, the apparatus further includes:

[0205] The screen determination module is used to determine multiple candidate face counts before the data acquisition module, and to determine the specified screen corresponding to each candidate face count using a preset scene and various preset models.

[0206] Optionally, in one specific implementation, the number of target devices is multiple; the apparatus further includes:

[0207] The determination module is used to determine the minimum and maximum number of target faces for each target device.

[0208] The selection module is used to select each reference number of faces within the range of faces formed by the minimum and the maximum values, according to a predetermined selection rule regarding the face number interval;

[0209] The reference surface number determination module is used to determine the maximum value, the minimum value, and the number of each reference surface as the number of each reference surface for each target device.

[0210] Optionally, in one specific implementation, the selection module is specifically used for:

[0211] According to the preset step size, within the range of face count formed by the minimum and maximum values, select each calibration face count.

[0212] Optionally, in one specific implementation, the target time determination module 520 is specifically used for:

[0213] Based on the preset baseline frame rate, calculate the baseline time required to render one frame.

[0214] Calculate the first product of the baseline latency and the reserved performance of the graphics card;

[0215] The first product is calculated and the second product of the maximum GPU utilization percentage included in each performance data group is used as the target time for the vertex shader.

[0216] This invention also provides an electronic device, such as... Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0217] Memory 603 is used to store computer programs;

[0218] The processor 601, when executing the program stored in the memory 603, implements any of the face number determination methods described above.

[0219] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0220] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0221] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0222] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0223] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of any of the above-described face number determination methods.

[0224] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the face number determination methods described above.

[0225] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0226] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0227] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments, electronic device embodiments, and computer-readable storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0228] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for determining the number of faces, characterized in that, The method includes: For each candidate face number among a preset plurality of candidate face numbers, various performance data of the target device are obtained during the process of the vertex shader of the target device rendering a specified image corresponding to that candidate face number, and these data are used as a performance data set corresponding to that candidate face number; wherein, the specified image corresponding to each candidate face number is: an image determined based on the sum of the face numbers of the placed objects in the preset scene and the preset models corresponding to that candidate face number, and the face number to be rendered by the vertex shader is that candidate face number; the performance data set corresponding to each candidate face number includes: the vertex shader's execution time, the frame rate of the target device, and the percentage of GPU utilization of the vertex shader; The target time for the vertex shader is determined based on the preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group. Each target performance data group is determined to have a frame rate that is not less than the baseline frame rate and a time consumption that is less than the target time consumption. The target number of the target device is determined based on the maximum and minimum number of facets among the candidate facets corresponding to each target performance data group.

2. The method according to claim 1, characterized in that, The specified screen corresponding to each candidate face count is: the screen obtained by placing each preset model with a face count summed to the candidate face count in the preset scene; For each of the preset multiple candidate face counts, the following performance data of the target device are obtained during the process of the vertex shader of the target device rendering a specified image corresponding to that candidate face count: For each of the preset multiple candidate face numbers, obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face in the specified image corresponding to that candidate face number.

3. The method according to claim 1, characterized in that, The specified image corresponding to each candidate face count is: an image obtained by placing a preset model with a preset face count in the preset scene, and the preset model is rendered a specified number of times for each face; the specified number of times is: the ratio of the candidate face count to the preset face count; For each of the preset multiple candidate face counts, the following performance data of the target device are obtained during the process of the vertex shader of the target device rendering a specified image corresponding to that candidate face count: For each of the preset candidate face numbers, obtain various performance data of the target device during the process of the vertex shader of the target device rendering each face of the preset model according to the specified number of times.

4. The method according to any one of claims 1-3, characterized in that, Before obtaining various performance data of the target device during the process of rendering a specified image corresponding to that candidate face number in the vertex shader of the target device for each of the preset multiple candidate face numbers, the method further includes: Multiple candidate face counts are determined, and using preset scenes and various preset models, the specified screen corresponding to each candidate face count is determined.

5. The method according to claim 1, characterized in that, The number of target devices is multiple; the method further includes: Determine the minimum and maximum number of target faces for each target device; According to a predetermined selection rule regarding the number of faces interval, each reference number of faces is selected within the range of the number of faces formed by the minimum and the maximum values; The maximum value, the minimum value, and the number of reference surfaces are determined as the number of calibration surfaces for each target device.

6. The method according to claim 5, characterized in that, The step of selecting a reference number of faces within the range of faces formed by the minimum and maximum values, according to a predetermined selection rule regarding face number intervals, includes: According to a preset step size, within the range of faces formed by the minimum and maximum values, select each reference face number.

7. The method according to claim 1, characterized in that, The determination of the target execution time of the vertex shader based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group includes: Based on the preset baseline frame rate, calculate the baseline time required to render one frame. Calculate the first product of the baseline latency and the reserved performance of the graphics card; The first product is calculated and the second product of the maximum GPU utilization percentage included in each performance data group is used as the target time for the vertex shader.

8. A face count determining device, characterized in that, The device includes: The data acquisition module is used to acquire, for each of a preset plurality of candidate face counts, various performance data of the target device during the process of the vertex shader of the target device rendering a specified screen corresponding to that candidate face count, as a performance data set corresponding to that candidate face count; wherein, the specified screen corresponding to each candidate face count is: a screen determined based on the sum of the face counts placed in a preset scene and each preset model corresponding to that candidate face count, and the face count to be rendered by the vertex shader is that candidate face count; the performance data set corresponding to each candidate face count includes: the vertex shader's execution time, the frame rate of the target device, and the percentage of GPU utilization of the vertex shader; The target time determination module is used to determine the target time of the vertex shader based on a preset baseline frame rate and the maximum GPU utilization percentage included in each performance data group. The data group determination module is used to determine each target performance data group that includes a frame rate not less than the baseline frame rate and a time consumption difference from the target time consumption less than a preset difference threshold. The target surface number determination module is used to determine the target surface number of the target device based on the maximum and minimum surface number among the candidate surface numbers corresponding to each target performance data group.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7.