Power consumption abnormity attribution analysis method and device, equipment, storage medium and program product

Through multi-factor analysis and prediction models, the reasons for abnormal power consumption of electronic devices in high-performance functions such as video conferencing are accurately attributed to the problem of insufficient explanation of single factors in the existing technology, and the detailed influencing factors and degree of influence are provided. .

CN118964077APending Publication Date: 2024-11-15BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411034892.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The prior art is difficult to accurately analyze the reasons for abnormal power consumption in high-performance functions such as video conferencing. Relying solely on CPU or GPU usage is not enough to explain the problem of fast power consumption.

Method used

By obtaining data from multiple factors, including CPU usage, GPU usage, screen brightness, network IO, etc., we determine the target factors that may cause power consumption abnormalities, and input them into the power consumption speed prediction model, and replace them with standard data to predict Normal power consumption speed, and then determine the power consumption difference to attribute the cause of the abnormality.

Benefits of technology

The reasons for abnormal power consumption speed of electronic devices in high-performance functions such as video conferencing are more accurately analyzed, avoiding the problem of insufficient explanation of single factors, and providing more detailed influencing factors and degree of influence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964077A_ABST
    Figure CN118964077A_ABST
Patent Text Reader

Abstract

The invention relates to a power consumption abnormity attribution analysis method and device, equipment, a storage medium and a program product, and the method comprises the steps: obtaining a plurality of pieces of first data corresponding to a first power consumption speed and a plurality of factors of the electronic equipment within a preset duration of running a target function of a target application; determining at least one target factor from the plurality of factors, wherein the first data corresponding to the target factor is greater than or equal to a first data threshold value corresponding to the target factor; the at least one set of prediction data is input into the power consumption speed prediction model, at least one second power consumption speed is obtained, and the set of prediction data comprises data obtained by replacing first data corresponding to one target factor in the multiple pieces of first data with corresponding second data; the power consumption speed prediction model is obtained based on training of a plurality of historical sample data and a target machine learning model; and based on the at least one power consumption difference value corresponding to the at least one target factor, determining the power consumption abnormity attribution of the electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to a method, device, equipment, storage medium and program product for analyzing the cause of abnormal power consumption. Background Art

[0002] Currently, many applications have high-power consumption functions, such as video conferencing. Audio and video encoding and decoding, screen sharing, special effects, etc. during video conferencing consume a lot of power, and this consumption lasts for a long time (refer to general schedule meetings, which last for 30 minutes to 60 minutes). If the electronic device is not plugged in and the video conference is conducted using the battery power of the electronic device itself, the user may encounter the problem of fast power consumption (abnormal power consumption). For example, during the video conference, the user perceives that the power is decreasing rapidly, or even the battery power cannot support the user to complete the video conference.

[0003] Usually when explaining the cause of abnormal power consumption in electronic devices, the central processing unit (CPU) or graphics processing unit (GPU) usage rate is used as the starting point, because these two computer components consume the most power. However, on the one hand, it is difficult for users to be convinced that the high power consumption is caused by the high CPU or GPU usage rate just because the CPU or GPU usage rate exceeds the normal value. On the other hand, in addition to the CPU or GPU usage rate, there are many other factors that cause fast power consumption, such as screen brightness, network input / output (IO), battery aging, etc. Therefore, fast power consumption is not necessarily caused by high CPU or GPU usage (at least it is not the only reason).

[0004] Therefore, the abnormal power consumption during the execution of high-performance functions cannot be explained simply by whether the CPU and GPU usage rates exceed normal values. Summary of the invention

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, device, equipment, storage medium and program product for analyzing the causes of abnormal power consumption.

[0006] In a first aspect of an embodiment of the present disclosure, a method for attributing abnormal power consumption is provided, the method comprising: obtaining a first power consumption speed of an electronic device and a plurality of first data corresponding to a plurality of factors within a preset duration of running a target function of a target application, the plurality of factors being factors causing battery power consumption of the electronic device; determining at least one target factor from the plurality of factors, the first data corresponding to the target factor being greater than or equal to a first data threshold corresponding to the target factor; inputting at least one set of predicted data into a power consumption speed prediction model to obtain at least one second power consumption speed, the set of predicted data comprising data obtained by replacing a first data corresponding to one of the plurality of first data with corresponding second data, the second data being standard data corresponding to the target factor; the power consumption speed prediction model is obtained by training based on a plurality of historical sample data and a target machine learning model, the historical sample data comprising a plurality of historical data corresponding to the plurality of factors and power consumption speeds corresponding to the plurality of historical data; determining the abnormal power consumption attribution of the electronic device based on at least one power consumption difference corresponding to the at least one target factor, the at least one power consumption difference being a difference between the first power consumption speed and the at least one second power consumption speed.

[0007] According to a second aspect of an embodiment of the present disclosure, there is provided a device for analyzing the attribution of abnormal power consumption, the device comprising: an acquisition module for acquiring a first power consumption speed of an electronic device and a plurality of first data corresponding to a plurality of factors within a preset duration of running a target function of a target application, the plurality of factors being factors causing battery power consumption of the electronic device; a determination module for determining at least one target factor from the plurality of factors, the first data corresponding to the target factor being greater than or equal to a first data threshold corresponding to the target factor; a model prediction module for inputting at least one set of prediction data into a power consumption speed prediction model to obtain at least one second power consumption speed, the set of prediction data comprising data obtained by replacing a first data corresponding to one of the plurality of first data with corresponding second data, the second data being standard data corresponding to the target factor; the power consumption speed prediction model is obtained by training based on a plurality of historical sample data and a target machine learning model, the historical sample data comprising a plurality of historical data corresponding to the plurality of factors and a power consumption speed corresponding to the plurality of historical data; the determination module is further used to determine the attribution of abnormal power consumption of the electronic device based on at least one power consumption difference corresponding to the at least one target factor, the at least one power consumption difference being a difference between the first power consumption speed and the at least one second power consumption speed.

[0008] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for analyzing the cause of abnormal power consumption as described in the first aspect is implemented.

[0009] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for analyzing the causes of abnormal power consumption as described in the first aspect is implemented.

[0010] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product includes a computer program. When the computer program product runs on a processor, the processor executes the computer program to implement the power consumption abnormality attribution analysis method as described in the first aspect.

[0011] According to a sixth aspect of an embodiment of the present disclosure, a chip is provided, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run program instructions to implement the power consumption abnormality attribution analysis method as described in the first aspect.

[0012] Compared with the prior art, the technical solution provided by the disclosed embodiment has the following advantages: obtaining a first power consumption speed of an electronic device and a plurality of first data corresponding to a plurality of factors within a preset duration of running a target function of a target application, wherein the plurality of factors are factors causing battery power consumption of the electronic device; determining at least one target factor from the plurality of factors, wherein the first data corresponding to the target factor is greater than or equal to a first data threshold corresponding to the target factor; inputting at least one set of predicted data into a power consumption speed prediction model to obtain at least one second power consumption speed, wherein the set of predicted data includes data obtained by replacing a first data corresponding to one of the plurality of first data with corresponding second data, wherein the second data is standard data corresponding to the target factor; the power consumption speed prediction model is obtained by training based on a plurality of historical sample data and a target machine learning model, wherein the historical sample data includes a plurality of historical data corresponding to the plurality of factors and power consumption speeds corresponding to the plurality of historical data; determining the abnormal power consumption cause of the electronic device based on at least one power consumption difference corresponding to the at least one target factor, wherein the at least one power consumption difference is a difference between the first power consumption speed and the at least one second power consumption speed. In the embodiment of the present disclosure, at least one target factor among the multiple factors that may cause abnormal power consumption of the electronic device (i.e., excessive power consumption) is first determined based on the size relationship between the first data corresponding to the multiple factors and the corresponding first data thresholds, and then the second data corresponding to the at least one target factor (standard data, data that will not cause abnormal power consumption of the electronic device) replaces the corresponding first data to obtain at least one set of predicted data (a set of predicted data includes the second data corresponding to a target factor, and the first data corresponding to the other factors among the multiple factors except the one target factor, that is, a set of predicted data has only one data changed relative to the multiple first data (the first data corresponding to a target factor is replaced by the second data corresponding to the target factor). Data), therefore, the change of the second power consumption speed predicted based on a set of predicted data relative to the first power consumption speed is caused by the change of the data corresponding to the one target factor), at least one second power consumption speed corresponding to at least one set of predicted data is predicted by the power consumption speed prediction model, and then the difference between the first power consumption speed and at least one second power consumption speed, that is, the degree of influence of at least one target factor on the power consumption speed of the electronic device, thereby obtaining at least one influencing factor causing the abnormal power consumption speed of the electronic device (part or all of at least one target factor), and the degree of influence of at least one influencing factor on the power consumption speed of the electronic device (part or all of at least one power consumption difference). In this way, to a certain extent, compared with the relevant technology, it is possible to more accurately analyze and obtain the attribution of the abnormal power consumption speed of the electronic device during the operation of the target function. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0015] Figure 1 A flowchart of a method for analyzing the cause of abnormal power consumption provided by an embodiment of the present disclosure;

