Performance indicator visualization method and platform based on webGL
Through the webGL-based performance indicator visualization method, multiple game performance data are collected and displayed, and vertical and horizontal comparative evaluations are used to solve the limitations of single indicator collection in the existing technology and achieve a comprehensive understanding of game performance and optimization direction. clear.
Patent Information
- Application Number
- CN202111405562.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2041-11-24
AI Technical Summary
The existing technology can only collect a single performance indicator of the game, which cannot meet the needs of game optimization designers and cannot fully understand the game performance status.
Provides a performance indicator visualization method based on webGL, collects multiple performance data when the game is running through the SDK, displays and compares it in a chart, generates a performance evaluation report, uses vertical and horizontal comparison evaluation standards, and provides a comprehensive score .
It achieves comprehensive collection and visualization of game performance data, provides relative evaluation standards, helps game designers quickly and accurately understand performance indicators, and clarify the direction of performance optimization.
Smart Images

Figure CN113926199B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of WebGL performance optimization, and in particular relates to a performance indicator visualization method and platform based on WebGL. Background Art
[0002] Game project performance testing is an important basic data for game optimization. In the existing technology, only a single performance indicator of the test game can be collected, which has great limitations and cannot meet the needs of game optimization designers. Summary of the invention
[0003] In view of the defects of the prior art, the present invention provides a performance indicator visualization method and platform based on WebGL, which can effectively solve the above problems.
[0004] The technical solution adopted by the present invention is as follows:
[0005] The present invention provides a performance indicator visualization method based on WebGL, comprising the following steps:
[0006] Step 1: Collect performance data during game operation:
[0007] Specifically: Develop an SDK acquisition program; during the running of the tested game, the SDK acquisition program obtains various performance data of the game through the Unity engine or the native API interface of the mobile device, and stores it locally in the form of a folder; the folder name is composed of the package name of the game installation package and the test time;
[0008] Among them, the performance data of the game runtime includes:
[0009] The average frame rate, that is, the number of times the game screen is rendered per second;
[0010] CPU time consumption, and calculate the percentage of frames with CPU time greater than 33 milliseconds;
[0011] PSS memory, and calculate the PSS memory peak value, that is, the maximum value of the physical memory actually occupied on the mobile device during the game running;
[0012] The number of times the game engine calls the low-level graphics rendering interface, that is, the number of DrawCalls;
[0013] Temperature change of mobile device when running games;
[0014] During the game test, the number of triangles is counted, and the maximum value of the number of triangles is obtained, that is, Tris peak value;
[0015] Step 2: Display the locally stored performance data in a graphical form:
[0016] Specifically, for the obtained average frame rate, a trend chart of the average frame rate is prepared with the test time as the x-axis and the number of times the game screen is rendered per second as the y-axis;
[0017] For the obtained CPU time consumption, the number of frames is used as the x-axis and the time consumption of each frame is used as the y-axis to make a CPU time consumption trend chart;
[0018] For the acquired PSS memory, a PSS memory trend chart is made with the test time as the x-axis and the actual physical memory occupied on the mobile device during the game running as the y-axis;
[0019] For the obtained DrawCall times, a DrawCall times trend chart is made with the test time as the x-axis and the DrawCall times as the y-axis;
[0020] For the temperature change value obtained when the mobile device runs the game, a temperature change trend chart is made with the test time as the x-axis and the real-time temperature value when the mobile device runs the game as the y-axis;
[0021] For the number of triangles obtained, a triangle number trend chart is made with the test time as the x-axis and the number of triangles during the game test as the y-axis;
[0022] Step 3, compare and analyze various performance data when the game is running to obtain a game performance data evaluation report.
[0023] Preferably, step 3 is specifically:
[0024] Comparison of historical data:
[0025] For the performance data of each game during runtime, first search for the historical data of the game to determine whether there is the same historical performance data of the game. If so, compare the latest test data with the historical performance data of the game to obtain a comparison result.
[0026] Horizontal comparison of similar products:
[0027] According to the project's game type, game engine version and test data generation time, search in the database to obtain game performance data of other projects with the same game type, the same major version of the game engine, and similar test time, sort them by similarity, and select a set number of other project game performance data ranked first, compare them with the latest test data, and present the comparison results in the form of a bar chart.
[0028] Preferably, it also includes:
[0029] Step 4, comprehensive rating:
[0030] Assign weights to each game performance parameter based on the degree of direct impact it has on the player's gaming experience;
[0031] Vertical scoring: For each game performance data, the initial score is 100 points. It is compared with the historical game performance data closest to the time. If the game performance index is improved, points are added, otherwise, points are subtracted. In this way, the updated score of each game performance data is obtained; then the updated scores of various game performance data are summed according to the weight to obtain the vertical score;
[0032] Horizontal scoring: Take the average value of the set number of game performance data of other items ranked first obtained in step 3 as the benchmark. For each game performance data, the initial score is 100 points. Compared with the benchmark, if the game performance index is improved, add points, otherwise, subtract points, thereby obtaining the updated score of each game performance data; then sum the updated scores of various game performance data according to the weight to obtain the horizontal score.
[0033] The present invention also provides a performance indicator visualization platform based on WebGL, comprising:
[0034] Performance data collection module, used to collect performance data during game operation;
[0035] A chart display module is used to display the locally stored performance data in chart form;
[0036] The game performance data evaluation report generation module is used to compare and analyze various performance data during game runtime to obtain a game performance data evaluation report.
[0037] The performance indicator visualization method and platform based on WebGL provided by the present invention have the following advantages:
[0038] The present invention provides a performance indicator visualization method and platform based on webGL, which can comprehensively collect various indicator data in the game operation and provide two relative evaluation standards. One is vertical comparison, which is compared with the previous performance data of the project product, and the other is horizontal comparison, which is compared with several other similar projects on the platform. At the same time, each key data is displayed as a chart, and the iterative changes of various performance of the project and the advantages and disadvantages of the same type of products in the industry are clear at a glance. Then the project performance is scored as a whole, which is convenient for game designers to quickly and accurately know the game performance indicators. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of the flow of the performance indicator visualization method based on WebGL provided by the present invention. DETAILED DESCRIPTION
[0040] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0041] The present invention provides a performance indicator visualization method based on WebGL, referring to Figure 1 , including the following steps:
[0042] Step 1: Collect performance data during game operation:
[0043] Specifically: Develop SDK collection program; connect the project to SDK to conduct performance test of uniform duration; after the test is completed, upload the test results to the performance display platform.
[0044] During the running of the tested game, the SDK acquisition program obtains various performance data of the game through the Unity engine or the native API interface of the mobile device, and stores it locally in the form of a folder in a regular Json string format. The folder name is composed of the package name of the game installation package and the test time. Users can select the required test data and upload it to the server background.
[0045] Among them, the performance data of the game runtime includes:
[0046] The average frame rate (FPS) is the number of times the game screen is rendered per second. Generally speaking, the higher the frame rate, the smoother the screen the player sees and the better the experience. If the frame rate is too low, the player will obviously feel the screen freeze.
[0047] CPU time consumption, and obtain the percentage of frames with CPU time consumption greater than 33 milliseconds. Specifically, if the target frame rate of the game project is 30 frames per second, the average time consumption for each frame in 1 second is: 1s / 30=0.033s, i.e. 33 milliseconds. A high percentage of frames with CPU time consumption greater than 33 milliseconds indicates that the game frame rate is unstable, and players are more likely to frequently experience game screen freezes.
[0048] PSS memory and statistics are used to obtain the PSS memory peak value, that is, the maximum value of the physical memory actually occupied on the mobile device during the game running. The serious impact of this value is that if it exceeds the threshold specified by the Android system, the system will forcibly terminate the application, which will cause the game to crash directly, causing serious damage to the player's gaming experience.
[0049] The number of times the game engine calls the low-level graphics rendering interface, i.e., the number of DrawCalls. Each time the game engine calls the low-level graphics rendering interface, a certain amount of time overhead will be incurred. If the call is too frequent per unit time, it is easy to cause the above-mentioned frame rate drop problem.
[0050] The temperature change value of the mobile device when running the game; during the game test, the difference in the temperature change of the mobile device, if the change value is large and the heat is serious, it can indirectly reflect that the game may frequently perform expensive calculations.
[0051] During the game testing process, the number of triangles is counted and the maximum number of triangles is obtained, namely: Tris peak value (face); in the current mainstream game rendering method, the game screen is composed of a combination of triangles. A triangle consists of three vertices, and each vertex contains the data information required to render the game screen. The more triangles there are in the game screen, the more vertex sequences need to be processed, and the more time-consuming the rendering operation is.
[0052] Step 2: Display the locally stored performance data in a graphical form:
[0053] Specifically, for the obtained average frame rate, a trend chart of the average frame rate is prepared with the test time as the x-axis and the number of times the game screen is rendered per second as the y-axis;
[0054] For the obtained CPU time consumption, the number of frames is used as the x-axis and the time consumption of each frame is used as the y-axis to make a CPU time consumption trend chart;
[0055] For the acquired PSS memory, a PSS memory trend chart is made with the test time as the x-axis and the actual physical memory occupied on the mobile device during the game running as the y-axis;
[0056] For the obtained DrawCall times, a DrawCall times trend chart is made with the test time as the x-axis and the DrawCall times as the y-axis;
[0057] For the temperature change value obtained when the mobile device runs the game, a temperature change trend chart is made with the test time as the x-axis and the real-time temperature value when the mobile device runs the game as the y-axis;
[0058] For the number of triangles obtained, a triangle number trend chart is made with the test time as the x-axis and the number of triangles during the game test as the y-axis;
[0059] Specifically, when optimizing performance, different game performance data will have different emphases. For example, for CPU time consumption, compared with the average time consumption, it is generally more necessary to know the trend of CPU time consumption during the entire game operation, and at which frames the peak time consumption occurs, indicating that the frame may bring a stuttering experience to the player, so that the player operation or game scene with problems can be optimized in a targeted manner. Another example is memory usage. In addition to the size of memory usage, since memory usage is composed of many different types of resources, such as memory occupied by the program / texture images / 3D model mesh grids / audio and video files, etc., if you know the proportion of each component occupying memory, you can optimize a certain type of resource in a more targeted manner.
[0060] As for the game performance data collected above, in this step, it is further processed and processed into a chart form from which users can easily obtain key information.
[0061] For example, the CPU time consumption information uses the number of frames as the x-axis and the time consumption of each frame as the y-axis to create a CPU time consumption trend chart. Users can find the time consumption peak point that needs to be focused on at a glance based on the changes in the curve. There are also pie charts for viewing memory usage and bar charts for comparing historical data.
[0062] At the same time, it can also provide users with some indicators and optimization suggestions, such as the recommended usage of art resources such as textures / model meshes for general projects, and that a certain performance indicator that is too high may indicate a problem in a certain aspect of the project.
[0063] Step 3, compare and analyze various performance data when the game is running to obtain a game performance data evaluation report.
[0064] Step 3 is as follows:
[0065] Comparison of historical data:
[0066] For the performance data of each game during runtime, first look up the historical data of the game to determine whether there is the same historical performance data of the game. If so, compare the latest test data with the historical performance data of the game to obtain a comparison result. Through this comparison, the data items in the latest test data that differ greatly from the historical test data are highlighted.
[0067] Horizontal comparison of similar products:
[0068] According to the game type (MMO / SLG / card, etc.), game engine version and test data generation time of the project, search in the database to obtain game performance data of other projects with the same game type, the same major version of the game engine (minor version is not mandatory, but the same priority is higher), and similar test time, sort by similarity, and select a set number (for example, 10) of other project game performance data ranked first, compare with the latest test data, and present the comparison results in the form of a bar chart. In this way, the level of each project data among similar products can be intuitively reflected.
[0069] Also includes:
[0070] Step 4, comprehensive rating:
[0071] Weights are assigned to each game performance parameter based on the degree of direct impact it has on the player's gaming experience. For example, if the frame rate (FPS) is too low, the player will clearly feel the game screen being stuck, so the frame rate parameter accounts for a higher proportion in the score.
[0072] After the weights are divided, the scores are also divided into two parts:
[0073] Vertical scoring: For each game performance data, the initial score is 100 points. It is compared with the historical game performance data closest to the time. If the game performance index is improved, points are added, otherwise, points are subtracted. In this way, the updated score of each game performance data is obtained; then the updated scores of various game performance data are summed according to the weight to obtain the vertical score;
[0074] Horizontal scoring: Take the average value of the set number of game performance data of other items ranked first obtained in step 3 as the benchmark. For each game performance data, the initial score is 100 points. Compared with the benchmark, if the game performance index is improved, add points, otherwise, subtract points, thereby obtaining the updated score of each game performance data; then sum the updated scores of various game performance data according to the weight to obtain the horizontal score.
[0075] The two scores can provide a clear and concise understanding of the performance changes during the project iteration process and the position of similar products in the industry.
[0076] The present invention also provides a performance indicator visualization platform based on WebGL, comprising:
[0077] Performance data collection module, used to collect performance data during game operation;
[0078] A chart display module is used to display the locally stored performance data in chart form;
[0079] The game performance data evaluation report generation module is used to compare and analyze various performance data during game runtime to obtain a game performance data evaluation report.
[0080] The performance indicator visualization method and platform based on WebGL provided by the present invention have the following advantages:
[0081] The present invention provides a performance indicator visualization method and platform based on webGL, which can comprehensively collect various indicator data in the game operation and provide two relative evaluation standards. One is vertical comparison, which is compared with the previous performance data of the project product, and the other is horizontal comparison, which is compared with several other similar projects on the platform. At the same time, each key data is displayed as a chart, and the iterative changes of various performance of the project and the advantages and disadvantages of the same type of products in the industry are clear at a glance. Then the project performance is scored as a whole, which is convenient for game designers to quickly and accurately know the game performance indicators.
[0082] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.
Claims
1. A performance indicator visualization method based on WebGL, characterized in that: The following steps are involved: Step 1: Collect performance data during game operation: Specifically: Develop an SDK acquisition program; during the running of the tested game, the SDK acquisition program obtains various performance data of the game through the Unity engine or the native API interface of the mobile device, and stores it locally in the form of a folder; the folder name is composed of the package name of the game installation package and the test time; Among them, the performance data of the game runtime includes: The average frame rate, that is, the number of times the game screen is rendered per second; CPU time consumption, and calculate the percentage of frames with CPU time greater than 33 milliseconds; PSS memory, and calculate the PSS memory peak value, that is, the maximum value of the physical memory actually occupied on the mobile device during the game running; The number of times the game engine calls the low-level graphics rendering interface, that is, the number of DrawCalls; Temperature change of mobile device when running games; During the game test, the number of triangles is counted, and the maximum value of the number of triangles is obtained, that is, Tris peak value; Step 2: Display the locally stored performance data in a graphical form: Specifically, for the obtained average frame rate, a trend chart of the average frame rate is prepared with the test time as the x-axis and the number of times the game screen is rendered per second as the y-axis; For the obtained CPU time consumption, the number of frames is used as the x-axis and the time consumption of each frame is used as the y-axis to make a CPU time consumption trend chart; For the acquired PSS memory, a PSS memory trend chart is made with the test time as the x-axis and the actual physical memory occupied on the mobile device during the game running as the y-axis; For the obtained DrawCall times, a DrawCall times trend chart is made with the test time as the x-axis and the DrawCall times as the y-axis; For the temperature change value obtained when the mobile device runs the game, a temperature change trend chart is made with the test time as the x-axis and the real-time temperature value when the mobile device runs the game as the y-axis; For the number of triangles obtained, a triangle number trend chart is made with the test time as the x-axis and the number of triangles during the game test as the y-axis; Step 3, compare and analyze various performance data when the game is running to obtain a game performance data evaluation report.
2. The performance indicator visualization method based on WebGL according to claim 1, characterized in that: Step 3 is as follows: Comparison of historical data: For the performance data of each game during runtime, first search for the historical data of the game to determine whether there is the same historical performance data of the game. If so, compare the latest test data with the historical performance data of the game to obtain a comparison result. Horizontal comparison of similar products: According to the project's game type, game engine version and test data generation time, search in the database to obtain game performance data of other projects with the same game type, the same major version of the game engine, and similar test time, sort them by similarity, and select a set number of other project game performance data ranked first, compare them with the latest test data, and present the comparison results in the form of a bar chart.
3. The performance indicator visualization method based on WebGL according to claim 2, characterized in that: Also includes: Step 4, comprehensive rating: Assign weights to each game performance parameter based on the degree of direct impact it has on the player's gaming experience; Vertical scoring: For each game performance data, the initial score is 100 points. It is compared with the historical game performance data closest to the time. If the game performance index is improved, points are added, otherwise, points are subtracted. In this way, the updated score of each game performance data is obtained; then the updated scores of various game performance data are summed according to the weight to obtain the vertical score; Horizontal scoring: Take the average of the set number of game performance data of other items ranked first obtained in step 3 as the benchmark. For each game performance data, the initial score is 100 points. Compared with the benchmark, if the game performance index is improved, add points, otherwise, subtract points, and thus get the updated score of each game performance data; Then sum the updated scores of various game performance data according to the weights to get the horizontal score.
4. A visualization platform for the performance indicator visualization method based on webGL according to claim 1, characterized in that: include: Performance data collection module, used to collect performance data during game operation; A chart display module is used to display the locally stored performance data in chart form; The game performance data evaluation report generation module is used to compare and analyze various performance data during game runtime to obtain a game performance data evaluation report.
