Performance optimization method and device, equipment, storage medium and product

By obtaining the call duration and computing resource information of virtual objects, objects that consume a lot of computing resources are selected for optimization, which solves the problem that existing technologies cannot specifically optimize resource consumption and improves operating efficiency and optimization effect.

CN120849085APending Publication Date: 2025-10-28SHENZHEN TENCENT NETWORK INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410526388.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing technologies cannot specifically identify and optimize virtual objects that consume a lot of resources during performance optimization, resulting in poor performance optimization and affecting overall operating efficiency.

Method used

By obtaining the call duration and computing resource information of virtual objects, target virtual objects that consume a lot of computing resources are filtered out, and their performance is optimized, including deleting or restricting their behavior, in order to reduce resource consumption.

Benefits of technology

This improves the targeting and efficiency of performance optimization, reduces the impact on other virtual objects, ensures business continuity and stability, and avoids the ripple effects of code changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849085A_ABST
    Figure CN120849085A_ABST
Patent Text Reader

Abstract

The invention provides a performance optimization method and device, equipment, a storage medium and a product, and belongs to the technical field of computers. The method comprises the steps of obtaining respective calling durations of a plurality of virtual objects in a virtual scene, wherein the calling durations are durations for calling interfaces in the virtual scene in a target time period; based on the calling duration of each virtual object, computing power resource information corresponding to each virtual object is determined, the computing power resource information corresponding to each virtual object is in positive correlation with the calling duration, and the computing power resource information is used for indicating computing power resources of computer equipment running the virtual scene; at least one target virtual object in the multiple virtual objects is determined based on the computing power resource information corresponding to the multiple virtual objects, and the computing power resource information corresponding to the target virtual object meets a first condition; and performing performance optimization on the virtual scene based on the at least one target virtual object. According to the method, the pertinence of performance optimization is higher, so that the optimization effect is good, and the operation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a performance optimization method, apparatus, device, storage medium, and product. Background Technology

[0002] Performance optimization refers to identifying resource-intensive interfaces in a software system through inspection and making targeted adjustments to these interfaces to improve performance. However, this approach is not suitable for certain scenarios. For example, if different objects can call the same interface, and one interface consumes a lot of resources, it may be due to calls to that interface by less important objects. Directly optimizing that interface might affect all objects that call it, resulting in poor performance optimization and failing to improve operational efficiency. Summary of the Invention

[0003] This application provides a performance optimization method, apparatus, device, storage medium, and product, which makes performance optimization more targeted, resulting in better optimization effects and improved operating efficiency. The technical solution is as follows:

[0004] On the one hand, a performance optimization method is provided, the method comprising:

[0005] Obtain the call duration of each of the multiple virtual objects in the virtual scene, wherein the call duration is the duration of calling the interface in the virtual scene within the target time period;

[0006] Based on the call duration of each of the multiple virtual objects, the computing power resource information corresponding to each of the multiple virtual objects is determined. The computing power resource information corresponding to each virtual object is positively correlated with the call duration. The computing power resource information is used to indicate the computing power resources of the computer device running the virtual scene.

[0007] Based on the computing power resource information corresponding to each of the plurality of virtual objects, at least one target virtual object is determined among the plurality of virtual objects, and the computing power resource information corresponding to the target virtual object satisfies the first condition.

[0008] Based on the at least one target virtual object, the performance of the virtual scene is optimized.

[0009] On the other hand, a performance optimization apparatus is provided, the apparatus comprising:

[0010] The acquisition module is used to acquire the call duration of each of the multiple virtual objects in the virtual scene, wherein the call duration is the duration of calling the interface in the virtual scene within the target time period;

[0011] The determination module is used to determine the computing power resource information corresponding to each of the multiple virtual objects based on the respective call duration of each virtual object. The computing power resource information corresponding to each virtual object is positively correlated with the call duration. The computing power resource information is used to indicate the computing power resources of the computer device running the virtual scene.

[0012] The determining module is further configured to determine at least one target virtual object among the plurality of virtual objects based on the computing power resource information corresponding to each of the plurality of virtual objects, wherein the computing power resource information corresponding to the target virtual object satisfies the first condition;

[0013] An optimization module is used to optimize the performance of the virtual scene based on the at least one target virtual object.

[0014] In some embodiments, the determining module is configured to:

[0015] For each virtual object, a first ratio is determined, which is the ratio of the virtual object's call duration to the duration of the target time period; the first ratio is output as the computing resource information corresponding to the virtual object; or...

[0016] For each virtual object, a second ratio is determined, which is the ratio of the call duration of the virtual object to the total call duration of the multiple virtual objects; the second ratio is output as the computing resource information corresponding to the virtual object.

[0017] In some embodiments, the determining module is configured to:

[0018] Based on the computing power resource information corresponding to each of the plurality of virtual objects, the plurality of virtual objects are sorted, and at least one virtual object in the top M positions is determined. This at least one virtual object is then output as the at least one target virtual object. The position of each virtual object is positively correlated with the computing power resource information corresponding to that virtual object, where M is an integer greater than 0; or...

[0019] Identify at least one virtual object among the plurality of virtual objects whose computing power resource information reaches a first threshold, and output the at least one virtual object whose computing power resource information reaches the first threshold as the at least one target virtual object.

[0020] In some embodiments, each virtual object calls the interface at least once within the target time period, and the determining module is configured to:

[0021] For each virtual object, based on the call duration of the virtual object, the computing power resource information of the virtual object in multiple sub-time periods is determined, and all of the multiple sub-time periods are located within the target time period;

[0022] For each sub-time period, based on the computing power resource information of the plurality of virtual objects in the sub-time period, at least one candidate virtual object is determined within the sub-time period;

[0023] Based on the at least one candidate virtual object within the plurality of sub-time periods, the at least one target virtual object is determined.

[0024] In some embodiments, the determining module is configured to:

[0025] For each sub-time period, a third ratio is determined, which is the ratio of the virtual object's call duration within the sub-time period to the duration of the sub-time period; the third ratio is output as the computing resource information of the virtual object within the sub-time period; or...

[0026] For each sub-time period, a fourth ratio is determined, which is the ratio of the virtual object's call duration within that sub-time period to the duration of the target time period; the fourth ratio is output as the computing resource information of the virtual object within that sub-time period; or...

[0027] For each sub-time period, a fifth ratio is determined, which is the ratio of the call duration of the virtual object in the sub-time period to the total call duration of the multiple virtual objects in the sub-time period. The fifth ratio is then output as the computing power resource information of the virtual object in the sub-time period.

[0028] In some embodiments, the determining module is configured to:

[0029] For each sub-time period, based on the computing power resource information of the plurality of virtual objects in that sub-time period, the plurality of virtual objects are sorted, and at least one virtual object in the top N positions is determined. This at least one virtual object is then output as the at least one candidate virtual object. The position of each virtual object is positively correlated with its computing power resource information in that sub-time period, where N is a positive integer. Alternatively,

[0030] For each sub-time period, at least one virtual object among the plurality of virtual objects whose computing power resource information reaches a second threshold in the sub-time period is identified, and the at least one virtual object whose computing power resource information reaches the second threshold is output as the at least one candidate virtual object.

[0031] In some embodiments, the determining module is configured to:

[0032] The candidate virtual objects that appear within at least a preset number of sub-time periods will be output as the target virtual object.

[0033] In some embodiments, the optimization module is configured to:

[0034] Remove the at least one target virtual object from the virtual scene.

[0035] In some embodiments, the call duration of each virtual object includes the call duration corresponding to various behaviors of the virtual object; the optimization module is configured to:

[0036] For each target virtual object, the computing power resource information corresponding to each of the various behaviors of the target virtual object is determined based on the call duration of each behavior.

[0037] Based on the computing power resource information corresponding to each of the multiple behaviors, at least one target behavior is determined among the multiple behaviors, and the computing power resource information corresponding to the target behavior satisfies the second condition.

[0038] The target virtual object is restricted from performing the target behavior in the virtual scene.

[0039] In some embodiments, the optimization module is configured to perform at least one of the following:

[0040] The target virtual object is prohibited from performing the target behavior in the virtual scene;

[0041] Reduce the frequency at which the target virtual object performs the target behavior in the virtual scene.

[0042] In some embodiments, the determining module is further configured to determine multiple processes within the target time period, each process being configured to control multiple virtual objects in the virtual scene;

[0043] The acquisition module is used for:

[0044] For each process, obtain the call duration of each of the multiple virtual objects in the process.

[0045] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory being used to store at least one program, the at least one program being loaded and executed by the processor to implement the performance optimization method in the embodiments of this application.

[0046] On the other hand, a computer-readable storage medium is provided, wherein at least one program is stored in the computer-readable storage medium, the at least one program being loaded and executed by a processor to implement the performance optimization method in the embodiments of this application.

[0047] On the other hand, a computer program product is provided, the computer program product including at least one program segment stored in a computer-readable storage medium, a processor of a computer device reading the at least one program segment from the computer-readable storage medium, the processor executing the at least one program segment, causing the computer device to perform the performance optimization method described in any of the above implementations.