[0016] Figure 2 A structural block diagram of factors affecting power consumption speed provided by an embodiment of the present disclosure;

[0017] Figure 3 A structural block diagram of sub-factors affecting CPU usage of a video conferencing function provided in an embodiment of the present disclosure;

[0018] Figure 4 A flowchart of a method for training a power consumption speed prediction model provided by an embodiment of the present disclosure;

[0019] Figure 5 A flowchart of an analysis model training method provided in an embodiment of the present disclosure;

[0020] Figure 6 A structural block diagram of a device for analyzing the cause of abnormal power consumption provided by an embodiment of the present disclosure;

[0021] Figure 7 A structural block diagram of a model training device provided in an embodiment of the present disclosure;

[0022] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0024] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0025] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0026] Power consumption rate: power consumption percentage / power consumption duration. If the user uses the computer for 10 minutes and the power drops from 95% to 85%, the power consumption rate is (95%-85%) / 10min=1% / min.

[0027] Machine Learning (ML) is a branch of Artificial Intelligence (AI) that aims to build systems that can learn or improve performance based on the data used. Among them, supervised machine learning algorithms are the most commonly used. Supervised learning learns a function from a given training data set, and when new data arrives, the result can be predicted based on this function. The training set for supervised learning is required to include input and output, or features and targets. The targets in the training set are labeled by humans. Common supervised learning algorithms include regression analysis and statistical classification.

[0028] For example, we input a set of (height, weight, gender) into the machine learning algorithm for training, and get a function of height, weight and gender. Then next time when I input height and weight into the function, this function can help predict the gender result.

[0029] When the system CPU usage reaches 90%, it is natural that the power consumption is fast. However, some situations cannot be explained in this way: for example, apart from the high CPU or GPU usage, screen brightness, network IO, battery aging and other reasons can also lead to fast power consumption, that is, there are many actual influencing factors; in actual problems, there may not be a single factor that is significantly problematic, such as the system CPU usage is slightly higher than the normal value by 5%, and the GPU usage is also slightly higher by 10%, that is, each factor is only slightly abnormal, so how much these factors affect the final result (i.e. power consumption speed) cannot be explained clearly.

[0030] In the embodiment of the present disclosure, at least one target factor among the multiple factors that may cause abnormal power consumption of the electronic device (excessive power consumption, i.e. abnormal power consumption) is first determined based on the size relationship between the first data corresponding to the multiple factors and the corresponding first data thresholds, and then the second data corresponding to the at least one target factor (standard data, data that will not cause abnormal power consumption of the electronic device) replaces the corresponding first data to obtain at least one set of predicted data (a set of predicted data includes the second data corresponding to a target factor, and the first data corresponding to the other factors among the multiple factors except the one target factor, that is, a set of predicted data is changed by only one data relative to the multiple first data (the first data corresponding to a target factor is replaced by the first data corresponding to the target factor). is the second data), therefore, the change of the second power consumption speed predicted based on a set of predicted data relative to the first power consumption speed is caused by the change of the data corresponding to the one target factor), at least one second power consumption speed corresponding to at least one set of predicted data is predicted by the power consumption speed prediction model, and then the difference between the first power consumption speed and at least one second power consumption speed, that is, the degree of influence of at least one target factor on the power consumption speed of the electronic device, thereby obtaining at least one influencing factor causing the fast power consumption speed of the electronic device (part or all of at least one target factor), and the degree of influence of at least one influencing factor on the power consumption speed of the electronic device (part or all of at least one power consumption difference). In this way, to a certain extent, compared with the relevant technology, the problem of fast power consumption of electronic devices during video conferencing can be explained more clearly.

[0031] The electronic device in the embodiments of the present disclosure may be a mobile electronic device or a non-mobile electronic device. The mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA); the non-mobile electronic device may be a personal computer (PC), a television (TV), a teller machine, or an automated machine; the embodiments of the present disclosure do not specifically limit this.

[0032] The executor of the abnormal power consumption attribution analysis method provided in the embodiment of the present disclosure may be the above-mentioned electronic device (including mobile electronic devices and non-mobile electronic devices), or may be a functional module and / or functional entity in the electronic device that can implement the abnormal power consumption attribution analysis method. The specific execution may be determined based on actual usage requirements, and the embodiment of the present disclosure is not limited thereto.

[0033] The power consumption abnormality attribution analysis method provided by the embodiment of the present disclosure is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0034] like Figure 1 As shown, an embodiment of the present disclosure provides a method for analyzing the causes of abnormal power consumption, which may include the following steps 101 to 104.

[0035] 101. Obtain a plurality of first data corresponding to a first power consumption speed of an electronic device and a plurality of factors within a preset time period of running a target function of a target application.

[0036] The target application may be any application, which may be determined according to actual conditions and is not limited here.

[0037] Exemplarily, the target application may be a video-related application, and the target function may be a video-related function. For example, the target application may be an application supporting a video conferencing function, an application supporting a video calling function, an application supporting a video playing function, and the like.

[0038] Among them, within the preset time length for running the target function, it can be within the preset time length for running the target video conference, within the preset time length for running the target video call, or within the preset time length for playing the target video.

[0039] Exemplarily, the target application may be an image editing application, and the target function may be an image editing function. For example, the target application may be an application with an image editing function.

[0040] Among them, within the preset time length of running the target function may be within the preset time length of running the image editing function.

[0041] The multiple factors are factors that cause battery power consumption of the electronic device.

[0042] The preset duration can be determined according to actual conditions and is not limited here. For example, the preset duration can be 5 minutes, 8 minutes, 10 minutes, etc.

[0043] In some embodiments of the present application, the preset duration may be greater than or equal to a duration threshold, wherein the value of the duration threshold needs to satisfy the change in the displayed value of the battery power within the preset duration, and the duration threshold may be determined according to actual conditions.

[0044] Among them, multiple factors correspond to multiple first data one by one. The first data can be real-time data, average data, maximum or minimum value of real-time data of a factor collected within a preset time period, or other feasible data, which can be determined according to actual conditions and is not limited here.

[0045] Among them, Figure 2 As shown, the multiple factors may include at least one of the following: CPU usage, GPU usage, CPU / GPU ladder score, CPU frequency, disk IO, screen brightness, fan speed, battery design capacity, current maximum battery capacity, camera switch, network IO. The multiple factors may also include other feasibility factors, which can be determined according to actual conditions and are not limited here.

[0046] 102. Determine at least one target factor from the multiple factors.

[0047] The first data corresponding to the target factor is greater than or equal to a first data threshold corresponding to the target factor.

[0048] Among them, the first data threshold is a reasonable value corresponding to the target factor under the premise that the target function is in the same functional scenario and / or the same model (that is, when the value of the target factor is the first data threshold, the target factor is not the cause of the abnormal power consumption of the electronic device).

[0049] Exemplarily, if the target function is a video conferencing function, the first data threshold is a reasonable value corresponding to the target factor under the premise of the same functional scenario and / or the same model (that is, when the value of the target factor is the first data threshold, the target factor is not the cause of the abnormal power consumption of the electronic device).

[0050] Among them, the functional scenarios corresponding to the video conferencing function are divided according to the parameters of the video conferencing. For example, they can be divided into video conferencing scenarios with the camera turned on, video conferencing scenarios without the camera turned on, video conferencing scenarios with special effects turned on, and video conferencing scenarios without special effects turned on. The specific scenarios can be determined based on actual conditions and are not limited here.

[0051] The first data threshold may be determined based on actual conditions and is not limited here.

[0052] It can be understood that based on the multiple first data thresholds respectively corresponding to the multiple first data and the multiple factors, at least one target factor that may cause the electronic device to consume power quickly is determined from the multiple factors.

[0053] Among them, at least one target factor may include factors that cause the electronic device to consume power quickly, and may also include factors that do not cause the electronic device to consume power quickly. The specific factors can be determined based on actual conditions and are not limited here.

[0054] In some embodiments of the present disclosure, the first power consumption rate may be a measured actual power consumption rate of the electronic device, or may be a power consumption rate predicted by a power consumption rate prediction model based on a plurality of first data.

[0055] In some embodiments of the present disclosure, the first power consumption rate is the actual power consumption rate of the electronic device within the preset time period; the above step 102 can be specifically implemented through the following step 102a.

