Power consumption control method, related device, storage medium and program product

By collecting and analyzing the stack information of the threads with the highest processor core usage, combined with temperature information, high-power states in applications such as video conferencing can be identified and managed to improve application performance.

CN122111201APending Publication Date: 2026-05-29BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-11-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, applications such as video conferencing often suffer from high power consumption during operation, which affects application performance and leads to a poor user experience.

Method used

By collecting the stack information of the top N threads with the highest processor core usage in the target application, and combining the processor core usage information and temperature information, the factors causing high power consumption are identified, and power reduction strategy information is generated and sent to the processor to perform corresponding operations.

Benefits of technology

Accurately identify the factors contributing to high power consumption, effectively address high power consumption issues in applications, and improve application performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111201A_ABST
    Figure CN122111201A_ABST
Patent Text Reader

Abstract

Embodiments of the present specification disclose an application power consumption control method, related equipment, a storage medium and a program product, to more accurately analyze the attribution of an application in a high power consumption state. The method comprises: receiving stack information of a first thread of a target application, the first thread comprising the top N threads with the highest usage rate of a processor core, the stack information of the first thread being collected and uploaded when the target application is in a high power consumption state, whether the target application is in a high power consumption state being determined based on usage rate information of the target application on the processor core and a temperature of a processor running the target application; determining a factor causing the target application to be in a high power consumption state based on the stack information of the first thread; determining first policy information based on the factor, the first policy information being used to describe a processing operation performed to reduce power consumption of the target application; and sending the first policy information to the processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and in particular to an application power consumption control method, related devices, storage media, and program products. Background Technology

[0002] Currently, applications such as video conferencing often experience high power consumption during operation, affecting performance and leading to a poor user experience. Therefore, accurately identifying the factors causing high power consumption is crucial for power management in applications. Summary of the Invention

[0003] The purpose of the embodiments in this specification is to provide an application power consumption control method, related devices, storage media, and program products to more accurately analyze the attribution of applications in a high power consumption state.

[0004] To achieve the above objectives, the embodiments in this specification adopt the following technical solutions: Firstly, a power consumption control method is provided, including: Receive the stack information of the first thread of the target application. The first thread includes the top N threads with the highest utilization of the processor cores. The stack information of the first thread is collected and uploaded when the target application is in a high power consumption state. Whether the target application is in a high power consumption state is determined based on the utilization information of the processor cores of the target application and the temperature information of the processor running the target application. Based on the stack information of the first thread, the factors causing the target application to be in a high-power state are determined; Based on the aforementioned factors, first strategy information is determined, which describes the processing operations performed to reduce the power consumption of the target application. The first strategy information is sent to the processor.

[0005] Secondly, an application power consumption control device is provided, comprising: The receiving module is used to receive the stack information of the first thread of the target application. The first thread includes the top N threads with the highest utilization of the processor cores. The stack information of the first thread is collected and uploaded when the target application is in a high power consumption state. Whether the target application is in a high power consumption state is determined based on the utilization information of the processor cores of the target application and the temperature information of the processor running the target application. The first determining module is used to determine the factors that cause the target application to be in a high-power state based on the stack information of the first thread; The second determining module is used to determine first strategy information based on the factors, wherein the first strategy information is used to describe the processing operations performed to reduce the power consumption of the target application; The sending module is used to send the first strategy information to the processor.

[0006] Thirdly, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the application power consumption control method provided in the first aspect.

[0007] Fourthly, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the application power consumption control method provided in the first aspect.

[0008] Fifthly, a computer program product is provided, the computer program product including a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps in the application power consumption control method provided in the first aspect.

[0009] The solution in this specification uses runtime data reflecting the application's performance and power consumption, such as the application's processor core utilization and the processor temperature, to accurately identify whether the application is in a high-power state. Furthermore, when the application is in a high-power state, the stack information of the top N threads with the highest processor core utilization is collected. This thread stack information objectively reflects the actual power consumption of the application's threads. By uploading this thread stack information to the server, the server can correlate the relationship between threads and processor core utilization, thereby accurately analyzing the factors causing the application to be in a high-power state. Based on these factors, a first strategy is determined and sent to the processor. The processor then executes processing operations to reduce the power consumption of the target application according to the first strategy, effectively addressing the application's high-power problem and improving application performance. Attached Figure Description

[0010] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings: Figure 1A A schematic diagram of a system architecture provided for one embodiment of this specification; Figure 1B A flowchart illustrating an application power consumption control method provided as an embodiment of this specification; Figure 2A flowchart illustrating an application power consumption control method provided for another embodiment of this specification; Figure 3 A flowchart illustrating an application power consumption control method provided for another embodiment of this specification; Figure 4 A flowchart illustrating an application power consumption control method provided for another embodiment of this specification; Figure 5 A flowchart illustrating a method for uploading runtime data, provided as an embodiment of this specification; Figure 6 A flowchart illustrating an application power consumption control method provided for another embodiment of this specification; Figure 7 A flowchart illustrating a visualization method provided as an embodiment of this specification; Figure 8 A flowchart illustrating a visualization method provided for another embodiment of this specification; Figure 9 A schematic diagram of an application power consumption control device provided as an embodiment of this specification; Figure 10 This is a schematic diagram of an electronic device provided as an embodiment of the present specification. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this document.

[0012] The term "comprising" and its variations as used in this document are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description. The term "in response to" indicates that the performed operation depends on a condition or state. When the dependent condition or state is met, one or more operations may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which multiple operations are performed.

[0013] It should be noted that the concepts of "first" and "second" mentioned in this document are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0014] It should be noted that the terms "one" and "more" used in this document are illustrative rather than restrictive, and those skilled in the art should understand that, unless explicitly stated otherwise in the context, they should be understood as "one or more".

[0015] The names of messages or information exchanged between multiple devices in the embodiments of this document are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0016] During routine performance and power consumption management for high-power applications, the inventors discovered that terminals running these applications typically contain two types of processor cores: performance cores (P-cores) and efficiency cores (E-cores), which differ in performance and power consumption. Based on this, by analyzing the kernel source code and testing the terminal's operating system kernel scheduling mechanism, the inventors ultimately used the `pthread_setschedparam()` function and a control variable scheme to test the two types of processor cores during application operation. The precise relationship between the two types of processor cores under full load and the terminal's heat generation and power consumption is as follows: When the processor is under high load, the P core is prone to rapid temperature rise and high power consumption when in high load mode. It can rise from 31°C to 37°C and up to 40°C in 10 minutes under full load. In contrast, the E core hardly causes the terminal to heat up when in high load mode (the highest temperature reached was 34°C by the end of the test under full load), has low power consumption (almost half that of the P core), and high energy efficiency.