[0048] This application provides a performance optimization method. This method determines the computing resource information of multiple virtual objects based on their respective interface call durations. Since a longer call duration indicates a higher computing resource consumption, the computing resource information determined by this method accurately represents the computing resource consumption of virtual objects. Furthermore, based on the computing resource information of multiple virtual objects, target virtual objects whose computing resource information meets a first condition are selected, i.e., virtual objects consuming a large amount of computing resources are identified. Performance optimization of the virtual scene is then performed based on these target virtual objects, reducing their computing resource consumption. This effectively reduces the computing resource consumption of virtual objects within the virtual scene, making the performance optimization more targeted, resulting in better optimization effects and improved operating efficiency. Moreover, this performance optimization method minimizes the impact on other virtual objects in the virtual scene, further enhancing the performance optimization effect. Furthermore, since this method performs performance optimization based on virtual objects, the optimization is based on adjustments at the business layer and does not involve code or logic modifications, thus preventing the spread of the impact of code adjustments. Furthermore, this method allows performance optimization to be performed directly even when computing resources are overloaded, without requiring a shutdown and release process, thus ensuring business continuity and stability. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application;

[0051] Figure 2 This is a flowchart of a performance optimization method provided in an embodiment of this application;

[0052] Figure 3 This is a flowchart of another performance optimization method provided in the embodiments of this application;

[0053] Figure 4 This is a schematic diagram of an object type provided in an embodiment of this application;

[0054] Figure 5 This is a schematic diagram of an object pool provided in an embodiment of this application;

[0055] Figure 6 This is a schematic diagram illustrating the acquisition of call duration provided in an embodiment of this application;

[0056] Figure 7 This is another schematic diagram illustrating the acquisition of call duration provided in an embodiment of this application;

[0057] Figure 8 This is a flowchart illustrating a performance optimization method provided in an embodiment of this application;

[0058] Figure 9 This is a schematic diagram illustrating a performance analysis provided in an embodiment of this application;

[0059] Figure 10 This is a flowchart illustrating a performance optimization method provided in an embodiment of this application;

[0060] Figure 11 This is a flowchart of another performance optimization provided in an embodiment of this application;

[0061] Figure 12 This is a flowchart of another performance optimization method provided in the embodiments of this application;

[0062] Figure 13 This is a flowchart of yet another performance optimization method provided in the embodiments of this application;

[0063] Figure 14 This is another schematic diagram illustrating the acquisition of call duration provided in an embodiment of this application;

[0064] Figure 15 This is a schematic diagram illustrating the distribution of computing resource information provided in an embodiment of this application;

[0065] Figure 16 This is another schematic diagram of the distribution of computing resource information provided in the embodiments of this application;

[0066] Figure 17 This is another schematic diagram of the distribution of computing power resource information provided in the embodiments of this application;

[0067] Figure 18 This is another schematic diagram of the distribution of computing power resource information provided in the embodiments of this application;

[0068] Figure 19 This is a schematic diagram illustrating another performance optimization provided in an embodiment of this application;

[0069] Figure 20 This is a block diagram of a performance optimization device provided in an embodiment of this application;

[0070] Figure 21 This is a block diagram of a terminal provided in an embodiment of this application;

[0071] Figure 22 This is a block diagram of a server provided in an embodiment of this application. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0073] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor are there any restrictions on quantity or execution order.

[0074] In this application, the term "at least one" means one or more, and "multiple" means two or more.

[0075] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the call durations involved in this application were all obtained under fully authorized conditions.

[0076] The following is a description of the technical terms used in this application:

[0077] Virtual scene: A virtual scene is a scene displayed (or provided) by an application when it runs on a terminal. This virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. A virtual scene can be any of a two-dimensional, 2.5-dimensional, or three-dimensional virtual scene; this application does not limit the dimension of the virtual scene. For example, a virtual scene may include the sky, land, ocean, etc., and the land may include environmental elements such as deserts and cities. The terminal user can control virtual objects to move within this virtual scene.

[0078] Virtual objects refer to movable objects in a virtual world. These movable objects can be at least one of virtual characters, virtual animals, anime characters, and virtual vehicles. Optionally, when the virtual world is a three-dimensional virtual world, the virtual object can be a three-dimensional model, with each virtual object having its own shape and volume in the three-dimensional virtual world and occupying a portion of the space within it. Optionally, the virtual object is a three-dimensional character constructed based on three-dimensional human skeleton technology, which achieves different external appearances by wearing different skins. In some implementations, virtual objects can also be implemented using 2.5D or 2D models; this application does not limit this aspect.

[0079] The following describes the implementation environment involved in this application:

[0080] The performance optimization method provided in this application can be executed by a computer device, which can be a server or a terminal. The following is a schematic diagram illustrating the implementation environment of the performance optimization method provided in this application.

[0081] See Figure 1 , Figure 1 This diagram illustrates an implementation environment for a performance optimization method provided in this application. The implementation environment includes a terminal 101 and a server 102. The terminal 101 and server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited herein. In some embodiments, a target application is installed on the terminal 101, and a virtual scene runs within the target application. The virtual scene includes multiple virtual objects, which call interfaces within the virtual scene to perform actions such as walking, scanning, and striking. At least one terminal 101 is used. The server 102 is used to obtain the call duration of each virtual object's interface within the virtual scene on at least one terminal 101, thereby obtaining the computing power resource information of each virtual object. Based on this information, the server identifies the target virtual object that consumes the most computing power resources among the multiple virtual objects, and finally optimizes the performance of the virtual scene based on the target virtual object.

[0082] In some embodiments, terminal 101 may be a smartphone, tablet, laptop, desktop computer, smart voice interaction device, smart home appliance, vehicle terminal, aircraft, VR (Virtual Reality) device, AR (Augmented Reality) device, etc., but is not limited thereto. In some embodiments, server 102 may be an independent server, a server cluster composed of multiple servers, or a distributed system. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, server 102 mainly undertakes computing work, and terminal 101 undertakes secondary computing work; or, server 102 undertakes secondary computing services, and terminal 101 undertakes primary computing work; or, server 102 and terminal 101 collaborate on computing using a distributed computing architecture.

[0083] See Figure 2 , Figure 2 A flowchart of a performance optimization method provided in an embodiment of this application is shown, the method including the following steps.

[0084] 201. The computer device obtains the call duration of each of the multiple virtual objects in the virtual scene. The call duration is the duration of calling the interface in the virtual scene within the target time period.

[0085] In this embodiment, virtual objects can perform various behaviors within a virtual scene, and these behaviors require calling interfaces within the virtual scene. There are multiple interfaces within the virtual scene, each used to implement different behaviors of the virtual object. For example, a virtual object walking within the virtual scene would call the walking interface. Similarly, a virtual object scanning within the virtual scene would call the field-of-view search interface.

[0086] In the embodiments of this application, the call duration of each virtual object includes the call duration of the virtual object to multiple interfaces respectively, or the call duration of each virtual object includes the total call duration of the virtual object to multiple interfaces, or the call duration of each virtual object includes the call duration of the virtual object to multiple interfaces respectively and the total call duration.

[0087] In this context, virtual objects can perform various behaviors in a virtual scene. Since different interfaces correspond to different behaviors, the call duration of each behavior of the virtual object can be obtained based on the call duration of the virtual object to multiple interfaces.

[0088] In the embodiments of this application, the target time period can be set and changed as needed. For example, the target time period can be any time period, or the target time period can be the time period when the computing power resource occupation exceeds the resource threshold, that is, the target time period is the time period when the computing power resource is overloaded.

[0089] In the embodiments of this application, virtual objects refer to any movable object in a virtual scene, such as NPC (Non-Player Character) objects, virtual objects controlled by players, virtual vehicles, etc.

[0090] In the embodiments of this application, the call duration can also be called the clock cycle, which is the duration of the cycle from the start of the call to the end of the call when the virtual object calls the interface.

[0091] 202. The computer device determines the computing power resource information corresponding to each of the multiple virtual objects based on their respective call durations. The computing power resource information corresponding to each virtual object is positively correlated with the call duration. The computing power resource information is used to indicate the computing power resources of the computer device running the virtual scene.

[0092] In this embodiment, computing resource information is used to indicate the occupancy of computing resources. Optionally, the computing resource information is a numerical value used to indicate the amount of computing resources occupied. Computing resources include resources provided by the CPU (Central Processing Unit), GPU (Graphics Processing Unit), etc., of computer devices.

[0093] In this embodiment, the computing resource information of each virtual object is positively correlated with the call duration; that is, the longer the call duration, the larger the computing resource information, and the shorter the call duration, the smaller the computing resource information. In this embodiment, the virtual object calling the interface is equivalent to the virtual object occupying computing resources in the virtual scene, and thus the computing resource information determined based on the call duration can represent the virtual object's occupation of computing resources.

[0094] 203. The computer device determines at least one target virtual object among the multiple virtual objects based on the computing power resource information corresponding to each of the multiple virtual objects, and the computing power resource information corresponding to the target virtual object satisfies the first condition.

[0095] In this embodiment of the application, the first condition is used to determine the virtual object that occupies a lot of computing resources, that is, the target virtual object is a virtual object with large computing resource information.

[0096] 204. Computer equipment optimizes the performance of a virtual scene based on at least one target virtual object.

[0097] In this embodiment, performance optimization based on the target virtual object refers to reducing the computational resource consumption of the target virtual object. Accordingly, performance optimization can remove the target virtual object from the virtual scene; and since the target virtual object's behavior in the virtual scene calls the interface, i.e., consumes computational resources, performance optimization can also restrict the target virtual object's behavior in the virtual scene.

[0098] This application provides a performance optimization method. This method determines the computing resource information of multiple virtual objects based on their respective interface call durations. Since a longer call duration indicates a higher computing resource consumption, the computing resource information determined by this method accurately represents the computing resource consumption of virtual objects. Furthermore, based on the computing resource information of multiple virtual objects, target virtual objects whose computing resource information meets a first condition are selected, i.e., virtual objects consuming a large amount of computing resources are identified. Performance optimization of the virtual scene is then performed based on these target virtual objects, reducing their computing resource consumption. This effectively reduces the computing resource consumption of virtual objects within the virtual scene, making the performance optimization more targeted, resulting in better optimization effects and improved operating efficiency. Moreover, this performance optimization method minimizes the impact on other virtual objects in the virtual scene, further enhancing the performance optimization effect.