[0056] 102a. In response to the first power consumption speed being greater than or equal to a first power consumption speed threshold, determine the at least one target factor from the multiple factors.

[0057] The first power consumption speed threshold is a power consumption speed threshold obtained based on the disk data of the target function in the same functional scenario and / or the same model, which can be an average power consumption value or the product of the average power consumption value and a predetermined ratio. The power consumption speed threshold is used to indicate a reasonable power consumption value under the same functional scenario and / or the same model.

[0058] For example, if the target function is a video conferencing function, the first power consumption speed threshold is a power consumption speed threshold obtained based on the disk data of the same functional scenario and / or the same model, which can be an average power consumption value or the product of the average power consumption value and a predetermined ratio. The power consumption speed threshold is used to indicate a reasonable power consumption value under the same functional scenario and / or the same model.

[0059] It can be understood that in response to the first power consumption speed being less than the first power consumption speed threshold, it indicates that the power consumption of the electronic device is normal and there is no abnormal power consumption; in response to the first power consumption speed being greater than or equal to the first power consumption speed threshold, it indicates that the power consumption of the electronic device is abnormal, and it is necessary to analyze the abnormal power consumption of the electronic device. In this way, if it is determined that the power consumption of the electronic device is abnormal, then based on the actual power consumption speed, the abnormal power consumption of the electronic device is analyzed. If it is determined that the power consumption of the electronic device is normal, there is no need to analyze the power consumption of the electronic device, thus avoiding unnecessary analysis.

[0060] In some embodiments of the present disclosure, the above step 101 includes the following steps 101a and 101b.

[0061] 101a. Obtain the actual power consumption rate of the electronic device within the preset time period.

[0062] 101b. In response to the actual power consumption speed being greater than or equal to a first power consumption speed threshold, inputting the plurality of first data into the power consumption speed prediction model to obtain a first power consumption speed.

[0063] The description of the first power consumption speed threshold may refer to the related description of the first power consumption speed threshold in the above step 101a, which will not be repeated here.

[0064] It can be understood that if the actual power consumption rate is less than the first power consumption rate threshold, it means that the power consumption of the electronic device is normal and there is no abnormal power consumption; if the actual power consumption rate is greater than or equal to the first power consumption rate threshold, it means that the power consumption of the electronic device is abnormal, and it is necessary to analyze the abnormal power consumption of the electronic device. In this way, if it is determined that the power consumption of the electronic device is abnormal, the multiple first data are first input into the power consumption rate prediction model to obtain the first power consumption rate, and then based on the first power consumption rate, the abnormal power consumption of the electronic device is analyzed. If it is determined that the power consumption of the electronic device is normal, there is no need to analyze the power consumption of the electronic device, so unnecessary analysis can be avoided. Moreover, since the first power consumption rate and a second power consumption rate corresponding to one of the following target factors are both obtained through the power consumption rate prediction model, a power consumption difference determined based on the two is more accurate (since the first power consumption rate and the second power consumption rate are obtained in the same way, the error caused by the power consumption rate prediction model can be eliminated to a certain extent).

[0065] In some embodiments of the present disclosure, after the above step 101b, the above step 102 can be specifically implemented through the following step 102b.

[0066] 102b In response to an absolute value of a difference between the first power consumption speed and the actual power consumption speed being less than or equal to a first difference threshold, determining the at least one target factor from the multiple factors.

[0067] The first difference threshold is used to indicate the maximum allowable error of the power consumption speed prediction model. The first difference threshold may be a fixed value or a value determined according to actual conditions, which is not limited here.

[0068] Exemplarily, if the first difference threshold is a value determined according to actual conditions, the first difference threshold can be the product of the first ratio and the actual power consumption speed, or the product of the second ratio and the first power consumption speed. The first difference threshold can also be determined by other feasible methods. The specific value can be determined according to actual conditions and is not limited here.

[0069] It can be understood that if the absolute value of the difference between the first power consumption speed and the actual power consumption speed is less than or equal to the first difference threshold, it means that the difference between the first power consumption speed and the actual power consumption speed is within the allowable error range, which means that the power consumption speed prediction model is more accurate in prediction, and the subsequent analysis of the battery power consumption anomaly based on the first power consumption speed and the power consumption speed prediction model is more accurate. On the contrary, if the absolute value of the difference between the first power consumption speed and the actual power consumption speed is greater than the first difference threshold, it means that the power consumption speed prediction model is not accurate enough and needs to continue training the power consumption speed prediction model.

[0070] In some embodiments of the present disclosure, if the absolute value of the difference between the first power consumption speed and the actual power consumption speed is greater than a first difference threshold, the power consumption speed prediction model is retrained, and the first power consumption speed is re-predicted based on the trained power consumption speed prediction model until the absolute value of the difference between the first power consumption speed and the actual power consumption speed is less than or equal to the first difference threshold.

[0071] 103. Input at least one set of prediction data into a power consumption rate prediction model to obtain at least one second power consumption rate.

[0072] Among them, the set of prediction data includes data obtained by replacing the first data corresponding to one of the target factor among the multiple first data with the corresponding second data, and the second data is the standard data corresponding to the target factor; the power consumption rate prediction model is trained based on multiple historical sample data and a target machine learning model, and the historical sample data includes multiple historical data corresponding to the multiple factors and the power consumption rates corresponding to the multiple historical data (i.e., the actual power consumption rates).

[0073] At least one set of prediction data corresponds to at least one second power consumption speed. One set of prediction data is input into the power consumption speed prediction model to obtain a second power consumption speed, another set of prediction data is input into the power consumption speed prediction model to obtain another second power consumption speed, and so on to obtain at least one second power consumption speed.

[0074] In some embodiments of the present disclosure, the first data corresponding to a target factor (recorded as target factor 1) among multiple first data is replaced with the second data corresponding to the target factor 1 to obtain a set of predicted data; the first data corresponding to another target factor (recorded as target factor 2) among the multiple first data is replaced with the second data corresponding to the target factor 2 to obtain another set of predicted data, and so on to obtain at least one set of predicted data. It can be understood that a set of predicted data is different from the multiple first data in only one data, and the different data is the data corresponding to one target factor. In this way, the change of the second power consumption speed obtained by the power consumption speed prediction model based on a set of predicted data relative to the first power consumption speed is caused by the change of the data corresponding to the one target factor (that is, it complies with the single variable principle).

[0075] The standard data corresponding to a factor may be the same as or different from the first data threshold corresponding to the factor, which may be determined according to actual conditions and is not limited here. If the standard data corresponding to a factor is different from the first data threshold corresponding to the factor, the standard data corresponding to the factor may be less than the first data threshold corresponding to the factor.

[0076] The standard data corresponding to a factor is a data value obtained based on statistics of a large amount of historical data and will not cause the factor to cause the electronic device to consume power quickly.

[0077] In some embodiments of the present disclosure, standard data corresponding to a factor is obtained by statistics of a large amount of historical data corresponding to the target function in the same functional scenario and / or the same model, and will not cause the factor to cause abnormal power consumption speed of the electronic device.

[0078] In some embodiments of the present disclosure, the power consumption rate prediction model can be trained to predict the power consumption of devices of the same type as the electronic device, or it can be trained to predict the power consumption of devices of multiple types (including the type to which the electronic device belongs). The specific method can be determined based on actual conditions and is not limited here.

[0079] In some embodiments of the present disclosure, the power consumption rate prediction model is used to predict the power consumption of a target type device, which includes a device in a functional scenario to which the target function belongs, and / or a device of the same model as the electronic device.

[0080] In some embodiments of the present disclosure, the power consumption rate prediction model is used to predict the power consumption of various types of devices, and the input parameters of the power consumption rate prediction model also include the functional scenario to which the target function belongs, and / or the model of the electronic device.

[0081] In the disclosed embodiment, various forms of the power consumption rate prediction model are disclosed, which can be specifically determined according to actual conditions.

[0082] In some embodiments of the present disclosure, the input of the power consumption rate prediction model may further include a preset duration (ie, a data collection duration).

[0083] The training process of the power consumption speed prediction model may refer to the relevant descriptions of the following steps 401 to 402, which will not be described in detail here.

[0084] 104. Determine a cause of abnormal power consumption of the electronic device based on at least one power consumption difference corresponding to the at least one target factor.

[0085] The at least one power consumption difference is a difference between the first power consumption speed and the at least one second power consumption speed.

[0086] In some embodiments of the present disclosure, the above step 104 can be specifically implemented through the following step 104a or step 104b.

[0087] 104a. Determine the at least one target factor and the at least one power consumption difference as the cause of abnormal power consumption of the electronic device.