[0017] In summary, the utilization rate of processor cores by applications is a better reference indicator for reflecting performance and power consumption.

[0018] Based on this, embodiments of this specification propose an application power consumption control method. This method utilizes operational data reflecting the application's performance and power consumption, such as processor core utilization and processor temperature, to accurately identify whether the application is in a high-power state. Furthermore, when the application is in a high-power state, the stack information of the top N threads with the highest processor core utilization is collected. This stack information objectively reflects the actual power consumption of the application's threads. By uploading this stack information to a server, the server can correlate the relationship between threads and processor core utilization, thereby accurately analyzing the factors causing the application to be in a high-power state. Based on these factors, a first strategy is determined and sent to the processor. The processor then executes processing operations to reduce the power consumption of the target application according to the first strategy, effectively addressing the application's high-power problem and improving application performance.

[0019] Before providing a detailed description of the network connection control method provided in the embodiments of this application, a brief introduction to the system architecture involved in the embodiments of this application will be given. Please refer to... Figure 1A This is a schematic diagram of a system architecture shown in one embodiment of this application. The system mainly includes a terminal and a server.

[0020] The target application runs on the terminal. During the target application's operation, the terminal can monitor its runtime data and upload it to the server, providing data support for the governance of the target application. As an example, based on different functions, runtime data can be divided into runtime data corresponding to business function scenarios, runtime data corresponding to application scenarios, and runtime data corresponding to system scenarios. Runtime data corresponding to business function scenarios mainly includes data representing the functional status of the target application, such as the status of business functions like recording and video recording. Runtime data corresponding to application scenarios mainly includes the target application's runtime status (e.g., background runtime status, foreground runtime status) and network status. Runtime data corresponding to system scenarios mainly includes data from the terminal's operating system, such as, but not limited to: the target application's processor core usage information, processor temperature, terminal memory size and usage, the stack information of the target application's first thread, and the processor core load mode. Therefore, by grouping the runtime data collected in the current period, each resulting first data group contains runtime data belonging to a specific scenario within the current period, achieving scenario-based segmentation of runtime data. This helps the server perform correlation analysis on the data in different first data groups, thereby effectively identifying scenario-related performance and power consumption issues in real time.

[0021] Furthermore, the terminal can determine whether the processor core is in a high-load mode based on operational data, such as instantaneous high-load mode, short-term high-load mode, and continuous high-load mode, using this as a reliable indicator for managing the target application. The terminal also has proactive analysis capabilities. Specifically, if the processor core is in a high-load mode, it captures the stack traces of threads with high processor core usage and uploads this information to the server for automatic attribution analysis to identify the factors causing the processor core to be in a high-load mode. Based on the strategy returned by the server according to these factors, the terminal can then perform performance degradation on the target application to reduce its power consumption.

[0022] In addition, the terminal can monitor whether the power consumption of the target application is abnormal based on the target application's utilization of processor cores, the collected thread stack information, and the processor temperature, and issue an alarm when the power consumption of the target application is abnormal.

[0023] The server-side deploys various tools, including but not limited to log analysis platforms, query platforms, transformation platforms, automated testing tools, and offline testing tools. As an example, the server can use a log analysis platform to convert the target application's runtime data into corresponding visual files for display, while the query platform provides query functionality for the runtime data. Furthermore, the server can use a transformation platform to convert the thread stack information reported by the terminal into identifiable and processable data. By performing automated testing or using offline testing tools to test and analyze this data, the factors causing the target application to be in a high-power state or abnormal power consumption can be identified, thus providing more targeted strategies for managing the target application.

[0024] Based on the system architecture described above, the technical solutions provided in each embodiment of this specification will be explained in detail below with reference to the accompanying drawings.

[0025] Please refer to Figure 1B The following is a flowchart illustrating an application power consumption control method according to an embodiment of this specification. The method is applied to a terminal running a target application and includes the following steps: S102, collect the runtime data of the target application.

[0026] The target application can be any application, and the specific application can be determined based on the actual situation; there is no limitation here. For example, the target application can be a video-related application, such as a video conferencing application.

[0027] The runtime data includes: processor core utilization information of the target application, processor temperature while running the target application, etc. Utilization information may include, but is not limited to: the average processor core utilization of the target application, and the processor core utilization per thread of the target application. It is worth noting that terminals typically contain two types of processor cores: performance cores and efficiency cores, as described above. Both types may have multiple performance cores. In this case, the average utilization of performance cores refers to the average utilization of each performance core by the target application, and the average utilization of efficiency cores refers to the average utilization of each efficiency core by the target application.

[0028] In addition, the target application's operational data can also include more data that can reflect the target application's operational status, such as including but not limited to: the terminal's battery level and memory, the target application's operating status (e.g., running in the foreground, running in the background, or stopped), the target application's network status, and the status of the target application's various functions (e.g., image acquisition function is on or off).

[0029] S104 determines whether the target application is in a high-power state based on usage information and processor temperature.

[0030] The utilization rate of the processor cores and the temperature of the processor in the target application can objectively reflect the performance and power consumption of the application. Based on this operational data, it is possible to accurately identify whether the target application is in a high power consumption state.

[0031] In one embodiment, the load mode of the processor core is determined based on the average utilization of the processor core by the target application; if the load mode of the processor core is a high load mode or the temperature of the processor reaches a first temperature threshold, the target application is determined to be in a high power consumption state.

[0032] The high load modes include: instantaneous high load mode, short-term high load mode, and continuous high load mode.

[0033] If the average utilization of a processor core by the target application is greater than or equal to a first utilization threshold, the processor core's load mode is determined to be a transient high-load mode. Specifically, in the case of a terminal containing multiple processor cores, for each processor core, if the average utilization of that processor core by the target application is greater than or equal to a threshold x%, the load mode of that processor core is determined to be a transient high-load mode. By identifying whether a processor core is in a transient high-load mode, the aim is to not overlook any individual abnormal action and to avoid multiple occurrences of a single abnormal action leading to overall high power consumption.

[0034] If the average utilization of the processor core by the target application remains greater than or equal to a second utilization threshold for a duration exceeding the second threshold, then the processor core load pattern is determined to be a brief high-load pattern, where the second utilization threshold is less than the first utilization threshold. Specifically, as follows... Figure 2 As shown, for each processor core, if the average utilization of that processor core by the target application reaches the threshold y% for m seconds, then the load mode of that processor core is determined to be a momentary high load mode. Identifying whether a processor core is in a brief high load mode helps to resolve the issue of missing short-term abnormal behavior due to prolonged high load, thus preventing the loss of critical windows for core data collection.