[0099] The above Figure 2 The basic process of performance optimization methods is as follows, based on Figure 3 This section provides further details on performance optimization methods. See [link / reference] Figure 3 , Figure 3 A flowchart of a performance optimization method provided in an embodiment of this application is shown, the method including the following steps.

[0100] 301. The computer equipment determines multiple processes within a target time period, and each process is used to control multiple virtual objects in a virtual scene.

[0101] In this embodiment, the virtual scene can contain multiple processes. Different processes control different virtual objects, or they control different behaviors of the virtual objects. Furthermore, the virtual objects controlled by different processes and the behaviors of the controlled virtual objects are all different. For example, one process controls a group of virtual objects to strike, while another process controls another group of virtual objects to walk.

[0102] 302. For each process, the computer device obtains the call duration of each of the multiple virtual objects in that process.

[0103] In this embodiment, multiple processes can be generated in a virtual scene within a certain period of time, and each process can be participated in by multiple virtual objects. Thus, during this period of time, multiple virtual objects in the virtual scene call the interface, resulting in a large and chaotic amount of data to be processed. In this embodiment, the virtual objects in the virtual scene are divided into processes, and the virtual objects in each process are processed separately, which can improve the convenience and efficiency of data processing.

[0104] It should be noted that processing virtual objects in a virtual scene on a process-by-process basis is only an optional implementation method. Computer devices can also directly and uniformly process all virtual objects in a virtual scene without having to divide them based on processes.

[0105] In this embodiment, the virtual scene includes virtual objects of various object types, including a first type, a second type, a third type, a fourth type, etc. For example, a first type virtual object is a player-controlled virtual object, a second type virtual object is an NPC object, a third type virtual object is a summoned creature or monster, and a fourth type virtual object is a virtual vehicle. See also... Figure 4 , Figure 4 This is a schematic diagram of an object type provided in an embodiment of this application. The virtual objects in the virtual scene can be of a first type, a second type, a third type, a fourth type, etc.

[0106] Each object type includes multiple virtual objects. Each object type has a corresponding object pool, which stores the multiple virtual objects under that object type. For example, see... Figure 5 , Figure 5 This is a schematic diagram of an object pool provided in an embodiment of this application. The object pool includes multiple virtual objects, all of which belong to the same object type. For example, all of these virtual objects may be elite monsters.

[0107] In this embodiment, each virtual object corresponds to a block of memory on a computer device. Calling the interface essentially involves adding, deleting, modifying, and querying data within that block of memory. Therefore, when calling the interface, the computer device can determine which block of memory is to be operated on, and thus obtain relevant information about that memory. This information includes the object type of the virtual object to which the memory belongs, the ID (Identity Document) of the virtual object, the current request behavior of the virtual object, and the interface identifier of the called interface, etc. For example, see 6. Figure 6This is a schematic diagram illustrating the acquisition of call duration provided in an embodiment of this application. Specifically, data points are embedded at the beginning of the interface call and before the interface exit. This allows the execution flow to acquire the aforementioned relevant information when it first enters the interface and is about to exit, and then report this information to the statistics system to provide data support for subsequent processing.

[0108] For example, see Figure 7 , Figure 7 This is a schematic diagram illustrating the acquisition of call duration provided in an embodiment of this application. Each interface can be called by multiple virtual objects. Therefore, the call time of the interface can be subdivided into the call duration of each virtual object on the interface. Furthermore, for each virtual object, the call duration of each behavior of the virtual object on the interface can also be obtained.

[0109] 303. For each virtual object, the computer device determines a first ratio, which is the ratio of the virtual object's call duration to the duration of the target time period; the first ratio is output as the computing power resource information corresponding to the virtual object, and the computing power resource information is used to indicate the computing power resources of the computer device running the virtual scene.

[0110] The aforementioned virtual object call duration refers to the total call duration of the virtual object to multiple interfaces in the virtual scene within the target time period. Furthermore, the target time period includes multiple sub-time periods, and the virtual object call duration within the target time period includes the total call duration of the virtual object across all sub-time periods; that is, the virtual object call duration within the target time period is the sum of the virtual object's call durations to the interfaces across all sub-time periods.

[0111] In this embodiment, step 303 described above enables a computer device to determine the computing resource information corresponding to each of the multiple virtual objects based on their respective call durations. In this embodiment, the longer the call duration of a virtual object to an interface, the higher its utilization rate of computing resources. Therefore, the ratio of the virtual object's call duration to the target time period is used as the computing resource information corresponding to the virtual object. This ensures that the computing resource information effectively represents the virtual object's utilization of computing resources, is highly accurate, and directly determines the ratio of call duration to the target time period, making it convenient and efficient. This improves efficiency while maintaining accuracy. Furthermore, using the ratio of call duration to the target time period as the computing resource information limits the value of the computing resource information to a certain range, achieving data normalization. This facilitates subsequent comparison of the computing resource information of multiple virtual objects, improving data processing efficiency.

[0112] In other embodiments, the process by which a computer device determines the computing resource information corresponding to each of multiple virtual objects based on their respective call durations includes the following steps: For each virtual object, the computer device determines a second ratio, which is the ratio of the virtual object's call duration to the total call duration of multiple virtual objects; the second ratio is then output as the computing resource information corresponding to the virtual object. In this embodiment, since a longer call duration for a virtual object indicates a higher utilization rate of computing resources, this embodiment aims to filter out virtual objects with high computing resource utilization rates. The call duration of a single virtual object is then compared with the total call duration of all virtual objects to obtain the computing resource information of the virtual object. This ensures that the computing resource information effectively represents the virtual object's utilization of computing resources among multiple virtual objects, resulting in high accuracy. Furthermore, using the ratio of call duration to total call duration as the computing resource information limits the value of the computing resource information to a certain range, achieving data normalization and facilitating subsequent comparison of the computing resource information of multiple virtual objects, thereby improving processing efficiency.

[0113] In other embodiments, the computer device directly uses the call duration of each virtual object as the computing resource information of that virtual object to improve the efficiency of determining computing resource information.

[0114] 304. The computer device sorts the multiple virtual objects based on the computing power resource information corresponding to each virtual object, determines at least one virtual object in the top M positions, and outputs at least one virtual object as at least one target virtual object. The position of each virtual object is positively correlated with the computing power resource information corresponding to the virtual object, and M is an integer greater than 0.

[0115] In the embodiments of this application, the ranking of a virtual object is positively correlated with the computing power resource information of the virtual object. That is, the larger the computing power resource information of the virtual object, the higher the ranking of the virtual object, and the smaller the computing power resource information of the virtual object, the lower the ranking of the virtual object.

[0116] In this embodiment, the size of M can be set and changed as needed. If the utilization rate of computing resources reaches the utilization threshold during the target time period, i.e., severe overload, then M can be set to a value greater than the first value, i.e., M is set to a larger value, such as M=10. If the utilization rate of computing resources does not reach the utilization threshold during the target time period, i.e., the overload is not severe, then M can be set to a value no greater than the first value, i.e., M is set to a smaller value, such as M=3. In this embodiment, the size of M is set based on different resource utilization situations during the target time period. In this way, when the overload is severe, more virtual objects in the virtual scene can be optimized, achieving a greater degree of performance optimization for the virtual scene and ensuring the optimization effect. Correspondingly, when the overload is not severe, fewer virtual objects in the virtual scene are optimized. Obviously, this method can improve the flexibility and effectiveness of performance optimization.

[0117] In this embodiment, step 304 described above enables a computer device to determine at least one target virtual object from among multiple virtual objects based on the computing power resource information corresponding to each virtual object. In this embodiment, based on the computing power resource information corresponding to each virtual object, the multiple virtual objects are sorted in descending order of computing power resource information. The virtual object ranked first is the one with the larger computing power resource information. This allows for convenient and accurate identification of the virtual object with the larger computing power resource information, improving efficiency and convenience.

[0118] In other embodiments, the process by which a computer device determines at least one target virtual object from a plurality of virtual objects based on the computing power resource information corresponding to each of the multiple virtual objects includes the following steps: the computer device determines at least one virtual object among the multiple virtual objects whose computing power resource information reaches a first threshold, and outputs the at least one virtual object whose computing power resource information reaches the first threshold as at least one target virtual object. In this embodiment, the virtual object whose computing power resource information reaches the first threshold is also the virtual object with large computing power resource information, thus directly filtering the virtual object with large computing power resource information based on the first threshold, without the need to sort the multiple virtual objects, thereby improving the efficiency of determining the target virtual object.

[0119] In other embodiments, the filtering objective is to select K target virtual objects, where K is an integer greater than 0. Optionally, the computer device identifies at least one virtual object among a plurality of virtual objects whose computing power resource information reaches a first threshold. Then, based on the computing power resource information corresponding to each of the at least one virtual object, it sorts the at least one virtual object to determine the top K virtual objects, and outputs the top K virtual objects as K target virtual objects. In this embodiment, virtual objects with large computing power resource information are first filtered based on the first threshold, narrowing the filtering range of virtual objects. Then, these virtual objects are sorted to determine the target virtual objects. Since the amount of data processing is reduced, the efficiency of determining the target virtual objects can be improved.

[0120] In this embodiment of the application, the computer device determines the target virtual object in each process through the above steps 302-304, and then performs the following performance optimization steps based on the target virtual objects in multiple processes, so as to realize the performance optimization of multiple processes in the virtual scene.