[0088] In the embodiment of the present application, the at least one target factor and the at least one power consumption difference are both determined as attributions of abnormal power consumption of the electronic device, so that the reasons causing the rapid power consumption of the electronic device can be displayed to the user in more detail.

[0089] 104b. Determine a target power consumption difference value greater than or equal to a second difference threshold value and the target factor corresponding to the target power consumption difference value among at least one power consumption difference value as the cause of abnormal power consumption of the electronic device.

[0090] The second difference threshold may be fixed or calculated according to actual conditions, which is not limited here.

[0091] Exemplarily, if the second difference threshold is calculated based on actual conditions, the second difference threshold can be the product of the first power consumption rate and the third ratio (used to indicate the maximum reduction ratio relative to the first power consumption rate, which is determined not to be the cause of the abnormal power consumption rate of the electronic device), or it can be the product of the corresponding second power consumption rate and the fourth ratio (relative to the first power consumption rate, which is determined not to be the cause of the abnormal power consumption rate of the electronic device). The specific ratio can be determined based on actual conditions and is not limited here.

[0092] In the disclosed embodiment, the main factor causing the electronic device to consume power quickly among at least one target factor and the degree of influence of the main factor on the electronic device's power consumption speed are determined as the cause of the abnormal power consumption speed of the electronic device. This can simplify the analysis results and reduce the difficulty of understanding for users.

[0093] Exemplarily, the target function is a video conferencing function, the target function is to run a target video conference, the target video conference is a meeting with abnormal power consumption reported by the user, and it is determined whether the actual power consumption rate A of the user's electronic device is normal; if the power consumption rate is too fast, the relevant characteristic data of the user during the target video conference (multiple first data corresponding to multiple factors) are input into the power consumption rate prediction model to obtain a predicted power consumption rate B; if A is close to B (within an acceptable error range), it is considered that the power consumption rate prediction model predicts accurately; at this time, the multiple first data are compared with the corresponding second data respectively. For example, if it is found that the system CPU occupancy rate during the user's meeting is about x% higher than the standard CPU occupancy rate, the user's CPU occupancy rate can be restored to the standard CPU occupancy rate, and then input into the power consumption rate prediction model again to obtain a predicted power consumption rate B'; thus, it can be known that this x% of CPU causes the user's power consumption rate to be B'-B faster.

[0094] In the embodiment of the present disclosure, at least one target factor among the multiple factors that may cause abnormal power consumption of the electronic device (i.e., excessive power consumption) is first determined based on the size relationship between the first data corresponding to the multiple factors and the corresponding first data thresholds, and then the second data corresponding to the at least one target factor (standard data, data that will not cause abnormal power consumption of the electronic device) replaces the corresponding first data to obtain at least one set of predicted data (a set of predicted data includes the second data corresponding to a target factor, and the first data corresponding to the other factors among the multiple factors except the one target factor, that is, a set of predicted data has only one data changed relative to the multiple first data (the first data corresponding to a target factor is replaced by the second data corresponding to the target factor). Data), therefore, the change of the second power consumption speed predicted based on a set of predicted data relative to the first power consumption speed is caused by the change of the data corresponding to the one target factor), at least one second power consumption speed corresponding to at least one set of predicted data is predicted by the power consumption speed prediction model, and then the difference between the first power consumption speed and at least one second power consumption speed, that is, the degree of influence of at least one target factor on the power consumption speed of the electronic device, thereby obtaining at least one influencing factor causing the abnormal power consumption speed of the electronic device (part or all of at least one target factor), and the degree of influence of at least one influencing factor on the power consumption speed of the electronic device (part or all of at least one power consumption difference). In this way, to a certain extent, compared with the relevant technology, the attribution of the abnormal power consumption speed of the electronic device during the operation of the target function can be accurately analyzed.

[0095] It should be noted that the operation target function can be a real-time operation target function or a historical operation target function. If the operation target function is to operate a target video conference, the target video conference can be a historical video conference or a real-time video conference, that is, the above steps 101 to 104 can be an analysis of the power consumption speed of the electronic device during the historical video conference (the video conference has ended when the analysis is performed) or an analysis of the power consumption speed of the electronic device during the real-time video conference (the video conference has not ended when the analysis is performed). The specific details can be determined according to the actual situation and are not limited here.

[0096] The target video conference can be a video conference obtained by tracking points, or a video conference with abnormal power consumption reported by users. The specific one can be determined based on actual conditions and is not limited here.

[0097] In some embodiments of the present disclosure, after the above-mentioned step 104, the power consumption abnormal attribution analysis method provided by the embodiment of the present disclosure may also include the following step 105a, step 106 to step 107; or, after the above-mentioned step 101, the power consumption abnormal attribution analysis method provided by the embodiment of the present disclosure may also include the following step 105b, step 106 and step 107.

[0098] 105a. In response to the abnormal attribution of power consumption of the electronic device including a first factor, obtaining first usage data of the target function for the first factor within the preset time period.

[0099] 105b. In response to the first data corresponding to the first factor being greater than or equal to the second data threshold, first usage data of the target function for the first factor within the preset time period is obtained.

[0100] The first factor is associated with a plurality of first sub-factors, and the second data threshold is greater than the first data threshold corresponding to the first factor.

[0101] The second data threshold is used to clearly indicate that the first factor is a factor causing the electronic device to consume power quickly, and the first data threshold is used to indicate that the first factor may be a factor causing the electronic device to consume power quickly.

[0102] The first factor may include any of the following: CPU usage, GPU usage, network IO, and the first factor may also be other factors, which are not limited here.

[0103] Exemplarily, if the first factor is CPU usage (also referred to as CPU occupancy), the multiple first sub-factors may include at least one of the following: special effect module, audio module, UI module, video module, data module, screen module. The special effect module corresponds to scene features, the audio module corresponds to audio stream features, the UI module corresponds to UI stream features, the video module corresponds to video stream features, the data module corresponds to device features, and the screen module corresponds to screen stream features.

[0104] Exemplarily, assuming that the first factor is CPU usage, multiple first sub-factors may include at least two of the following: special effects module CPU usage, audio module CPU usage, UI module CPU usage, video module CPU usage, data module CPU usage, screen module CPU usage. Multiple first sub-factors may also include other feasible sub-factors, which can be determined based on actual conditions and are not limited here.

[0105] 106. In response to the first usage data being greater than or equal to the first usage threshold, determining that usage of the first factor by the target function is a cause of the abnormal power consumption rate of the electronic device.

[0106] The first usage threshold is a reasonable usage value of the target function for the first factor, which can be determined based on actual conditions and is not limited here.

[0107] 107. In response to the first usage data being less than the first usage threshold, determining that usage of the first factor by the target function is not a cause of the abnormal power consumption speed of the electronic device.

[0108] It can be understood that if the first usage data is greater than or equal to the first usage threshold, it means that the usage data of the target function for the first factor exceeds the reasonable usage value, which means that the target function causes the electronic device to consume power abnormally; if the first usage data is less than the first usage threshold, it means that the usage data of the target function for the first factor does not exceed the reasonable usage value, which means that other applications cause the electronic device to consume power quickly.

[0109] In the disclosed embodiment, after the above step 104, the above step 105a, step 106 to step 107 are performed, and whether the target function is the cause of the first factor being the abnormal power consumption speed of the electronic device can be further analyzed on the basis of the above step 104. After the above step 101, the above step 105b, step 106 to step 107 are performed, and whether the target function is the cause of the first factor being the abnormal power consumption speed of the electronic device can be determined more quickly on the basis of the above step 101 and on the premise that it can be clearly determined that the first factor is the factor causing the electronic device to consume power quickly (the first data corresponding to the first factor is greater than or equal to the second data threshold).

[0110] In some embodiments of the present disclosure, after the above step 101, the above step 105b, the scheme of steps 106 to 107, and the scheme of steps 101 to 104 can all be performed, or one scheme can be selected to perform, which can be determined according to actual conditions.

[0111] In some embodiments of the present disclosure, after the above step 106, the power consumption abnormality attribution analysis method provided by the embodiments of the present disclosure may further include the following steps 108 to 110.

[0112] 108. Obtain first characteristic data corresponding to the plurality of first sub-factors and first actual usage data of the first factors respectively within the preset time period.

[0113] Among them, the first characteristic data can be real-time data, average data, maximum value or minimum value in real-time data of the corresponding feature collected within a preset time period, or other feasibility data, which can be determined according to actual conditions and is not limited here.

[0114] One sub-factor corresponds to one or more first characteristic data. The one or more first characteristic data corresponding to different sub-factors may be all the same, partially the same and partially different, or all different. The specific details may be determined based on actual conditions and are not limited here.

[0115] Any first characteristic data corresponding to a sub-factor is collected data that affects the characteristics of the sub-factor.