[0035] If the average utilization of processor cores by the target application remains greater than or equal to the second utilization threshold for a duration that reaches a third duration, then the processor core load pattern is determined to be a sustained high load pattern, and the third duration is longer than the second duration. Specifically, such as... Figure 2 As shown, if the average utilization rate of the processor core by the target application reaches the threshold y% for M (M>m) seconds, then the load mode of the processor core is determined to be a continuous high load mode. By identifying whether the processor core is in a continuous high load mode, it is helpful to capture the behavior of the target application in occupying the processor core for a long time during operation, and quickly and accurately locate abnormal business scenarios.

[0036] Furthermore, such as Figure 2 As shown, if for each processor core, if the average utilization rate of the target application on that processor core does not reach the threshold y% or the duration of continuously reaching the threshold y% is less than the second duration, then the load mode of that processor core is determined to be the normal load mode, and then the average utilization rate of the target application on that processor core continues to be monitored.

[0037] In the embodiments of this specification, the first temperature threshold can be set according to actual needs. As an example, the processor temperature can be divided into four levels: nominal, fair, serious, and critical. The nominal level indicates that the processor temperature is within the specified operating temperature range and can maintain normal operating performance and stability. The fair level indicates that the processor temperature is slightly higher than the nominal level, but still within a relatively safe range and will not significantly affect the terminal performance. The serious level indicates that the processor temperature has a significant impact on the terminal performance and may even cause malfunctions or security problems. The critical level indicates that the processor temperature may directly lead to serious security problems such as terminal damage, malfunction, or fire. In this case, the first temperature threshold can be set to the serious level.

[0038] The above describes a partial implementation of S104. It should be understood that S104 can also be implemented in other ways, such as determining that the target application is in a high-power state when the processor core is in a high-load mode and the processor temperature reaches a first temperature threshold.

[0039] S106 If the target application is in a high-power state, the stack information of the first thread of the target application is collected.

[0040] The first thread consists of the top N threads that utilize the processor cores most frequently, where N is a positive integer.

[0041] In one implementation, such as Figure 2 As shown, once the target application is detected to be in a momentary high-load mode, the stack information of the first thread is collected; or, after the target application is detected to enter a short-term high-load mode or a continuous high-load mode, the stack information of the first thread is collected at specified intervals.

[0042] In another embodiment, the process of collecting the stack information of the first thread of the target application further includes: determining whether the conditions for stopping the collection are met based on the number of first threads collected in a single collection, the temperature of the processor, and the utilization rate of the processor cores by the first thread; if the conditions for stopping the collection are met, then the collection of the stack information of the first thread of the target application is stopped.

[0043] In this embodiment, since collecting the stack information of the first thread also generates some power consumption, frequent execution of this operation may exacerbate terminal overheating and affect the operation of the target application. Therefore, during the process of collecting the stack information of the first thread, once the number of first threads collected in a single session, the processor temperature, and the utilization rate of the processor cores by the first thread meet the stop collection conditions, the collection of the stack information of the first thread is stopped. This can prevent the terminal from overheating and ensure the normal operation of the target application.

[0044] The conditions for stopping data collection include: the number of first threads in a single data collection is greater than or equal to a second quantity threshold; or, the number of first threads that have been continuously collected up to the current time is greater than a third quantity threshold; or, the utilization rate of the processor core by any first thread at the current time is less than a fourth utilization rate threshold; or, the temperature of the processor at the current time reaches a second temperature threshold; or, the current time is within a specified time window.

[0045] The second quantity threshold, the third quantity threshold, the fourth utilization rate threshold, the second temperature threshold, and the specified time window can all be set according to actual needs, and the embodiments in this specification do not limit this.

[0046] For example, the second quantity threshold can be set to 3, thereby avoiding excessive heat generation on the terminal due to an excessive number of collected threads, ensuring the normal operation of the target application. The third quantity threshold can be set to 100, thereby avoiding excessive heat generation on the terminal due to continuous thread collection, ensuring the normal operation of the target application. The fourth utilization threshold can be set to more than 20% of the utilization rate, thereby avoiding unnecessary collection that could increase terminal heat generation, ensuring the normal operation of the target application. The second temperature threshold can be set to critical, thereby avoiding excessive processor temperature that could affect the normal operation of the target application. The specified time window can be set to 60 seconds, that is, the stack information of the first thread is collected every 60 seconds. For example, if the current time window has been entered for 10 seconds, the stack information of the first thread can only be collected again after 50 seconds, thereby avoiding frequent thread collection that could increase terminal heat generation, ensuring the normal operation of the target application.

[0047] In practical applications, such as Figure 3 As shown, when the terminal detects that the target application is in a high-power state, it determines whether the data collection function for the first thread is enabled. If enabled, it then determines whether the above-mentioned stop data collection conditions are met. If not met, it continues to collect the stack information of the first thread. If the data collection function for the first thread is not enabled or the above-mentioned stop data collection conditions are met, it stops collecting the stack information of the first thread and continues to monitor the running data of the target application.

[0048] In another embodiment of this specification, after S106 above, the method further includes: determining an abnormal thread from the first thread based on the stack information of the first thread; determining whether the power consumption of the target application is abnormal based on the number of abnormal threads, the running data of the target application, and the load mode of the processor core; if the power consumption of the target application is abnormal, generating a power consumption abnormality event and uploading it to the server.

[0049] By analyzing numerous abnormal power consumption cases both online and offline, and considering the relationship between processor core utilization and power consumption in the target application, the inventors discovered that the high power consumption of the target application is mainly caused by the following factors: charging the terminal causes it to overheat; the target application's consistently high utilization of performance cores leads to terminal overheating and high power consumption; frequent switching between data networks and base stations causes terminal overheating and high power consumption; the terminal is used in a high-temperature environment; and the terminal is using other high-utilization applications in the background. Taking all these factors into account, the factor that can be proactively managed within the target application is the consistently high utilization of performance cores, leading to terminal overheating and high power consumption.

[0050] Therefore, based on the number of abnormal threads, the running data of the target application, and the load mode of the processor core, it is possible to determine whether the power consumption of the target application is abnormal. This can accurately identify whether the power consumption of the target application is abnormal, and then report the power consumption abnormality event when the power consumption of the target application is abnormal. This helps the server to accurately locate the factors causing the power consumption abnormality of the target application, thereby improving the performance of the target application in a targeted manner and reducing the power consumption of the target application.