[0121] 305. For each target virtual object, if the target virtual object is a removable virtual object, the computer device shall delete the target virtual object from the virtual scene.

[0122] In this embodiment, the virtual objects in the virtual scene include deletable virtual objects and non-deletable virtual objects. The deletable and non-deletable virtual objects are set and changed as needed. For example, a computer device stores a deletable list and a non-deletable list, used to store deletable and non-deletable virtual objects respectively. Deletable virtual objects are those with low importance, while non-deletable objects are those with high importance.

[0123] In this embodiment, step 305 described above enables a computer device to optimize the performance of a virtual scene based on at least one target virtual object. Accordingly, if all at least one target virtual object is a deletable virtual object, then all at least one target virtual object is deleted from the virtual scene. In this embodiment, since the target virtual objects are those with high computing power, directly deleting them from the virtual scene avoids calls to the interface by the target virtual objects, thus reducing the consumption of computing power resources and preventing interference with other virtual objects, thereby improving the efficiency and effectiveness of performance optimization.

[0124] In other embodiments, after identifying multiple target virtual objects, the computer device performs performance optimization based on one of these target virtual objects. Optionally, the process of optimizing the performance of a virtual scene based on at least one target virtual object includes the following steps: if the target virtual object with the largest computing resource information is a removable virtual object, the computer device deletes that target virtual object from the virtual scene; if the target virtual object with the largest computing resource information is not a removable virtual object, the computer device determines the target virtual object ranked second in computing resource information, and if that target virtual object ranked second in computing resource information is a removable virtual object, it deletes that target virtual object from the virtual scene; if the target virtual object ranked second in computing resource information is not a removable virtual object, it determines the target virtual object ranked third in computing resource information, and repeats the above steps until the first removable virtual object among the multiple target virtual objects is found, and then deletes that target virtual object from the virtual scene. In this embodiment, by identifying multiple candidate target virtual objects in advance and then selecting the most suitable virtual object from them, the convenience of performance optimization based on target virtual objects can be improved.

[0125] In other embodiments, the target virtual objects identified by the computer device are all deletable target virtual objects. Accordingly, in the process of determining at least one target virtual object from multiple virtual objects based on the computing resource information corresponding to each virtual object, the computer device first identifies multiple deletable virtual objects from the multiple virtual objects, and then determines at least one target virtual object from these deletable virtual objects. Alternatively, before obtaining the call duration of each of the multiple virtual objects, the computer device determines the multiple deletable virtual objects in the virtual scene and obtains the call duration of each of the deletable virtual objects, thereby improving the convenience of subsequent processing.

[0126] For example, see Figure 8 , Figure 8 This is a flowchart illustrating a performance optimization method provided in an embodiment of this application. First, an overload check of the computing resources in the virtual scene is performed to determine if it is overloaded. If not, the process ends. If so, energy-consuming objects are filtered out; these are virtual objects with high computing resource information. Then, energy-consuming objects are deleted. Before deletion, it is determined whether the virtual object is deletable. If so, the virtual object is deleted, and the process ends. If not, subsequent filtering processes are performed, and the process ends.

[0127] 306. For each target virtual object, if the target virtual object is a non-deletable virtual object, the computing resource information corresponding to each of the various behaviors of the target virtual object is determined based on the call duration corresponding to each of the various behaviors.

[0128] The call duration for each virtual object includes the call duration for each of the virtual object's various behaviors. For example, see... Figure 9 , Figure 9 This is a schematic diagram of a performance analysis provided in an embodiment of this application. The computer device establishes a behavior list for each virtual object across multiple virtual objects of each object type. The behavior list includes various behaviors of the virtual object, and then obtains the call duration of each behavior on the interface.

[0129] In some embodiments, the process by which the computer device determines the computing resource information corresponding to various behaviors of the target virtual object based on the call duration of each behavior includes the following steps: For each behavior, a sixth ratio is determined, which is the ratio of the call duration corresponding to the behavior to the duration of the target time period. In this embodiment, since a longer call duration for a certain behavior indicates a higher utilization rate of computing resources, the ratio of the call duration of the behavior to the target time period is used as the computing resource information corresponding to that behavior. This ensures that the computing resource information can effectively represent the utilization of computing resources by the behavior, with high accuracy. Furthermore, using the ratio of the call duration to the target time period as the computing resource information limits the value of the computing resource information to a certain range, achieving data normalization, which facilitates the comparison of computing resource information of multiple virtual objects and improves data processing efficiency.

[0130] 307. The computer device determines at least one target behavior among the multiple behaviors based on the computing power resource information corresponding to each behavior, and the computing power resource information corresponding to the target behavior satisfies the second condition.

[0131] In this embodiment of the application, the second condition is used to determine behaviors that consume a lot of computing resources, that is, the target behavior is a behavior with a large amount of computing resource information.

[0132] In some embodiments, the process by which the computer device determines at least one target behavior among multiple behaviors based on the computing resource information corresponding to each behavior includes the following two implementation methods.

[0133] In one implementation, a computer device sorts multiple behaviors based on their respective computing resource information, determines the top P-ranked behavior, and outputs this top P-ranked behavior as at least one target behavior. The rank of each behavior is positively correlated with its corresponding computing resource information, where P is a positive integer greater than 0. In this embodiment, the behaviors are sorted in descending order of computing resource information, with the top-ranked behavior representing the behavior with the largest computing resource information. This allows for convenient and accurate identification of behaviors with large computing resource information, improving efficiency and convenience.

[0134] In another implementation, the computer device determines at least one behavior among multiple behaviors whose computing resource information reaches a third threshold, and outputs this at least one behavior as at least one target behavior. In this embodiment, the behavior whose computing resource information reaches the third threshold is also the behavior with large computing resource information. Therefore, the behavior with large computing resource information is directly filtered based on the third threshold, without the need to sort multiple behaviors, thus improving the efficiency of determining the target behavior.

[0135] 308. Computer equipment restricts the target virtual object from performing target behaviors in a virtual scene.

[0136] In some embodiments, the process by which the computer device restricts the target virtual object from performing target behavior in a virtual scene includes at least one of the following implementations: the computer device prohibits the target virtual object from performing target behavior in a virtual scene; the computer device reduces the frequency at which the target virtual object performs target behavior in a virtual scene.

[0137] Among them, prohibiting the target virtual object from performing the target behavior in the virtual scene means that the computer device does not respond to the target virtual object's call to the target interface, where the target interface refers to the interface corresponding to the target behavior.

[0138] In this embodiment, since the computing power resource information corresponding to the target behavior is large, it indicates that the computing power resources occupied when the target behavior calls the interface are large. Therefore, by prohibiting the execution of the target behavior or reducing the execution frequency of the target behavior, the target behavior of the target virtual object can be effectively restricted, thereby reducing the computing power resources occupied by the target virtual object and ensuring the performance optimization effect of the virtual scene.

[0139] For example, see Figure 10 , Figure 10This is a flowchart illustrating a performance optimization method provided in an embodiment of this application. For a target virtual object, the target behavior with the highest computational resource information is determined, and then the target virtual object is restricted from performing the target behavior in the virtual scene. For example, if a virtual object needs to perform actions such as walking, vision search, pursuit, and skill release in the virtual scene, and vision search has the highest computational resource information, then the vision search behavior can be skipped, and only walking, pursuit, and skill release behaviors can be performed.

[0140] In some embodiments, the behavior of a virtual object includes both restrictable and unrestrictable behaviors. Accordingly, the process by which the computer device restricts the target behavior of the target virtual object in a virtual scene includes the following steps: when the target behavior is restrictable, the computer device restricts the target behavior of the target virtual object in the virtual scene.

[0141] In other embodiments, the computer device identifies multiple target behaviors and performs performance optimization based on one of these target behaviors. Optionally, the process by which the computer device optimizes the performance of a virtual scene based on at least one target behavior includes the following steps: if the target behavior with the largest computing resource information is a finite behavior, the computer device restricts the target virtual object from performing the target behavior in the virtual scene; if the target behavior with the largest computing resource information is an unfinite behavior, the computer device determines the target behavior ranked second in computing resource information, and if the target behavior ranked second in computing resource information is a finite behavior, the computer device restricts the target virtual object from performing the target behavior in the virtual scene. If the target behavior ranked second in computing resource information is an unfinite behavior, the computer device determines the target behavior ranked third in computing resource information, and repeats the above steps until the first finite target behavior among the multiple target behaviors is found, and the target virtual object is restricted from performing the target behavior in the virtual scene.

[0142] For example, see Figure 11 , Figure 11 This is a flowchart of a performance optimization method provided in an embodiment of this application. When the target virtual object is a non-deletable virtual object, high-energy-consuming behaviors of the target virtual object are filtered out. High-energy-consuming behaviors are those with high computing power resource information, which are then identified as target behaviors. For a target behavior, if it can be restricted, it is restricted; if it cannot be restricted, the next behavior with high computing power resource information is selected. The above steps are repeated until a restrictable target behavior is found, at which point the process ends.

[0143] In this embodiment, steps 306-308 described above implement a process for performance optimization of a virtual scene based on at least one target virtual object. Since some virtual objects are non-deletable in the virtual scene, in this embodiment, when a target virtual object is non-deletable, the computing power resource information of various behaviors of the target virtual object is determined. Performance optimization is then performed based on behaviors with high computing power resource information for the target virtual object. This not only avoids the situation where non-deletable virtual objects cannot be optimized, but also refines performance optimization down to the behavior of virtual objects, thereby further improving the accuracy of performance optimization, enhancing the performance optimization effect, and further reducing the impact of performance optimization.