[0116] 109. Input the first characteristic data corresponding to the plurality of first sub-factors into a first analysis model corresponding to the first factor to obtain first predicted usage data of the plurality of first sub-factors for the first factor.

[0117] Among them, the first analysis model is obtained by training based on multiple first historical training data and a first machine learning model, and the first historical training data includes the first historical feature data corresponding to the multiple first sub-factors respectively, and the first historical actual usage data of the multiple first sub-factors for the first factor respectively.

[0118] The plurality of first sub-factors correspond one-to-one to the plurality of first predicted usage data, and the plurality of first predicted usage data correspond one-to-one to the plurality of first actual usage data.

[0119] It can be understood that the present application inputs the first characteristic data corresponding to the multiple first sub-factors respectively into the first analysis model corresponding to the first factor at the same time to obtain the multiple first predicted usage data.

[0120] The training of the first analysis model may refer to the relevant description of the following steps 501 to 502, which will not be described in detail here.

[0121] Exemplarily, it is assumed that the first factor is CPU usage, such as Figure 3 As shown, multiple first sub-factors include special effects module CPU usage, audio module CPU usage, UI module CPU usage, video module CPU usage, data module CPU usage and screen module CPU usage; the features corresponding to the multiple first sub-factors include four feature modules: device features, scene features, video stream features and screen stream features, among which device features include: CPU real-time frequency, CPU ladder score, number of CPU cores, number of external monitors; scene features include: projection box, remote control, local recording, sharing type, annotation, special effects, camera switch, independent mouse; video stream features include: number of subscribed 90 / 180 / 360 / 720P streams, number of published 90 / 180 / 360 / 720P streams, camera acquisition size / frame rate, camera publishing size / frame rate, upstream and downstream bit rates, encoding and decoding schemes; screen stream features include: captured screen size, sent screen size, captured screen frame rate, sent screen frame rate, received screen size, and received screen frame rate.

[0122] Therefore, the first sub-factors correspond to the first feature data, i.e., the feature data of the features included in the above four feature modules. The feature data of the features included in the above four feature modules are simultaneously input into the first analysis model to obtain a total of 6 first predicted usage data, namely, the predicted CPU usage rate of the special effect module, the predicted CPU usage rate of the audio module, the predicted CPU usage rate of the UI module, the predicted CPU usage rate of the video module, the predicted CPU usage rate of the data module, and the predicted CPU usage rate of the screen module.

[0123] Correspondingly, the first actual usage data of the first factor respectively include six first actual usage data, namely, the actual usage rate of the special effect module CPU, the actual usage rate of the audio module CPU, the actual usage rate of the UI module CPU, the actual usage rate of the video module CPU, the actual usage rate of the data module CPU and the actual usage rate of the screen module CPU.

[0124] 110. Determine at least one target first sub-factor from the multiple first sub-factors based on the first actual usage data and the first predicted usage data respectively corresponding to the multiple first sub-factors.

[0125] Among them, the absolute value of the difference between the first predicted usage data and the first actual usage data corresponding to the target first sub-factor is greater than or equal to the third difference threshold, and the at least one target first sub-factor is the reason why the first factor causes the abnormal power consumption speed of the electronic device.

[0126] The third difference threshold is used to indicate whether there is an abnormality in the actual usage data of a sub-factor to the first factor.

[0127] If the absolute value of the difference between the first predicted usage data and the first actual usage data corresponding to a sub-factor is less than the third difference threshold, it means that the difference between the two is not large, indicating that the actual usage data of the sub-factor for the first factor is within a reasonable range; if the absolute value of the difference between the first predicted usage data and the first actual usage data corresponding to a sub-factor is greater than or equal to the third difference threshold, it means that the gap between the two is large, the actual usage data of the sub-factor for the first factor is much higher, and the actual usage data of the sub-factor for the first factor is abnormal. This sub-factor is an abnormal usage factor for the first factor. Next, the log, other data and code can be combined to implement further root cause analysis of this sub-factor. You can refer to the relevant technology, which will not be elaborated here.

[0128] The third difference threshold may be fixed or calculated in real time, which is not limited here.

[0129] Exemplarily, if the third difference threshold is calculated in real time, the third difference threshold can be the product of the first predicted usage data and the fifth ratio, or the product of the corresponding first actual usage data and the sixth ratio. The specific value can be determined based on actual conditions and is not limited here.

[0130] In the disclosed embodiment, through the above steps 108 to 110, the sub-factors in the first factor that cause the electronic device to consume power quickly are further analyzed for the target function, so that the reasons for the abnormal power consumption speed of the electronic device can be accurately and more detailedly obtained.

[0131] In some embodiments of the present disclosure, the solutions corresponding to the above steps 105b, 106, 108 to 110, and the solutions corresponding to the above steps 101 to 104 may all be performed, or one solution may be selected for performance, which may be determined based on actual conditions.

[0132] In some embodiments of the present disclosure, the power consumption abnormality attribution analysis method provided by the embodiments of the present disclosure may also include the following steps 111 to 112.

[0133] 111. Acquire a plurality of third data corresponding to the plurality of factors of the electronic device within a first time period including a currently running target function at a current moment.

[0134] Among them, since steps 111 to 112 are used to predict the power consumption of the target function running in real time, the first time length is usually less than the preset time length. The first time length can be 0.5 minutes, 1 minute, etc., which is not limited here.

[0135] The multiple factors correspond to the multiple third data one by one. The description of the third data can refer to the above-mentioned description of the first data, which will not be repeated here.

[0136] 112. Input the plurality of third data into the power consumption rate prediction model to obtain a third power consumption rate, where the third power consumption rate is used to determine whether the electronic device currently has abnormal power consumption.

[0137] In the disclosed embodiment, steps 111 to 112 can be used to predict the real-time power consumption of the target function running in real time, and then the predicted third power consumption rate can be used to determine whether the currently running target function has a problem of fast power consumption.

[0138] In some embodiments of the present disclosure, after the above step 112, the power consumption abnormality attribution analysis method provided by the embodiments of the present disclosure may further include the following steps 113 to 115.

[0139] 113. In response to the third power consumption rate being greater than or equal to the second power consumption rate threshold, obtaining second usage data of the currently running target function on the second factor within the first duration.

[0140] The second factor is one of the multiple factors. The second factor may include any of the following: CPU usage, GPU usage, network IO, and the first factor may also be other factors, which are not limited here.

[0141] The second factor may be the same as or different from the first factor, and may be determined based on actual conditions, and is not limited here.

[0142] The description of the second factor and the second usage data may refer to the related description of the first factor and the first usage data in the above embodiment, which will not be repeated here.

[0143] For the description of the second power consumption speed threshold, reference may be made to the related description of the second power consumption speed threshold in the above embodiment, which will not be repeated here.

[0144] It can be understood that if the third power consumption rate is greater than or equal to the second power consumption rate threshold, it means that the current power consumption of the electronic device is abnormal; if the third power consumption rate is less than the second power consumption rate threshold, it means that the current power consumption of the electronic device is normal.

[0145] 114. In response to the second usage data being greater than or equal to a second usage threshold, execute a target degradation strategy for the currently running target function.

[0146] The second usage threshold may be the same as or different from the first usage threshold, and may be determined based on actual conditions, which is not limited here.

[0147] It should be noted that, since the preset duration is generally greater than the first duration, the second usage threshold is generally smaller than the first usage threshold.

[0148] The description of the second usage threshold may refer to the above description of the first usage threshold, which will not be repeated here.

[0149] Among them, the target degradation measurement can be degradation measures such as reducing screen brightness, reducing special effect energy consumption, reducing audio energy consumption, and reducing video energy consumption.

[0150] 115. In response to the second usage data being less than the second usage threshold, outputting prompt information, where the prompt information is used to indicate that the electronic device is running other applications.

[0151] It is understood that if the second usage data is less than the second usage threshold, it indicates that there are third-party applications (other applications) with relatively high energy consumption in the electronic device, so the user can be prompted to close the third-party application. The prompt information can be determined according to actual conditions and is not limited here.

[0152] In the embodiment of the present application, through the above steps 113 to 115, if it is determined that the power consumption of the electronic device is abnormal, certain measures can be taken to reduce the power consumption rate of the electronic device, thereby ensuring the power consumption of the target function and improving the user experience.

[0153] In some embodiments of the present disclosure, the power consumption abnormality attribution analysis method provided by the embodiments of the present disclosure may also include the following steps 116 to 119.

[0154] 116. Obtain fourth data corresponding to the second factor of the electronic device within a second time period including the current target function at the current moment.

[0155] The second factor is associated with a plurality of second sub-factors, and the second factor is one of the plurality of factors.