[0051] As an example, the following method can be used to determine whether the power consumption of a target application is abnormal: If the terminal's highest temperature at the current moment reaches the second temperature threshold, and the processor's temperature when the target application starts is lower than the highest temperature, then the power consumption of the target application is determined to be abnormal, and the second temperature threshold is higher than the first temperature threshold.

[0052] Alternatively, if the terminal's highest temperature at the current moment reaches the first temperature threshold, the processor's temperature at the time the target application starts is lower than the highest temperature, and at least one of the following conditions is met, then the target application's power consumption is determined to be abnormal: Condition 1: The number of times the performance core has been in high load mode up to the current moment is greater than or equal to the threshold of the first count; Condition 2: The ratio between the duration of the performance core being under high load and the runtime of the target application is greater than or equal to the first duration threshold. Condition 3: As of the current moment, the average utilization rate of the target application to the performance cores is greater than or equal to the third utilization threshold; Condition 4: The number of confirmed abnormal threads as of the current moment is greater than the first threshold. Condition 5: The average of the target application's average utilization of performance cores and average utilization of efficiency cores as of the current moment is greater than the fifth utilization threshold.

[0053] Specifically, such as Figure 4 As shown, during the operation of the target application, the terminal queries whether it is configured to ignore charging. If so, it identifies whether it is in a charging state. If the terminal is in a charging state, it does not perform abnormal power consumption identification. If the terminal is not in a charging state or is not configured to ignore charging, it monitors whether the processor temperature reaches the second temperature threshold. If the processor temperature reaches the second temperature threshold, and the highest temperature up to the current moment is greater than or equal to the processor temperature when the target application starts, it determines that the power consumption of the target application is abnormal, and then generates an abnormal power consumption event and uploads it to the server. If the processor temperature does not reach the second temperature threshold, but reaches the first temperature threshold, then if any of the above conditions 1 to 5 are met, it determines that the power consumption of the target application is abnormal, and then generates an abnormal power consumption event and uploads it to the server.

[0054] S108, upload the stack information of the first thread to the server so that the server can determine the factors that cause the target application to be in a high-power state.

[0055] In one implementation, the terminal can upload the stack information of the first thread to the server as soon as it collects the stack information of the first thread.

[0056] In another implementation, considering that the processor temperature during the target application's operation does not affect the target application's performance, or that the number of threads collected by the time the target application stops running is small, the reported stack information is meaningless for the server's attribution analysis. Therefore, to avoid unnecessary stack information reporting that could lead to resource consumption and terminal overheating, in the above S108, such as... Figure 3 As shown, after the target application stops running, if the processor temperature reaches the first temperature threshold during the operation of the target application, or if the number of the first threads collected is greater than or equal to the fourth number threshold, then the stack information of the first threads collected will be uploaded to the server.

[0057] The fourth quantity threshold can be set according to actual needs, such as 2. This application embodiment does not limit this.

[0058] In another embodiment of this specification, after S108 described above, the collected operational data can also be uploaded to the server. Since the operational data contains richer and more comprehensive information, uploading it to the server can assist the server in more accurately analyzing the factors causing the target application to be in a high-power state, thereby enabling more targeted management of the target application, reducing its power consumption, and improving its performance.

[0059] Specifically, the terminal can upload the collected operational data to the server in the following way: periodically divide the operational data of the target application belonging to the same scenario into the same first data group to obtain multiple first data groups; for each first data group, aggregate the operational data in the first data group to obtain aggregated data and upload it to the server.

[0060] For example, such as Figure 5As shown, depending on the function, the scenarios to which the runtime data belongs can include, but are not limited to, business function scenarios, application scenarios, and system scenarios. Runtime data belonging to business function scenarios mainly includes data representing the functional status of the target application, such as the status of business functions like recording and video recording. Runtime data belonging to application scenarios mainly includes the running status of the target application (e.g., background running status, foreground running status) and network status. Runtime data belonging to system scenarios mainly includes data from the terminal's operating system, such as, but not limited to, the target application's processor core usage information, processor temperature, terminal memory size and usage, the stack information of the target application's first thread, and the processor core load mode. Therefore, by grouping the runtime data collected in the current period, each resulting first data group contains runtime data belonging to a specific scenario within the current period. This allows for scenario-based segmentation of the runtime data, which helps the server perform correlation analysis on the data in different first data groups, thereby effectively identifying scenario-related performance and power consumption issues in real time.

[0061] Furthermore, for each first data group, the data in the first data group can be aggregated in various appropriate ways, and the embodiments in this specification do not limit this.

[0062] As an example, the runtime data in the first data group can be directly aggregated and uploaded to the server.

[0063] As another example, the process data in the first data group is aggregated to obtain aggregated data and uploaded to the server, including: adding corresponding sequence identifiers to the process data based on the generation order of the process data in the first data group, and aggregating the process data based on the sequence identifiers to obtain first aggregated data and uploading it to the server; and aggregating the instantaneous data in the first data group to obtain second aggregated data and uploading it to the server.

[0064] For example, such as Figure 5 As shown, process data essentially represents data with closed states, such as the recording function changing from an on to a closed state, or picture-in-picture entering and exiting. Instantaneous data, also known as non-process data, includes data such as the processor core usage rate of a target application at a certain moment, or the battery level and temperature of a terminal at a certain moment.

[0065] To ensure the orderliness of the process data, a unique sequence identifier is generated for this type of data. The terminal aggregates the process data within the current cycle according to the sequence identifier to form the first aggregated data reflecting the process and uploads it to the server. In this way, even if a single point of data is lost, it will not affect the overall integrity.

[0066] For instantaneous data, this type of data within the current period is directly aggregated to form a second aggregated data set, which is then uploaded to the server. Since the second aggregated data is uploaded to the server within the same period as the first aggregated data, alignment with the first aggregated data can be achieved.

[0067] S110 receives the first policy information sent by the server.

[0068] The first strategy information is determined by the server based on factors, and it is used to describe the processing operations performed to reduce the power consumption of the target application.

[0069] S112, based on the first strategy information, perform processing operations on the target application.

[0070] This allows for effective management of the target application, reducing its power consumption and improving its performance.

[0071] As an example, if the target application includes a video conferencing application, the processing operations include at least one of the following: reducing the audio sampling frame length of the video conferencing application, enabling the terminal's hardware encoding and hardware decoding capabilities, etc.

[0072] For example, if the initial audio sampling frame length of a video conferencing application is 15ms, it can be reduced to 10ms. This can reduce the utilization of the performance cores by the video conferencing application and reduce its power consumption.