[0144] It should be noted that the sequence numbers of steps 305 and 306-308 above are for ease of explanation only; both are optional steps and are not intended to restrict their execution order. In other embodiments, the computer device may directly choose to perform performance optimization by deleting the target virtual object or by restricting the behavior of the target virtual object, without considering whether the target virtual object is a deletable virtual object.

[0145] In other embodiments, the computer device also performs performance optimization based on the object type of the virtual objects. The process of optimizing a virtual scene based on at least one target virtual object includes the following steps: The computer device, based on the object type of at least one target virtual object, determines the target object type to which the at least one target virtual object belongs most frequently, and deletes virtual objects of that target object type from the virtual scene. In this embodiment, if the overall computing power resource information for any object type is large, then virtual objects of that object type are directly deleted from the virtual scene. This batch deletion of virtual objects when there are a large number of virtual objects in the virtual scene improves the efficiency of performance optimization.

[0146] Furthermore, if each object type includes multiple subtypes, then optionally, the computer device determines the target subtype to which at least one target virtual object belongs most based on the subtype to which each target virtual object belongs, and deletes the virtual objects of the target subtype from the virtual scene, thereby improving the fineness of performance optimization.

[0147] In other embodiments, the process of determining at least one target virtual object based on the computing power resource information of each of the multiple virtual objects further includes the following implementation: the computer device determines the total computing power resource information corresponding to each object type based on the computing power resource information and object type of each of the multiple virtual objects. The total computing power resource information of each object type is the sum of the computing power resource information of multiple virtual objects under that object type. The multiple virtual objects included in the object type with the largest total computing power resource information are all output as target virtual objects. Then, all virtual objects of that object type can be directly deleted in the future, improving efficiency and convenience.

[0148] It should be noted that object types include deletable object types and non-deletable object types. For example, player-controlled virtual objects generally belong to the non-deletable object type, while NPC objects generally belong to the deletable object type. Optionally, the computer device stores a list of deletable types and a list of non-deletable types, respectively used to store deletable and non-deletable object types. Alternatively, if each object type has multiple subtypes including deletable and non-deletable subtypes, then the computer device stores a list of deletable subtypes and a list of non-deletable subtypes, respectively used to store deletable and non-deletable subtypes.

[0149] Accordingly, after determining the target object type, the computer device deletes the virtual object of the target object type from the virtual scene if the target object type is a deletable object type. Alternatively, after determining the target subtype, the computer device deletes the virtual object of the target subtype from the virtual scene if the target subtype is a deletable subtype.

[0150] This application provides a performance optimization method. This method determines the computing resource information of multiple virtual objects based on their respective interface call durations. Since a longer call duration indicates a higher computing resource consumption, the computing resource information determined by this method accurately represents the computing resource consumption of virtual objects. Furthermore, based on the computing resource information of multiple virtual objects, target virtual objects whose computing resource information meets a first condition are selected, i.e., virtual objects consuming a large amount of computing resources are identified. Performance optimization of the virtual scene is then performed based on these target virtual objects, reducing their computing resource consumption. This effectively reduces the computing resource consumption of virtual objects within the virtual scene, making the performance optimization more targeted, resulting in better optimization effects and improved operating efficiency. Moreover, this performance optimization method minimizes the impact on other virtual objects in the virtual scene, further enhancing the performance optimization effect.

[0151] In the embodiments of this application, to clearly illustrate the output and result of each of the above steps, please refer to... Figure 12 , Figure 12 This is a flowchart of a performance optimization method provided in an embodiment of this application. In this flowchart, combined with steps 301-303, the computing resource information of multiple virtual objects can be obtained. Combined with step 304, multiple virtual objects are obtained after sorting, with the target virtual object being virtual object 1, which is ranked first. Combined with step 305, the target virtual object that can be deleted is removed from the virtual scene. Combined with steps 306-308, for the target virtual object that cannot be deleted, its target behavior B is determined, and the target virtual object is restricted from executing target behavior B.

[0152] Through the above Figure 2 and Figure 3 The embodiments illustrate a performance optimization method. The following is based on... Figure 13 This paper introduces another performance optimization method, which uses the example of dividing the target time period into multiple sub-time periods to determine the target virtual object. See also... Figure 13 , Figure 13 This is a flowchart of a performance optimization method provided in an embodiment of this application, which includes the following steps.

[0153] 1301. The computer device determines multiple processes within a target time period, and each process is used to control multiple virtual objects in a virtual scene.

[0154] 1302. For each process, the computer device obtains the call duration of each of the multiple virtual objects in that process.

[0155] In the embodiments of this application, steps 1301-1302 are the same as steps 301-302, and will not be described again here.

[0156] In this embodiment, the invocation duration of the virtual object includes the invocation duration of the virtual object in multiple sub-time periods, and the invocation duration in each sub-time period includes the total invocation duration of multiple interfaces within that sub-time period. For example, see... Figure 14 , Figure 14 This is a schematic diagram illustrating the acquisition of call duration according to an embodiment of this application. The computer device's statistics system acquires and integrates the call durations of multiple virtual objects. Then, it splits the data according to processes to process the virtual objects within each process separately. For each process, the corresponding time period is divided into multiple sub-time periods, i.e., frames. Within each frame, a four-layer mapping relationship is formed based on the virtual object's object type, virtual object ID, behavior ID, and interface.

[0157] 1303. For each virtual object, the computer equipment determines the computing resource information of the virtual object in multiple sub-time periods based on the virtual object's call duration, and all multiple sub-time periods are located within the target time period.

[0158] In this embodiment, the durations of multiple sub-time periods can be the same or different. There are no overlapping time periods between the multiple sub-time periods; that is, the multiple sub-time periods do not overlap. It should be noted that the duration of a sub-time period is generally longer than the duration of a virtual object calling an interface once. For example, if the duration of a virtual object calling an interface once is 10 seconds, the duration of a sub-time period is 1 minute.

[0159] For any given process, if its time period coincides with the target time period, multiple sub-time periods are obtained by dividing the target time period. If the process's time period differs from the target time period (i.e., the process's duration is shorter than the target time period), then for each process, multiple sub-time periods are located within the target time period corresponding to that process. In other words, multiple sub-time periods are obtained by dividing the time period corresponding to the process.

[0160] In some embodiments, the process by which the computer device determines the computing resource information of each virtual object in multiple sub-time periods based on the virtual object's call duration includes the following implementation methods.

[0161] In one implementation, the computer device determines a third ratio for each sub-time period. This third ratio is the ratio of the virtual object's call duration within the sub-time period to the duration of the sub-time period. The third ratio is then output as the computing resource information of the virtual object within the sub-time period. In this embodiment, for each sub-time period, the longer the virtual object's call duration to the interface within that sub-time period, the higher the virtual object's utilization of computing resources within that sub-time period. Therefore, using the ratio of the virtual object's call duration to the duration of the sub-time period as the computing resource information of the virtual object within that sub-time period ensures that this information effectively represents the virtual object's utilization of computing resources within that sub-time period, providing high accuracy. Furthermore, directly determining the ratio of call duration to sub-time period duration is convenient and efficient, thus improving efficiency while maintaining accuracy. Moreover, using the ratio of call duration to sub-time period duration as the computing resource information limits the value of the computing resource information to a certain range, achieving data normalization. This facilitates the comparison of computing resource information for multiple virtual objects subsequently, improving data processing efficiency.

[0162] In another implementation, the computer device determines a fourth ratio for each sub-time period. This fourth ratio is the ratio of the virtual object's call duration within the sub-time period to the duration of the target time period. The fourth ratio is then output as the virtual object's computing resource information for the sub-time period. In this embodiment, for any sub-time period, the longer the virtual object's call duration to the interface within that sub-time period, the higher the virtual object's utilization rate of computing resources within that sub-time period. Therefore, the ratio of the virtual object's call duration within the sub-time period to the target time period is used as the virtual object's computing resource information. By dividing all calls by the target time period, the call duration is transformed by the same order of magnitude. This not only ensures that the computing resource information effectively represents the virtual resource's utilization within the sub-time period but also limits the values ​​of the computing resource information for multiple virtual objects to a certain range, achieving data normalization. This facilitates subsequent comparison of the computing resource information of multiple virtual objects and improves data processing efficiency.

[0163] In another implementation, the computer device determines a fifth ratio for each sub-time period. This fifth ratio is the ratio of the call duration of a virtual object within the sub-time period to the total call duration of multiple virtual objects within the sub-time period. The fifth ratio is then output as the computing resource information of the virtual object within the sub-time period. In this embodiment, for any sub-time period, the longer the call duration of a virtual object to the interface within that sub-time period, the higher the utilization rate of computing resources by the virtual object within that sub-time period. In this application, the goal is to filter out virtual objects with high computing resource utilization rates within a sub-time period, and then compare the call duration of a single virtual object within that sub-time period with the total call duration of all virtual objects within that sub-time period to obtain the computing resource information of the virtual object. This ensures that the computing resource information effectively represents the computing resource utilization of the virtual object among multiple virtual objects, resulting in high accuracy. Furthermore, using the ratio of call duration to total duration as the computing resource information limits the value of the computing resource information to a certain range, achieving data normalization and facilitating subsequent comparison of computing resource information of multiple virtual objects, thereby improving data processing efficiency.

[0164] In another implementation, the computer device directly uses the call duration of each virtual object within a sub-time period as the computing resource information of the virtual object within that sub-time period, thereby improving the efficiency of determining computing resource information.

[0165] In this embodiment of the application, the above step 1303 realizes the process of a computer device determining the computing power resource information corresponding to each of the multiple virtual objects based on the respective call duration of the multiple virtual objects.