[0156] The second duration may be determined based on actual conditions, and the second duration is generally shorter than the preset duration.

[0157] The second duration may be the same as or different from the first duration, and the second duration is generally shorter than the first duration.

[0158] Among them, the description of the fourth data can refer to the above-mentioned description of the first data, which will not be repeated here.

[0159] 117. In response to the fourth data being greater than or equal to the third data threshold, obtain second usage data of the second factor of the electronic device by the currently running target function within a second time period.

[0160] The third data threshold is greater than the first data threshold corresponding to the second factor.

[0161] The third data threshold may be the same as or different from the second data threshold, which is not limited here.

[0162] The description of the third data threshold may refer to the above-mentioned description of the second data threshold, which will not be repeated here.

[0163] 118. In response to the second usage data being greater than or equal to the second usage threshold, determining that usage of the second factor by the currently running target function is the cause of the abnormal power consumption speed of the electronic device.

[0164] The second usage threshold may be the same as or different from the first usage threshold, and may be determined based on actual conditions, which is not limited here.

[0165] The description of the second usage threshold may refer to the above description of the first usage threshold, which will not be repeated here.

[0166] After step 118 , a target degradation strategy may be executed for the currently running target function, or the scheme of steps 120 to 122 described below may be executed.

[0167] 119. In response to the second usage data being less than the second usage threshold, determining that usage of the second factor by the currently running target function is not a cause of the abnormal power consumption speed of the electronic device.

[0168] A prompt message may be output after step 119, where the prompt message is used to indicate that the electronic device is running other applications and then waits for the user to close the related application.

[0169] For the description of the above steps 116 to 119, reference may be made to the relevant description of the above steps 105b, 106 and 107, which will not be repeated here.

[0170] In the embodiment of the present disclosure, in the case where the second factor of the target function running in real time (the target function currently running) suddenly increases rapidly, the use of the second factor by the target function currently running can be quickly and accurately analyzed to determine whether it is the cause of the abnormal power consumption rate of the electronic device.

[0171] In some embodiments of the present disclosure, after the above step 118, the power consumption abnormality attribution analysis method provided by the embodiments of the present disclosure may further include the following steps 120 to 122.

[0172] 120. Obtain second feature data corresponding to the plurality of second sub-factors and second actual usage data of the second factors respectively within a second period of time.

[0173] 121. Input the second characteristic data corresponding to the plurality of second sub-factors into a second analysis model corresponding to the second factor to obtain second predicted usage data of the plurality of second sub-factors for the second factor.

[0174] Among them, the second analysis model is obtained by training based on multiple second historical training data and a second machine learning model, and the second historical training data includes second historical feature data corresponding to the multiple second sub-factors respectively, and second historical actual usage data of the multiple second sub-factors for the second factor respectively.

[0175] 122. Determine at least one target second sub-factor from the plurality of second sub-factors based on the second actual usage data and the second predicted usage data respectively corresponding to the plurality of second sub-factors.

[0176] Among them, the absolute value of the difference between the second predicted usage data and the second actual usage data corresponding to the target second sub-factor is greater than or equal to the fourth difference threshold, and the at least one target second sub-factor is the reason why the second factor causes the abnormal power consumption speed of the electronic device.

[0177] The fourth difference threshold value may be the same as or different from the third difference threshold value, and may be determined based on actual conditions, which is not limited here.

[0178] The description of the above steps 120 to 122 can refer to the relevant description of the above steps 108 to 110, which will not be repeated here.

[0179] In the disclosed embodiment, through the above steps 120 to 122, the sub-factors in the second factor that cause the electronic device to consume power quickly are further analyzed for the currently running target function, so that the reasons for the abnormal power consumption speed of the electronic device can be accurately and more detailed. Then, a corresponding degradation strategy is determined based on at least one target second sub-factor to reduce the power consumption speed of the electronic device.

[0180] In some embodiments of the present disclosure, the related solutions corresponding to the above steps 111 to 115 and the related solutions corresponding to the listing steps 116 to 122 can be executed serially or in parallel, which is not limited here.

[0181] In some embodiments of the present application, a method for training a power consumption speed prediction model is disclosed. The execution subject of the method may be an electronic device or a server, or a functional module or functional entity in the electronic device or server that can implement the power consumption speed prediction model training method, which is not limited here. Figure 4 As shown, the method includes the following steps 401 and 402.

[0182] 401. Obtain multiple historical sample data and target machine learning models.

[0183] The historical sample data includes a plurality of historical data corresponding to a plurality of factors of the electronic device and power consumption speeds (actual power consumption speeds) corresponding to the plurality of historical data.

[0184] 402. Based on the multiple historical sample data, the target machine learning model is trained to obtain a power consumption rate prediction model.

[0185] The power consumption rate prediction model is used to predict the power consumption rate of the electronic device based on the data corresponding to the multiple factors.

[0186] In some embodiments of the present application, a method for training an analysis model is disclosed. The execution subject of the method may be an electronic device or a server, or a functional module or functional entity in the electronic device or server that can implement the method for training an analysis model, which is not limited here. Figure 5 As shown, the method includes the following steps 501 and 502.

[0187] 501. Obtain multiple historical training data and machine learning models.

[0188] The historical training data includes historical feature data corresponding to a plurality of first sub-factors associated with a first factor of the electronic device, and historical actual usage data of the plurality of first sub-factors on the first factor.

[0189] 502. Based on the multiple historical training data, the machine learning model is trained to obtain an analysis model.

[0190] The analysis model is used to predict usage data of the first factor by the first sub-factors based on the characteristic data corresponding to the first sub-factors.

[0191] In the disclosed embodiment, the first analysis model and the second analysis model are both obtained by training according to the above steps 501 and 502.

[0192] In the embodiment of the present disclosure, in the process of training the above-mentioned model, the model training data can be divided into a training set and a validation set. The machine learning model is trained with the training set data to make the model converge, and the trained model is verified with the validation set data until the error between the predicted value and the true value of the trained model is less than or equal to the error threshold.

[0193] In some embodiments of the present disclosure, if the model cannot make accurate predictions, it indicates that the model has defects, such as incomplete features (there are some unknown factors), and further factors can be supplemented and retrained until a model that can make accurate predictions is obtained.

[0194] Figure 6 FIG. 1 is a structural block diagram of a device for analyzing the cause of abnormal power consumption shown in an embodiment of the present disclosure. Figure 6As shown, it includes: an acquisition module 601, which is used to acquire a first power consumption speed of the electronic device and a plurality of first data corresponding to a plurality of factors within a preset duration of running a target function of a target application, wherein the plurality of factors are factors causing battery power consumption of the electronic device; a determination module 602, which is used to determine at least one target factor from the plurality of factors, wherein the first data corresponding to the target factor is greater than or equal to the first data threshold corresponding to the target factor; a model prediction module 603, which is used to input at least one set of prediction data into a power consumption speed prediction model to obtain at least one second power consumption speed, wherein the set of prediction data includes data obtained by replacing a first data corresponding to one of the plurality of first data with corresponding second data, wherein the second data is standard data corresponding to the target factor; the power consumption speed prediction model is obtained by training based on a plurality of historical sample data and a target machine learning model, wherein the historical sample data includes a plurality of historical data corresponding to the plurality of factors and the power consumption speed corresponding to the plurality of historical data; the determination module 602 is also used to determine the cause of the abnormal power consumption speed of the electronic device based on at least one power consumption difference corresponding to the at least one target factor, wherein the at least one power consumption difference is the difference between the first power consumption speed and the at least one second power consumption speed.

[0195] In some embodiments of the present disclosure, the first power consumption rate is the actual power consumption rate of the electronic device within the preset time period; the determination module 602 is specifically used to determine the at least one target factor from the multiple factors in response to the first power consumption rate being greater than or equal to the first power consumption rate threshold.

[0196] In some embodiments of the present disclosure, the acquisition module 601 is specifically used to obtain the actual power consumption speed of the electronic device within the preset time period; in response to the actual power consumption speed being greater than or equal to a first power consumption speed threshold, the multiple first data are input into the power consumption speed prediction model to obtain the first power consumption speed; the determination module 602 is specifically used to determine the at least one target factor from the multiple factors in response to the absolute value of the difference between the first power consumption speed and the actual power consumption speed being less than or equal to the first difference threshold.

[0197] In some embodiments of the present disclosure, the power consumption rate prediction model is used to predict the power consumption of a target type of device, and the target type of device includes a device in a functional scenario to which the target function belongs, and / or a device of the same model as the electronic device; alternatively, the power consumption rate prediction model is used to predict the power consumption of multiple types of devices, and the input parameters of the power consumption rate prediction model also include the functional scenario to which the target function belongs, and / or the model of the electronic device.