[0073] For example, the terminal uses hardware such as a graphics card or dedicated chips to encode the acquired audio and video data. Because this hardware encoding method is high-performance and does not occupy processor cores, it can reduce the utilization of processor cores by video conferencing applications, especially the utilization of performance cores by the target application, while ensuring encoding quality, thereby greatly reducing the power consumption of video conferencing applications.

[0074] In addition, the terminal uses dedicated decoding chips and other hardware to decode the encoded results, which can reduce the workload of the processor core, improve decoding efficiency, reduce power consumption of video conferencing applications, and improve the smoothness and clarity of video playback.

[0075] The application power consumption control method provided in one or more embodiments of this specification accurately identifies whether an application is in a high-power state by utilizing operational data reflecting the application's performance and power consumption, such as the application's processor core utilization and the temperature of the processor running the application. Furthermore, when the application is in a high-power state, the stack information of the top N threads with the highest processor core utilization in the application is collected. This thread stack information objectively reflects the actual power consumption of the application's threads. By uploading this thread stack information to a server, the server can correlate the relationship between threads and processor core utilization, thereby accurately analyzing the factors causing the application to be in a high-power state. Based on these factors, a first strategy is determined and sent to the processor, allowing the processor to execute processing operations to reduce the power consumption of the target application according to the first strategy information, thereby effectively addressing the application's high power consumption problem and improving application performance.

[0076] Please refer to Figure 6 This is a flowchart illustrating another embodiment of a power consumption control method provided in this specification, which is applied to a server. Figure 6 As shown, the method includes the following steps: S602 receives the stack information of the first thread of the target application.

[0077] The first thread includes the top N threads with the highest processor core usage. The stack information of the first thread is collected and uploaded when the target application is in a high-power state. Whether the target application is in a high-power state is determined based on the target application's processor core usage information and the temperature information of the processor running the target application.

[0078] S604, based on the stack information of the first thread, determines the factors that cause the target application to be in a high-power state.

[0079] The stack information of the first thread contains key information such as the call context of the first thread, the state of the lock, and the running state of the first thread. By analyzing this key information, the potential relationship between the power consumption of the first thread and the target application can be determined, thereby identifying the factors that cause the target application to be in a high power consumption state.

[0080] In one implementation, the server can analyze the stack information of the first thread to determine the abnormal call stack of the first thread, and then determine the factors that cause the target application to be in a high-power state based on the mapping relationship between the abnormal call stack and the factors.

[0081] In another implementation, the server can also receive the target application's running data, abnormal power consumption events, etc. uploaded by the terminal, and use deep learning technology, big data, etc. to analyze the stack information of the first thread of these datasets to obtain the factors that cause the target application to be in a high power consumption state.

[0082] The foregoing illustrates a partial implementation of S604. It should be understood that S604 can be implemented in other ways, and this specification does not limit this implementation.

[0083] S606 determines first strategy information based on factors that cause the target application to be in a high-power state.

[0084] The first strategy information describes the processing operations performed to reduce the power consumption of the target application.

[0085] S608 sends the first policy information to the processor.

[0086] As an example, the server stores a pre-configured mapping relationship between factors and processing operations. Based on the factors that cause the target application to be in a high-power state, it determines the processing operations required to reduce the power consumption of the target application, and generates first policy information based on these processing operations and sends it to the terminal.

[0087] As another example, the server can use technologies such as deep learning and big data to determine the processing operations required to reduce the power consumption of the target application based on the factors that cause the target application to be in a high power consumption state, and generate first policy information based on these processing operations and send it to the terminal.

[0088] The application power consumption control method provided in this embodiment can effectively manage the target application, reduce its power consumption, and improve its performance.

[0089] In another embodiment of this specification, the server also has the function of visualizing the runtime data of the target application. As an example, such as... Figure 7 As shown, following S604 above, it also includes: S610a receives aggregated data from the target application and stores it in the backend of the query platform.

[0090] Aggregated data is obtained by aggregating the runtime data of the target application from the terminal.

[0091] S612a receives display requests through the front end of the query platform.

[0092] The display request is used to request a visualization of the aggregated data.

[0093] S614a, in response to a display request, retrieves aggregated data from the backend of the query platform via cloud computing services.

[0094] Cloud computing services can be FaaS (Function as a Service), which provides event-driven computing services that allow developers to write and upload function code without worrying about the underlying infrastructure. When a specific event is triggered, the FaaS service provider automatically executes this function code and returns the result.

[0095] For example, taking a video conferencing application as the target application, the user can input the terminal identifier, the identifier of the target meeting to be queried, and the meeting time range through the front end of the query platform. The front end carries the query information input by the user in the display request and sends the display request to the cloud computing service. The cloud computing service filters the running data from the back end of the query platform (without worrying about cross-domain, cross-tenant, or other environmental issues), aggregates and summarizes this running data, generates the first visualization file, and sends it to the file storage platform.

[0096] S616a generates a first visualization file based on aggregated data and sends it to the file storage platform, obtaining an access link for the first visualization file.

[0097] S618a sends the access link to the front end of the query platform for display via cloud computing services.

[0098] This allows the query platform's front end to seamlessly integrate visualization capabilities, enabling users to access the file storage platform and obtain the first visualized file by clicking the access link on the front end, thus solving the problems of difficulty in finding and consuming running data.

[0099] As another example, following S604 above, it also includes: The S610b receives aggregated data from the target application and stores it in the log analysis platform.

[0100] Aggregated data is obtained by aggregating the runtime data of the target application.

[0101] S612b, in response to receiving the target tracking event uploaded by the terminal, transforms the aggregated data into a second visualization file through the log analysis platform and sends it to the file storage platform for display.

[0102] The target event tracking can be set according to actual needs, and the embodiments in this specification do not limit it. For example, the target event tracking may include, but is not limited to: detecting abnormal power consumption of the target application, detecting that the target application is in a high power consumption state, detecting that the processor core enters a high load mode, etc.

[0103] like Figure 8As shown, during the operation of the target application, after the terminal detects the target event, it reports the event to the log analysis platform. The log analysis platform obtains the aggregated data of the target application and converts it into a second visualization file; further, the log analysis platform sends the second visualization file to the file storage platform for display.

[0104] The log analysis platform is a localized analysis platform. By storing the aggregated data of the target application in the log analysis platform, it helps to quickly obtain a second visualization text when visualizing the runtime data and send it to the file storage platform for display. This not only improves visualization efficiency but also enhances data security.

[0105] In another embodiment of this specification, the aggregated data is obtained by the processor periodically dividing the running data of the target application belonging to the same scenario into the same first data group, and then aggregating the running data in the first data group for each first data group.

