Equipment performance detection method and device, equipment and storage medium
By gradually increasing the number of three-dimensional models, rendering and displaying and recording frame rates, device performance evaluation information is generated, which solves the problem of low device performance detection efficiency in the existing technology and improves application development efficiency.
Patent Information
- Application Number
- CN202310361730.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
When developing applications that run virtual scenes, existing technologies require multiple rounds of modification and testing, resulting in low device performance detection efficiency and affecting development and testing efficiency.
By obtaining the specified three-dimensional model corresponding to the target application, gradually increasing the number of models for rendering display, and recording the number of triangles rendered at the specified frame rate, generating device performance evaluation information to indicate the smoothness of the virtual scene.
Quickly determine how to adjust the number of triangles in the 3D model of the virtual scene, reduce multiple modifications and tests, and improve application development efficiency.
Smart Images

Figure CN118733410A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and in particular to a device performance detection method, apparatus, device and storage medium. Background Art
[0002] In the process of developing applications that run virtual scenes, developers need to test the performance of various types of computer devices when running the applications, so as to adjust the applications so that the applications can run smoothly on a variety of computer devices.
[0003] In the related art, the process of detecting the performance of a computer device when running an application can be performed through a pre-set test tool; for example, a developer / tester can install the test tool in a computer device, open the application's installation package / resource package through the test tool to run the application, and the test tool will record the frame rate of the application's virtual scene during runtime. If the frame rate is low, the requirements for device performance for the operation of the virtual scene can be reduced by reducing the number of faces of the three-dimensional model of the virtual object in the virtual scene.
[0004] However, in the above solution, developers are usually required to perform multiple rounds of modification and testing on the application model before they can complete the development of the application, which has a great impact on the efficiency of application development and testing. Summary of the invention
[0005] The embodiments of the present application provide a device performance detection method, apparatus, device and storage medium, which can improve the efficiency of device performance detection. The technical solution is as follows:
[0006] According to one aspect of an embodiment of the present application, a device performance detection method is provided, the method being executed by a computer device, the method comprising:
[0007] Acquire a specified three-dimensional model corresponding to a target application; the target application is an application for running a virtual scene; the specified three-dimensional model is composed of at least two triangles;
[0008] Rendering and displaying the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional model;
[0009] Obtain the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate;
[0010] Based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate, device performance evaluation information is generated; the device performance evaluation information is used to indicate the smoothness of the computer device when displaying the virtual scene.
[0011] According to one aspect of an embodiment of the present application, a device performance detection apparatus is provided, the apparatus comprising:
[0012] A model acquisition module, used to acquire a specified three-dimensional model corresponding to a target application; the target application is an application for running a virtual scene; the specified three-dimensional model is composed of at least two triangles;
[0013] A rendering module, configured to render and display the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional models;
[0014] A quantity acquisition module, used to acquire the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate;
[0015] A generation module is used to generate device performance evaluation information based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate; the device performance evaluation information is used to indicate the smoothness of the computer device when displaying the virtual scene.
[0016] In a possible implementation, the model acquisition module is used to:
[0017] Display a model setting interface, wherein the model setting interface includes a file upload entry;
[0018] In response to receiving a first model file uploaded based on the file upload portal, a model indicated by the first model file is determined as the designated three-dimensional model.
[0019] In a possible implementation, the model acquisition module is used to:
[0020] Parsing a second model file in a resource package of the target application;
[0021] The designated three-dimensional model is acquired based on the second model file.
[0022] In a possible implementation manner, the second model file is at least one model file among the model files used to run the virtual scene;
[0023] The model acquisition module is used to:
[0024] Acquire model complexity information of the second model file; the model complexity information is used to indicate the complexity of the three-dimensional model indicated by the second model file;
[0025] A template three-dimensional model matching the model complexity information is determined from at least two template three-dimensional models as the designated three-dimensional model.
[0026] In a possible implementation, the second model file is a reference file other than the model file used to run the virtual scene;
[0027] The model acquisition module is used to acquire the three-dimensional model indicated by the second model file as the designated three-dimensional model.
[0028] In a possible implementation manner, the device further includes:
[0029] A light and shadow effect acquisition module, used for acquiring the light and shadow effect corresponding to the virtual scene before the rendering module renders and displays the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional model;
[0030] The rendering module is used to render and display the specified three-dimensional model based on the light and shadow effect in a manner of increasing the number of the specified three-dimensional models.
[0031] In a possible implementation, the rendering module is used to:
[0032] Displaying a light and shadow effect setting interface, wherein the light and shadow effect setting interface includes light and shadow effect setting options;
[0033] In response to receiving a setting operation on the light and shadow effect setting option, the light and shadow effect corresponding to the setting operation is acquired.
[0034] In a possible implementation, the rendering module is used to:
[0035] Parsing the resource package of the target application to obtain light and shadow configuration information of the virtual scene; the light and shadow configuration information is used to indicate the light and shadow effects corresponding to the virtual scene;
[0036] Based on the light and shadow configuration information, the light and shadow effects corresponding to the virtual scene are obtained.
[0037] In a possible implementation manner, the device further includes:
[0038] a processing capability acquisition module, used for acquiring processor capability information of the computer device before the generation module generates device performance evaluation information based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate, wherein the processor capability information is used to indicate the computing capability of the processor in the computer device;
[0039] The generation module is used to generate the device performance evaluation parameter based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate and the processor capability information.
[0040] In a possible implementation manner, the processor capability information is used to indicate at least one of the following information:
[0041] The integer computing capability of the central processing unit in the computer device;
[0042] The floating point computing capability of the central processing unit in the computer device;
[0043] The self-built project performance of the graphics processor in the computer device.
[0044] In a possible implementation, the rendering module is used to render and display the specified three-dimensional models starting from the specified position of the display screen of the computer device in a specified position order in an increasing manner of the number of the specified three-dimensional models.
[0045] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the above-mentioned device performance detection method.
[0046] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the above-mentioned device performance detection method.
[0047] On the other hand, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the device performance detection method provided in the above-mentioned various optional implementations.
[0048] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0049] In the process of optimizing the application, the specified three-dimensional model corresponding to the target application can be obtained, and then the specified three-dimensional model can be rendered and displayed in a manner of increasing the number of the specified three-dimensional model. At the same time, the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate can be obtained, thereby obtaining the limit of the number of triangles rendered and displayed by the current computer device at the required frame rate, so that developers can quickly determine how to adjust the number of triangles in the three-dimensional model of the virtual scene, without having to modify the application multiple times and test the frame rate of the computer device when running the virtual scene of the application, thereby improving the development efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0051] Figure 2 is a flow chart of a device performance detection method provided by an embodiment of the present application;
[0052] Figure 3 It is a framework diagram for implementing the equipment performance detection involved in this application;
[0053] Figure 4 is a flow chart of a device performance detection method provided by an embodiment of the present application;
[0054] Figure 5 is a flow chart of a device performance detection method provided by an embodiment of the present application;
[0055] Figure 6 is a flow chart of a device performance detection method provided by an embodiment of the present application;
[0056] Figure 7 is a flow chart of a device performance detection method provided by an embodiment of the present application;
[0057] Figure 8 yes Figure 7 A schematic diagram of a stress test of a GPU self-built project rendering scene involved in the illustrated embodiment;
[0058] Fig. 9 yes Figure 7 A schematic diagram of pressure measurement of the number of triangle faces involved in the illustrated embodiment;
[0059] Fig.10 yes Figure 7 The entire computer equipment performance stress test flow chart involved in the illustrated embodiment;
[0060] Fig.11 yes Figure 7 A schematic diagram of the integer computing capability stress test involved in the illustrated embodiment;
[0061] Fig.12 yes Figure 7 The core code for calculating pi involved in the illustrated embodiment;
[0062] Fig.13 yes Figure 7 A schematic diagram of stress testing of CPU floating point computing capability involved in the illustrated embodiment;
[0063] Fig.14 yes Figure 7 The formula of the elimination method involved in the illustrated embodiment;
[0064] Fig.15 yes Figure 7 A schematic diagram of a GPU self-built project performance stress test involved in the illustrated embodiment;
[0065] Fig.16 yes Figure 7 A schematic diagram of a tree material stress test using a GPU self-built demo according to the embodiment shown;
[0066] Fig.17 yes Figure 7 A schematic diagram of pressure measurement of a specified number of model faces involved in the illustrated embodiment;
[0067] Fig.18 yes Figure 7 Schematic diagram of extreme stress test scores in various dimensions involved in the illustrated embodiment;
[0068] Fig.19 is a block diagram of a device performance detection apparatus provided by an embodiment of the present application;
[0069] Fig. 20 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0071] 1) Performance testing
[0072] It refers to testing the system's performance indicators by simulating a variety of normal, peak, and abnormal load conditions through test tools.
[0073] 2) Frames Per Second (FPS)
[0074] The definition in the field of imaging refers to the number of frames transmitted per second, which generally refers to the number of frames in an animation or video.
[0075] 3) Central Processing Unit (CPU) usage
[0076] Refers to the CPU usage occupied by running programs, which can be used to measure the running application status of a computer device at a certain point in time.
[0077] Figure 1 A schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. The implementation environment may include: a first terminal 110 and a server 120.
[0078] The first terminal 110 is installed and runs an application 111, which can be an application developed based on a game engine. When the first terminal runs the application 111, the user interface of the application 111 is displayed on the screen of the first terminal 110. Optionally, the application 111 can be any one of a role-playing game (RPG), a multiplayer online tactical competitive game (MOBA), a battle royale shooting game, and a simulation game (SLG). The first terminal 110 is a terminal used by the second user 112. The second user 112 uses the first terminal 110 to control a virtual object A located in a virtual scene to perform activities. The virtual object A can be called the main control virtual object of the first user 112. Schematically, the virtual object A is a first virtual character, such as a simulated character or an anime character.
[0079] Figure 1 Only one terminal is shown, but in different embodiments, there are multiple other terminals that can access the server 120. Optionally, there are one or more terminals corresponding to the developer, and a development and editing platform of a test tool for testing the performance of the terminal when running an application is installed on the terminal. The developer can edit and update the test tool on the terminal, and transmit the updated test tool installation package to the server 120 via a wired or wireless network. The first terminal 110 can download the test tool installation package from the server 120 to update the application.
[0080] The first terminal 110 and other terminals are connected to the server 120 via a wireless network or a wired network.
[0081] The server 120 includes at least one of a single server, a server cluster consisting of multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for the test tool. Optionally, the server 120 undertakes the main computing work and the terminal undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work and the terminal undertakes the main computing work; or, the server 120 and the terminal adopt a distributed computing architecture for collaborative computing.
[0082] In an illustrative example, the server 120 includes a memory 121, a processor 122, a user account database 123, a test service module 124, and a user-oriented input / output interface (I / O interface) 125. The processor 122 is used to load instructions stored in the server 120 and process data in the user account database 123 and the test service module 124; the user account database 123 is used to store data of user accounts used by the first terminal 110 and other terminals, such as the user account's avatar, the user account's nickname, and the service area where the user account is located; the test service module 124 is used to provide and maintain the installation package of the test tool, etc.; the user-oriented I / O interface 125 is used to establish communication and exchange data with the first terminal 110 through a wireless network or a wired network.
[0083] In related technologies, after the development of various game resources is completed, the overall resources will be packaged; performance data will be collected manually using test tools, and at this time, the focus will be on performance parameters such as FPS; when performance data does not meet the standards, if it is a bottleneck such as art resource rendering, trial optimizations such as reducing the number of triangles will usually be performed; if it is a bottleneck such as program logic, operations such as reducing logical calculations will usually be performed; after trial optimization, packaging testing will be performed.
[0084] In the above solution, when the performance does not meet the requirements, since the optimization can only be carried out tentatively, the above process will be iterated repeatedly until the problem is fixed. Since the overall resource packaging and testing are very time-consuming, the entire optimization process will be very lengthy, resulting in a very slow R&D process.
[0085] The solution shown in the embodiment of the present application can pre-test the performance of the target computer device. The user can obtain the CPU shaping and floating-point computing time and score of the target computer device, the graphics processing capability score of the graphics processing unit (GPU) of the target computer device, and the maximum number of triangle faces of the target computer device under the target frame rate. By obtaining these data, the R&D personnel can obtain various computing capabilities of the computer device, so that there are data standards to refer to in the process of starting production and optimization, thereby speeding up the entire R&D optimization process.
[0086] Please refer to Figure 2 , which shows a flow chart of a device performance detection method provided by an embodiment of the present application. For the sake of convenience, only the computer device that executes each step is introduced and described. The above-mentioned computer device can be the above-mentioned Figure 1 The first terminal 110 shown; the method may include the following steps:
[0087] Step 201: Acquire a designated three-dimensional model corresponding to a target application; the target application is an application for running a virtual scene; the designated three-dimensional model is composed of at least two triangles.
[0088] In an embodiment of the present application, the specified three-dimensional model corresponding to the above-mentioned target application can be a model that matches the three-dimensional model in the virtual scene of the target application.
[0089] For example, the specified three-dimensional model may be a three-dimensional model in the target application that can reflect the average complexity / maximum complexity of the three-dimensional model in the virtual scene.
[0090] Alternatively, the above-mentioned specified three-dimensional model may be a three-dimensional model set by a developer / tester and capable of reflecting the average complexity / maximum complexity of the three-dimensional model in the virtual scene.
[0091] Alternatively, the designated three-dimensional model may be a three-dimensional model that can reflect the average complexity / maximum complexity of the three-dimensional models in the virtual scene among a plurality of pre-set three-dimensional models.
[0092] Step 202: Rendering and displaying the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional model.
[0093] In an embodiment of the present application, through the testing tool, the computer device can gradually increase the number of specified three-dimensional models during the process of rendering and displaying the specified three-dimensional models.
[0094] When adding the specified three-dimensional model incrementally, the computer device may add one specified three-dimensional model each time, or add multiple specified three-dimensional models each time, through the test tool.
[0095] When incrementing the specified three-dimensional model, the computer device may increment the specified three-dimensional model at a specified time interval, for example, incrementing the specified three-dimensional model once every 1 second.
[0096] In a possible implementation, rendering and displaying the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional model includes:
[0097] Starting from the specified position of the display screen of the computer device, the specified three-dimensional model is rendered and displayed in a manner of increasing the number of the specified three-dimensional models in the specified position sequence.
[0098] For example, the computer device may render and display the specified three-dimensional model starting from the lower left corner of the display screen, in a sequence from left to right and from front to back, in a manner of increasing the number of the specified three-dimensional models.
[0099] Specifically, the computer device starts rendering and displaying the first specified three-dimensional model from the lower left corner of the display screen, then displays the second specified three-dimensional model on the right side of the first specified three-dimensional model, displays the third specified three-dimensional model on the right side of the second specified three-dimensional model, and so on; when the number of specified three-dimensional models at the bottom of the display screen is full, the next specified three-dimensional model is displayed behind the first specified three-dimensional model, and then the next specified three-dimensional model is displayed on the right side of the specified three-dimensional model, and so on.
[0100] Through the above scheme, the computer equipment can display the specified three-dimensional models incrementally according to the specified rules, optimize the layout of the specified three-dimensional models, avoid position conflicts between the specified three-dimensional models, and at the same time, increase the number of specified three-dimensional models that can be displayed as much as possible, thereby ensuring the test effect on high-performance computer equipment.
[0101] Step 203: Obtain the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate.
[0102] In an embodiment of the present application, the computer device can read the frame rate of the currently displayed specified three-dimensional model after each increment of the number of specified three-dimensional models, and record the number of specified three-dimensional models rendered and displayed at the specified frame rate, and then determine the number of triangles in the specified three-dimensional model rendered and displayed at the specified frame rate based on the number of specified three-dimensional models rendered and displayed at the specified frame rate and the number of triangles contained in the specified three-dimensional model.
[0103] Among them, when the computer device reads the frame rate of the currently displayed specified three-dimensional model after each increment of the number of specified three-dimensional models, the average value of the frame rate of the currently displayed specified three-dimensional model during the time period from the current increment of the number of specified three-dimensional models to the next increment of the number of specified three-dimensional models can be obtained as the number of specified three-dimensional models rendered and displayed at the current frame rate.
[0104] For example, a computer device can count the number of frames displayed in the time period from the current increase in the number of specified three-dimensional models to the next increase in the number of specified three-dimensional models, and divide the number of frames by the length of the time period from the current increase in the number of specified three-dimensional models to the next increase in the number of specified three-dimensional models to obtain the number of specified three-dimensional models rendered and displayed at the current frame rate.
[0105] The specified frame rate may be a frame rate preset by a developer; or, the specified frame rate may be a frame rate set by a user of the test tool.
[0106] Step 204: Generate device performance evaluation information based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate; the device performance evaluation information is used to indicate the smoothness of the computer device when displaying the virtual scene.
[0107] In an embodiment of the present application, the above-mentioned device performance evaluation information may include the number of triangles in a specified three-dimensional model rendered and displayed at a specified frame rate.
[0108] Alternatively, the computer device may also calculate a score based on the number of triangles in a specified three-dimensional model rendered and displayed at a specified frame rate, and add the score to the above-mentioned device performance evaluation information.
[0109] In an embodiment of the present application, the testing tool may also display or output the above-mentioned device performance evaluation information.
[0110] To summarize, in the scheme shown in the embodiment of the present application, in the process of optimizing the application, a specified three-dimensional model corresponding to the target application can be obtained, and then the specified three-dimensional model can be rendered and displayed in a manner of increasing the number of the specified three-dimensional model, and at the same time, the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate is obtained, thereby obtaining the limit on the number of triangles rendered and displayed by the current computer device at the required frame rate, so that developers can quickly determine how to adjust the number of triangles in the three-dimensional model of the virtual scene, without having to modify the application multiple times and test the frame rate of the computer device when running the virtual scene of the application, thereby improving the development efficiency of the application.
[0111] The solution shown in the above embodiment of the present application can be applied to the development process of any application based on a virtual scene. Figure 3 , which shows the implementation framework diagram of the device performance detection involved in this application.
[0112] like Figure 3 As shown, at the software level, software applications such as a test tool 31 are running in the operating system of the computer device; wherein, when testing the performance of the computer device when running a virtual scene of an application 32, the test tool 31 can obtain a specified three-dimensional model 33 that matches the complexity of the three-dimensional model in the virtual scene of the application 32, and render and display the specified three-dimensional model 33 in an increasing manner, in which process the frame rate of each number of specified three-dimensional models when displayed is recorded, the number of triangles 34 in the specified three-dimensional model rendered and displayed at the specified frame rate is determined, and then based on the number of triangles 34 in the specified three-dimensional model rendered and displayed at the specified frame rate, the device performance evaluation information 35 is output.
[0113] Through the above-mentioned device performance evaluation information 35, the developer of the application 32 can quickly and accurately determine the appropriate value of the number of triangles contained in the three-dimensional model in the virtual scene of the application, thereby accelerating the development process of the application.
[0114] based on Figure 2 For the examples shown, please refer to Figure 4 , which shows a flow chart of a device performance detection method provided by an embodiment of the present application. For the sake of convenience, only the computer device is used as the execution subject of each step for introduction and description. Figure 4 As shown above Figure 2 Step 201 in the illustrated embodiment may be implemented as steps 201a and 201b:
[0115] Step 201a: Display the model setting interface, which includes a file upload entry.
[0116] In an embodiment of the present application, the above-mentioned testing tool may provide a model setting interface, which may include a file upload entry. By clicking on the file upload entry, the user may upload a pre-set model file to the testing tool.
[0117] Step 201b: In response to receiving the first model file uploaded based on the file upload portal, determining the model indicated by the first model file as the designated three-dimensional model.
[0118] In an embodiment of the present application, when the testing tool receives the first model file uploaded based on the file upload portal, it can generate a specified three-dimensional model based on the first model file.
[0119] The solution shown in the embodiment of the present application can be applied to various scenarios such as before and during application development.
[0120] For example, before developing an application, developers can pre-set a specified 3D model that can reflect the average complexity or maximum complexity of the 3D model in the virtual scene based on the planning of the virtual scene. By testing the specified 3D model, the developer can determine the limit of the number of rendered display triangles at each specified frame rate when various models of computer devices run the virtual scene. This allows the developer to control the number of triangles in the 3D model in the virtual scene in a targeted manner during the development process, thereby improving the efficiency of application development.
[0121] For another example, during the application development process, when the developer initially develops the three-dimensional model in the virtual scene, he or she can select a three-dimensional model that can reflect the average complexity or maximum complexity of the three-dimensional model in the virtual scene as the above-mentioned designated three-dimensional model. When the virtual scene is run by various models of computer devices through the designated three-dimensional model, the limit of the number of rendered and displayed triangles at each designated frame rate can be tested. Since the designated three-dimensional model is closer to the three-dimensional model actually displayed in the virtual scene, it can more accurately test the limit of the number of rendered and displayed triangles at each designated frame rate when the virtual scene is run by various models of computer devices.
[0122] based on Figure 2 For the examples shown, please refer to Figure 5 , which shows a flow chart of a device performance detection method provided by an embodiment of the present application. For the sake of convenience, only the computer device is used as the execution subject of each step for introduction and description. Figure 5 As shown above Figure 2 Step 201 in the illustrated embodiment may be implemented as steps 201c and 201d:
[0123] Step 201c: Parse the second model file in the resource package of the target application.
[0124] In an embodiment of the present application, the above-mentioned test tool may provide a setting interface, which may include a resource package upload entry. By clicking the resource package upload entry, the user may upload the resource package of the application to the test tool. After the test tool obtains the above-mentioned resource package, it may parse the resource package to obtain the above-mentioned second model file.
[0125] The second model file mentioned above may be all the model files in the resource package.
[0126] Alternatively, the second model file may be one or more model files specified in the resource package. For example, the second model file may be a model file in the resource package whose file name contains a specified field. The file name of the model file may be preset by the developer.
[0127] Step 201d: Acquire a specified three-dimensional model based on the second model file.
[0128] Through the scheme shown in the embodiment of the present application, on the one hand, the computer device can automatically obtain the specified three-dimensional model through resource package parsing, without the need for the user to upload the model file separately, thereby improving the testing efficiency; on the other hand, the above-mentioned testing tool can be compatible with test items that require the resource package of the application to be implemented, thereby improving the compatibility of the testing tool.
[0129] In a possible implementation, the second model file is at least one model file among the model files used to run the virtual scene;
[0130] Acquiring a specified three-dimensional model based on the second model file includes:
[0131] Acquire model complexity information of the second model file; the model complexity information is used to indicate the complexity of the three-dimensional model indicated by the second model file;
[0132] A template three-dimensional model matching the model complexity information is determined from at least two template three-dimensional models as a designated three-dimensional model.
[0133] In an embodiment of the present application, a computer device can directly obtain at least one model file among the model files used to run the virtual scene as the above-mentioned second model file. The complexity of the three-dimensional model generated by the second model file can be more closely matched with the average complexity / maximum complexity of the three-dimensional model in the virtual scene. On this basis, a specified three-dimensional model with matching complexity is determined from a plurality of pre-set three-dimensional models, which can simulate as realistically as possible the limit on the number of triangles rendered and displayed at each specified frame rate when computer devices of various models run the virtual scene.
[0134] The above-mentioned model complexity information may include the number of triangles contained in the three-dimensional model, the material of the three-dimensional model, etc.
[0135] In a possible implementation, the second model file is a reference file other than the model file used to run the virtual scene;
[0136] Acquiring a specified three-dimensional model based on the second model file includes:
[0137] The three-dimensional model indicated by the second model file is acquired as the designated three-dimensional model.
[0138] In an embodiment of the present application, the above-mentioned second model file may also be a model file other than the model file used by the virtual scene, and the second model file may be set by the developer; optionally, the second model file may be uploaded to the testing tool together with the resource package through a plug-in file or the like.
[0139] Through the above solution, developers can freely set the complexity of a specified three-dimensional model, thereby increasing the flexibility of testing the limit of the number of rendering display triangles at various specified frame rates when running the virtual scene on various models of computer devices.
[0140] based on Figure 2 For the examples shown, please refer to Figure 6, which shows a flow chart of a device performance detection method provided by an embodiment of the present application. For the sake of convenience, only the computer device is used as the execution subject of each step for introduction and description. Figure 6 As shown above Figure 2 The embodiment shown may further include step 205, the above Figure 2 Step 202 in the illustrated embodiment may be implemented as step 202a:
[0141] Step 205: Obtain the light and shadow effects corresponding to the virtual scene.
[0142] The light and shadow effects may include at least one of light source effects and shadow effects.
[0143] The above light source effects may include the number of light sources, light source brightness, light source angle, and the like.
[0144] The shadow effect may include shadow level and the like.
[0145] Step 202a: Rendering and displaying the designated three-dimensional models based on light and shadow effects in a manner of increasing the number of designated three-dimensional models.
[0146] In an embodiment of the present application, when rendering and displaying a specified three-dimensional model, the computer device can also consider the lighting effects corresponding to the virtual scene, and can simulate as realistically as possible the limit on the number of triangles rendered and displayed at each specified frame rate when various models of computer devices run the virtual scene.
[0147] In a possible implementation, obtaining the light and shadow effects corresponding to the virtual scene includes:
[0148] Display the light and shadow effect setting interface, which contains light and shadow effect setting options;
[0149] In response to receiving a setting operation on a light and shadow effect setting option, a light and shadow effect corresponding to the setting operation is acquired.
[0150] In an embodiment of the present application, the above-mentioned testing tool can provide a light and shadow effect setting interface, which can include a light and shadow effect setting option. By clicking the light and shadow effect setting option, the user can set a customized light and shadow effect, thereby improving the customization performance of the light and shadow effect and improving the controllability of the light and shadow effect.
[0151] In a possible implementation, obtaining the light and shadow effects corresponding to the virtual scene includes:
[0152] Parse the resource package of the target application to obtain the light and shadow configuration information of the virtual scene; the light and shadow configuration information is used to indicate the light and shadow effects corresponding to the virtual scene;
[0153] Based on the light and shadow configuration information, obtain the light and shadow effects corresponding to the virtual scene.
[0154] In an embodiment of the present application, a computer device can also automatically obtain the light and shadow configuration information of a virtual scene by parsing a resource package, without the need for a user to configure the light and shadow effects separately. At the same time, it can also be compatible with test projects that require the resource package of an application program to be implemented, thereby reducing the operational complexity of developers, improving test efficiency, and ensuring the compatibility of test tools.
[0155] The above light and shadow configuration information may be pre-added to the resource package of the target application by the developer.
[0156] based on Figure 2 For the examples shown, please refer to Figure 7 , which shows a flow chart of a device performance detection method provided by an embodiment of the present application. For the sake of convenience, only the computer device is used as the execution subject of each step for introduction and description. Figure 7 As shown above Figure 2 The illustrated embodiment may further include step 206, the above Figure 2 Step 204 in the illustrated embodiment may be implemented as step 204a:
[0157] Step 206: Acquire processor capability information of the computer device, where the processor capability information is used to indicate the computing capability of the processor in the computer device.
[0158] In a possible implementation, the processor capability information is used to indicate at least one of the following information:
[0159] The integer computing power of the central processing unit in a computing device;
[0160] The floating point computing capability of the central processing unit in a computing device;
[0161] Self-built project performance of the graphics processor in the computer equipment.
[0162] Table 1 below shows a stress test of the target machine's CPU integer computing capability. The computer device can use a test tool to test the CPU's integer computing performance by calculating pi. As shown in Table 1, it shows the time consumption of calculating to 10,000 digits of pi.
[0163] Table 1
[0164] Java implementation, execution time: 7855ms Java implementation, execution time: 7856ms Java implementation, execution time: 7852ms Java implementation, execution time: 7859ms
[0165] Table 2 below shows the CPU floating point computing capability stress test of the target machine. The computer equipment can use the test tool to calculate the speed of solving the univariate N-order equation by Gaussian elimination method to stress the floating point computing capability of the target processor. As shown in Table 2, it shows the time consumption of the algorithm when N=1000.
[0166] Table 2
[0167] Java implementation, execution time: 11317ms Java implementation, execution time: 11226ms Java implementation, execution time: 11294ms Java implementation, execution time: 11402ms Java implementation, execution time: 11454ms
[0168] Please refer to Figure 8 , which shows a schematic diagram of a GPU self-built project rendering scene stress test involved in an embodiment of the present application, such as Figure 8 As shown in the figure, taking the generation of 100 trees in the scene as an example, the final average frame rate of the rendered scene is used for scoring, as shown in Figure 8 As shown in the figure, under the pressure of 100 trees, the current FPS is only 4 frames / s.
[0169] Table 3 shows the final performance stress test score. The second to fourth columns show the CPU integer capability calculation score, CPU floating point stress test score, and GPU self-built project score. These scores are obtained based on the stress test time of each model in various scenarios. For example, the time consumption of model 1 in the CPU integer computing capability scenario is 59186ms, which is 171 points according to the score calculation formula; the time consumption in the CPU floating point computing capability scenario is 32261ms, which is 29 points according to the score calculation formula; the GPU self-built project test frame rate is 2.3 frames, which is 230 points according to the score calculation formula. By performing various stress tests on the target model, you can see the scores in various dimensions, so that you can plan the model grading of subsequent new models.
[0170] Table 3
[0171]
[0172]
[0173] Please refer to Fig. 9 , which shows a schematic diagram of the triangle face number stress test involved in the embodiment of the present application. The user can upload the model and perform face number stress test for a specified frame rate, such as Fig. 9 In the scene shown, we can see the limit load of the specified building model on a certain model. From left to right and from top to bottom, the limit triangle face number is 10w at 40 frames, 16w at 30 frames, 22w at 25 frames, and 30w at 20 frames. Therefore, game developers can determine that the number of scene faces should be within 22w to run smoothly on this model at more than 25 frames.
[0174] Please refer to Fig.10, which shows the entire computer equipment performance stress test flow chart involved in the embodiment of the present application. First, the CPU shaping computing power stress test is performed to obtain the time consumption of the shaping stress test scenario; the CPU floating-point computing power stress test is performed to obtain the time consumption of the floating-point stress test scenario; the GPU self-built project performance stress test is performed to obtain the average frame rate of the GPU stress test scenario; the specified model face number stress test is performed to obtain the maximum face number of the model at 40, 30, 25, and 20 frames.
[0175] Please refer to Fig.11 , which shows a schematic diagram of the integer computing capability stress test involved in an embodiment of the present application; optionally, the computer device uses a test tool to first set a specific target number of pi digits, such as 1000, and then performs continuous algorithm iterations according to a specific iterative algorithm π=2+2 / 3+2 / 3*2 / 5+2 / 3*2 / 5*3 / 7+..., and determines whether the entire algorithm needs to continue to be executed according to the number of digits of π in the continuous iterative algorithm, thereby obtaining the final performance time.
[0176] Please refer to Fig.12 , which shows the core code for calculating pi involved in the embodiment of the present application; Fig.12 As shown, the original core calculation formula π=2+2 / 3+2 / 3*2 / 5+2 / 3*2 / 5*3 / 7+..., corresponding to the above core code, can be expressed as 2+2*a1 / b1+2*a2 / b2+2*a3 / b3+...
[0177] Please refer to Fig.13 , which shows a schematic diagram of CPU floating point computing capability stress testing involved in an embodiment of the present application; Fig.13 As shown, first set a specific number of eliminations, such as 1000, and then iterate continuously according to the following code. The specific algorithm is to eliminate the (n-1)×(n-1) equations in the n×n system of equations to form a new system of equations equivalent to the original system of equations. The (n-1)×(n-1) equations in the new system of equations only contain (n-1)×(n-1) unknowns; so the problem is transformed into solving a system of equations with (n-1)×(n-1) variables, so we can continue to eliminate variables, and so on, until the last system of equations is a linear system of equations with one variable; solve the last unknown from the last linear system of equations with one variable, and then gradually substitute it back into the previous system of equations to obtain all the unknowns and obtain the running time of the entire algorithm. Among them, the formula of the elimination method involved in the embodiment of the present application is as follows: Fig.14 shown.
[0178] The iterative code of the core relation in the elimination method is as follows:
[0179]
[0180] Among them, A, b and l correspond to the relational expressions α, β and l in the algorithm description 3-10, and the parameters of each relational expression are obtained through iterative recursion.
[0181] Please refer to Fig.15 , which shows a schematic diagram of the performance stress test of a GPU self-built project involved in an embodiment of the present application, such as Fig.15 As shown, first generate 100 trees; randomly place them in the entire space; rotate them smoothly at random angles at regular intervals, with the entire angle range between -30 degrees and +30 degrees; and count the average frame rate over a period of time.
[0182] Please refer to Fig.16 , which shows a schematic diagram of a GPU self-built demo stress test tree material involved in an embodiment of the present application, such as Fig.16 As shown in the figure, each tree is rendered using Unity's ShaderLab, and the material is relatively complex (trunk: Nature / TreeCreator Bark + leaves: Nature / Tree Creator Leaves); the material ball is as follows Fig.16 As shown (alphablend is turned on and depth writing is turned off), the scene has only one directional light, the trunk and leaves are input with basic texture maps and normal maps, and the leaf material is Alpha Tested (Alpha cutoff 0.5).
[0183] Please refer to Fig.17 , which shows a schematic diagram of stress testing the number of faces of a specified model involved in an embodiment of the present application, first obtaining the model uploaded by the user; continuously generating it sequentially from the lower left corner of the screen, from left to right and from front to back; continuously obtaining frame rate and number of faces data during the stress testing process; and finally obtaining the maximum number of faces at each frame rate level of 20 frames, 25 frames, 30 frames, and 40 frames.
[0184] Step 204a: Generate device performance evaluation parameters based on the number of triangles in the specified 3D model rendered and displayed at the specified frame rate and the processor capability information.
[0185] Please refer to Fig.18 , which shows a schematic diagram of the extreme stress test scores in various dimensions involved in the embodiments of the present application. First, the CPU integer computing power score is calculated, and the algorithm formula is score = N*60 / time consumed squared, and the number of pi digits N = 10000; the CPU floating-point computing power score, the algorithm formula is score = N*30 / time consumed squared, and the number of Gaussian elimination digits is N = 1000; the GPU self-built project stress test score, the algorithm formula is score = N*FPS / 100, and N is the number of stress test trees; the recommended number of faces for the specified model stress test is the limit number of faces in the stress test process. For example, if the maximum number of faces at 40 frames is 10w, then the number of faces of the corresponding scene under the target 40 frames cannot exceed 10w.
[0186] The embodiment of the present application implements a performance stress testing technology for client devices, which can comprehensively stress test various capabilities of the CPU and GPU, greatly facilitating the project team to build their own device performance gradient and plan the overall market layout of the game, and when new machines are launched, they can also quickly incorporate new devices into the existing performance gradient based on unified performance metrics; the specified model face number recommendation can provide the project team with various face number recommendations at the beginning of the project, greatly facilitating the project team's face number performance planning for the entire scene, and optimizing the performance convergence optimization time from the previous 10 people / day to 2 people.
[0187] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0188] Please refer to Fig.19 , which shows a block diagram of a device performance detection device provided by an embodiment of the present application. The device may include:
[0189] The model acquisition module 1901 is used to acquire a specified three-dimensional model corresponding to a target application; the target application is an application for running a virtual scene; the specified three-dimensional model is composed of at least two triangles;
[0190] A rendering module 1902, configured to render and display the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional models;
[0191] The number acquisition module 1903 is used to acquire the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate;
[0192] The generation module 1904 is used to generate device performance evaluation information based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate; the device performance evaluation information is used to indicate the smoothness of the computer device when displaying the virtual scene.
[0193] In a possible implementation, the model acquisition module 1901 is used to:
[0194] Display a model setting interface, wherein the model setting interface includes a file upload entry;
[0195] In response to receiving a first model file uploaded based on the file upload portal, a model indicated by the first model file is determined as the designated three-dimensional model.
[0196] In a possible implementation, the model acquisition module 1901 is used to:
[0197] Parsing a second model file in a resource package of the target application;
[0198] The designated three-dimensional model is acquired based on the second model file.
[0199] In a possible implementation manner, the second model file is at least one model file among the model files used to run the virtual scene;
[0200] The model acquisition module 1901 is used to:
[0201] Acquire model complexity information of the second model file; the model complexity information is used to indicate the complexity of the three-dimensional model indicated by the second model file;
[0202] A template three-dimensional model matching the model complexity information is determined from at least two template three-dimensional models as the designated three-dimensional model.
[0203] In a possible implementation, the second model file is a reference file other than the model file used to run the virtual scene;
[0204] The model acquisition module 1901 is used to acquire the three-dimensional model indicated by the second model file as the designated three-dimensional model.
[0205] In a possible implementation manner, the device further includes:
[0206] A light and shadow effect acquisition module, used for acquiring the light and shadow effect corresponding to the virtual scene before the rendering module 1902 renders and displays the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional model;
[0207] The rendering module 1902 is used to render and display the specified three-dimensional model based on the light and shadow effect in a manner of increasing the number of the specified three-dimensional models.
[0208] In a possible implementation, the rendering module 1902 is used to:
[0209] Displaying a light and shadow effect setting interface, wherein the light and shadow effect setting interface includes light and shadow effect setting options;
[0210] In response to receiving a setting operation on the light and shadow effect setting option, the light and shadow effect corresponding to the setting operation is acquired.
[0211] In a possible implementation, the rendering module 1902 is used to:
[0212] Parsing the resource package of the target application to obtain light and shadow configuration information of the virtual scene; the light and shadow configuration information is used to indicate the light and shadow effects corresponding to the virtual scene;
[0213] Based on the light and shadow configuration information, the light and shadow effects corresponding to the virtual scene are obtained.
[0214] In a possible implementation manner, the device further includes:
[0215] a processing capability acquisition module, used to acquire processor capability information of the computer device before the generation module 1904 generates device performance evaluation information based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate, wherein the processor capability information is used to indicate the computing capability of the processor in the computer device;
[0216] The generating module 1904 is used to generate the device performance evaluation parameter based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate and the processor capability information.
[0217] In a possible implementation manner, the processor capability information is used to indicate at least one of the following information:
[0218] The integer computing capability of the central processing unit in the computer device;
[0219] The floating point computing capability of the central processing unit in the computer device;
[0220] The self-built project performance of the graphics processor in the computer device.
[0221] In a possible implementation, the rendering module 1902 is used to render and display the specified three-dimensional model starting from a specified position of the display screen of the computer device in a specified position order in an increasing manner of the number of the specified three-dimensional models.
[0222] Fig. 20 The following is a block diagram of a computer device 2000 provided by an exemplary embodiment of the present application. The computer device 2000 may be a terminal device, such as a VR device, an AR device, a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), or an MP4 player (Moving Picture Experts Group Audio Layer IV). The computer device 2000 may also be referred to as a user device, a portable terminal, or other names.
[0223] Typically, the computer device 2000 includes a processor 2001 and a memory 2002 .
[0224] The memory 2002 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 2002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2002 is used to store at least one instruction, which is used to be executed by the processor 2001 to implement the method provided in the embodiment of the present application.
[0225] In some embodiments, the computer device 2000 may further include: a peripheral device interface 2003 and at least one peripheral device. Specifically, the peripheral device includes: at least one of a radio frequency circuit 2004 , a touch display screen 2005 , a camera 2006 , an audio circuit 2007 and a power supply 2008 .
[0226] In some embodiments, the computer device 2000 further includes one or more sensors 2009 , including but not limited to: an acceleration sensor 2010 , a gyroscope sensor 2011 , a pressure sensor 2012 , an optical sensor 2013 , and a proximity sensor 2014 .
[0227] Those skilled in the art will appreciate that the structure shown above does not limit the computer device 2000 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0228] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set implements the above-mentioned device performance detection method when executed by a processor.
[0229] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned device performance detection method.
[0230] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0231] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A device performance detection method, It is characterized in that The method is performed by a computer device, and the method comprises: Acquire a specified three-dimensional model corresponding to a target application; the target application is an application for running a virtual scene; the specified three-dimensional model is composed of at least two triangles; Rendering and displaying the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional model; Obtain the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate; Based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate, device performance evaluation information is generated; the device performance evaluation information is used to indicate the smoothness of the computer device when displaying the virtual scene.
2. The method according to claim 1, It is characterized in that The step of obtaining a specified three-dimensional model corresponding to the target application comprises: Display a model setting interface, wherein the model setting interface includes a file upload entry; In response to receiving a first model file uploaded based on the file upload portal, a model indicated by the first model file is determined as the designated three-dimensional model.
3. The method according to claim 1, It is characterized in that The step of obtaining a specified three-dimensional model corresponding to the target application comprises: Parsing a second model file in a resource package of the target application; The designated three-dimensional model is acquired based on the second model file.
4. The method according to claim 3, It is characterized in that The second model file is at least one model file among the model files used to run the virtual scene; The acquiring the specified three-dimensional model based on the second model file includes: Acquire model complexity information of the second model file; the model complexity information is used to indicate the complexity of the three-dimensional model indicated by the second model file; A template three-dimensional model matching the model complexity information is determined from at least two template three-dimensional models as the designated three-dimensional model.
5. The method according to claim 3, It is characterized in that The second model file is a reference file other than the model file used to run the virtual scene; The acquiring the specified three-dimensional model based on the second model file includes: The three-dimensional model indicated by the second model file is acquired as the designated three-dimensional model.
6. The method according to claim 1, It is characterized in that Before rendering and displaying the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional models, the method further includes: Obtaining light and shadow effects corresponding to the virtual scene; The rendering and displaying of the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional model comprises: The designated three-dimensional models are displayed based on the light and shadow effect rendering in a manner of increasing the number of the designated three-dimensional models.
7. The method according to claim 6, It is characterized in that The obtaining of the light and shadow effects corresponding to the virtual scene includes: Displaying a light and shadow effect setting interface, wherein the light and shadow effect setting interface includes light and shadow effect setting options; In response to receiving a setting operation on the light and shadow effect setting option, the light and shadow effect corresponding to the setting operation is acquired.
8. The method according to claim 6, It is characterized in that The obtaining of the light and shadow effects corresponding to the virtual scene includes: Parsing the resource package of the target application to obtain light and shadow configuration information of the virtual scene; the light and shadow configuration information is used to indicate the light and shadow effects corresponding to the virtual scene; Based on the light and shadow configuration information, the light and shadow effects corresponding to the virtual scene are obtained.
9. The method according to any one of claims 1 to 8, It is characterized in that Before generating the device performance evaluation information based on the number of triangles in the specified three-dimensional model rendered and displayed at the specified frame rate, the method further includes: Acquiring processor capability information of the computer device, where the processor capability information is used to indicate the computing capability of a processor in the computer device; The generating of device performance evaluation information based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate includes: The device performance evaluation parameter is generated based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate and the processor capability information.
10. The method according to claim 9, It is characterized in that The processor capability information is used to indicate at least one of the following information: The integer computing capability of the central processing unit in the computer device; The floating point computing capability of the central processing unit in the computer device; The self-built project performance of the graphics processor in the computer device.
11. The method according to any one of claims 1 to 8, It is characterized in that The rendering and displaying of the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional model comprises: Starting from the designated position of the display screen of the computer device, the designated three-dimensional models are rendered and displayed in a designated position sequence in an increasing manner of the number of the designated three-dimensional models.
12. A device for detecting equipment performance, It is characterized in that The device comprises: A model acquisition module, used to acquire a specified three-dimensional model corresponding to a target application; the target application is an application for running a virtual scene; the specified three-dimensional model is composed of at least two triangles; A rendering module, configured to render and display the specified three-dimensional model in a manner of increasing the number of the specified three-dimensional models; A quantity acquisition module, used to acquire the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate; A generation module is used to generate device performance evaluation information based on the number of triangles in the specified three-dimensional model rendered and displayed at a specified frame rate; the device performance evaluation information is used to indicate the smoothness of the computer device when displaying the virtual scene.
13. A computer device, It is characterized in that The computer device includes a processor and a memory, the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the device performance detection method according to any one of claims 1 to 11.
14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one computer program, and the computer program is loaded and executed by a processor to implement the device performance detection method according to any one of claims 1 to 11.
15. A computer program product, It is characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium; the computer program is read and executed by a processor of a computer device to implement the device performance detection method as described in any one of claims 1 to 11.
