Virtual scene automation performance detection method and device, equipment, medium and product
By generating task chains and using virtual cameras for data collection, combined with clustering algorithms to analyze performance data, the inefficiency and reliance on manual labor in virtual scene performance testing are solved, achieving automated and intelligent performance testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-04-03
AI Technical Summary
Existing virtual scene performance testing methods are inefficient, lack full-process automated tracking capabilities, struggle to capture occasional stuttering, and lack spatiotemporal correlation between performance data and scene content, making it impossible to systematically analyze performance bottleneck areas and their distribution patterns.
Test parameters are set through configuration files to generate a task chain, which controls the movement of the virtual camera in the virtual scene and data acquisition. Static and dynamic sampling modes are used, and performance data is analyzed by combining clustering algorithms to identify performance bottleneck patterns.
It improves the efficiency and intelligence of virtual scene performance testing, ensures the repeatability and consistency of the testing process, automatically identifies performance bottlenecks without manual intervention, and provides intuitive performance analysis results.
Smart Images

Figure CN121785902A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Unreal Engine technology, and in particular to a method, apparatus, device, medium and product for automated performance testing of virtual scenes. Background Technology
[0002] As the complexity of virtual scenes continues to increase, especially in high-performance applications such as digital twins and large-scale games, real-time rendering performance has become a key factor affecting user experience and project implementation. Traditional manual performance testing methods are inefficient, difficult to reproduce, and unable to systematically capture performance fluctuations throughout the entire process, making it difficult to quantify and evaluate optimization effects. Therefore, developing an automated, configurable, and comprehensive virtual scene performance testing technology has become an essential requirement for improving development efficiency, ensuring project performance quality, and achieving refined optimization.
[0003] Current common methods for testing virtual scene performance still heavily rely on manual operation and built-in engine tools, such as manually controlling the viewpoint, recording performance data frame by frame, or using console commands for sampling analysis. These methods have significant limitations: first, they lack the ability to automatically track custom paths throughout their entirety, making it difficult to capture occasional stuttering; second, the performance data lacks a spatiotemporal correlation with the specific scene content, leading to difficulties in problem localization; and third, they cannot perform systematic analysis and pattern recognition of the entire path's performance, making it difficult to automatically identify performance bottlenecks and their distribution patterns. Furthermore, existing tools typically lack flexible configuration mechanisms and automated screenshot binding functions, further limiting their practicality and reusability in large-scale, highly complex scenarios. Summary of the Invention
[0004] This invention provides a method, apparatus, device, medium, and product for automated performance testing of virtual scenes, which can improve the efficiency and intelligence of virtual scene performance testing.
[0005] In a first aspect, embodiments of the present invention provide an automated performance testing method for virtual scenes, comprising:
[0006] The preset configuration file is parsed to obtain the test parameter set, and a task chain is generated based on the test parameter set; wherein, the task chain decomposes the performance test process into a preparation phase, an execution phase, and an exit phase that are executed sequentially.
[0007] According to the task list and the preset sampling mode, the preset virtual camera is controlled to move and collect data in the target virtual scene to obtain a test dataset; wherein, the sampling mode includes a static sampling mode and a dynamic sampling mode.
[0008] The performance dataset is analyzed using a pre-defined clustering algorithm to obtain the performance test results of the target virtual scene.
[0009] This invention enables repeatability and consistency of the testing process by setting test parameters through configuration files, reducing manual setup errors. It also structures the testing process by generating a task chain, ensuring orderly execution of test steps and improving test reliability and resource management efficiency. By controlling the movement and data acquisition of the virtual camera, it simulates user-perspective roaming, collecting performance data and scene screenshots, covering key areas, and addressing the lack of regional frame rate tracking in existing technologies. Furthermore, it provides two sampling modes: a static mode for detailed fixed-point testing and a dynamic mode for continuous path testing, adapting to different testing scenarios. Through clustering algorithms, it automatically analyzes performance data and identifies performance bottleneck patterns without manual intervention, solving the problem of performance analysis relying on human experience in existing technologies. Compared with existing technologies, this invention improves the efficiency and intelligence of virtual scene performance testing.
[0010] Furthermore, based on the task list and the preset sampling mode, a preset virtual camera is controlled to move and collect data in the target virtual scene to obtain a test dataset, including:
[0011] When the sampling mode is static sampling mode, a preset set of discrete sampling points is obtained;
[0012] The virtual camera is controlled to jump sequentially to the sampling points in the discrete sampling point set, and stays still at each sampling point to collect performance data and scene screenshots of that sampling point;
[0013] The performance data and scene screenshots are integrated to obtain the test dataset.
[0014] This invention addresses the problem of not being able to perform directional testing of specific areas in existing technologies by allowing users to specify key test points (such as corners in complex scenes) to ensure coverage of performance-sensitive areas. By controlling the camera to jump to the point and collect data while stationary, accurate performance data can be obtained under static conditions, avoiding fluctuations caused by movement and improving data reliability.
[0015] Furthermore, based on the task list and the preset sampling mode, a preset virtual camera is controlled to move and collect data in the target virtual scene to obtain a test dataset, including:
[0016] When the sampling mode is dynamic sampling mode, a preset discrete sampling point set and camera rotation data are acquired; wherein, the camera rotation data is used to control the sampling angle of the virtual camera;
[0017] Using a preset interpolation algorithm, a data acquisition path is generated based on the discrete sampling point set. Then, according to the data acquisition path and camera rotation data, the virtual camera is controlled to move in the target virtual scene to acquire performance data and scene screenshots.
[0018] The performance data and scene screenshots are integrated to obtain the test dataset.
[0019] This invention addresses the lack of roaming path performance analysis in existing technologies by defining test paths and perspectives to ensure that the paths conform to actual roaming scenarios. It generates paths using interpolation algorithms to simulate real user roaming, collects continuous performance data, and captures frame rate fluctuations. By recording performance data during the dynamic process, it more realistically reflects the user experience, making it particularly suitable for detecting occasional stuttering.
[0020] Furthermore, the performance data and scene screenshots are integrated to obtain a test dataset, specifically:
[0021] For each sampling point, the performance data is associated with the corresponding timestamp and the spatial coordinate data under the corresponding timestamp to obtain an associated dataset; wherein, the corresponding timestamp is the time when the performance data was collected; and the spatial coordinate data is the coordinates of the virtual camera at the time of collection.
[0022] A mapping relationship is established between the associated dataset and scene screenshots collected at the same timestamp to obtain the test dataset.
[0023] This invention provides a spatiotemporal context by associating performance data with timestamps and spatial coordinates, enabling performance data to be traced back to a specific location and time, thus solving the problem of lack of correlation between performance data and scene in the prior art. By establishing a mapping between associated data and scene screenshots, performance data is directly bound to the visual scene. When a performance trough is detected, the corresponding screenshot can be viewed immediately to quickly locate the cause of the problem and reduce the cost of reproduction.
[0024] Furthermore, while controlling the virtual camera to move within the target virtual scene based on the data acquisition path and camera rotation data, the method also includes:
[0025] Calculate the distance between the current sampling point and the next sampling point. If the distance is less than a preset distance threshold, take the current sampling point as the center point, control the virtual camera to perform 360-degree interpolation rotation with the Z-axis of the current sampling point as the center axis, and collect performance data and scene screenshots during the interpolation rotation process.
[0026] This invention automatically detects the distance between sampling points. When the points are too close, it avoids unnecessary movement and instead performs rotational sampling to optimize testing efficiency. Furthermore, through 360-degree interpolation rotation, it ensures that comprehensive performance data is obtained at key points, covering more perspectives and avoiding overlooking performance bottlenecks.
[0027] Furthermore, the performance analysis of the performance dataset using a preset clustering algorithm to obtain the performance detection results of the target virtual scene specifically involves:
[0028] Using the preset DBSCAN clustering algorithm, the performance dataset is divided into several clusters based on the spatial density distribution of the performance dataset in the target virtual scene;
[0029] Calculate the center point features of each cluster, and determine the center point features as the typical performance features of the corresponding cluster;
[0030] Based on the spatial coordinate data corresponding to each performance data within the cluster, determine the spatial distribution range of the typical performance characteristics in the target virtual scene;
[0031] Based on the typical performance characteristics and their corresponding spatial distribution range, visualized performance test results are generated.
[0032] This invention utilizes the DBSCAN clustering algorithm to automatically identify clusters and outliers (noise points) in data, eliminating the need for a preset number of clusters. It adapts to different scenarios and identifies unknown performance bottleneck patterns. By calculating the features of the centroids, it summarizes the typical performance characteristics of each cluster (e.g., high FPS and low DrawCal represent high-performance areas), providing quantitative analysis indicators. By associating performance characteristics with scene regions, it displays the specific location of performance bottlenecks (e.g., high-modulus clustering areas), solving the problem of lack of spatial correlation in existing technologies. Finally, it presents the analysis results in an intuitive manner, facilitating developers to quickly decide on optimization directions.
[0033] Secondly, embodiments of the present invention provide an automated performance testing device for virtual scenes, including a task list generation module, a test data acquisition module, and a performance analysis module, wherein...
[0034] The task chain generation module is used to parse the preset configuration file, obtain the test parameter set, and generate a task chain based on the test parameter set; wherein, the task chain decomposes the performance testing process into a preparation phase, an execution phase, and an exit phase that are executed sequentially.
[0035] The test data acquisition module is used to control a preset virtual camera to move and acquire data in the target virtual scene according to the task chain and the preset sampling mode, so as to obtain a test dataset; wherein, the sampling mode includes a static sampling mode and a dynamic sampling mode.
[0036] The performance analysis module is used to perform performance analysis on the performance dataset using a preset clustering algorithm to obtain the performance detection results of the target virtual scene.
[0037] This invention, through a task list generation module, sets test parameters based on configuration files, achieving repeatability and consistency in the testing process, reducing manual setting errors. A test data acquisition module generates a task list, structuring the testing process, ensuring orderly execution of test steps, and improving test reliability and resource management efficiency. By controlling the movement and data acquisition of a virtual camera, it simulates user-perspective roaming, collecting performance data and scene screenshots, covering key areas, and solving the problem of lacking regional frame rate tracking in existing technologies. It also provides two sampling modes: a static mode for detailed fixed-point testing and a dynamic mode for continuous path testing, adapting to different testing scenarios. Through a performance analysis module, using clustering algorithms, it automatically analyzes performance data and identifies performance bottleneck patterns without manual intervention, solving the problem of performance analysis relying on human experience in existing technologies.
[0038] Thirdly, embodiments of the present invention provide a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;
[0039] The memory is used to store at least one executable instruction that causes the processor to perform the operation of the virtual scene automated performance detection method as described in any of the above.
[0040] Fourthly, embodiments of the present invention provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus where the computer-readable storage medium is located to perform the virtual scene automated performance testing method as described in any of the above.
[0041] Fifthly, embodiments of the present invention provide a computer program product, including a computer program or instructions, wherein the computer program or instructions execute the virtual scene automated performance testing method as described in any of the above.
[0042] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of an automated performance testing method for virtual scenes provided in an embodiment of the present invention;
[0044] Figure 2 This is a structural diagram of an automated performance testing device for virtual scenes provided in an embodiment of the present invention. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] Example 1:
[0047] like Figure 1 As shown, an automated performance testing method for a virtual scene provided by an embodiment of the present invention includes the following steps:
[0048] S101, parse the preset configuration file to obtain the test parameter set, and generate a task chain list based on the test parameter set; wherein, the task chain list decomposes the performance test process into a preparation phase, an execution phase, and an exit phase that are executed sequentially.
[0049] In one specific embodiment, upon system startup, parameters are read from the configuration file, including the test mode, position / rotation point, host address (Trace server), task phase duration (preparation, execution, exit), and number of screenshots. The configuration file uses the INI format for easy and rapid parsing.
[0050] Specifically, Unreal Engine dynamically loads and parses INI files. If no Trace server IP is specified (host address is empty), the trace data is saved locally by default. The World subsystem manages the task chain (linked list structure), transforming configuration parameters into a sequence of test tasks. Tasks are broken down into a preparation phase (initializing camera position), an execution phase (movement and recording), and an exit phase (cleaning up resources), with each phase having a duration set via a timer.
[0051] S102, according to the task list and the preset sampling mode, control the preset virtual camera to move and collect data in the target virtual scene to obtain a test dataset; wherein, the sampling mode includes a static sampling mode and a dynamic sampling mode.
[0052] In this embodiment, based on the task list and a preset sampling mode, a preset virtual camera is controlled to move and collect data in the target virtual scene to obtain a test dataset. This includes: when the sampling mode is a static sampling mode, obtaining a preset set of discrete sampling points; controlling the virtual camera to sequentially jump to the sampling points in the set of discrete sampling points, and stopping at each sampling point to collect performance data and scene screenshots at that sampling point; and integrating the performance data and scene screenshots to obtain the test dataset.
[0053] In one specific embodiment, a preset camera path (such as a fixed route in a digital twin scene) is used. The system automatically plays a sequence, simulating a walkthrough by moving a pawn (an operable object). During the movement, FPS (frames per second), performance panel data (such as GPU timeout and DrawCal) are recorded frame by frame, and scene screenshots (bugscreenshots) are taken periodically. The screenshot frequency is controlled by configuration, for example, per second. Figure 1 Second-rate.
[0054] In this embodiment, based on the task list and a preset sampling mode, a preset virtual camera is controlled to move and collect data in a target virtual scene to obtain a test dataset. This includes: when the sampling mode is a dynamic sampling mode, acquiring a preset discrete sampling point set and camera rotation data; wherein, the camera rotation data is used to control the sampling angle of the virtual camera; generating a data acquisition path based on the discrete sampling point set using a preset interpolation algorithm, and controlling the virtual camera to move in the target virtual scene according to the data acquisition path and camera rotation data to collect performance data and scene screenshots; and integrating the performance data and scene screenshots to obtain the test dataset.
[0055] In one specific embodiment, custom points (such as coordinates and rotation angles) are read from a configuration file. The system first teleports to each point, acquires static screenshots and performance data (for performance tracking monitoring), and then smooths the connection path using an interpolation algorithm (such as linear interpolation or Bézier curves) to simulate dynamic roaming. Simultaneously, based on the configured performance acquisition frequency (such as every 100 milliseconds), FPS (Frames Per Second) data is recorded to a temporary buffer.
[0056] It should be noted that both modes integrate performance tracing: real-time sending of trace data to a specified server (or local machine) and using Unreal Insights tools to capture frame-level historical records (including frame time fluctuations).
[0057] In this embodiment, the performance data and scene screenshots are integrated to obtain a test dataset. Specifically, for each sampling point, the performance data is associated with the corresponding timestamp and the spatial coordinate data under the corresponding timestamp to obtain an associated dataset. The corresponding timestamp is the time when the performance data was collected, and the spatial coordinate data is the coordinates of the virtual camera at the time of collection. A mapping relationship is established between the associated dataset and the scene screenshots collected under the same timestamp to obtain the test dataset.
[0058] In this embodiment, while controlling the virtual camera to move in the target virtual scene according to the data acquisition path and camera rotation data, the method also includes: calculating the distance between the current sampling point and the next sampling point; if the distance is less than a preset distance threshold, then taking the current sampling point as the center point, controlling the virtual camera to perform a 360-degree interpolation rotation with the Z-axis of the current sampling point as the center axis, and acquiring performance data and scene screenshots during the interpolation rotation process.
[0059] In one specific embodiment, the position and rotation are controlled by a basic Pawn class in Unreal Engine (i.e., the core controllable / playable entity base class of the engine, specifically used to carry the logic of "player control" or "AI control", and is the core bridge connecting "control input" and "entity behavior"). The FInterpTo (interpolation calculation) function is used to achieve smooth movement. The core principle is: between the "current value" and the "target value", the target is gradually approached at a fixed "interpolation speed" and "time step", and finally converges smoothly to the target value (rather than jumping instantly), ensuring the continuity of the path. If multiple points are detected to be too close, the first point is taken as the center point, and the camera performs a 360-degree interpolation rotation with the Z-axis of this point as the center axis. The interpolation speed is determined by reading the interpolation speed in the configuration file, and the subsequent data acquisition logic remains unchanged.
[0060] In one specific embodiment, the frequency recording process is as follows: Based on the frame rate in the configuration file, the real-time FPS, GPU time, CPU time, DrawCall (draw call, referring to the CPU's request to the GPU to "execute a drawing command") time, camera view data, and scene triangle count are obtained and written to a memory array. Trace data is sent via console commands (parameters include host IP, port, and channel), for example: Trace.Send host = 192.168.1.100 port = 1980 channel = perf_data.
[0061] In one specific embodiment, the scene screenshot acquisition process is as follows: The scene view is captured using Unreal Engine's screenshot interface, and a performance panel (rendered via the Stat command set) is overlaid, outputting a PNG file. The screenshot is temporally and spatially bound to the frame rate data, i.e., a visual image screenshot, with timestamps and location information appended during storage.
[0062] In one specific embodiment, the data is written to a TXT file (formatted as one frame rate value per line). Statistical analysis is performed using a custom algorithm (e.g., iterating through the data array to calculate the mean).
[0063] In one specific embodiment, during the final data output stage, a corresponding txt file is output, which records FPS, GPU time, CPU time, DrawCall time, camera view data, and the number of scene triangles.
[0064] S103, The performance dataset is analyzed using a preset clustering algorithm to obtain the performance detection results of the target virtual scene.
[0065] In this embodiment, the performance analysis of the performance dataset using a preset clustering algorithm to obtain the performance detection results of the target virtual scene specifically involves: using a preset DBSCAN clustering algorithm, dividing the performance dataset into several clusters based on the spatial density distribution of the performance dataset in the target virtual scene; calculating the centroid feature of each cluster and determining the centroid feature as the typical performance feature of the corresponding cluster; determining the spatial distribution range of the typical performance feature in the target virtual scene based on the spatial coordinate data corresponding to each performance data within the cluster; and generating a visualized performance detection result based on the typical performance feature and the corresponding spatial distribution range.
[0066] In one specific embodiment, the input data is a set of performance data from all sampling points during a complete path test, read from a TXT file. Each data point is a multi-dimensional vector containing: FPS, GPU time, CPU time, DrawCall time, camera view data, and scene triangle count data.
[0067] In one specific embodiment, the DBSCAN algorithm (density-based noisy applied spatial clustering algorithm) assigns a "cluster label" to each data point. The tool can then analyze the characteristics of the centroids of each cluster.
[0068] For example, automatic discovery:
[0069] Cluster 1 (High-performance area): Characterized by high FPS and low DrawCall time, it is mostly distributed in open areas.
[0070] Cluster 2 (GPU bottleneck area): characterized by low FPS and high GPU time consumption, and mostly distributed in areas with complex models and rich materials.
[0071] Cluster 3 (CPU bottleneck area): characterized by low FPS, high CPU time consumption, and high DrawCall time, and is mostly distributed in areas with a large number of dynamic objects.
[0072] Finally, a report is automatically generated, showing the regions with different performance characteristics.
[0073] This invention enables repeatability and consistency of the testing process by setting test parameters through configuration files, reducing manual setup errors. It also structures the testing process by generating a task chain, ensuring orderly execution of test steps and improving test reliability and resource management efficiency. By controlling the movement and data acquisition of the virtual camera, it simulates user-perspective roaming, collecting performance data and scene screenshots, covering key areas, and addressing the lack of regional frame rate tracking in existing technologies. Furthermore, it provides two sampling modes: a static mode for detailed fixed-point testing and a dynamic mode for continuous path testing, adapting to different testing scenarios. Through clustering algorithms, it automatically analyzes performance data and identifies performance bottleneck patterns without manual intervention, solving the problem of performance analysis relying on human experience in existing technologies. Compared with existing technologies, this invention improves the efficiency and intelligence of virtual scene performance testing.
[0074] Example 2:
[0075] like Figure 2 As shown, this embodiment provides an automated performance testing device for virtual scenes, including a task list generation module 201, a test data acquisition module 202, and a performance analysis module 203, wherein...
[0076] The task list generation module 201 is used to parse a preset configuration file, obtain a test parameter set, and generate a task list based on the test parameter set; wherein, the task list decomposes the performance testing process into a preparation phase, an execution phase, and an exit phase that are executed sequentially.
[0077] The test data acquisition module 202 is used to control a preset virtual camera to move and acquire data in a target virtual scene according to the task chain and the preset sampling mode, so as to obtain a test dataset; wherein, the sampling mode includes a static sampling mode and a dynamic sampling mode.
[0078] In this embodiment, the test data acquisition module 202 controls a preset virtual camera to move and acquire data in the target virtual scene according to the task chain and the preset sampling mode to obtain a test dataset, including: when the sampling mode is static sampling mode, the test data acquisition module 202 acquires a preset discrete sampling point set; controls the virtual camera to jump to the sampling point in the discrete sampling point set in sequence, and stays still at each sampling point to collect performance data and scene screenshots at that sampling point; and integrates the performance data and scene screenshots to obtain the test dataset.
[0079] In this embodiment, the test data acquisition module 202 controls a preset virtual camera to move and acquire data in the target virtual scene according to the task list and a preset sampling mode to obtain a test dataset. This includes: when the sampling mode is dynamic sampling mode, the test data acquisition module 202 acquires a preset discrete sampling point set and camera rotation data; wherein the camera rotation data is used to control the sampling angle of the virtual camera; a data acquisition path is generated based on the discrete sampling point set using a preset interpolation algorithm, and the virtual camera is controlled to move in the target virtual scene according to the data acquisition path and camera rotation data to acquire performance data and scene screenshots; the performance data and scene screenshots are integrated to obtain the test dataset.
[0080] The performance analysis module 203 is used to perform performance analysis on the performance dataset using a preset clustering algorithm to obtain the performance detection results of the target virtual scene.
[0081] In this embodiment, the performance analysis module 203 performs performance analysis on the performance dataset using a preset clustering algorithm to obtain the performance detection results of the target virtual scene. Specifically, the performance analysis module 203 uses a preset DBSCAN clustering algorithm to divide the performance dataset into several clusters based on the spatial density distribution of the performance dataset in the target virtual scene; calculates the centroid feature of each cluster and determines the centroid feature as the typical performance feature of the corresponding cluster; determines the spatial distribution range of the typical performance feature in the target virtual scene based on the spatial coordinate data corresponding to each performance data within the cluster; and generates a visualized performance detection result based on the typical performance feature and the corresponding spatial distribution range.
[0082] For a more detailed explanation of the working principle and procedures of this embodiment, please refer to the relevant description in Embodiment 1.
[0083] This invention, through a task list generation module 201, sets test parameters based on configuration files, achieving repeatability and consistency in the testing process, reducing manual setting errors, and structuring the testing process by generating a task list, ensuring orderly execution of test steps, and improving test reliability and resource management efficiency. The test data acquisition module 202 controls the movement and data acquisition of the virtual camera, simulating user-perspective roaming, collecting performance data and scene screenshots, covering key areas, and solving the problem of lacking regional frame rate tracking in existing technologies. It also provides two sampling modes: a static mode for detailed fixed-point testing and a dynamic mode for continuous path testing, adapting to different testing scenarios. The performance analysis module 203 uses clustering algorithms to automatically analyze performance data and identify performance bottleneck patterns without manual intervention, solving the problem of performance analysis relying on human experience in existing technologies.
[0084] Example 3:
[0085] This embodiment provides a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;
[0086] The memory is used to store at least one executable instruction that causes the processor to perform the operation of the virtual scene automated performance detection method as described in any of the above.
[0087] Example 4:
[0088] This invention provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when running, controls the device or apparatus containing the computer-readable storage medium to execute the virtual scene automated performance testing method as described above.
[0089] Example 5:
[0090] This invention provides a computer program product, including a computer program or instructions, wherein the computer program or instructions execute the virtual scene automated performance testing method as described in any of the above embodiments.
[0091] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0092] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for automated performance testing of virtual scenes, characterized in that, include: The preset configuration file is parsed to obtain the test parameter set, and a task chain is generated based on the test parameter set; wherein, the task chain decomposes the performance test process into a preparation phase, an execution phase, and an exit phase that are executed sequentially. According to the task list and the preset sampling mode, the preset virtual camera is controlled to move and collect data in the target virtual scene to obtain a test dataset; wherein, the sampling mode includes a static sampling mode and a dynamic sampling mode. The performance dataset is analyzed using a pre-defined clustering algorithm to obtain the performance test results of the target virtual scene.
2. The automated performance testing method for virtual scenes as described in claim 1, characterized in that, Based on the task list and the preset sampling mode, a preset virtual camera is controlled to move and collect data in the target virtual scene to obtain a test dataset, including: When the sampling mode is static sampling mode, a preset set of discrete sampling points is obtained; The virtual camera is controlled to jump sequentially to the sampling points in the discrete sampling point set, and stays still at each sampling point to collect performance data and scene screenshots of that sampling point; The performance data and scene screenshots are integrated to obtain the test dataset.
3. The automated performance testing method for virtual scenes as described in claim 1, characterized in that, Based on the task list and the preset sampling mode, a preset virtual camera is controlled to move and collect data in the target virtual scene to obtain a test dataset, including: When the sampling mode is dynamic sampling mode, a preset discrete sampling point set and camera rotation data are acquired; wherein, the camera rotation data is used to control the sampling angle of the virtual camera; Using a preset interpolation algorithm, a data acquisition path is generated based on the discrete sampling point set. Then, according to the data acquisition path and camera rotation data, the virtual camera is controlled to move in the target virtual scene to acquire performance data and scene screenshots. The performance data and scene screenshots are integrated to obtain the test dataset.
4. The automated performance testing method for virtual scenes as described in claim 2 or claim 3, characterized in that, The performance data and scene screenshots are integrated to obtain the test dataset, specifically: For each sampling point, the performance data is associated with the corresponding timestamp and the spatial coordinate data under the corresponding timestamp to obtain an associated dataset; wherein, the corresponding timestamp is the time when the performance data was collected; and the spatial coordinate data is the coordinates of the virtual camera at the time of collection. A mapping relationship is established between the associated dataset and scene screenshots collected at the same timestamp to obtain the test dataset.
5. The automated performance testing method for virtual scenes as described in claim 3, characterized in that, While controlling the virtual camera to move within the target virtual scene based on the data acquisition path and camera rotation data, the method also includes: Calculate the distance between the current sampling point and the next sampling point. If the distance is less than a preset distance threshold, take the current sampling point as the center point and control the virtual camera to perform a 360-degree interpolation rotation with the Z-axis of the current sampling point as the center axis. During the interpolation rotation, collect performance data and scene screenshots.
6. The automated performance testing method for virtual scenes as described in claim 1, characterized in that, The performance analysis of the performance dataset using a preset clustering algorithm to obtain the performance detection results of the target virtual scene is as follows: Using the preset DBSCAN clustering algorithm, the performance dataset is divided into several clusters based on the spatial density distribution of the performance dataset in the target virtual scene; Calculate the center point features of each cluster, and determine the center point features as the typical performance features of the corresponding cluster; Based on the spatial coordinate data corresponding to each performance data within the cluster, determine the spatial distribution range of the typical performance characteristics in the target virtual scene; Based on the typical performance characteristics and their corresponding spatial distribution range, visualized performance test results are generated.
7. A virtual scene automated performance testing device, characterized in that, It includes a task list generation module, a test data acquisition module, and a performance analysis module, among which, The task chain generation module is used to parse the preset configuration file, obtain the test parameter set, and generate a task chain based on the test parameter set; wherein, the task chain decomposes the performance testing process into a preparation phase, an execution phase, and an exit phase that are executed sequentially. The test data acquisition module is used to control a preset virtual camera to move and acquire data in the target virtual scene according to the task chain and the preset sampling mode, so as to obtain a test dataset; wherein, the sampling mode includes a static sampling mode and a dynamic sampling mode. The performance analysis module is used to perform performance analysis on the performance dataset using a preset clustering algorithm to obtain the performance detection results of the target virtual scene.
8. A terminal device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation of the virtual scene automated performance testing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus containing the computer-readable storage medium to perform the virtual scene automated performance testing method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or instructions execute the virtual scene automated performance testing method as described in any one of claims 1 to 6.