[0106] Specifically, the operational data includes process data and instantaneous data, and the aggregated data includes first aggregated data and second aggregated data. The aggregated data is obtained as follows: for each first data group, based on the generation order of the process data in the first data group, a corresponding sequence identifier is added to the process data, and the process data is aggregated based on the sequence identifier to obtain the first aggregated data; the instantaneous data in the first data group is aggregated to obtain the second aggregated data.

[0107] In another embodiment of this specification, the utilization information includes the average utilization of the processor cores by the target application. Whether the target application is in a high-power state is determined by: determining the load mode of the processor cores based on the collected average utilization; if the load mode of the processor cores is a high-load mode or the processor temperature reaches a first temperature threshold, then the target application is determined to be in a high-power state.

[0108] Specifically, high load modes include instantaneous high load mode, short-term high load mode, and continuous high load mode. In this case, determining the processor core load mode based on the collected average utilization rate includes: if the collected average utilization rate is greater than or equal to a first utilization rate threshold, the processor core load mode is determined to be an instantaneous high load mode; if the collected average utilization rate is continuously greater than or equal to a second utilization rate threshold for a duration of a second duration, the processor core load mode is determined to be a short-term high load mode; if the collected average utilization rate is continuously greater than or equal to the second utilization rate threshold for a duration of a third duration, the processor core load mode is determined to be a continuous high load mode, where the third duration is greater than the second duration.

[0109] In another embodiment of this specification, prior to S604, the method further includes: receiving a power consumption anomaly event. This power consumption anomaly event is generated and uploaded by the processor upon determining that the target application has a power consumption anomaly. The power consumption anomaly of the target application is determined based on the number of abnormal threads in the first thread, the running data of the target application, and the load mode of the processor core. The abnormal threads are determined based on the stack information of the first thread. Accordingly, in S604, the factors causing the target application to be in a high-power state are determined based on the stack information of the first thread and the power consumption anomaly event.

[0110] In another embodiment of this specification, the processor core includes a performance core and an efficiency core. Whether the power consumption of the target application is abnormal is determined by the following method: If the processor's highest temperature at the current moment reaches the second temperature threshold, and the processor's temperature at the time the target application starts is lower than the highest temperature, then the power consumption of the target application is determined to be abnormal, and the second temperature threshold is higher than the first temperature threshold; or, If the processor's highest temperature at the current moment reaches the first temperature threshold, the processor's temperature at the time the target application starts is lower than the highest temperature, and at least one of the following conditions is met, then the power consumption of the target application is determined to be abnormal: The number of times the performance core has been in high load mode as of the current moment is greater than or equal to the threshold for the first occurrence. The ratio between the duration of the performance core being under high load and the runtime of the target application at the current moment is greater than or equal to the first duration threshold. As of the current moment, the target application's average utilization of performance cores is greater than or equal to the third utilization threshold; The number of confirmed abnormal threads as of the current moment exceeds the first threshold. As of the current moment, the average of the target application's average utilization of performance cores and average utilization of efficiency cores is greater than the fifth utilization threshold.

[0111] In another embodiment of this specification, the stack information of the first thread is collected when the number of first threads, the temperature of the processor, and the utilization rate of the processor core by the first thread meet the collection conditions in a single collection.

[0112] Specifically, the collection conditions include: the number of first threads collected in a single collection is less than the second quantity threshold; or, the number of first threads collected continuously up to the current time is less than the third quantity threshold; or, the utilization rate of any first thread on the processor core at the current time is greater than or equal to the fourth utilization rate threshold; or, the processor temperature at the current time has not reached the second temperature threshold; or, the current time is not within the specified time window.

[0113] In another embodiment of this specification, the stack information of the first thread is uploaded after the target application stops running, if the temperature of the processor during the operation of the target application reaches a first temperature threshold, or if the number of the first threads collected is greater than or equal to a fourth quantity threshold.

[0114] The application power consumption control method provided in one or more embodiments of this specification accurately identifies whether an application is in a high-power state by utilizing operational data reflecting the application's performance and power consumption, such as the application's processor core utilization and the temperature of the processor running the application. Furthermore, when the application is in a high-power state, the stack information of the top N threads with the highest processor core utilization in the application is collected. This thread stack information objectively reflects the actual power consumption of the application's threads. By uploading this thread stack information to the server, the server can correlate the relationship between threads and processor core utilization, thereby accurately analyzing the factors causing the application to be in a high-power state. Based on these factors, a first strategy is determined and sent to the processor, so that the processor can execute processing operations to reduce the power consumption of the target application according to the first strategy information, thereby effectively managing the application's high-power problem and improving application performance. In addition, compared with the above... Figure 6 Corresponding to the application power consumption control method shown, this specification also provides an application power consumption control device, which is applied to a server. Figure 9 This is a schematic diagram of the structure of an application power consumption control device 900 provided in the embodiments of this specification, including: The receiving module 910 is used to receive the stack information of the first thread of the target application. The first thread includes the top N threads with the highest utilization of the processor cores. The stack information of the first thread is collected and uploaded when the target application is in a high power consumption state. Whether the target application is in a high power consumption state is determined based on the utilization information of the processor cores of the target application and the temperature information of the processor running the target application. The first determining module 920 is used to determine the factors that cause the target application to be in a high-power state based on the stack information of the first thread.

[0115] The second determining module 930 is used to determine first strategy information based on the factors, wherein the first strategy information is used to describe the processing operations performed to reduce the power consumption of the target application.

[0116] The sending module 940 is used to send the first strategy information to the processor.

[0117] In another embodiment, the receiving module is further configured to: The system receives aggregated data from the target application and stores it in the backend of the query platform. The aggregated data is obtained by aggregating the runtime data of the target application. The query platform receives display requests through its front end, and the display requests are used to request the visualization of the aggregated data. The sending module is further configured to: In response to the display request, the aggregated data is obtained from the backend of the query platform through cloud computing services, and a first visualization file is generated based on the aggregated data and sent to the file storage platform to obtain the access link of the first visualization file; The access link is sent to the front end of the query platform for display via the cloud computing service.

[0118] In another embodiment, the receiving module is further configured to receive aggregated data of the target application and store it in the log analysis platform, wherein the aggregated data is obtained by aggregating the running data of the target application; The sending module is also used to respond to the target tracking event uploaded by the processor, convert the aggregated data into a second visualization file through the log analysis platform and send it to the file storage platform for display.

[0119] In another embodiment, the aggregated data is obtained by the processor periodically dividing the running data of the target application belonging to the same scenario into the same first data group, and then aggregating the running data in the first data group for each first data group.

