Laptop battery life prediction method based on deep learning
Through deep learning-based methods, the time-frequency characteristics of the real-time power consumption of laptops are extracted and semantic enhancement are carried out, which solves the deviation problem of battery life prediction in the prior art and achieves higher-precision battery life prediction.
Patent Information
- Application Number
- CN202410946069.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-07-15
AI Technical Summary
When predicting the battery life of the laptop, the prior art fails to effectively consider the voltage conversion efficiency of each power supply device, resulting in large deviations in the prediction results and it is difficult to accurately capture various influencing factors of actual power consumption.
Using a deep learning-based method, time-frequency feature extraction and image block segmentation are performed by obtaining the time series of real-time power consumption of the laptop, combining the significance-global contextual semantic enhancement module and the Bi-LSTM model, the average power consumption is automatically estimated and the remaining time is predicted.
It improves the accuracy of battery life prediction, can more accurately capture the mode and change trend of power consumption, and comprehensively considers the voltage conversion efficiency of each power supply device.
Smart Images

Figure CN118838484B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of laptop computers, and more specifically, to a method for predicting laptop battery life based on deep learning. Background Art
[0002] Laptop battery life refers to the time a device can work continuously when powered by a battery. With the popularity of mobile devices and laptops, users' demand for using these devices without a power outlet is growing. Therefore, accurate battery life prediction can improve the user experience, help users better plan usage time and charging plans, and avoid the inconvenience caused by running out of power.
[0003] In the related art, the battery life estimation method includes: calculating the power according to the current and voltage of each device to obtain the cumulative power of all devices; estimating the battery life by dividing the total battery energy by the cumulative power. However, this method does not take into account the voltage conversion efficiency of each power device, resulting in a large deviation in the estimation result; and the above estimation method can only estimate the battery power status at the current time, while the actual power consumption of a laptop in actual use will be mixed with many factors, such as screen brightness, CPU usage of the application, temperature, etc. If the traditional method is used, it is difficult to accurately obtain the battery life prediction result of the laptop battery.
[0004] Therefore, an optimized laptop battery life prediction solution is desired. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present application provides a method for predicting the battery life of a laptop computer based on deep learning, which obtains the time series of the real-time power consumption of the monitored laptop computer, and uses image processing and analysis technology based on deep learning to perform time-frequency analysis and association of the real-time power consumption, so as to automatically obtain the average power consumption estimate based on the semantic association features of multiple local time-frequency graphs of real-time power consumption in the full time domain, and estimate the remaining time based on the remaining power of the monitored laptop computer. In this way, the power consumption pattern and change trend can be captured more accurately and comprehensively, and at the same time, the voltage conversion efficiency of each power supply device is comprehensively considered to improve the prediction accuracy of the battery life.
[0006] According to one aspect of the present application, a method for predicting laptop battery life based on deep learning is provided, which includes:
[0007] Get the time series of real-time power consumption of the monitored laptop;
[0008] Extracting time-frequency features from the time series of the real-time power consumption to obtain a two-dimensional time-frequency graph of the real-time power consumption, and then segmenting the two-dimensional time-frequency graph of the real-time power consumption into image blocks to obtain a sequence of local time-frequency graphs of the real-time power consumption;
[0009] Extracting time-frequency features of power consumption from each of the real-time power consumption local time-frequency graphs in the sequence of real-time power consumption local time-frequency graphs to obtain a sequence of real-time power consumption local time-frequency associated feature vectors;
[0010] Inputting the sequence of local time-frequency correlation feature vectors of real-time power consumption into a contextual semantic enhancement module based on significance-globality to obtain a sequence of enhanced local time-frequency correlation feature vectors of real-time power consumption;
[0011] Performing power consumption feature time series context encoding on the sequence of the enhanced real-time power consumption local time-frequency correlation feature vectors to obtain a power consumption full-time domain time series correlation feature vector as a power consumption full-time domain time series correlation feature;
[0012] Based on the time series correlation characteristics of the power consumption in the entire time domain, an estimated value of average power consumption is obtained;
[0013] The remaining power of the monitored laptop computer is divided by the average power consumption estimate to obtain an estimated remaining time.
[0014] In the above-mentioned laptop battery life prediction method based on deep learning, the time-frequency features of the time series of real-time power consumption are extracted to obtain a two-dimensional time-frequency graph of real-time power consumption, and then the two-dimensional time-frequency graph of real-time power consumption is segmented into image blocks to obtain a sequence of local time-frequency graphs of real-time power consumption, including: performing wavelet analysis on the time series of real-time power consumption to obtain the two-dimensional time-frequency graph of real-time power consumption; and segmenting the two-dimensional time-frequency graph of real-time power consumption into image blocks to obtain a sequence of local time-frequency graphs of real-time power consumption.
[0015] In the above-mentioned laptop battery life prediction method based on deep learning, power consumption time-frequency features are extracted for each real-time power consumption local time-frequency graph in the sequence of real-time power consumption local time-frequency graphs to obtain a sequence of real-time power consumption local time-frequency associated feature vectors, including: inputting each real-time power consumption local time-frequency graph in the sequence of real-time power consumption local time-frequency graphs into a power consumption time-frequency feature extractor based on a convolutional neural network model and a non-local neural network model to obtain a sequence of real-time power consumption local time-frequency associated feature vectors.
[0016] In the above-mentioned laptop battery life prediction method based on deep learning, the sequence of the local time-frequency association feature vectors of real-time power consumption is input into a contextual semantic enhancement module based on significance-globality to obtain a sequence of enhanced local time-frequency association feature vectors of real-time power consumption, including: extracting the maximum value of each local time-frequency association feature vector of real-time power consumption in the sequence of local time-frequency association feature vectors of real-time power consumption to obtain a prominent local time-frequency association feature vector of real-time power consumption; extracting the average value of each local time-frequency association feature vector of real-time power consumption in the sequence of local time-frequency association feature vectors of real-time power consumption to obtain a global local time-frequency association feature vector of real-time power consumption; performing convolution coding and feature activation processing on the prominent local time-frequency association feature vector of real-time power consumption and the global local time-frequency association feature vector of real-time power consumption to obtain a prominent local time-frequency association feature vector of real-time power consumption; Obtain the local time-frequency association activation vector of the prominent feature real-time power consumption and the local time-frequency association activation vector of the global feature real-time power consumption; fuse the local time-frequency association activation vector of the prominent feature real-time power consumption and the local time-frequency association activation vector of the global feature real-time power consumption to obtain the global-prominent feature real-time power consumption local time-frequency association vector; perform nonlinear activation on the global-prominent feature real-time power consumption local time-frequency association vector to obtain the global-prominent feature real-time power consumption local time-frequency association weight feature vector; use the global-prominent feature real-time power consumption local time-frequency association weight feature vector as the weight, perform positional point multiplication on the sequence of the real-time power consumption local time-frequency association feature vectors and add the sequence of the real-time power consumption local time-frequency association feature vectors to obtain the sequence of the enhanced real-time power consumption local time-frequency association feature vectors.
[0017] In the above-mentioned laptop battery life prediction method based on deep learning, the local time-frequency correlation feature vector of the prominent real-time power consumption and the local time-frequency correlation feature vector of the global real-time power consumption are convolutionally encoded and feature activated to obtain the local time-frequency correlation activation vector of the prominent feature real-time power consumption and the local time-frequency correlation activation vector of the global feature real-time power consumption, including: inputting the local time-frequency correlation convolution coding vector of the prominent real-time power consumption obtained by performing one-dimensional convolution coding on the local time-frequency correlation feature vector of the prominent real-time power consumption into the ReLU function to obtain the local time-frequency correlation activation coding feature vector of the prominent real-time power consumption; The salient point convolution feature vector obtained after point convolution encoding of the feature vector is matrix multiplied with the first weight matrix to obtain the salient feature real-time power consumption local time-frequency associated activation vector; the global real-time power consumption local time-frequency associated convolution coding vector obtained after one-dimensional convolution encoding of the global real-time power consumption local time-frequency associated feature vector is input into the ReLU function to obtain the global real-time power consumption local time-frequency associated activation coding feature vector; the global point convolution feature vector obtained after point convolution encoding of the global real-time power consumption local time-frequency associated activation coding feature vector is matrix multiplied with the second weight matrix to obtain the global feature real-time power consumption local time-frequency associated activation vector.
[0018] In the above-mentioned laptop battery life prediction method based on deep learning, the global-prominent feature real-time power consumption local time-frequency association vector is nonlinearly activated to obtain the global-prominent feature real-time power consumption local time-frequency association weight feature vector, including: inputting the global-prominent feature real-time power consumption local time-frequency association vector into the tanh function to obtain a first activated global-prominent feature real-time power consumption local time-frequency association vector; inputting the global-prominent feature real-time power consumption local time-frequency association vector into the Sigmoid function to obtain a second activated global-prominent feature real-time power consumption local time-frequency association vector; and performing position point multiplication on the first activated global-prominent feature real-time power consumption local time-frequency association vector and the second activated global-prominent feature real-time power consumption local time-frequency association vector to obtain the global-prominent feature real-time power consumption local time-frequency association weight feature vector.
[0019] In the above-mentioned laptop battery life prediction method based on deep learning, the sequence of the enhanced real-time power consumption local time-frequency correlation feature vectors is subjected to power consumption feature time series context encoding to obtain the full time domain time series correlation feature vector of power consumption, including: inputting the sequence of the enhanced real-time power consumption local time-frequency correlation feature vectors into the power consumption feature time series context encoder based on the Bi-LSTM model to obtain the full time domain time series correlation feature vector of power consumption.
[0020] In the above-mentioned laptop battery life prediction method based on deep learning, the average power consumption estimate is obtained based on the full-domain timing correlation characteristics of the power consumption, including: inputting the full-domain timing correlation feature vector of the power consumption into an average power consumption estimator based on a decoder to obtain the average power consumption estimate.
[0021] This application has significant technical effects due to the adoption of the above technical solutions:
[0022] The laptop battery life prediction method based on deep learning provided by the present application obtains the time series of the real-time power consumption of the monitored laptop computer, and uses image processing and analysis technology based on deep learning to perform time-frequency analysis and association of the real-time power consumption, so as to automatically obtain the average power consumption estimate based on the semantic association features of multiple local time-frequency graphs of real-time power consumption in the full time domain, and estimate the remaining time based on the remaining power of the monitored laptop computer. In this way, the power consumption pattern and change trend can be captured more accurately and comprehensively, and at the same time, the voltage conversion efficiency of each power supply device is comprehensively considered to improve the prediction accuracy of the battery life. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0024] Figure 1 The present invention is a flowchart of a method for predicting laptop battery life based on deep learning according to an embodiment of the present application.
[0025] Figure 2 Schematic diagram of the architecture of a laptop battery life prediction method based on deep learning according to an embodiment of the present application.
[0026] Figure 3 This is a flowchart of a method for predicting laptop battery life based on deep learning according to an embodiment of the present application, which extracts time-frequency features from the time series of real-time power consumption to obtain a two-dimensional time-frequency graph of real-time power consumption, and then performs image block segmentation on the two-dimensional time-frequency graph of real-time power consumption to obtain a sequence of local time-frequency graphs of real-time power consumption.
[0027] Figure 4In the laptop battery life prediction method based on deep learning according to an embodiment of the present application, the sequence of local time-frequency correlation feature vectors of real-time power consumption is input into a contextual semantic enhancement module based on significance-globality to obtain a flowchart of the sequence of enhanced local time-frequency correlation feature vectors of real-time power consumption. DETAILED DESCRIPTION
[0028] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0030] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0031] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0032] Laptop battery life refers to the time a device can continue to operate when powered only by batteries. With the widespread use of mobile devices and laptops, people are increasingly using these devices without being plugged into a power source. Therefore, accurate prediction of battery life is crucial to improving user experience, helping users to more reasonably arrange their usage time and develop charging plans, thereby avoiding the inconvenience caused by running out of power.
[0033] In existing technologies, the method of predicting battery life usually involves calculating the current and voltage of each device to obtain the total power consumption. Then, the battery life is estimated by dividing the total energy of the battery by this total power. However, this method ignores the efficiency loss of power devices during voltage conversion, which may lead to large deviations in the prediction results. In addition, this method can only provide an estimate of the current battery power, but in fact the power consumption of a laptop during use is affected by many factors, such as screen brightness, CPU usage, temperature, etc. These factors make it difficult for traditional methods to provide accurate battery life predictions.
[0034] Therefore, in response to the above technical problems, this application proposes a laptop battery life prediction method based on deep learning, which obtains the time series of the real-time power consumption of the monitored laptop computer, and uses image processing and analysis technology based on deep learning to perform time-frequency analysis and association of the real-time power consumption, so as to automatically obtain the average power consumption estimate based on the semantic association features of multiple local time-frequency graphs of real-time power consumption in the full time domain, and estimate the remaining time based on the remaining power of the monitored laptop computer. In this way, the power consumption pattern and change trend can be captured more accurately and comprehensively, and at the same time, the voltage conversion efficiency of each power supply device is comprehensively considered to improve the prediction accuracy of the battery life.
[0035] Figure 1 The present invention is a flowchart of a method for predicting laptop battery life based on deep learning according to an embodiment of the present application. Figure 2 Schematic diagram of the architecture of a laptop battery life prediction method based on deep learning according to an embodiment of the present application.
[0036] like Figure 1 and Figure 2 As shown, according to the deep learning-based laptop battery life prediction method of the embodiment of the present application, the method includes:
[0037] S110, obtaining a time series of real-time power consumption of the monitored laptop computer;
[0038] S120, extracting time-frequency features from the time series of the real-time power consumption to obtain a two-dimensional time-frequency graph of the real-time power consumption, and then segmenting the two-dimensional time-frequency graph of the real-time power consumption into image blocks to obtain a sequence of local time-frequency graphs of the real-time power consumption;
[0039] S130, extracting time-frequency features of power consumption from each of the real-time local time-frequency graphs in the sequence of real-time local time-frequency graphs of power consumption to obtain a sequence of local time-frequency associated feature vectors of real-time power consumption;
[0040] S140, inputting the sequence of local time-frequency correlation feature vectors of real-time power consumption into a contextual semantic enhancement module based on saliency-globality to obtain a sequence of enhanced local time-frequency correlation feature vectors of real-time power consumption;
[0041] S150, performing power consumption feature time series context coding on the sequence of the enhanced real-time power consumption local time-frequency correlation feature vectors to obtain a power consumption full-time domain time series correlation feature vector as a power consumption full-time domain time series correlation feature;
[0042] S160, obtaining an estimated average power consumption value based on the full-time domain time series correlation characteristics of the power consumption;
[0043] S170: Divide the remaining power of the monitored laptop computer by the estimated average power consumption value to obtain an estimated remaining time.
[0044] In step S110, the time series of real-time power consumption of the monitored laptop is obtained. It should be understood that the time series of real-time power consumption is the basic data for predicting the battery life of the laptop, which reflects the dynamic changes in the power consumption of the laptop during use. Therefore, by analyzing the time series of real-time power consumption of the laptop, the power consumption mode of the laptop can be accurately learned, thereby accurately estimating the average power consumption. In other words, the average power consumption estimate is a key indicator for predicting the battery life of the laptop, which represents the average power consumption of the laptop over a period of time and can be used to calculate the remaining battery life.
[0045] In particular, in a specific embodiment of the present application, the real-time power consumption time series data of the notebook computer can be obtained by using the operating system API.
[0046] In step S120, time-frequency features are extracted from the time series of the real-time power consumption to obtain a two-dimensional time-frequency graph of real-time power consumption, and then the two-dimensional time-frequency graph of real-time power consumption is segmented into image blocks to obtain a sequence of local time-frequency graphs of real-time power consumption.
[0047] Specifically, Figure 3 This is a flowchart of a method for predicting laptop battery life based on deep learning according to an embodiment of the present application, which extracts time-frequency features from the time series of real-time power consumption to obtain a two-dimensional time-frequency graph of real-time power consumption, and then performs image block segmentation on the two-dimensional time-frequency graph of real-time power consumption to obtain a sequence of local time-frequency graphs of real-time power consumption.
[0048] like Figure 3As shown, extracting time-frequency features from the time series of real-time power consumption to obtain a two-dimensional time-frequency graph of real-time power consumption, and then segmenting the two-dimensional time-frequency graph of real-time power consumption into image blocks to obtain a sequence of local time-frequency graphs of real-time power consumption, including:
[0049] S121, performing wavelet analysis on the time series of the real-time power consumption to obtain a two-dimensional time-frequency graph of the real-time power consumption;
[0050] S122, performing image block segmentation on the two-dimensional time-frequency graph of real-time power consumption to obtain a sequence of local time-frequency graphs of real-time power consumption. Accordingly, considering that the time series of real-time power consumption contains characteristic information about the time and frequency of power consumption. Wavelet analysis is a time-frequency analysis method that can provide time and frequency information at the same time, and can help extract local time-frequency features in the signal and identify important information such as mutation points and frequency changes in the signal.
[0051] Based on this, in the technical solution of the present application, wavelet analysis is performed on the time series of the real-time power consumption to capture the local variation characteristics of the power consumption signal in time and frequency, thereby obtaining a two-dimensional time-frequency diagram of the real-time power consumption.
[0052] Then, considering that the frequency characteristics of different local time periods in the real-time power consumption two-dimensional time-frequency graph have different local trends of representation and transformation. Therefore, in order to analyze the time-frequency characteristics of different areas in the real-time power consumption two-dimensional time-frequency graph more carefully, and to capture the frequency fluctuation changes and detailed feature information of each local time period in a fine-grained manner, in the technical solution of the present application, the real-time power consumption two-dimensional time-frequency graph is segmented into image blocks to obtain a sequence of local time-frequency graphs of real-time power consumption, so that a whole large real-time power consumption two-dimensional time-frequency graph can be segmented into small image blocks, which is helpful to extract the time-frequency change trend feature information of each local time-frequency graph of real-time power consumption.
[0053] In step S130, power consumption time-frequency features are extracted from each of the real-time power consumption local time-frequency graphs in the sequence of real-time power consumption local time-frequency graphs to obtain a sequence of real-time power consumption local time-frequency associated feature vectors.
[0054] Specifically, in an embodiment of the present application, power consumption time-frequency features are extracted for each real-time power consumption local time-frequency graph in the sequence of real-time power consumption local time-frequency graphs to obtain a sequence of real-time power consumption local time-frequency associated feature vectors, including: inputting each real-time power consumption local time-frequency graph in the sequence of real-time power consumption local time-frequency graphs into a power consumption time-frequency feature extractor based on a convolutional neural network model and a non-local neural network model to obtain a sequence of real-time power consumption local time-frequency associated feature vectors.
[0055] It should be understood that, considering that each of the real-time power consumption local time-frequency graphs in the sequence of the real-time power consumption local time-frequency graphs expresses the implicit characteristic information of the frequency change of power consumption in a local time segment, and the frequency fluctuation trend in different time periods in each of the real-time power consumption local time-frequency graphs has global correlation in the entire local time-frequency graph. Convolutional neural networks perform well in the field of image processing and can effectively extract implicit features in images; non-local neural network models can capture the global temporal correlation between pixels in an image.
[0056] Therefore, in the technical solution of the present application, each real-time power consumption local time-frequency graph in the sequence of real-time power consumption local time-frequency graphs is input into a power consumption time-frequency feature extractor based on a convolutional neural network model and a non-local neural network model to capture and associate the frequency change characteristic information in different time segments in each real-time power consumption local time-frequency graph, thereby obtaining a sequence of real-time power consumption local time-frequency correlation feature vectors.
[0057] In step S140, the sequence of local time-frequency associated feature vectors of real-time power consumption is input into a contextual semantic enhancement module based on significance-globality to obtain a sequence of enhanced local time-frequency associated feature vectors of real-time power consumption.
[0058] Considering that the sequence of the local time-frequency correlation feature vectors of the real-time power consumption expresses the significant changes in the frequency changes in each local time period of the real-time power consumption and the overall frequency characteristics based on the entire time domain.
[0059] Therefore, in order to be able to enhance the time-frequency correlation features of the sequence of local time-frequency correlation feature vectors of real-time power consumption based on the key significant change feature information of frequency in the entire sequence and the global information in the entire time domain, in the technical solution of the present application, the sequence of local time-frequency correlation feature vectors of real-time power consumption is input into a contextual semantic enhancement module based on significance-globality to obtain an enhanced sequence of local time-frequency correlation feature vectors of real-time power consumption.
[0060] That is, the saliency-global contextual semantics enhancement module extracts and mines the most significant features and global features from the sequence of the local time-frequency association feature vectors of the real-time power consumption, respectively, to identify and emphasize the most important significant features for the prediction and estimation of power consumption and comprehensively consider the distribution and correlation of the time-frequency features of the overall power consumption, so as to obtain the prominent local time-frequency association features of real-time power consumption and the global local time-frequency association features of real-time power consumption. Next, the prominent and global features are sequentially convolutionally encoded and activated to help improve the semantic understanding ability of the local time-frequency association features of real-time power consumption and capture the contextual time-frequency information and semantic associations between different features. Then, the features obtained after activation are fused to comprehensively consider the local fine-grained semantics and global time domain information of power consumption, and the fused features obtained after fusion are nonlinearly processed to further extract the complex temporal relationship and correlation dependency pattern between the fused features. Finally, the nonlinearly processed features are used as weights to weight the sequence of the local time-frequency association feature vectors of real-time power consumption, so as to strengthen and highlight the most critical and representative features for the prediction and estimation of power consumption, thereby improving the importance and influence of the local time-frequency association features of real-time power consumption.
[0061] Specifically, Figure 4 In the laptop battery life prediction method based on deep learning according to an embodiment of the present application, the sequence of local time-frequency correlation feature vectors of real-time power consumption is input into a contextual semantic enhancement module based on significance-globality to obtain a flowchart of the sequence of enhanced local time-frequency correlation feature vectors of real-time power consumption.
[0062] like Figure 4 As shown, the sequence of local time-frequency correlation feature vectors of real-time power consumption is input into a contextual semantic enhancement module based on significance-globality to obtain a sequence of enhanced local time-frequency correlation feature vectors of real-time power consumption, including:
[0063] S141, extracting the maximum value of each local time-frequency correlation feature vector of real-time power consumption in the sequence of local time-frequency correlation feature vectors of real-time power consumption to obtain a prominent local time-frequency correlation feature vector of real-time power consumption;
[0064] S142, extracting an average value of each of the local time-frequency correlation feature vectors of real-time power consumption in the sequence of the local time-frequency correlation feature vectors of real-time power consumption to obtain a global local time-frequency correlation feature vector of real-time power consumption;
[0065] S143, performing convolution coding and feature activation processing on the prominent real-time power consumption local time-frequency association feature vector and the global real-time power consumption local time-frequency association feature vector to obtain a prominent feature real-time power consumption local time-frequency association activation vector and a global feature real-time power consumption local time-frequency association activation vector;
[0066] S144, fusing the local time-frequency association activation vector of the prominent feature real-time power consumption and the local time-frequency association activation vector of the global feature real-time power consumption to obtain a global-prominent feature real-time power consumption local time-frequency association vector;
[0067] S145, performing nonlinear activation on the global-prominent feature real-time power consumption local time-frequency association vector to obtain a global-prominent feature real-time power consumption local time-frequency association weight feature vector;
[0068] S146, using the global-prominent feature real-time power consumption local time-frequency correlation weight feature vector as a weight, performing positional dot multiplication on the sequence of the real-time power consumption local time-frequency correlation feature vectors and adding the sequence of the real-time power consumption local time-frequency correlation feature vectors to obtain the sequence of the enhanced real-time power consumption local time-frequency correlation feature vectors.
[0069] More specifically, in an embodiment of the present application, the local time-frequency correlation feature vector of the prominent real-time power consumption and the local time-frequency correlation feature vector of the global real-time power consumption are convolutionally encoded and feature activated to obtain the local time-frequency correlation activation vector of the prominent feature real-time power consumption and the local time-frequency correlation activation vector of the global feature real-time power consumption, including: inputting the local time-frequency correlation convolution encoding vector of the prominent real-time power consumption obtained by performing one-dimensional convolution encoding on the local time-frequency correlation feature vector of the prominent real-time power consumption into the ReLU function to obtain the local time-frequency correlation activation encoding encoding feature vector of the prominent real-time power consumption; The salient point convolution feature vector obtained after point convolution encoding is matrix multiplied with the first weight matrix to obtain the salient feature real-time power consumption local time-frequency associated activation vector; the global real-time power consumption local time-frequency associated convolution coding vector obtained after one-dimensional convolution encoding of the global real-time power consumption local time-frequency associated feature vector is input into the ReLU function to obtain the global real-time power consumption local time-frequency associated activation coding feature vector; the global point convolution feature vector obtained after point convolution encoding of the global real-time power consumption local time-frequency associated activation coding feature vector is matrix multiplied with the second weight matrix to obtain the global feature real-time power consumption local time-frequency associated activation vector.
[0070] More specifically, in an embodiment of the present application, the global-prominent feature real-time power consumption local time-frequency correlation vector is nonlinearly activated to obtain a global-prominent feature real-time power consumption local time-frequency correlation weight feature vector, including: inputting the global-prominent feature real-time power consumption local time-frequency correlation vector into a tanh function to obtain a first activated global-prominent feature real-time power consumption local time-frequency correlation vector; inputting the global-prominent feature real-time power consumption local time-frequency correlation vector into a sigmoid function to obtain a second activated global-prominent feature real-time power consumption local time-frequency correlation vector; and performing position point multiplication on the first activated global-prominent feature real-time power consumption local time-frequency correlation vector and the second activated global-prominent feature real-time power consumption local time-frequency correlation vector to obtain the global-prominent feature real-time power consumption local time-frequency correlation weight feature vector.
[0071] In an embodiment of the present application, specifically, the sequence of the local time-frequency associated feature vectors of the real-time power consumption is input into a contextual semantic enhancement module based on significance-globality to obtain a sequence of enhanced local time-frequency associated feature vectors of the real-time power consumption, including: using the contextual semantic enhancement module based on significance-globality to process the sequence of the local time-frequency associated feature vectors of the real-time power consumption with the following semantic enhancement formula to obtain the sequence of the enhanced local time-frequency associated feature vectors of the real-time power consumption; wherein the semantic enhancement formula is:
[0072]
[0073] C=tanh(C1+C2)⊙σ(C1+C2)
[0074] X′=X⊙C+X
[0075] Wherein, X is the sequence of local time-frequency correlation feature vectors of real-time power consumption, Max(·) and Avg(·) are the maximum value and average value of each feature vector in the set of feature vectors, Conv(·) is a one-dimensional convolutional code, ReLU is a ReLU function, Conv 1×1 (·) is the point convolutional coding, and are the first weight matrix and the second weight matrix respectively, C1 and C2 are the local time-frequency association activation vector of the prominent feature real-time power consumption and the local time-frequency association activation vector of the global feature real-time power consumption respectively, σ(·) is the Sigmoid function, tanh is the tanh function, ⊙ represents the point multiplication by position, C is the global-prominent feature real-time power consumption local time-frequency association weight feature vector, and X′ is the sequence of the enhanced real-time power consumption local time-frequency association feature vector.
[0076] In step S150, the sequence of the enhanced real-time local time-frequency associated feature vectors of power consumption is subjected to power consumption feature temporal context encoding to obtain a full-time domain time-series associated feature vector of power consumption as a full-time domain time-series associated feature of power consumption. Specifically, in an embodiment of the present application, the sequence of the enhanced real-time local time-frequency associated feature vectors of power consumption is subjected to power consumption feature temporal context encoding to obtain a full-time domain time-series associated feature vector of power consumption, including: inputting the sequence of the enhanced real-time local time-frequency associated feature vectors of power consumption into a power consumption feature temporal context encoder based on a Bi-LSTM model to obtain the full-time domain time-series associated feature vector of power consumption.
[0077] Accordingly, it is considered that there are time-frequency correlation characteristics of real-time power consumption in different local time periods between the sequence of the enhanced local time-frequency correlation feature vectors of real-time power consumption, and the time-frequency correlation influence capabilities between different time spans are different. The Bi-LSTM model is a recurrent neural network model suitable for time series data modeling, which can effectively capture the time series information and long-term dependencies in sequence data. Therefore, in the technical solution of the present application, the sequence of the enhanced local time-frequency correlation feature vectors of real-time power consumption is input into the power consumption feature time series context encoder based on the Bi-LSTM model to capture and extract the mutual dependencies within different local time scales, thereby obtaining the full-time domain time series correlation feature vector of power consumption.
[0078] In step S160 and step S170, based on the full-time domain timing correlation characteristics of power consumption, an average power consumption estimation value is obtained, and the remaining power of the monitored laptop is divided by the average power consumption estimation value to obtain an estimated remaining time.
[0079] Specifically, the method of obtaining the estimated average power consumption value based on the full-time-domain time series correlation characteristics of the power consumption includes: inputting the full-time-domain time series correlation feature vector of the power consumption into the decoder-based average power consumption estimator to obtain the estimated average power consumption value. In other words, the full-time-domain time series correlation characteristics of the power consumption obtained by performing full-time-domain context association using the sequence of the enhanced real-time local time-frequency correlation feature vectors of power consumption are decoded to automatically obtain the estimated average power consumption value, and the remaining time is estimated based on the remaining power of the monitored laptop computer. In this way, the pattern and change trend of power consumption can be captured more accurately and comprehensively. At the same time, the voltage conversion efficiency of each power supply device is comprehensively considered to improve the prediction accuracy of the battery life.
[0080] In particular, considering that the sequence of the local time-frequency correlation feature vectors of real-time power consumption expresses the image semantic feature distribution of the real-time power consumption two-dimensional time-frequency graph in the local image semantic space domain, after the image semantic distribution significance of each local image semantic space domain under the global image semantic space domain - global context semantic reinforcement and short-range-long-range bidirectional semantic context association, the full-time domain temporal series correlation feature vector of power consumption will also have a priori-posteriori decoding regression causal association missing of the image semantic feature representation relative to the sequence of the local time-frequency correlation feature vectors of real-time power consumption, affecting the accuracy of the decoding value.
[0081] Based on this, preferably, the whole time domain timing correlation feature vector of power consumption is input into the average power consumption estimator based on the decoder to obtain the average power consumption estimation value, including: probabilizing each eigenvalue of the whole time domain timing correlation feature vector of power consumption based on a probability activation function, such as a sigmoid function and a softmax function, to obtain a probabilistic whole time domain timing correlation feature vector of power consumption; obtaining the average power consumption estimation value obtained by inputting the whole time domain timing correlation feature vector of power consumption into the average power consumption estimator based on the decoder, and dividing the average power consumption estimation value by the sum of the average power consumption estimation value and an error threshold to obtain a decoding regression probability value; determining the regression recognition symbol based on the comparison of each eigenvalue of the probabilistic whole time domain timing correlation feature vector of power consumption with the decoding regression probability value. signal value, wherein the regression recognition symbol value is equal to one, zero and negative one in response to the eigenvalue of the probabilistic full-time-domain time series associated feature vector of power consumption being greater than, equal to and less than the decoding regression probability value, respectively; the mean of all eigenvalues of the probabilistic full-time-domain time series associated feature vector of power consumption is calculated to obtain the regression overall phase shift value; each eigenvalue of the probabilistic full-time-domain time series associated feature vector of power consumption is multiplied by the regression recognition symbol value and the regression overall phase shift value, and then a weighted difference calculation is performed, and the absolute value is taken to obtain the optimized eigenvalue of the probabilistic full-time-domain time series associated feature vector of power consumption; the optimized full-time-domain time series associated feature vector of power consumption composed of the optimized eigenvalues is input into the decoder-based average power consumption estimator to obtain the average power consumption estimate.
[0082] Specifically, in this preferred embodiment, the probabilistic time series correlation feature vector of power consumption in the entire time domain is optimized to obtain an optimized time series correlation feature vector of power consumption in the entire time domain. The process formula is as follows:
[0083]
[0084] Among them, v iis the characteristic value of each position in the probabilistic time-domain time series associated characteristic vector of power consumption, p is the decoding regression probability value, sgn is the sign function, α and β are weight hyperparameters, is the overall phase shift value of the regression, v ′i It is the characteristic value of each position in the optimized full-time domain time series correlation characteristic vector of power consumption.
[0085] Therefore, in the above optimization process, the regression cognitive phase transformation response of the full-time-domain time-series associated characteristic vector of the power consumption is obtained by comparing the probabilistic amplitude of the characteristic value of the full-time-domain time-series associated characteristic vector of the power consumption with the regression probability, and the characteristic distribution sequence invariance transformation based on the regression differential distribution expansion is performed on the phase shift response of the characteristic value of the full-time-domain time-series associated characteristic vector of the power consumption relative to the probability representation of the feature set as a whole, so as to realize the causal constraint of the posterior regression probability of the full-time-domain time-series associated characteristic vector of the power consumption on its prior feature distribution representation, so as to improve the accuracy of the average power consumption estimator based on the decoder input of the full-time-domain time-series associated characteristic vector of the power consumption to obtain the average power consumption estimate. In this way, the pattern and change trend of power consumption can be captured more accurately and comprehensively. At the same time, the voltage conversion efficiency of each power supply device is comprehensively considered to improve the prediction accuracy of the battery life.
[0086] In summary, a laptop battery life prediction method based on deep learning based on the embodiment of the present application is explained, which obtains the time series of the real-time power consumption of the monitored laptop computer, and uses deep learning-based image processing and analysis technology to perform time-frequency analysis and association of the real-time power consumption, so as to automatically obtain the average power consumption estimate based on the semantic association features of multiple local time-frequency graphs of real-time power consumption in the full time domain, and estimate the remaining time based on the remaining power of the monitored laptop computer. In this way, the power consumption pattern and change trend can be captured more accurately and comprehensively, and at the same time, the voltage conversion efficiency of each power supply device is comprehensively considered to improve the prediction accuracy of the battery life.
[0087] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details of the above application are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present application to the use of the above specific details to be implemented.
Claims
1. A laptop battery life prediction method based on deep learning, characterized in that: include: Get the time series of real-time power consumption of the monitored laptop; Extracting time-frequency features from the time series of the real-time power consumption to obtain a two-dimensional time-frequency graph of the real-time power consumption, and then segmenting the two-dimensional time-frequency graph of the real-time power consumption into image blocks to obtain a sequence of local time-frequency graphs of the real-time power consumption; Extracting time-frequency features of power consumption from each of the real-time power consumption local time-frequency graphs in the sequence of real-time power consumption local time-frequency graphs to obtain a sequence of real-time power consumption local time-frequency associated feature vectors; Inputting the sequence of local time-frequency correlation feature vectors of real-time power consumption into a contextual semantic enhancement module based on significance-globality to obtain a sequence of enhanced local time-frequency correlation feature vectors of real-time power consumption; Performing power consumption feature time series context encoding on the sequence of the enhanced real-time power consumption local time-frequency correlation feature vectors to obtain a power consumption full-time domain time series correlation feature vector as a power consumption full-time domain time series correlation feature; Based on the time series correlation characteristics of the power consumption in the entire time domain, an estimated value of average power consumption is obtained; Dividing the remaining power of the monitored laptop computer by the estimated average power consumption value to obtain an estimated remaining time; The method comprises: extracting time-frequency features from the time series of the real-time power consumption to obtain a two-dimensional time-frequency graph of the real-time power consumption, and then performing image block segmentation on the two-dimensional time-frequency graph of the real-time power consumption to obtain a sequence of local time-frequency graphs of the real-time power consumption, including: Performing wavelet analysis on the time series of the real-time power consumption to obtain a two-dimensional time-frequency graph of the real-time power consumption; The real-time power consumption two-dimensional time-frequency graph is segmented into image blocks to obtain a sequence of the real-time power consumption local time-frequency graphs.
2. The method for predicting laptop battery life based on deep learning according to claim 1, characterized in that: Performing power consumption time-frequency feature extraction on each real-time power consumption local time-frequency graph in the sequence of real-time power consumption local time-frequency graphs to obtain a sequence of real-time power consumption local time-frequency associated feature vectors, including: inputting each real-time power consumption local time-frequency graph in the sequence of real-time power consumption local time-frequency graphs into a power consumption time-frequency feature extractor based on a convolutional neural network model and a non-local neural network model to obtain a sequence of real-time power consumption local time-frequency associated feature vectors.
3. The method for predicting laptop battery life based on deep learning according to claim 2, characterized in that: Inputting the sequence of local time-frequency correlation feature vectors of real-time power consumption into a contextual semantic enhancement module based on saliency-globality to obtain a sequence of enhanced local time-frequency correlation feature vectors of real-time power consumption, including: Extracting the maximum value of each local time-frequency correlation feature vector of real-time power consumption in the sequence of local time-frequency correlation feature vectors of real-time power consumption to obtain a prominent local time-frequency correlation feature vector of real-time power consumption; Extracting an average value of each of the local time-frequency correlation feature vectors of real-time power consumption in the sequence of the local time-frequency correlation feature vectors of real-time power consumption to obtain a global local time-frequency correlation feature vector of real-time power consumption; Performing convolution coding and feature activation processing on the prominent real-time power consumption local time-frequency correlation feature vector and the global real-time power consumption local time-frequency correlation feature vector to obtain a prominent feature real-time power consumption local time-frequency correlation activation vector and a global feature real-time power consumption local time-frequency correlation activation vector; Fusion of the local time-frequency association activation vector of the prominent feature real-time power consumption and the local time-frequency association activation vector of the global feature real-time power consumption to obtain a global-prominent feature real-time power consumption local time-frequency association vector; Performing nonlinear activation on the global-prominent feature real-time power consumption local time-frequency association vector to obtain a global-prominent feature real-time power consumption local time-frequency association weight feature vector; Using the global-prominent feature real-time power consumption local time-frequency correlation weight feature vector as a weight, the sequence of the real-time power consumption local time-frequency correlation feature vectors is point-multiplied by position and added to the sequence of the real-time power consumption local time-frequency correlation feature vectors to obtain the sequence of the enhanced real-time power consumption local time-frequency correlation feature vectors.
4. The method for predicting laptop battery life based on deep learning according to claim 3, characterized in that: The prominent real-time power consumption local time-frequency association feature vector and the global real-time power consumption local time-frequency association feature vector are subjected to convolution coding and feature activation processing to obtain a prominent feature real-time power consumption local time-frequency association activation vector and a global feature real-time power consumption local time-frequency association activation vector, including: The prominent real-time power consumption local time-frequency correlation feature vector is subjected to one-dimensional convolution coding to obtain a prominent real-time power consumption local time-frequency correlation convolution coding vector, and then the convolution coding vector is input into a ReLU function to obtain a prominent real-time power consumption local time-frequency correlation activation coding feature vector; Performing matrix multiplication of a prominent point convolution feature vector obtained by performing point convolution encoding on the prominent real-time power consumption local time-frequency associated activation coding feature vector and a first weight matrix to obtain the prominent feature real-time power consumption local time-frequency associated activation vector; The global real-time power consumption local time-frequency correlation convolution coding vector obtained by performing one-dimensional convolution coding on the global real-time power consumption local time-frequency correlation feature vector is input into the ReLU function to obtain the global real-time power consumption local time-frequency correlation activation coding feature vector; The global point convolution feature vector obtained by performing point convolution encoding on the global real-time power consumption local time-frequency associated activation coding feature vector is matrix multiplied with the second weight matrix to obtain the global feature real-time power consumption local time-frequency associated activation vector.
5. The method for predicting laptop battery life based on deep learning according to claim 4, characterized in that: The global-prominent feature real-time power consumption local time-frequency association vector is nonlinearly activated to obtain a global-prominent feature real-time power consumption local time-frequency association weight feature vector, including: Inputting the global-prominent feature real-time power consumption local time-frequency correlation vector into a tanh function to obtain a first activated global-prominent feature real-time power consumption local time-frequency correlation vector; Inputting the global-prominent feature real-time power consumption local time-frequency correlation vector into a Sigmoid function to obtain a second activated global-prominent feature real-time power consumption local time-frequency correlation vector; The first activated global-prominent feature real-time power consumption local time-frequency association vector and the second activated global-prominent feature real-time power consumption local time-frequency association vector are multiplied by position point to obtain the global-prominent feature real-time power consumption local time-frequency association weight feature vector.
6. The method for predicting laptop battery life based on deep learning according to claim 5, characterized in that: The sequence of the enhanced real-time local time-frequency associated feature vectors of power consumption is subjected to power consumption feature time series context encoding to obtain the full-time domain time series associated feature vector of power consumption, including: inputting the sequence of the enhanced real-time local time-frequency associated feature vectors of power consumption into a power consumption feature time series context encoder based on a Bi-LSTM model to obtain the full-time domain time series associated feature vector of power consumption.
7. The method for predicting laptop battery life based on deep learning according to claim 6, characterized in that: Based on the full-time domain timing correlation characteristics of the power consumption, an average power consumption estimation value is obtained, including: inputting the full-time domain timing correlation characteristic vector of the power consumption into an average power consumption estimator based on a decoder to obtain the average power consumption estimation value.
Citation Information
Patent Citations
Battery charging management method and system, intelligent terminal and computer readable storage medium
CN110676905A
Lithium ion battery charge state estimation method based on time domain fusion converter
CN117538783A
Cited By
Intelligent notebook power management method and system
CN122795192A