[0198] In some embodiments of the present disclosure, the determination module 602 is specifically used to determine the at least one target factor and the at least one power consumption difference as the attribution of abnormal power consumption of the electronic device; or, determine the target power consumption difference in at least one power consumption difference that is greater than or equal to a second difference threshold and the target factor corresponding to the target power consumption difference as the attribution of abnormal power consumption of the electronic device.

[0199] In some embodiments of the present disclosure, the acquisition module 601 is further used to, in response to at least one power consumption difference corresponding to the at least one target factor, determine that after the abnormal power consumption of the electronic device is attributable, the abnormal power consumption of the electronic device includes the first factor, or, in response to obtaining a first power consumption speed of the electronic device and multiple first data corresponding to multiple factors within a preset duration of running the target function of the target application, the first data corresponding to the first factor is greater than or equal to the second data threshold, obtain the first usage data of the target function for the first factor within the preset duration, the first factor is associated with multiple first sub-factors, and the second data threshold is greater than the first data threshold corresponding to the first factor; the determination module 602 is further used to, in response to the first usage data being greater than or equal to the first usage threshold, determine that the usage of the target function for the first factor is the cause of the abnormal power consumption speed of the electronic device; in response to the first usage data being less than the first usage threshold, determine that the usage of the target function for the first factor is not the cause of the abnormal power consumption speed of the electronic device.

[0200] In some embodiments of the present disclosure, the acquisition module 601 is further used to obtain, after determining that the usage of the target function for the first factor is the cause of the abnormal power consumption speed of the electronic device, the first feature data corresponding to the multiple first sub-factors and the first actual usage data for the first factor within the preset time period; the device also includes: a model analysis module, which is used to input the first feature data corresponding to the multiple first sub-factors into the first analysis model corresponding to the first factor to obtain the first predicted usage data of the multiple first sub-factors for the first factor, the first analysis model is trained according to multiple first historical training data and a first machine learning model, and the first historical training data includes the first historical feature data corresponding to the multiple first sub-factors, and the first historical actual usage data of the multiple first sub-factors for the first factor; the determination module 602 is also used to determine at least one target first sub-factor from the multiple first sub-factors based on the first actual usage data and the first predicted usage data corresponding to the multiple first sub-factors, the absolute value of the difference between the first predicted usage data and the first actual usage data corresponding to the multiple first sub-factors is greater than or equal to the third difference threshold, and the at least one target first sub-factor is the cause of the abnormal power consumption speed of the electronic device caused by the first factor.

[0201] In some embodiments of the present disclosure, the acquisition module 601 is also used to obtain multiple third data corresponding to the multiple factors of the electronic device within the first time period of the currently running target function including the current moment; the model prediction module 603 is also used to input the multiple third data into the power consumption speed prediction model to obtain the third power consumption speed, and the third power consumption speed is used to determine whether the electronic device is currently consuming abnormal power.

[0202] In some embodiments of the present disclosure, the acquisition module 601 is also used to, after inputting the multiple third data into the power consumption speed prediction model to obtain the third power consumption speed, in response to the third power consumption speed being greater than or equal to the second power consumption speed threshold, obtain second usage data of the currently running target function for a second factor within a first time period, the second factor being one of the multiple factors; the device also includes: an execution module, used to execute a target degradation strategy for the currently running target function in response to the second usage data being greater than or equal to the second usage threshold; and an output module, used to output a prompt message in response to the second usage data being less than the second usage threshold, the prompt message being used to indicate that the electronic device is running other applications.

[0203] In some embodiments of the present disclosure, the acquisition module 601 is also used to acquire fourth data corresponding to a second factor of the electronic device within a second time period at the current moment for the currently running target function, the second factor is associated with multiple second sub-factors, and the second factor is one of the multiple factors; in response to the fourth data being greater than or equal to a third data threshold, acquiring second usage data of the second factor of the electronic device by the currently running target function within the second time period, the third data threshold being greater than a first data threshold corresponding to the second factor; the determination module 602 is also used to determine, in response to the second usage data being greater than or equal to the second usage threshold, that usage of the second factor by the currently running target function is the cause of the abnormal power consumption speed of the electronic device; in response to the second usage data being less than the second usage threshold, determining that usage of the second factor by the currently running target function is not the cause of the abnormal power consumption speed of the electronic device.

[0204] In some embodiments of the present disclosure, the acquisition module 601 is further used to obtain the second feature data corresponding to the multiple second sub-factors and the second actual usage data of the second factors within the second time period after determining that the usage of the second factor by the currently running target function is the cause of the abnormal power consumption speed of the electronic device; the model analysis module is used to input the second feature data corresponding to the multiple second sub-factors into the second analysis model corresponding to the second factor to obtain the second predicted usage data of the multiple second sub-factors for the second factor, the second analysis model is trained according to multiple second historical training data and a second machine learning model, and the second historical training data includes the second historical feature data corresponding to the multiple second sub-factors, and the second historical actual usage data of the multiple second sub-factors for the second factor; the determination module 602 is also used to determine at least one target second sub-factor from the multiple second sub-factors based on the second actual usage data and the second predicted usage data corresponding to the multiple second sub-factors, the absolute value of the difference between the second predicted usage data and the second actual usage data corresponding to the target second sub-factor is greater than or equal to the fourth difference threshold, and the at least one target second sub-factor is the cause of the abnormal power consumption speed of the electronic device caused by the second factor.

[0205] In the embodiments of the present disclosure, each module can implement the abnormal power consumption attribution analysis method provided in the above method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0206] Figure 7 A structural block diagram of a model training device shown in an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, it includes: an acquisition module 701, used to acquire multiple historical sample data and a target machine learning model, wherein the historical sample data include multiple historical data corresponding to multiple factors of the electronic device and power consumption speeds (actual power consumption speeds) corresponding to the multiple historical data; a training module 702, used to train the target machine learning model based on the multiple historical sample data to obtain a power consumption speed prediction model, wherein the power consumption speed prediction model is used to predict the power consumption speed of the electronic device based on the data corresponding to the multiple factors.

[0207] Alternatively, an acquisition module 701 is used to acquire multiple historical training data and a machine learning model, wherein the historical training data include historical feature data corresponding to multiple first sub-factors associated with the first factor of the electronic device, and historical actual usage data of the multiple first sub-factors for the first factor; a training module 702 is used to train the machine learning model based on the multiple historical training data to obtain an analysis model, wherein the analysis model is used to predict the usage data of the multiple first sub-factors for the first factor based on the feature data corresponding to the multiple first sub-factors.

[0208] In the embodiments of the present disclosure, each module can implement the model training method provided in the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0209] Figure 8 A structural schematic diagram of an electronic device provided in an embodiment of the present disclosure is used to exemplify an electronic device that implements any power consumption abnormality attribution analysis method in an embodiment of the present disclosure, and should not be understood as a specific limitation on the embodiment of the present disclosure.

[0210] like Figure 8 As shown, the electronic device 800 may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0211] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although an electronic device 800 having various devices is shown, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.

[0212] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processor 801, the functions defined in any power consumption anomaly attribution analysis method provided in the embodiment of the present disclosure can be executed.

[0213] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0214] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0215] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0216] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a first power consumption speed of the electronic device and multiple first data corresponding to multiple factors within a preset duration of running a target function of a target application, and the multiple factors are factors that cause battery power consumption of the electronic device; determines at least one target factor from the multiple factors, and the first data corresponding to the target factor is greater than or equal to the first data threshold corresponding to the target factor; inputs at least one set of prediction data into a power consumption speed prediction model to obtain at least one second power consumption speed, and the set of prediction data includes data obtained by replacing a first data corresponding to one of the target factors in the multiple first data with corresponding second data, and the second data is standard data corresponding to the target factor; the power consumption speed prediction model is trained based on multiple historical sample data and a target machine learning model, and the historical sample data includes multiple historical data corresponding to the multiple factors and power consumption speeds corresponding to the multiple historical data; based on at least one power consumption difference corresponding to the at least one target factor, determines the cause of the abnormal power consumption speed of the electronic device, and the at least one power consumption difference is the difference between the first power consumption speed and the at least one second power consumption speed.