[0120] In another embodiment, the operational data includes process data and instantaneous data, and the aggregated data includes first aggregated data and second aggregated data; The aggregated data is obtained in the following way: For each first data group, based on the generation order of the process data in the first data group, a corresponding sequence identifier is added to the process data, and the process data is aggregated based on the sequence identifier to obtain the first aggregated data; The instantaneous data in the first data group is aggregated to obtain the second aggregated data.

[0121] In another embodiment, the utilization information includes the average utilization of the processor core by the target application; Whether the target application is in a high-power state is determined in the following way: Based on the collected average utilization, the load pattern of the processor core is determined; If the processor core is in a high-load mode or the processor temperature reaches a first temperature threshold, then the target application is determined to be in a high-power state.

[0122] In another embodiment, the high load mode includes a momentary high load mode, a brief high load mode, and a continuous high load mode; Determining the load pattern of the processor core based on the collected average utilization includes: If the average utilization rate collected is greater than or equal to the first utilization rate threshold, then the load mode of the processor core is determined to be the instantaneous high load mode. If the average utilization rate is continuously greater than or equal to the second utilization rate threshold for a duration that reaches the second duration, then the load mode of the processor core is determined to be the brief high load mode. If the average utilization rate is continuously greater than or equal to the second utilization rate threshold for a duration of a third duration, then the load mode of the processor core is determined to be the continuous high load mode, and the third duration is longer than the second duration.

[0123] In another embodiment, the receiving module is further configured to receive a power consumption anomaly event, which is generated and uploaded by the processor when it determines that the target application has a power consumption anomaly. The power consumption anomaly of the target application is determined based on the number of abnormal threads in the first thread, the running data of the target application, and the load mode of the processor core. The abnormal threads are determined based on the stack information of the first thread. The first determining module is used to determine the factors that cause the target application to be in a high-power state based on the stack information of the first thread and the power consumption anomaly event.

[0124] In another embodiment, the processor core includes a performance core and an efficiency core; Whether the power consumption of the target application is abnormal is determined in the following way: If, as of the current moment, the processor's highest temperature reaches the second temperature threshold, and the processor's temperature at the time the target application starts is lower than the highest temperature, then it is determined that the target application's power consumption is abnormal, and the second temperature threshold is higher than the first temperature threshold; or... If the processor's highest temperature at the current moment reaches the first temperature threshold, the processor's temperature at the time the target application starts is lower than the highest temperature, and at least one of the following conditions is met, then the power consumption of the target application is determined to be abnormal: The number of times the performance core has been in high load mode as of the current moment is greater than or equal to the threshold of the first occurrence. The ratio between the duration of the performance core being under high load and the runtime of the target application is greater than or equal to a first duration threshold. As of the current moment, the average utilization rate of the target application on the performance core is greater than or equal to the third utilization threshold. The number of confirmed abnormal threads as of the current moment exceeds the first threshold. As of the current moment, the average of the target application's average utilization of the performance core and the average utilization of the efficiency core is greater than the fifth utilization threshold.

[0125] In another embodiment, the stack information of the first thread is collected when the number of the first thread, the temperature of the processor, and the utilization rate of the processor core by the first thread in a single acquisition meet the acquisition conditions.

[0126] In another embodiment, the acquisition conditions include: The number of threads in the first data collection session is less than the second threshold; or, The number of consecutively collected first-thread data points up to the current time is less than the third threshold; or, At the current moment, the utilization rate of the processor core by any first thread is greater than or equal to the fourth utilization threshold; or, The processor's temperature has not reached the second temperature threshold at the current moment; or, The current time is not within the specified time window.

[0127] In another embodiment, the stack information of the first thread is uploaded after the target application stops running, if the temperature of the processor during the operation of the target application reaches a first temperature threshold, or if the number of the first threads collected is greater than or equal to a fourth quantity threshold.

[0128] In another embodiment, the target application includes a video conferencing application, and the processing operation includes at least one of the following operations: reducing the audio sampling frame length of the video conferencing application, and enabling hard encoding and hard decoding of the video of the video conferencing application.

[0129] Obviously, the power consumption control device used in the embodiments of this specification can be used as described above. Figure 6 The illustrated application power consumption control method is the execution entity, thus enabling the application power consumption control method to achieve power consumption control in... Figure 6 The functions implemented are the same, so they will not be described in detail here.

[0130] Figure 10 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this specification. Please refer to it. Figure 10At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0131] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0132] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0133] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming an application power control mechanism at the logical level. The processor executes the program stored in memory and specifically performs the following operations: Receive the stack information of the first thread of the target application. The first thread includes the top N threads with the highest utilization of the processor cores. The stack information of the first thread is collected and uploaded when the target application is in a high power consumption state. Whether the target application is in a high power consumption state is determined based on the utilization information of the processor cores of the target application and the temperature information of the processor running the target application. Based on the stack information of the first thread, the factors causing the target application to be in a high-power state are determined; Based on the aforementioned factors, first strategy information is determined, which describes the processing operations performed to reduce the power consumption of the target application. The first strategy information is sent to the processor.

[0134] The above is as described in this instruction manual. Figure 6The method executed by the power consumption control device disclosed in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this specification can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0135] It should be understood that the electronic devices described in the embodiments of this specification can implement the application of power consumption control devices. Figure 6 The embodiments shown have the same function. Since the principle is the same, the embodiments in this specification will not be described again here.

[0136] Of course, in addition to software implementation, the electronic device described in this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0137] This specification also provides an embodiment of a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform... Figure 6 The method of the illustrated embodiment is specifically used to perform the following operations: Receive the stack information of the first thread of the target application. The first thread includes the top N threads with the highest utilization of the processor cores. The stack information of the first thread is collected and uploaded when the target application is in a high power consumption state. Whether the target application is in a high power consumption state is determined based on the utilization information of the processor cores of the target application and the temperature information of the processor running the target application. Based on the stack information of the first thread, the factors causing the target application to be in a high-power state are determined; Based on the aforementioned factors, first strategy information is determined, which describes the processing operations performed to reduce the power consumption of the target application. The first strategy information is sent to the processor.

[0138] This specification also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps in the application power consumption control method provided in the embodiments of this application.

[0139] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0140] In summary, the above description is merely a preferred embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

[0141] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0142] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0143] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0144] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A power consumption control method, characterized in that, include: Receive the stack information of the first thread of the target application. The first thread includes the top N threads with the highest utilization of the processor cores. The stack information of the first thread is collected and uploaded when the target application is in a high power consumption state. Whether the target application is in a high power consumption state is determined based on the utilization information of the processor cores of the target application and the temperature information of the processor running the target application. Based on the stack information of the first thread, the factors causing the target application to be in a high-power state are determined; Based on the aforementioned factors, first strategy information is determined, which describes the processing operations performed to reduce the power consumption of the target application. The first strategy information is sent to the processor.