[0166] For example, see Figure 15 , Figure 15This is a schematic diagram illustrating the distribution of computing power resource information provided in an embodiment of this application. The performance percentage refers to the computing power resource information. For each sub-time period, the computing power resource information for each virtual object in that sub-time period includes the computing power resource information corresponding to various behaviors of the virtual object during that sub-time period. Furthermore, for each sub-time period, based on the computing power resource information of multiple virtual objects in that sub-time period, the multiple virtual objects are sorted in descending order.

[0167] 1304. For each sub-time period, the computer device determines at least one candidate virtual object within the sub-time period based on the computing power resource information of multiple virtual objects in the sub-time period.

[0168] In this embodiment of the application, the computing power resource information of the candidate virtual object satisfies the third condition. The third condition is used to determine the virtual object that occupies more computing power resources, that is, the candidate virtual object is the virtual object with large computing power resource information.

[0169] In some embodiments, the process by which the computer device determines at least one candidate virtual object within a sub-time period based on the computing power resource information of multiple virtual objects in the sub-time period includes the following two implementation methods.

[0170] In one implementation, for each sub-time period, the computer device sorts multiple virtual objects based on their computing resource information within that sub-time period, determines at least one virtual object ranking in the top N positions, and outputs this at least one virtual object as at least one candidate virtual object. The ranking of each virtual object is positively correlated with its computing resource information within the sub-time period, where N is a positive integer. In this embodiment, the multiple virtual objects are sorted in descending order of their computing resource information. This ensures that the virtual objects ranking higher are those with larger computing resource information, thus conveniently and accurately identifying them and improving efficiency and convenience.

[0171] In the embodiments of this application, the ranking of a virtual object is positively correlated with the computing power resource information of the virtual object. That is, the larger the computing power resource information of the virtual object, the higher the ranking of the virtual object, and the smaller the computing power resource information of the virtual object, the lower the ranking of the virtual object.

[0172] In this embodiment, the value of N can be set and changed as needed. If the utilization rate of computing resources reaches the utilization threshold during the target time period, i.e., severe overload, N can be set to a value greater than the second value, i.e., N is set to a larger value, such as N=10. If the utilization rate of computing resources does not reach the utilization threshold during the target time period, i.e., the overload is not severe, N can be set to a value no greater than the second value, i.e., N is set to a smaller value, such as N=3. In this embodiment, the value of N is set based on the different computing resource utilization situations during the target time period. In this way, when the overload is severe, more virtual objects in the virtual scene can be optimized, achieving a greater degree of performance optimization for the virtual scene and ensuring the optimization effect. Correspondingly, when the overload is not severe, fewer virtual objects in the virtual scene are optimized. Obviously, this method can improve the flexibility and effectiveness of performance optimization.

[0173] For example, see Figure 16 , Figure 16 This is a schematic diagram illustrating the distribution of computing resource information provided in an embodiment of this application. The distribution of computing resource information in the Fth sub-time period is used as an example, where F is an integer greater than 0. The horizontal axis represents the ID of the virtual object, and the vertical axis represents the computing resource information. Multiple virtual objects are sorted from left to right according to the amount of computing resource information. This distribution diagram allows analysis of which virtual object consumes the most computing resources within the sub-time period, thus enabling analysis of objects consuming the most computing resources at the virtual object level. Accordingly, based on this distribution diagram, at least one candidate virtual object within the sub-time period can be identified.

[0174] The computing resource information for each virtual object in each sub-time period includes the computing resource information corresponding to various behaviors of the virtual object in that sub-time period, which is the sum of the computing resource information corresponding to various behaviors. For example, see Figure 17 , Figure 17 This is a schematic diagram illustrating the distribution of computing resource information provided in an embodiment of this application. The distribution of computing resource information corresponding to multiple behaviors of a virtual object within the Fth sub-time period is used as an example. The horizontal axis represents the ID of the behavior, and the vertical axis represents the computing resource information. Multiple behaviors are sorted from left to right according to the magnitude of their computing resource information. This breakdown of computing resources for different behaviors of the virtual object provides a more granular data display of computing resource usage.

[0175] In another implementation, for each sub-time period, the computer device identifies at least one virtual object among multiple virtual objects whose computing power resource information reaches a second threshold during the sub-time period, and outputs this at least one virtual object as at least one candidate virtual object. In this embodiment, the virtual object whose computing power resource information reaches the second threshold is also the virtual object with large computing power resource information. Therefore, the virtual object with large computing power resource information is directly filtered based on the second threshold, without the need to sort multiple virtual objects, thereby improving the efficiency of determining candidate virtual objects.

[0176] In other embodiments, the goal of filtering candidate virtual objects is to select L candidate virtual objects, where L is an integer greater than 0. Optionally, for each sub-time period, the computer device identifies at least one virtual object among multiple virtual objects whose computing power resource information reaches a second threshold in that sub-time period. Then, based on the computing power resource information corresponding to each of the at least one virtual object, the at least one virtual object is sorted to determine the top L virtual objects, and the top L virtual objects are output as L candidate virtual objects. In this embodiment, virtual objects with large computing power resource information are first filtered based on the second threshold, narrowing the range of virtual objects to be filtered. Then, these virtual objects are sorted to determine the candidate virtual objects. Since the amount of data processing is reduced, the efficiency of determining candidate virtual objects can be improved.

[0177] 1305. A computer device determines at least one target virtual object based on at least one candidate virtual object within multiple sub-time periods.

[0178] In some embodiments, the process by which the computer device determines at least one target virtual object based on at least one candidate virtual object within multiple sub-time periods includes the following steps: the computer device outputs candidate virtual objects appearing within at least a preset number of sub-time periods as target virtual objects. In this embodiment, since the candidate virtual objects within each sub-time period are virtual objects with large computing power resource information within that sub-time period, if any virtual object is a candidate virtual object within multiple sub-time periods, it indicates that the virtual object has a long call duration to the interface when calling the interface multiple times, that is, the virtual object frequently occupies the interface for a long time, resulting in a high overall utilization rate of computing power resources. Therefore, such a virtual object is selected as the target virtual object, improving the accuracy of the target virtual object.

[0179] The preset quantity can be set and changed as needed, and is not specifically limited here. Furthermore, the computer device will output the candidate virtual objects that appear in multiple consecutive sub-time periods as the target virtual objects. The number of consecutive sub-time periods is not less than the preset quantity. That is, the target virtual objects are not only candidate virtual objects in multiple sub-time periods, but also candidate virtual objects in consecutive sub-time periods. This further refines the definition of the target virtual objects and improves accuracy.

[0180] In this embodiment, steps 1304-1305 described above achieve the process of determining at least one target virtual object from multiple virtual objects based on their respective computing power resource information. In this embodiment, the target time period is divided into multiple sub-time periods, and virtual objects with large computing power resource information within each sub-time period are identified. The target virtual object is then determined from these virtual objects. This method ensures that the determined target virtual object is one that frequently calls the interface for long durations, rather than one whose long call duration is due to a single, specific call. Therefore, the target virtual object determined based on these candidate virtual objects is more accurate and representative, thus improving the accuracy of the target virtual object determination.

[0181] 1306. For each target virtual object, if the target virtual object is a removable virtual object, the computer device shall delete the target virtual object from the virtual scene.

[0182] In this embodiment of the application, step 1306 is the same as step 305 above, and will not be described again here.

[0183] In this embodiment, when a performance bottleneck occurs in the backend service, since the performance consumption percentage for each sub-time period has been obtained, the overall resource-consuming objects in the virtual scene can be adjusted in a packaged manner. For example, a virtual object may have high computing power resource information over several consecutive sub-time periods. Figure 18 As shown, at this point, an evaluation can be performed to determine whether the virtual object is removable within the virtual scene. If it is removable, the virtual object can be reclaimed from the virtual scene, i.e., deleted, through the virtual scene's control panel. Figure 19 As shown.

[0184] 1307. For each target virtual object, if the target virtual object is a non-deletable virtual object, the computing power resource information corresponding to each of the various behaviors of the target virtual object is determined based on the call duration corresponding to each of the various behaviors.

[0185] 1308. A computer device determines at least one target behavior among multiple behaviors based on the computing power resource information corresponding to each behavior, and the computing power resource information corresponding to the target behavior satisfies the second condition.

[0186] 1309. Computer equipment restricts the target virtual object from performing target behaviors in a virtual scene.

[0187] In the embodiments of this application, steps 1307-1309 are the same as steps 306-308 above, and will not be repeated here.

[0188] In this embodiment, virtual objects within a virtual scene are used as the unit for performance optimization, avoiding the efficiency issues and uncontrollable impact on business operations associated with performance tuning based on interfaces. Specifically, transforming performance optimization into a virtual object-based optimization unit avoids the code structure adjustment issues associated with interface-based performance optimization, saving development effort and making online performance tuning more agile. It eliminates the need for downtime-code modification-redeployment processes, allowing for direct online completion, saving time and effort. Furthermore, performance optimization based on virtual objects ensures core user experience while avoiding the risk of risk propagation from code-level optimization. Moreover, performance optimization based on virtual objects involves packaging and optimizing virtual objects, eliminating the need for individual function optimization and improving efficiency. Furthermore, optimizing based on the behavior of virtual objects enables multi-level optimization, compensating for the shortcomings of performance optimization based solely on virtual objects.

[0189] The method provided in this application is based on the fundamental characteristics of virtual scenario services. Hotspot analysis of the program is no longer limited to inanimate interfaces, but rather uses execution units within the virtual scenario as a framework, with specific virtual objects as the basic unit for statistical analysis. It analyzes performance overhead from a business perspective, making trade-offs in computing resource information to achieve a high degree of optimization with minimal effort. Simultaneously, it avoids the risks of uncontrollable business changes and experience loss caused by using interfaces as the optimization unit.