[0217] In embodiments of the present disclosure, computer program codes for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0218] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0219] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0220] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0221] In the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0222] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0223] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0224] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for analyzing the causes of abnormal power consumption, characterized in that: The method comprises: Acquire a plurality of first data corresponding to a first power consumption speed of the electronic device and a plurality of factors respectively within a preset time period of running a target function of a target application, wherein the plurality of factors are factors causing battery power consumption of the electronic device; Determine at least one target factor from the multiple factors, the first data corresponding to the target factor being greater than or equal to a first data threshold corresponding to the target factor; Inputting at least one set of prediction data into the power consumption speed prediction model respectively to obtain at least one second power consumption speed, wherein the set of prediction data includes data obtained by replacing the first data corresponding to one of the target factors in the multiple first data with corresponding second data, and the second data is standard data corresponding to the target factor; the power consumption speed prediction model is trained based on multiple historical sample data and a target machine learning model, and the historical sample data includes multiple historical data corresponding to the multiple factors and power consumption speeds corresponding to the multiple historical data; Based on at least one power consumption difference corresponding to the at least one target factor, the cause of abnormal power consumption of the electronic device is determined, and the at least one power consumption difference is the difference between the first power consumption speed and the at least one second power consumption speed.

2. The method according to claim 1, characterized in that The first power consumption rate is the actual power consumption rate of the electronic device within the preset time period; The determining at least one target factor from the multiple factors comprises: In response to the first power consumption speed being greater than or equal to a first power consumption speed threshold, the at least one target factor is determined from the plurality of factors.

3. The method according to claim 1, characterized in that Obtaining a first power consumption rate of an electronic device within a preset duration of running a target function of a target application includes: Acquire the actual power consumption rate of the electronic device within the preset time period; In response to the actual power consumption speed being greater than or equal to a first power consumption speed threshold, inputting the plurality of first data into the power consumption speed prediction model to obtain the first power consumption speed; The determining at least one target factor from the multiple factors comprises: In response to an absolute value of a difference between the first power consumption speed and the actual power consumption speed being less than or equal to a first difference threshold, the at least one target factor is determined from the plurality of factors.

4. The method according to claim 1, characterized in that: The power consumption rate prediction model is used to predict the power consumption of a target type device, wherein the target type device includes a device in a functional scenario to which the target function belongs and / or a device of the same model as the electronic device; or, The power consumption rate prediction model is used to predict the power consumption of various types of equipment. The input parameters of the power consumption rate prediction model also include the functional scenario to which the target function belongs and / or the model of the electronic device.

5. The method according to claim 1, characterized in that The determining the cause of abnormal power consumption of the electronic device based on at least one power consumption difference value respectively corresponding to the at least one target factor includes: Determining the at least one target factor and the at least one power consumption difference as the cause of abnormal power consumption of the electronic device; or, A target power consumption difference value that is greater than or equal to the second difference threshold value and the target factor corresponding to the target power consumption difference value among at least one power consumption difference value are determined as the cause of abnormal power consumption of the electronic device.

6. The method according to claim 1, characterized in that The method further comprises: In response to at least one power consumption difference value corresponding to the at least one target factor, after determining the attribution of abnormal power consumption of the electronic device, the abnormal power consumption of the electronic device includes a first factor, or in response to obtaining a first power consumption speed of the electronic device and a plurality of first data corresponding to a plurality of factors within a preset duration of running a target function of a target application, the first data corresponding to the first factor is greater than or equal to a second data threshold, obtaining first usage data of the first factor by the target function within the preset duration, the first factor is associated with a plurality of first sub-factors, and the second data threshold is greater than the first data threshold corresponding to the first factor; In response to the first usage data being greater than or equal to a first usage threshold, determining that usage of the first factor by the target function is a cause of abnormal power consumption speed of the electronic device; In response to the first usage data being less than the first usage threshold, it is determined that the usage of the first factor by the target function is not a cause of the abnormal power consumption speed of the electronic device.

7. The method according to claim 6, characterized in that After determining that the use of the first factor by the target function is the cause of the abnormal power consumption speed of the electronic device, the method further includes: Acquire first characteristic data respectively corresponding to the plurality of first sub-factors and first actual usage data respectively for the first factors within the preset time period; Inputting the first feature data corresponding to the plurality of first sub-factors into a first analysis model corresponding to the first factor to obtain first predicted usage data of the plurality of first sub-factors for the first factor, wherein the first analysis model is trained based on a plurality of first historical training data and a first machine learning model, wherein the first historical training data includes the first historical feature data corresponding to the plurality of first sub-factors, and first historical actual usage data of the plurality of first sub-factors for the first factor; Based on the first actual usage data and the first predicted usage data respectively corresponding to the multiple first sub-factors, at least one target first sub-factor is determined from the multiple first sub-factors, the absolute value of the difference between the first predicted usage data and the first actual usage data corresponding to the target first sub-factor is greater than or equal to a third difference threshold, and the at least one target first sub-factor is the reason why the first factor causes the abnormal power consumption speed of the electronic device.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Acquire a plurality of third data respectively corresponding to the plurality of factors of the electronic device within a first time period including the current moment of the currently running target function; The plurality of third data are input into the power consumption speed prediction model to obtain a third power consumption speed, and the third power consumption speed is used to determine whether the electronic device currently has abnormal power consumption.

9. The method according to claim 8, characterized in that After inputting the plurality of third data into the power consumption speed prediction model to obtain the third power consumption speed, the method further includes: In response to the third power consumption rate being greater than or equal to a second power consumption rate threshold, obtaining second usage data of a second factor by the currently running target function within the first duration, where the second factor is one of the multiple factors; In response to the second usage data being greater than or equal to a second usage threshold, executing a target degradation strategy for the currently running target function; In response to the second usage data being less than the second usage threshold, outputting prompt information, wherein the prompt information is used to indicate that the electronic device is running other applications.

10. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Acquire fourth data corresponding to a second factor of the electronic device within a second time period including a current moment of the target function currently being run, wherein the second factor is associated with a plurality of second sub-factors, and the second factor is one of the plurality of factors; In response to the fourth data being greater than or equal to a third data threshold, obtaining second usage data of a second factor of the electronic device by the currently running target function within the second time period, the third data threshold being greater than the first data threshold corresponding to the second factor; In response to the second usage data being greater than or equal to a second usage threshold, determining that usage of the second factor by the currently running target function is a cause of abnormal power consumption speed of the electronic device; In response to the second usage data being less than the second usage threshold, it is determined that usage of the second factor by the currently running target function is not a cause of abnormal power consumption speed of the electronic device.

11. The method according to claim 10, characterized in that After determining that the use of the second factor by the currently running target function is the cause of the abnormal power consumption speed of the electronic device, the method further includes: Acquire second feature data respectively corresponding to the plurality of second sub-factors and second actual usage data respectively for the second factors within the second time period; Inputting the second feature data corresponding to the plurality of second sub-factors into the second analysis model corresponding to the second factor, to obtain second predicted usage data of the plurality of second sub-factors for the second factor, wherein the second analysis model is obtained by training based on a plurality of second historical training data and a second machine learning model, wherein the second historical training data includes the second historical feature data corresponding to the plurality of second sub-factors, and the second historical actual usage data of the plurality of second sub-factors for the second factor; Based on the second actual usage data and the second predicted usage data respectively corresponding to the multiple second sub-factors, at least one target second sub-factor is determined from the multiple second sub-factors, the absolute value of the difference between the second predicted usage data and the second actual usage data corresponding to the target second sub-factor is greater than or equal to a fourth difference threshold, and the at least one target second sub-factor is the reason why the second factor causes the abnormal power consumption speed of the electronic device.

12. A device for analyzing abnormal power consumption, characterized in that: include: an acquisition module, used for acquiring a first power consumption rate of the electronic device and a plurality of first data corresponding to a plurality of factors within a preset duration of running a target function of a target application, wherein the plurality of factors are factors causing battery power consumption of the electronic device; A determination module, configured to determine at least one target factor from the multiple factors, wherein the first data corresponding to the target factor is greater than or equal to a first data threshold corresponding to the target factor; A model prediction module, used for inputting at least one set of prediction data into a power consumption speed prediction model respectively to obtain at least one second power consumption speed, wherein the set of prediction data includes data obtained by replacing the first data corresponding to one of the target factors in the plurality of first data with corresponding second data, and the second data is standard data corresponding to the target factor; the power consumption speed prediction model is obtained by training based on a plurality of historical sample data and a target machine learning model, and the historical sample data includes a plurality of historical data corresponding to the plurality of factors respectively and power consumption speeds corresponding to the plurality of historical data; The determination module is further used to determine the cause of abnormal power consumption of the electronic device based on at least one power consumption difference corresponding to the at least one target factor, wherein the at least one power consumption difference is the difference between the first power consumption speed and the at least one second power consumption speed.

13. An electronic device, characterized in that: include: A memory and a processor, the memory is used to store a computer program; the processor is used to execute the power consumption abnormality attribution analysis method described in any one of claims 1 to 11 when calling the computer program.

14. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for analyzing the cause of abnormal power consumption according to any one of claims 1 to 11 is implemented.

15. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the method for analyzing the cause of abnormal power consumption according to any one of claims 1 to 11 is implemented.