2. The method as described in claim 1, characterized in that, After receiving the stack information of the first thread of the target application, the following is also included: The system receives aggregated data from the target application and stores it in the backend of the query platform. The aggregated data is obtained by aggregating the runtime data of the target application. The query platform receives display requests through its front end, and the display requests are used to request the visualization of the aggregated data. In response to the display request, the aggregated data is obtained from the backend of the query platform through cloud computing services, and a first visualization file is generated based on the aggregated data and sent to the file storage platform to obtain the access link of the first visualization file; The access link is sent to the front end of the query platform for display via the cloud computing service.

3. The method as described in claim 1, characterized in that, After receiving the stack information of the first thread of the target application, the following is also included: The system receives aggregated data from the target application and stores it in the log analysis platform. The aggregated data is obtained by aggregating the runtime data of the target application. In response to receiving the target tracking event uploaded by the processor, the aggregated data is converted into a second visualization file through the log analysis platform and sent to the file storage platform for display.

4. The method as described in claim 2 or 3, characterized in that, The aggregated data is obtained by the processor periodically dividing the running data of the target application belonging to the same scenario into the same first data group, and then aggregating the running data in the first data group for each first data group.

5. The method as described in claim 4, characterized in that, The operational data includes process data and instantaneous data, and the aggregated data includes first aggregated data and second aggregated data; The aggregated data is obtained in the following way: For each first data group, based on the generation order of the process data in the first data group, a corresponding sequence identifier is added to the process data, and the process data is aggregated based on the sequence identifier to obtain the first aggregated data; The instantaneous data in the first data group is aggregated to obtain the second aggregated data.

6. The method as described in claim 1, characterized in that, The utilization information includes the average utilization rate of the processor core by the target application; Whether the target application is in a high-power state is determined in the following way: Based on the collected average utilization, the load pattern of the processor core is determined; If the processor core is in a high-load mode or the processor temperature reaches a first temperature threshold, then the target application is determined to be in a high-power state.

7. The method as described in claim 6, characterized in that, The high load modes include instantaneous high load mode, short-term high load mode, and continuous high load mode; Determining the load pattern of the processor core based on the collected average utilization includes: If the average utilization rate collected is greater than or equal to the first utilization rate threshold, then the load mode of the processor core is determined to be the instantaneous high load mode. If the average utilization rate is continuously greater than or equal to the second utilization rate threshold for a duration that reaches the second duration, then the load mode of the processor core is determined to be the brief high load mode. If the average utilization rate is continuously greater than or equal to the second utilization rate threshold for a duration of a third duration, then the load mode of the processor core is determined to be the continuous high load mode, and the third duration is longer than the second duration.

8. The method as described in claim 6, characterized in that, Before determining the factors causing the target application to be in a high-power state based on the stack information of the first thread, the method further includes: Receive a power consumption anomaly event, which is generated and uploaded by the processor when it determines that the target application has a power consumption anomaly. The power consumption anomaly of the target application is determined based on the number of abnormal threads in the first thread, the running data of the target application, and the load mode of the processor core. The abnormal thread is determined based on the stack information of the first thread. The factors determining the high-power state of the target application based on the stack information of the first thread include: Based on the stack information of the first thread and the power consumption anomaly event, the factors causing the target application to be in a high power consumption state are determined.

9. The method as described in claim 8, characterized in that, The processor core includes a performance core and an efficiency core; Whether the power consumption of the target application is abnormal is determined in the following way: If the processor's highest temperature as of the current moment reaches the second temperature threshold, and the processor's temperature when the target application starts is lower than the highest temperature, then it is determined that the target application's power consumption is abnormal, and the second temperature threshold is higher than the first temperature threshold. or, If the processor's highest temperature at the current moment reaches the first temperature threshold, the processor's temperature at the time the target application starts is lower than the highest temperature, and at least one of the following conditions is met, then the power consumption of the target application is determined to be abnormal: The number of times the performance core has been in high load mode as of the current moment is greater than or equal to the threshold of the first occurrence. The ratio between the duration of the performance core being under high load and the runtime of the target application is greater than or equal to a first duration threshold. As of the current moment, the average utilization rate of the target application on the performance core is greater than or equal to the third utilization threshold. The number of confirmed abnormal threads as of the current moment exceeds the first threshold. As of the current moment, the average of the target application's average utilization of the performance core and the average utilization of the efficiency core is greater than the fifth utilization threshold.

10. The method as described in claim 1, characterized in that, The stack information of the first thread is collected when the number of the first thread, the temperature of the processor, and the utilization rate of the processor core by the first thread meet the collection conditions in a single collection.

11. The method as described in claim 10, characterized in that, The data collection conditions include: The number of threads in the first data collection session is less than the second threshold; or, The number of consecutively collected first-thread data points up to the current time is less than the third threshold; or, At the current moment, the utilization rate of the processor core by any first thread is greater than or equal to the fourth utilization threshold; or, The processor's temperature has not reached the second temperature threshold at the current moment; or, The current time is not within the specified time window.

12. The method as described in claim 1, characterized in that, The stack information of the first thread is uploaded after the target application stops running, if the temperature of the processor during the operation of the target application reaches a first temperature threshold, or if the number of the first threads collected is greater than or equal to a fourth quantity threshold.

13. The method as described in claim 1, characterized in that, The target application includes a video conferencing application, and the processing operation includes at least one of the following operations: reducing the audio sampling frame length of the video conferencing application, and enabling hardware encoding and hardware decoding of the video of the video conferencing application.

14. An application power consumption control device, characterized in that, include: The receiving module is used to receive the stack information of the first thread of the target application. The first thread includes the top N threads with the highest utilization of the processor cores. The stack information of the first thread is collected and uploaded when the target application is in a high power consumption state. Whether the target application is in a high power consumption state is determined based on the utilization information of the processor cores of the target application and the temperature information of the processor running the target application. The first determining module is used to determine the factors that cause the target application to be in a high-power state based on the stack information of the first thread; The second determining module is used to determine first strategy information based on the factors, wherein the first strategy information is used to describe the processing operations performed to reduce the power consumption of the target application; The sending module is used to send the first strategy information to the processor.

15. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the application power consumption control method as described in any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the application power consumption control method as described in any one of claims 1 to 13.

17. A computer program product, characterized in that, The computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps in the application power control method as described in any one of claims 1 to 13.