[0190] In this embodiment, the target time period is divided into multiple sub-time periods, and virtual objects with large computing power resource information are identified in each sub-time period. Then, the target virtual object is determined from these virtual objects. The target virtual object determined in this way is the virtual object that frequently calls the interface for a long time, rather than the virtual object whose long call time is caused by a single special call. Therefore, the target virtual object determined based on these candidate virtual objects is more accurate. On this basis, performance optimization based on the target virtual object can further improve the targeting of performance optimization, thereby improving the optimization effect and further improving the operating efficiency.

[0191] Figure 20This is a block diagram of a performance optimization apparatus according to an embodiment of this application. See also... Figure 20 The device includes:

[0192] The acquisition module 2001 is used to acquire the call duration of each of the multiple virtual objects in the virtual scene. The call duration is the duration of calling the interface in the virtual scene within the target time period.

[0193] The determination module 2002 is used to determine the computing power resource information corresponding to each of the multiple virtual objects based on their respective call durations. The computing power resource information corresponding to each virtual object is positively correlated with the call duration. The computing power resource information is used to indicate the computing power resources of the computer equipment running the virtual scene.

[0194] The determination module 2002 is also used to determine at least one target virtual object among the multiple virtual objects based on the computing power resource information corresponding to each of the multiple virtual objects, wherein the computing power resource information corresponding to the target virtual object satisfies the first condition.

[0195] Optimization module 2003 is used to optimize the performance of a virtual scene based on at least one target virtual object.

[0196] In some embodiments, the determining module 2002 is configured to:

[0197] For each virtual object, determine a first ratio, which is the ratio of the virtual object's call duration to the target time period duration; output the first ratio as the computing resource information corresponding to the virtual object; or...

[0198] For each virtual object, a second ratio is determined, which is the ratio of the call duration of the virtual object to the total call duration of multiple virtual objects; the second ratio is output as the computing resource information corresponding to the virtual object.

[0199] In some embodiments, the determining module 2002 is configured to:

[0200] Based on the computing power resource information corresponding to each of the multiple virtual objects, the multiple virtual objects are sorted, and at least one virtual object in the top M positions is determined. This at least one virtual object is then output as at least one target virtual object. The position of each virtual object is positively correlated with the computing power resource information corresponding to that virtual object, where M is a positive integer. Alternatively,

[0201] Identify at least one virtual object among multiple virtual objects whose computing power resource information reaches a first threshold, and output the at least one virtual object whose computing power resource information reaches the first threshold as at least one target virtual object.

[0202] In some embodiments, each virtual object calls the interface at least once within a target time period. The determining module 2002 is used for:

[0203] For each virtual object, based on the virtual object's call duration, the computing power resource information of the virtual object is determined in multiple sub-time periods, all of which are within the target time period;

[0204] For each sub-time period, based on the computing power resource information of multiple virtual objects in the sub-time period, at least one candidate virtual object is determined within the sub-time period;

[0205] Based on at least one candidate virtual object within multiple sub-time periods, determine at least one target virtual object.

[0206] In some embodiments, the determining module 2002 is configured to:

[0207] For each sub-time period, determine a third ratio, which is the ratio of the virtual object's call duration within the sub-time period to the duration of the sub-time period; output the third ratio as the computing resource information of the virtual object within the sub-time period; or,

[0208] For each sub-time period, determine a fourth ratio, which is the ratio of the virtual object's call duration within the sub-time period to the duration of the target time period; output the fourth ratio as the virtual object's computing resource information for the sub-time period; or,

[0209] For each sub-time period, a fifth ratio is determined. The fifth ratio is the ratio of the call duration of the virtual object in the sub-time period to the total call duration of multiple virtual objects in the sub-time period. The fifth ratio is output as the computing power resource information of the virtual object in the sub-time period.

[0210] In some embodiments, the determining module 2002 is configured to:

[0211] For each sub-time period, based on the computing power resource information of multiple virtual objects in the sub-time period, the multiple virtual objects are sorted, and at least one virtual object in the top N positions is determined. This at least one virtual object is output as at least one candidate virtual object. The position of each virtual object is positively correlated with its computing power resource information in the sub-time period, where N is a positive integer. Alternatively,

[0212] For each sub-time period, identify at least one virtual object among multiple virtual objects whose computing power resource information reaches the second threshold during the sub-time period, and output the at least one virtual object whose computing power resource information reaches the second threshold as at least one candidate virtual object.

[0213] In some embodiments, the determining module 2002 is configured to:

[0214] The candidate virtual objects that appear within at least a preset number of sub-time periods will be output as the target virtual object.

[0215] In some embodiments, the optimization module 2003 is used for:

[0216] Remove at least one target virtual object from the virtual scene.

[0217] In some embodiments, the call duration of each virtual object includes the call duration corresponding to each of the various behaviors of the virtual object; the optimization module 2003 is used for:

[0218] For each target virtual object, the computing resource information corresponding to each of the various behaviors of the target virtual object is determined based on the call duration corresponding to each of the various behaviors.

[0219] Based on the computing power resource information corresponding to each of the multiple behaviors, at least one target behavior is determined among the multiple behaviors, and the computing power resource information corresponding to the target behavior satisfies the second condition.

[0220] Restrict the target virtual object from performing the target behavior in the virtual scene.

[0221] In some embodiments, the optimization module 2003 is configured to perform at least one of the following:

[0222] Prevent the target virtual object from performing the target behavior in the virtual scene;

[0223] Reduce the frequency with which the target virtual object performs the target behavior in the virtual scene.

[0224] In some embodiments, the determining module 2002 is further configured to determine multiple processes within a target time period, each process being configured to control multiple virtual objects in a virtual scene;

[0225] Module 2001 is used for:

[0226] For each process, obtain the call duration of each of the multiple virtual objects in the process.

[0227] This application provides a performance optimization device that determines the computing resource information of multiple virtual objects based on their respective interface call durations. Since a longer call duration indicates a higher computing resource consumption, the computing resource information determined by this device accurately represents the computing resource consumption of virtual objects. Furthermore, based on the computing resource information of multiple virtual objects, target virtual objects whose computing resource information meets a first condition are selected, i.e., virtual objects consuming a large amount of computing resources are identified. Performance optimization of the virtual scene is then performed based on these target virtual objects, reducing their computing resource consumption. This effectively reduces the computing resource consumption of virtual objects within the virtual scene, making the performance optimization more targeted and resulting in better optimization and improved operating efficiency. Moreover, this performance optimization method minimizes the impact on other virtual objects in the virtual scene, further enhancing the performance optimization effect.

[0228] It should be noted that the performance optimization device provided in the above embodiments is only illustrated by the division of the above functional modules during model training. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the performance optimization device and the performance optimization method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0229] In the embodiments of this application, the computer device can be a terminal or a server. When the computer device is a terminal, the terminal acts as the execution subject to implement the technical solution provided in the embodiments of this application; when the computer device is a server, the server acts as the execution subject to implement the technical solution provided in the embodiments of this application; or, the technical solution provided in this application can be implemented through the interaction between the terminal and the server. The embodiments of this application do not limit this.

[0230] Figure 21 A structural block diagram of a terminal 2100 provided in an exemplary embodiment of this application is shown.

[0231] Typically, terminal 2100 includes a processor 2101 and a memory 2102.

[0232] Processor 2101 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 2101 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 2101 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 2101 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 2101 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0233] The memory 2102 may include one or more computer-readable storage media, which may be non-transitory. The memory 2102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 2102 are used to store at least one program code, which is executed by the processor 2101 to implement the performance optimization method provided in the method embodiments of this application.

[0234] In some embodiments, the terminal 2100 may also optionally include a peripheral device interface 2103 and at least one peripheral device. The processor 2101, memory 2102, and peripheral device interface 2103 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 2103 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 2104, a display screen 2105, a camera assembly 2106, an audio circuit 2107, and a power supply 2108.

[0235] Peripheral device interface 2103 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 2101 and memory 2102. In some embodiments, processor 2101, memory 2102 and peripheral device interface 2103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 2101, memory 2102 and peripheral device interface 2103 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0236] The radio frequency (RF) circuit 2104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 2104 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 2104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 2104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 2104 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 2104 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0237] Display screen 2105 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 2105 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 2101 for processing. In this case, display screen 2105 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 2105, disposed on the front panel of terminal 2100; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 2100 or in a folded design; in still other embodiments, display screen 2105 may be a flexible display screen, disposed on a curved or folded surface of terminal 2100. Furthermore, display screen 2105 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 2105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0238] The camera assembly 2106 is used to acquire images or videos. Optionally, the camera assembly 2106 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 2106 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0239] The audio circuit 2107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 2101 for processing, or to the radio frequency circuit 2104 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 2100. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 2101 or the radio frequency circuit 2104 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 2107 may also include a headphone jack.

[0240] Power supply 2108 is used to power the various components in terminal 2100. Power supply 2108 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 2108 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0241] In some embodiments, the terminal 2100 further includes one or more sensors 2109. The one or more sensors 2109 include, but are not limited to: an acceleration sensor 2110, a gyroscope sensor 2111, a pressure sensor 2112, an optical sensor 2113, and a proximity sensor 2114.

[0242] Accelerometer 2110 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 2100. For example, accelerometer 2110 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 2101 can control display screen 2105 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 2110. Accelerometer 2110 can also be used for games or for acquiring user motion data.

[0243] The gyroscope sensor 2111 can detect the orientation and rotation angle of the terminal 2100. The gyroscope sensor 2111 can work in conjunction with the accelerometer sensor 2110 to collect the user's 3D movements on the terminal 2100. Based on the data collected by the gyroscope sensor 2111, the processor 2101 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0244] The pressure sensor 2112 can be disposed on the side bezel of the terminal 2100 and / or on the lower layer of the display screen 2105. When the pressure sensor 2112 is disposed on the side bezel of the terminal 2100, it can detect the user's grip signal on the terminal 2100, and the processor 2101 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 2112. When the pressure sensor 2112 is disposed on the lower layer of the display screen 2105, the processor 2101 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 2105. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0245] An optical sensor 2113 is used to collect ambient light intensity. In one embodiment, the processor 2101 can control the display brightness of the display screen 2105 based on the ambient light intensity collected by the optical sensor 2113. Specifically, when the ambient light intensity is high, the display brightness of the display screen 2105 is increased; when the ambient light intensity is low, the display brightness of the display screen 2105 is decreased. In another embodiment, the processor 2101 can also dynamically adjust the shooting parameters of the camera assembly 2106 based on the ambient light intensity collected by the optical sensor 2113.

[0246] The proximity sensor 2114, also known as a distance sensor, is typically located on the front panel of the terminal 2100. The proximity sensor 2114 is used to detect the distance between the user and the front of the terminal 2100. In one embodiment, when the proximity sensor 2114 detects that the distance between the user and the front of the terminal 2100 is gradually decreasing, the processor 2101 controls the display screen 2105 to switch from a screen-on state to a screen-off state; when the proximity sensor 2114 detects that the distance between the user and the front of the terminal 2100 is gradually increasing, the processor 2101 controls the display screen 2105 to switch from a screen-off state to a screen-on state.

[0247] Those skilled in the art will understand that Figure 21 The structure shown does not constitute a limitation on terminal 2100 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0248] Figure 22This is a schematic diagram of a server structure according to an embodiment of this application. The server 2200 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 2201 and one or more memories 2202. The memories 2202 are used to store executable program code, and the processors 2201 are configured to execute the executable program code to implement the performance optimization methods provided in the various method embodiments described above. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated here.

[0249] This application also provides a computer-readable storage medium storing at least one program, which is loaded and executed by a processor to implement the performance optimization method of any of the above implementations.

[0250] This application also provides a computer program product, which includes at least one program segment stored in a computer-readable storage medium. The processor of a computer device reads the at least one program segment from the computer-readable storage medium and executes the at least one program segment, causing the computer device to perform the performance optimization method of any of the above implementations.

[0251] In some embodiments, the computer program product involved in the present application can be deployed and executed on a computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network can form a blockchain system.

[0252] All the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here. The above are only optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A performance optimization method, characterized in that, The method includes: Obtain the call duration of each of the multiple virtual objects in the virtual scene, wherein the call duration is the duration of calling the interface in the virtual scene within the target time period; Based on the call duration of each of the multiple virtual objects, the computing power resource information corresponding to each of the multiple virtual objects is determined. The computing power resource information corresponding to each virtual object is positively correlated with the call duration. The computing power resource information is used to indicate the computing power resources of the computer device running the virtual scene. Based on the computing power resource information corresponding to each of the plurality of virtual objects, at least one target virtual object is determined among the plurality of virtual objects, and the computing power resource information corresponding to the target virtual object satisfies the first condition. Based on the at least one target virtual object, the performance of the virtual scene is optimized.

2. The method according to claim 1, characterized in that, The step of determining the computing resource information corresponding to each of the multiple virtual objects based on their respective call durations includes: For each virtual object, a first ratio is determined, which is the ratio of the virtual object's call duration to the duration of the target time period; the first ratio is output as the computing resource information corresponding to the virtual object; or... For each virtual object, a second ratio is determined, which is the ratio of the call duration of the virtual object to the total call duration of the multiple virtual objects; the second ratio is output as the computing resource information corresponding to the virtual object.

3. The method according to claim 1, characterized in that, The step of determining at least one target virtual object among the plurality of virtual objects based on the computing power resource information corresponding to each of the plurality of virtual objects includes: Based on the computing power resource information corresponding to each of the plurality of virtual objects, the plurality of virtual objects are sorted, and at least one virtual object in the top M positions is determined. This at least one virtual object is then output as the at least one target virtual object. The position of each virtual object is positively correlated with the computing power resource information corresponding to that virtual object, where M is an integer greater than 0; or... Identify at least one virtual object among the plurality of virtual objects whose computing power resource information reaches a first threshold, and output the at least one virtual object whose computing power resource information reaches the first threshold as the at least one target virtual object.

4. The method according to claim 1, characterized in that, Each virtual object calls the interface at least once within the target time period. The determination of the computing resource information corresponding to each of the multiple virtual objects based on their respective call durations includes: For each virtual object, based on the call duration of the virtual object, the computing power resource information of the virtual object in multiple sub-time periods is determined, and all of the multiple sub-time periods are located within the target time period; The step of determining at least one target virtual object among the plurality of virtual objects based on the computing power resource information corresponding to each of the plurality of virtual objects includes: For each sub-time period, based on the computing power resource information of the plurality of virtual objects in the sub-time period, at least one candidate virtual object is determined within the sub-time period; Based on the at least one candidate virtual object within the plurality of sub-time periods, the at least one target virtual object is determined.

5. The method according to claim 4, characterized in that, For each virtual object, based on the virtual object's call duration, the computing resource information of the virtual object is determined in multiple sub-time periods, including: For each sub-time period, a third ratio is determined, which is the ratio of the virtual object's call duration within the sub-time period to the duration of the sub-time period; the third ratio is output as the computing resource information of the virtual object within the sub-time period; or... For each sub-time period, a fourth ratio is determined, which is the ratio of the virtual object's call duration within that sub-time period to the duration of the target time period; the fourth ratio is output as the computing resource information of the virtual object within that sub-time period; or... For each sub-time period, a fifth ratio is determined, which is the ratio of the call duration of the virtual object in the sub-time period to the total call duration of the multiple virtual objects in the sub-time period. The fifth ratio is then output as the computing power resource information of the virtual object in the sub-time period.

6. The method according to claim 4, characterized in that, For each sub-time period, based on the computing power resource information of the plurality of virtual objects in the sub-time period, determining at least one candidate virtual object within the sub-time period includes: For each sub-time period, based on the computing power resource information of the plurality of virtual objects in that sub-time period, the plurality of virtual objects are sorted, and at least one virtual object in the top N positions is determined. This at least one virtual object is then output as the at least one candidate virtual object. The position of each virtual object is positively correlated with its computing power resource information in that sub-time period, where N is a positive integer. Alternatively, For each sub-time period, at least one virtual object among the plurality of virtual objects whose computing power resource information reaches a second threshold in the sub-time period is identified, and the at least one virtual object whose computing power resource information reaches the second threshold is output as the at least one candidate virtual object.

7. The method according to claim 4, characterized in that, The step of determining the at least one target virtual object based on the at least one candidate virtual object within the plurality of sub-time periods includes: The candidate virtual objects that appear within at least a preset number of sub-time periods will be output as the target virtual object.

8. The method according to claim 1, characterized in that, The performance optimization of the virtual scene based on the at least one target virtual object includes: Remove the at least one target virtual object from the virtual scene.

9. The method according to claim 1, characterized in that, The call duration for each virtual object includes the call duration corresponding to each of the various behaviors of the virtual object; the performance optimization of the virtual scene based on the at least one target virtual object includes: For each target virtual object, the computing power resource information corresponding to each of the various behaviors of the target virtual object is determined based on the call duration of each behavior. Based on the computing power resource information corresponding to each of the multiple behaviors, at least one target behavior is determined among the multiple behaviors, and the computing power resource information corresponding to the target behavior satisfies the second condition. The target virtual object is restricted from performing the target behavior in the virtual scene.

10. The method according to claim 9, characterized in that, The restriction on the target virtual object to perform the target behavior in the virtual scene includes at least one of the following: The target virtual object is prohibited from performing the target behavior in the virtual scene; Reduce the frequency at which the target virtual object performs the target behavior in the virtual scene.

11. The method according to claim 1, characterized in that, The method further includes: Multiple processes are identified within the target time period, and each process is used to control multiple virtual objects in the virtual scene; The process of obtaining the call duration of each of the multiple virtual objects in the virtual scene includes: For each process, obtain the call duration of each of the multiple virtual objects in the process.

12. A performance optimization device, characterized in that, The device includes: The acquisition module is used to acquire the call duration of each of the multiple virtual objects in the virtual scene, wherein the call duration is the duration of calling the interface in the virtual scene within the target time period; The determination module is used to determine the computing power resource information corresponding to each of the multiple virtual objects based on the respective call duration of each virtual object. The computing power resource information corresponding to each virtual object is positively correlated with the call duration. The computing power resource information is used to indicate the computing power resources of the computer device running the virtual scene. The determining module is further configured to determine at least one target virtual object among the plurality of virtual objects based on the computing power resource information corresponding to each of the plurality of virtual objects, wherein the computing power resource information corresponding to the target virtual object satisfies the first condition; An optimization module is used to optimize the performance of the virtual scene based on the at least one target virtual object.

13. A computer device, characterized in that, The computer device includes a processor and a memory, the memory being used to store at least one program, the at least one program being loaded by the processor and executed as the performance optimization method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store at least one program segment for performing the performance optimization method according to any one of claims 1 to 11.

15. A computer program product, characterized in that, The computer program product includes at least one program segment stored in a computer-readable storage medium, a processor of a computer device reads the at least one program segment from the computer-readable storage medium, and the processor executes the at least one program segment, causing the computer device to perform the performance optimization method according to any one of claims 1 to 11.