Battery performance acquisition method and device, electronic equipment and storage medium
By collecting multiple charging parameters of charging duration during the battery charging process and inputting them into a preset multi-layer model combination, the problem of insufficient accuracy in obtaining battery health in the prior art is solved, and higher accuracy and convenient data acquisition are achieved.
Patent Information
- Application Number
- CN202311467685.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-06
- Publication Date
- 2025-05-06
AI Technical Summary
When obtaining battery health, the prior art mainly relies on the integration method, which has problems with data accuracy and integration error, which affects accuracy.
The target performance of the battery is obtained by obtaining the charging parameters acquired by multiple charging durations of the battery during charging and inputting them into a preset combination of at least two layers of model. Each layer of the model combined includes at least one model, the output data of the previous layer model is used as input data of the next layer model, and the number of models included in the previous layer model is greater than the number of models included in the next layer model.
Improve the accuracy of obtaining battery health, avoid errors in the integration method, and data collection is more convenient, and there is no need to manually adjust the weight parameters.
Smart Images

Figure CN119936660A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to a method, device, electronic device and storage medium for obtaining battery performance. Background Art
[0002] With the development of science and technology, various electronic devices appear in people's daily lives. People can use electronic devices for entertainment, work, etc.
[0003] At present, hardware devices such as batteries have become an indispensable part of electronic devices. During the charging process or use of electronic devices, the battery power, temperature, and current will change over time. Therefore, it is necessary to monitor the performance of the battery at all times. For example, the state of health (SOH) is a good indicator of battery performance. Electronic devices can usually be equipped with a function to obtain battery health, which reflects the performance of the battery by obtaining battery health. However, most of the existing machine learning models for obtaining battery health are mainly obtained through the ampere-hour integration method, that is, the current of the battery during the charging process is integrated to calculate the current battery capacity, and then the current battery SOH is calculated based on the ratio of the calculated battery capacity to the rated capacity. In this process, not only is it necessary to obtain long-term charging and discharging data, but there is also an integration error, which affects the accuracy of obtaining battery health. Summary of the invention
[0004] In order to improve the accuracy of obtaining battery health, the embodiments of the present application provide a battery performance acquisition method, device, electronic device and storage medium. The technical solution is as follows:
[0005] In one aspect, the present application provides a method for obtaining battery performance, which is applied to an electronic device, and the method comprises:
[0006] Acquiring charging data of the battery during the charging process, wherein the charging data includes charging parameters collected during multiple charging periods;
[0007] The charging data is input into a preset model combination to obtain the target performance of the battery, wherein the preset model combination is at least two layers of models, each layer of models includes at least one model, the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models.
[0008] In one aspect, the present application provides a battery performance acquisition device, which is applied to an electronic device, and the device includes:
[0009] A first acquisition module is used to acquire charging data of the battery during the charging process, wherein the charging data includes charging parameters collected during multiple charging durations;
[0010] The second acquisition module is used to input the charging data into a preset model combination to obtain the target performance of the battery. The preset model combination is at least two layers of models, each layer of models includes at least one model, the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models.
[0011] In another aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the battery performance acquisition method as described in one aspect.
[0012] In another aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the battery performance acquisition method as described in one aspect.
[0013] On the other hand, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the battery performance acquisition method as described in one aspect above.
[0014] On the other hand, an embodiment of the present application provides an application publishing platform, which is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes the battery performance acquisition method as described in one aspect above.
[0015] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0016] The charging data of the battery during the charging process is obtained, and the charging data includes charging parameters collected during multiple charging times; the charging data is input into a preset model combination to obtain the target performance of the battery, and the preset model combination is at least two layers of models, each layer of models includes at least one model, and the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models. In an embodiment of the present application, the charging data obtained are the charging parameters within each charging time, and there is no need to collect a complete charging curve, which makes data collection more convenient. The collected charging data is then input into the preset model combination, and the target performance of the battery is obtained through the preset model combination. The output data of the previous layer of models in the preset model combination is used as the input data of the next layer of models. The target performance of the battery is obtained by combining various models, avoiding the use of integral method to obtain, and improving the accuracy of obtaining battery health. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 is a schematic diagram of an example structure of an electronic device provided in an embodiment of the present application;
[0019] Figure 2 is a method flow chart of a method for obtaining battery performance provided by an exemplary embodiment of the present application;
[0020] Figure 3 is a training flow chart of a preset model combination provided by an exemplary embodiment of the present application;
[0021] Figure 4 is a structural schematic diagram of a preset model combination involved in an exemplary embodiment of the present application;
[0022] Figure 5 is a structural schematic diagram of another preset model combination involved in an exemplary embodiment of the present application;
[0023] Figure 6 is a method flow chart of a method for obtaining battery performance provided by an exemplary embodiment of the present application;
[0024] Figure 7 is a structural block diagram of a battery performance acquisition device provided by an exemplary embodiment of the present application;
[0025] Figure 8It is a structural schematic diagram of another example of a battery performance acquisition device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0027] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0028] The solution provided by the present application can be used in real-life scenarios where people monitor the battery performance of electronic devices during their daily use of electronic devices. To facilitate understanding, some terms and application scenarios involved in the embodiments of the present application are briefly introduced below.
[0029] Battery health (State of health, SOH): SOH = current capacity of the battery / initial capacity of the battery * 100%).
[0030] ANN refers to a complex network structure formed by a large number of processing units (neurons) connected to each other. It is a kind of abstraction, simplification and simulation of the organizational structure and operation mechanism of the human brain. Artificial Neural Network (ANN) simulates neuronal activity with a mathematical model. It is an information processing system based on imitating the structure and function of the brain neural network.
[0031] With the development of science and technology, batteries, as mobile power supply devices, have been widely used in various electronic devices. Among them, lithium batteries are used in most electronic devices due to their light weight and large capacity. During the operation of lithium batteries, the battery power, temperature, and current usually change over time. Timely acquisition of the current performance indicators of the battery helps to improve the charging and discharging strategy.
[0032] For example, battery health SOH is a good indicator of battery performance. Electronic devices are usually equipped with a function to obtain battery health, which reflects battery performance. Accurately calculating the SOH of lithium batteries helps predict the overall life of lithium batteries, and can also improve charging and discharging strategies, thereby effectively managing batteries. For example, when the battery is aged and the health is less than 80%, it should be replaced.
[0033] Please refer to Figure 1 , is a schematic diagram of an example structure of an electronic device provided in an embodiment of the present application. Figure 1 The electronic device shown includes components such as a processor 110 , a memory 120 , a transceiver 130 , a display unit 140 , an input unit 150 , a sensor 160 , an audio circuit 170 , and a power module 180 .
[0034] The processor 110 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, the processor 110 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 110 may include one or more processing units; optionally, the processor 110 may integrate an application processor, which mainly processes operating devices, user interfaces, and application programs, etc. Of course, other processors may also be included, which are not listed here one by one.
[0035] The memory 120 can be used to store software programs and modules. The processor 110 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area, wherein the program storage area may store operating devices, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as audio data, phone book, etc.), etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0036] The transceiver 130 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The transceiver 130 can be one or more devices integrating at least one communication processing module, for example, an antenna and a baseband processor are integrated into the transceiver 130, or an antenna and a modem processor are integrated into the transceiver 130, etc., which are not limited here.
[0037] The display unit 140 may be used to display information input by a user or information provided to a user and various menus of the electronic device. The display unit 140 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc., which is not limited here.
[0038] The input unit 150 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the input unit 150 can collect the user's operations on or near it, and drive the corresponding connection device according to a pre-set program. In addition, the input unit 150 may include a touch panel, which can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel, the input unit 150 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of function keys (such as volume control keys, switch keys, etc.), trackballs, joysticks, etc.
[0039] The electronic device may also include at least one sensor 160, such as a gyroscope sensor, a motion sensor, and other sensors. The motion sensor may include an acceleration sensor for detecting the magnitude of acceleration in all directions, and the magnitude and direction of gravity when stationary, which may be used for applications to identify the posture of the electronic device, such as horizontal and vertical screen switching, related games, magnetometer posture calibration, etc. As for other sensors that may be configured in the electronic device, such as a pressure gauge, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be described in detail here.
[0040] The audio circuit 170 may include a speaker and a microphone, and may provide an audio interface between the user and the electronic device. The audio circuit 170 may transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 170 and converted into audio data, and then the audio data is output to the processor 110 for processing, and then sent to another electronic device through the video circuit, or the audio data is output to the memory 120 for further processing.
[0041] The electronic device also includes a power module 180 for supplying power to various components. Optionally, the power module 180 can be logically connected to the processor 110 through a charging management module, so that functions such as charging, discharging, and power consumption management can be implemented through the charging management module.
[0042] Although not shown, the electronic device may further include a camera. Optionally, the camera may be located at the front or rear of the electronic device, which is not limited in the present embodiment.
[0043] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0044] Optionally, the above-mentioned electronic devices may include but are not limited to wearable devices (such as smart bracelets, smart watches, smart glasses, etc.), mobile phones, tablet computers, laptops, smart glasses, smart watches, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, desktop computers, laptops, etc.
[0045] Usually, the above Figure 1 The electronic device shown needs to be equipped with a corresponding operating system and run based on the operating system. For example, the operating system of the electronic device can be an Android system, an iOS system, a Linux system, etc.
[0046] Optionally, when the battery module in the electronic device is working, it is mainly powered by the internal lithium battery or other batteries. When the electronic device is charging and discharging, in order to better monitor the performance of the battery, the SOH of the battery can be calculated in a preset manner.
[0047] There are many ways to calculate SOH. For example, one is the ampere-hour integration method, which is to calculate the current battery capacity by integrating the current during the charging process, and then calculate the current battery SOH based on the ratio of the calculated battery capacity to the rated capacity. However, this method is greatly affected by data accuracy and the accumulation of integral errors, and the accuracy of the calculated SOH is not high enough.
[0048] Another method is to fit the relationship between battery parameters and battery health in the number of battery cycles, or to fit the attenuation factor through the battery parameters in the number of cycles, and then obtain the battery health. For example, the relationship function between the number of cycles and the temperature and current rate is fitted using the cyclic charge and discharge experimental data, and then the health capacity value at different temperatures and currents is calculated based on the fitting function. This type of solution requires multiple cycles of complete charge and discharge data, but in real scenarios, it is generally not used until it is completely out of power before charging, but the user charges whenever he wants, so most of the data obtained are usually fragments of the charging process, and the specific information of the number of cycles cannot be obtained, so the application has limitations. Another method is to predict battery health through machine learning or big data methods. For example, multiple base models are trained by inputting battery voltage, current and temperature, and then several base models are given different weights for fusion. In this solution, the weights of different base models need to be optimized manually, which is difficult to adjust.
[0049] Therefore, for the above-mentioned related technologies, the method of calculating the battery health SOH not only has great limitations, but the accuracy of the calculated battery health SOH is also not high. Based on the hybrid machine learning method, the weight parameters need to be manually adjusted, and there are also problems such as cumbersome process.
[0050] In order to avoid the problems arising in the above-mentioned related technologies and improve the accuracy of obtaining battery health, the present application provides a battery performance acquisition method that can be applied to electronic devices. By acquiring charging parameters collected at different charging times and inputting them into a preset model combination, the accurate battery health can be obtained without the need to manually adjust the weight parameters, thereby reducing the time required.
[0051] Please refer to Figure 2 , which shows a method flow chart of a battery performance acquisition method provided by an exemplary embodiment of the present application. The battery performance acquisition method can be applied to the above electronic device and executed by the processor or charging management module of the electronic device. Figure 2As shown, the battery performance acquisition method may include the following steps:
[0052] Step 201 : acquiring charging data of the battery during the charging process, where the charging data includes charging parameters collected during multiple charging periods.
[0053] Among them, users can charge electronic devices at any time during the use of electronic devices. For example, the electronic device can be charged by connecting the charging cable to the interface on the electronic device. After connecting the charger, the battery of the electronic device can be charged. When obtaining charging data, the electronic device can monitor the charging process and measure the charging parameters such as voltage, current, temperature, capacitance, and capacitance increment in real time. Most of these charging parameters are curves that change with time. The charging parameters during the battery charging process are collected and obtained during the charging time.
[0054] In a possible implementation, the charging data includes charging parameters collected during multiple charging durations. The charging process may be performed during a constant current charging process. Taking the charging parameter as voltage as an example, the electronic device may collect the voltage during the constant current charging process of the battery to obtain V=[v0, v1, ..., v t ]There are so many values, among which 0 to t is the charging time in this charging process. The electronic device can intercept multiple fragments from it, form the voltage within multiple charging time periods, and obtain the charging parameters collected at multiple charging time periods.
[0055] Step 202, input the charging data into a preset model combination to obtain the target performance of the battery, the preset model combination is at least two layers of models, each layer of models includes at least one model, the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models.
[0056] Optionally, the electronic device inputs the charging data into a preset model combination, and calculates the target performance of the battery through the preset model combination. The preset model combination is trained in advance and designed in the electronic device, and the preset model combination includes at least two layers of models, that is, at least two model layers, each layer contains at least one model, and the output data of the previous layer model is used as the input data of the next layer model. The target performance is calculated through each layer model, and then the calculated target performance is input into the next layer model, so that the next layer model calculates the new target performance, and the target performance finally output is the target performance obtained by this solution.
[0057] For example, if the target performance is battery health, each layer includes at least one model, which will calculate the battery health obtained by each model based on the charging data, and then input these battery health into the subsequent models, so that the subsequent models continue to calculate the battery health. The last layer of models includes a model, and finally this model will output a final battery health. The electronic device obtains the required target performance through the preset model combination composed of these models.
[0058] In summary, the charging data of the battery during the charging process is obtained, and the charging data includes charging parameters collected during multiple charging durations; the charging data is input into a preset model combination to obtain the target performance of the battery, and the preset model combination is at least two layers of models, each layer of models includes at least one model, and the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models. In an embodiment of the present application, the charging data obtained are the charging parameters within each charging duration, and there is no need to collect a complete charging curve, which makes data collection more convenient. The collected charging data is then input into the preset model combination, and the target performance of the battery is obtained through the preset model combination. The output data of the previous layer of models in the preset model combination is used as the input data of the next layer of models. The target performance of the battery is obtained by combining various models, avoiding the use of integral methods to obtain, and improving the accuracy of obtaining battery health.
[0059] In a possible implementation, a preset model combination including a base model layer and a fusion model layer is taken as an example, wherein the base model layer includes N base models, N is an integer greater than or equal to 2, each base model is used to calculate the target performance of the battery based on the charging data, and the calculation logic of each base model is different; the fusion model layer includes at least one fusion model, and at least one fusion model is used to receive the output data of each of the connected M base models and fuse them to obtain the target performance of the battery, where M is an integer less than or equal to N. By combining the base model layer and the fusion model layer to form a preset model combination, the target performance of the battery is calculated without manually adjusting the weights of each base model, thereby improving the efficiency of the calculation.
[0060] Before executing the above method for obtaining battery performance, this solution needs to train each base model and fusion model in advance to obtain the trained preset model combination. Please refer to Figure 3 , which shows a training flow chart of a preset model combination provided by an exemplary embodiment of the present application, and the training of the preset model combination can be performed by an electronic device. Figure 3 As shown, the training process of the preset model combination may include the following steps:
[0061] Step 301 : obtaining a training sample data set, where the training sample data set includes charging parameters of multiple charging durations acquired by monitoring a battery.
[0062] The process of obtaining the training sample data set can be accumulated over a long period of time, for example, various charging parameters are collected by monitoring the battery during the charging time of the electronic device during one or two months. The time of one or two months can be pre-set in the electronic device by the developer.
[0063] Taking the charging parameter collected as charging voltage as an example, during the constant current charging process of the battery, the electronic device obtains the curve V = [v0, v1, ..., v t ]. Considering that in actual scenarios, the time required for each charging is different, the charging parameters collected each time are usually different during the data collection process. For the charging data collected at different times, the specific value of V will also be inconsistent in time. In other words, the length t of each charging voltage in the time series of these collected charging parameters is inconsistent. Therefore, this solution can intercept the collected charging data to obtain multiple fragments of the charging voltage changing over time.
[0064] For example, the voltage data collected during a charging process is as follows: V = [v0, v1, ..., v t The electronic device can intercept the voltage data to obtain the following multiple segments of voltage data: segment one data is [v0, v1, v2, v3], segment two data is [v4, v5, v6, v7], segment three data is [v8, v9, v 10 , v 11 ] and so on until v t , the charging data of this charging is intercepted to obtain the charging voltage corresponding to each segment, that is, the charging parameters corresponding to multiple charging durations.
[0065] In one possible implementation, the electronic device intercepts the above data with a time window of 10mv, that is, each time the voltage increases by 10mv, it is regarded as a segment, and the collected charging voltage is smoothed. For example, for a segment of voltage data, a voltage segment is obtained by dividing it according to the duration of each voltage increase of 10mv, and the charging voltage in the voltage segment is averaged to finally obtain the voltage value corresponding to the segment, and the charging voltage in the other multiple segments is processed in this way, so that the overall data composed of different charging voltage segments is smoother, and smoothing is achieved. For example, according to the above division result, the data of segment one is [v0, v1, v2, v3], then the data of segment one is smoothed, and the average value of these four voltages is obtained as the voltage value corresponding to segment one, and the average value is obtained for each segment to obtain the voltage data after smoothing.
[0066] Optionally, in the process of data collection, abnormal values are sometimes collected. For example, in [v0, v1, v2, v3], the data of v2 is very large. The terminal device can calculate the voltage difference corresponding to the moment before and after this moment. For the voltage difference exceeding the preset difference, v2 is treated as a noise point in the data and filtered, and filled with adjacent values. Alternatively, in the process of data collection, the collected charging voltage may be too short or missing. The electronic device can also use the padding method to fill these data. Among them, the preset difference and the algorithm for filling missing values can be pre-set in the terminal device by the developer. It should be noted that the above-mentioned processes of filtering noise points and filling missing values can process the entire collected training sample data set.
[0067] Step 302: train each model of each layer in the preset model combination according to the training sample data set to obtain a trained preset model combination.
[0068] Optionally, each model of each layer in the preset model combination is trained according to the obtained training sample data set to obtain a trained preset model combination. The preset model combination includes a base model layer and a fusion model layer. The base model layer includes N base models, where N is an integer greater than or equal to 2. Each base model is used to calculate the target performance of the battery based on the charging data, and the calculation logic of each base model is different. For example, the first layer in this solution is the base model layer, and the selection of each base model can be one or more combinations of a random forest (RF) model, a Gaussian process regression (GPR) model, an ANN model, etc.
[0069] In addition, the fusion model layer also includes at least one fusion model, which is used to receive and fuse the output data of the connected M base models to obtain the target performance of the battery, where M is an integer less than or equal to N. Optionally, the fusion model can also select RF, ANN and other models.
[0070] Please refer to Figure 4 , which shows a schematic diagram of the structure of a preset model combination involved in an exemplary embodiment of the present application. Figure 4 As shown, the base model layer 401 includes various base models 401a, and the fusion model layer 402 includes a fusion model 402a. Optionally, during training, the training sample data set is first input into each base model 401a for training, and then the output of each base model 401a is used as the input of the fusion model 402a to train the fusion model 402a, thereby obtaining a preset model combination after training.
[0071] In a possible implementation, each base model in the base model layer is connected to the fusion model of the next layer according to a preset connection relationship. Figure 4 According to the structure in the scheme, the electronic device can divide the training sample data set into a first sample data set and a second sample data set; input the first sample data set to each base model in the base model layer for training, and obtain each trained base model; input the second sample data set to each trained base model, and obtain the output result of each trained base model; input the output result of each trained base model to each fusion model in the connected fusion model layer for training, and obtain each trained fusion model.
[0072] For example, the electronic device can divide the training sample data set in a ratio of 5:5, and give it to the base model and the fusion model for training verification and testing respectively. Before inputting the first sample data set into each base model in the base model layer for training, the electronic device can also divide the first sample data set assigned to the base model into a training set Train1, a verification set Val1, and a test set Test1 in a ratio of 6:2:2. The first sample data set is preprocessed, including data processing methods such as outlier processing and missing value filling.
[0073] In one possible implementation, the charging data also includes multiple types of charging parameters. Before training the base model, the electronic device can also normalize the data in the first sample data set. For example, in a training cycle, all the sample data in the first sample data set are traversed, the sample data are standardized, and the standardized parameters are saved. For example, the charging parameters include voltage, current, temperature, capacitance based on ampere-hour integration, capacitance increment IC, and differential capacity DV parameters. Among these different charging parameters, other charging parameters can be normalized according to voltage, for example, by calculating the maximum and minimum values of the voltage in the training set. Then, according to the min-max normalization method, the other charging parameters are normalized. And the min-max values in the training set are saved, and the same operation is performed on the validation set and the test set to complete the data normalization process. Optionally, after the above normalization process is performed, the normalized data is sent to each base model, and these base models can be trained separately.
[0074] Optionally, for the second sample data set, when training the fusion model, after the second sample data set is input into the trained base model, each base model will obtain its own model output result, and these model output results are input into the fusion model to train the fusion model. Among them, the electronic device can also perform a processing process similar to the first sample data set on the second sample data set, for example, the second sample data set is also divided into a training set Train2, a validation set Val2 and a test set Test2 in a ratio of 6:2:2, and these data are preprocessed, including data processing methods such as outlier processing, missing value filling, and normalization, which will not be repeated here.
[0075] In a possible implementation, after the electronic device inputs these second sample data sets into each trained base model, it can obtain the output results of each base model on the training set Train2, the validation set Val2 and the test set Test2, A=[a1,a2,…,aN], B=[b1,b2,…,bM], C=[c1,c2,…,cQ]; the output results A of different base models in train2 are used as input and sent to the fusion model for training. Verification and testing are performed on B and C to complete the training of the fusion model.
[0076] Optionally, taking battery health as an example, through the calculation of the above-mentioned base models, the battery health obtained by each base model based on the first sample data set can be calculated, and then the battery health is fused through the fusion model to obtain the final battery health prediction result and the final desired target performance.
[0077] It should be noted that the above Figure 4The structure of the preset model combination shown is exemplary. In actual applications, it can also be a model combination with more layers. Finally, a fusion model layer contains a fusion model, which uses all the outputs of the previous layer as its input to calculate the final fusion result (i.e., target performance). The connections between the intermediate layers can be flexibly designed by the developer. For example, please refer to Figure 5 , which shows a schematic diagram of the structure of another preset model combination involved in an exemplary embodiment of the present application. Figure 5 As shown, it includes a base model layer 501, a first fusion model layer 502, and a second fusion model layer 503. The base model layer 501 includes various base models 501a, the first fusion model layer 502 includes two fusion models 502a, and the second fusion model layer 503 includes a fusion model 503a. Figure 5 In the example, a part of each base model 501a is connected to one of the two fusion models 502a, and the other part is connected to the other of the two fusion models 502a. The first fusion model layer 502 includes two fusion models 502a, and finally they are connected to the fusion model 503a in the second fusion model layer 503. During training, the collected training sample set can be divided according to the above process, and the models in each layer can be trained separately to finally obtain the preset model combination. The training process can be similar to Figure 4 The training process will not be described here.
[0078] After training, the trained preset model combination is set in the electronic device. After the electronic device collects the charging parameters of the battery during charging, it inputs them into the preset model combination to obtain the desired target performance.
[0079] Please refer to Figure 6 , which shows a method flow chart of a battery performance acquisition method provided by an exemplary embodiment of the present application, and the battery performance acquisition method can be applied to electronic devices. Figure 6 As shown, the battery performance acquisition method may include the following steps:
[0080] Step 601 , obtaining charging data of the battery during the charging process, where the charging data includes charging parameters collected during multiple charging periods.
[0081] Optionally, in actual applications, the electronic device is already provided with the above-mentioned trained preset model combination, and during the process of charging the battery, the collection can be performed to obtain the charging parameters collected during the corresponding charging process. Among them, multiple charging durations can also include the time spent collecting charging parameters during the previous charging processes. For example, the charging parameters collected in one charging duration are relatively small, and the electronic device can combine the charging parameters collected when connecting the charger for charging several times to obtain the charging parameters collected in multiple charging durations, which are the charging data.
[0082] In one possible implementation, the electronic device can first obtain the curves of various charging parameters changing over time during the collection, and intercept these parameter curves to obtain the corresponding charging parameters for multiple time periods. For example, through the collection, one or more types of data can be obtained, including voltage curve segment data, current curve segment data, temperature curve segment data, capacitance curve segment data based on ampere-hour integration, capacitance increment IC curve segment data, and battery discharge curve segment data. By intercepting these collected curve data, different types of charging parameters collected at multiple charging durations can be obtained. The charging parameters obtained after interception are equivalent to the charging parameters under different time segments, and the charging data uses the charging parameters under these different time segments.
[0083] In one possible implementation, the charging data also includes multiple types of charging parameters. When the electronic device obtains the charging data of the battery during the charging process, it can do the following: obtain the collection time, which is the time spent by the electronic device to collect the charging data; determine the smoothing amount based on the collection time, which is the amount of data selected each time when smoothing the collected charging data; smooth the collected charging data according to the smoothing amount to obtain processed charging data.
[0084] For example, the electronic device is pre-set with the corresponding relationship between different collection durations and smoothing processing amounts. During the battery charging process, the charging duration is equivalent to the collection duration. The electronic device queries the above corresponding relationship based on the collection duration, thereby determining the smoothing processing amount corresponding to the collection duration, and smoothing the collected charging data according to the smoothing processing amount to obtain the processed charging data. For example, the above charging parameter is the charging voltage, and the collection duration exceeds 10 minutes. The smoothing processing amount determined by the electronic device can be the data amount corresponding to each change of 10mv in the charging voltage. When smoothing, each charging voltage is smoothed according to the time window corresponding to each change of 10mv, for example, the average value is calculated to obtain the processed charging voltage (i.e., the calculated average value), and the charging voltage collected within the time window is the calculated average value, thereby smoothing the charging parameters within the entire time period. The above smoothing processing amount is also exemplary. In actual applications, the specific processing amount can be obtained in combination with empirical data, which is not limited here.
[0085] Step 602 , normalize various types of charging parameters according to preset types of charging parameters to obtain normalized charging data.
[0086] Optionally, since the charging parameters obtained above are of multiple types, before inputting the charging data into the preset model combination, the electronic device can normalize the various types of charging parameters according to the preset type of charging parameters. For example, the preset type is the charging voltage, and the normalization process can refer to the process of normalizing the training data in the above-mentioned training model process, which will not be repeated here. Optionally, when there is only one type of charging parameter obtained, for example, the charging parameter only includes any one of the charging voltage, charging current, temperature, capacitance based on ampere-hour integration, and capacitance increment IC, the normalization process of this step can also be omitted, and normalization does not need to be performed.
[0087] It should be noted that the types of charging parameters that the electronic device needs to obtain can also be specifically defined by the developer, and the target performance of the battery can be obtained by combining different types of charging parameters.
[0088] Step 603: input the normalized charging data into a preset model combination to obtain the target performance of the battery.
[0089] The preset model combination is the above-mentioned trained preset model combination. In practical applications, it is only necessary to input the collected and normalized charging data into the preset model combination, and the preset model combination executes the corresponding process to calculate the target performance of the battery.
[0090] With the above Figure 4 and Figure 5Taking the preset model combination shown as an example, the electronic device inputs the charging data into each base model in the base model layer to obtain the output data of each base model; the output data of each base model is input into the fusion model layer to obtain the target performance of the battery. Thereby obtaining the target performance of the battery that is ultimately desired. Optionally, the target performance may be the above-mentioned battery health. In actual applications, there are many types of performance that characterize battery life, aging, etc. Here, battery health is also used as an example. Developers can also design and calculate different target performances according to actual needs, which is not limited here.
[0091] In summary, the charging data of the battery during the charging process is obtained, and the charging data includes charging parameters collected during multiple charging durations; the charging data is input into a preset model combination to obtain the target performance of the battery, and the preset model combination is at least two layers of models, each layer of models includes at least one model, and the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models. In an embodiment of the present application, the charging data obtained are the charging parameters within each charging duration, and there is no need to collect a complete charging curve, which makes data collection more convenient. The collected charging data is then input into the preset model combination, and the target performance of the battery is obtained through the preset model combination. The output data of the previous layer of models in the preset model combination is used as the input data of the next layer of models. The target performance of the battery is obtained by combining various models, avoiding the use of integral methods to obtain, and improving the accuracy of obtaining battery health.
[0092] In addition, this application can also accurately predict the health of the battery based on the charging voltage, without collecting the complete charging curve, and can be adapted to most application scenarios. During the model training process, multiple base models are trained first. The output of the base model is sent to the fusion model, and finally the output of the fusion model is used as the prediction result of the battery health. Through integrated learning, the prediction results of the base models are fused to improve the accuracy of the model prediction. At the same time, there is no need to manually adjust the base model weight parameters, which improves the robustness and accuracy of the prediction results.
[0093] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0094] Please refer to Figure 7 , which shows a structural block diagram of a battery performance acquisition device provided by an exemplary embodiment of the present application. The battery performance acquisition device 700 can be used in an electronic device. Figure 2 or Figure 6 All or part of the steps in the method provided by the illustrated embodiment are performed by the electronic device. The battery performance acquisition device 700 includes:
[0095] A first acquisition module 701 is used to acquire charging data of the battery during the charging process, wherein the charging data includes charging parameters collected during multiple charging durations;
[0096] The second acquisition module 702 is used to input the charging data into a preset model combination to obtain the target performance of the battery, wherein the preset model combination is at least two layers of models, each layer of models includes at least one model, the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models.
[0097] In summary, the charging data of the battery during the charging process is obtained, and the charging data includes charging parameters collected during multiple charging durations; the charging data is input into a preset model combination to obtain the target performance of the battery, and the preset model combination is at least two layers of models, each layer of models includes at least one model, and the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models. In an embodiment of the present application, the charging data obtained are the charging parameters within each charging duration, and there is no need to collect a complete charging curve, which makes data collection more convenient. The collected charging data is then input into the preset model combination, and the target performance of the battery is obtained through the preset model combination. The output data of the previous layer of models in the preset model combination is used as the input data of the next layer of models. The target performance of the battery is obtained by combining various models, avoiding the use of integral methods to obtain, and improving the accuracy of obtaining battery health.
[0098] Optionally, the preset model combination includes a base model layer and a fusion model layer, the base model layer includes N base models, N is an integer greater than or equal to 2, each base model is used to calculate the target performance of the battery according to the charging data, and the calculation logic of each base model is different;
[0099] The fusion model layer includes at least one fusion model, and the at least one fusion model is used to receive and fuse the output data of each of the connected M base models to obtain the target performance of the battery, where M is an integer less than or equal to N.
[0100] Optionally, the second acquisition module 702 includes: a first acquisition unit and a second acquisition unit;
[0101] The first acquisition unit is used to input the charging data into each base model in the base model layer to acquire output data of each base model;
[0102] The second acquisition unit is used to input the output data of each base model into the fusion model layer to obtain the target performance of the battery.
[0103] Optionally, the device further comprises:
[0104] A third acquisition module is used to acquire a training sample data set before acquiring charging data of the battery during the charging process, wherein the training sample data set includes charging parameters of multiple charging durations obtained by monitoring and collecting the battery;
[0105] The fourth acquisition module is used to train each model of each layer in the preset model combination according to the training sample data set to obtain the trained preset model combination.
[0106] Optionally, the fourth acquisition module includes: a first division unit, a third acquisition unit, a fourth acquisition unit, and a fifth acquisition unit;
[0107] The first division unit is used to divide the training sample data set into a first sample data set and a second sample data set;
[0108] The third acquisition unit is used to input the first sample data set into each base model in the base model layer for training, and acquire each base model after training;
[0109] The fourth acquisition unit is used to input the second sample data set into each of the trained base models to obtain output results obtained by each of the trained base models;
[0110] The fifth acquisition unit is used to input the output results obtained from each of the trained base models into each fusion model in the connected fusion model layer for training, so as to obtain each fusion model after training.
[0111] Optionally, the charging data also includes multiple types of charging parameters, and the device also includes:
[0112] A fifth acquisition module, used for normalizing various types of charging parameters according to preset types of charging parameters before inputting the charging data into the preset model combination, and acquiring the normalized charging data;
[0113] The step of inputting the charging data into a preset model combination comprises:
[0114] The normalized charging data is input into the preset model combination.
[0115] Optionally, the first acquisition module includes: a sixth acquisition unit, a first determination unit, and a seventh acquisition unit;
[0116] The sixth acquisition unit is used to acquire a collection time, where the collection time is the time taken by the electronic device to collect the charging data;
[0117] The first determining unit is used to determine a smoothing processing amount according to the collection time, where the smoothing processing amount is the amount of data selected each time when smoothing the collected charging data;
[0118] The seventh acquisition unit is used to perform smoothing processing on the collected charging data according to the smoothing processing amount to obtain processed charging data.
[0119] Please refer to Figure 8 , which is a structural diagram of another example of a battery performance acquisition device provided in an embodiment of the present application. Among them, the battery performance acquisition device 800 can be an electronic device that can implement the functions in the method provided in an embodiment of the present application. Among them, the battery performance acquisition device 800 can be a chip system. In the embodiment of the present application, the chip system can be composed of a chip, or it can include a chip and other discrete devices.
[0120] In terms of hardware implementation, the communication module may be a transceiver, which is integrated into the battery performance acquisition device 800 to form a communication interface 803 .
[0121] The battery performance acquisition device 800 includes at least one processor 801, which is used to implement or support the battery performance acquisition device 800 to implement the functions of the electronic device in the method provided in the embodiment of the present application. Exemplarily, the processor 801 can execute the steps of obtaining charging data of the battery during the charging process, inputting the charging data into a preset model combination, and obtaining the target performance of the battery. Please refer to the detailed description in the method example for details, which will not be repeated here.
[0122] The battery performance acquisition device 800 may also include at least one memory 802 for storing program instructions and / or data. The memory 802 is coupled to the processor 801. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 801 may operate in conjunction with the memory 802. The processor 801 may execute program instructions stored in the memory 802. At least one of the at least one memory may be included in the processor.
[0123] The battery performance acquisition device 800 may also include a communication interface 803, which is used to communicate with other devices through a transmission medium, so that the device in the battery performance acquisition device 800 can communicate with other devices. Exemplarily, the other device may be a network side device. The processor 801 may use the communication interface 803 to send and receive data. The communication interface 803 may specifically be a transceiver.
[0124] The specific connection medium between the communication interface 803, the processor 801 and the memory 802 is not limited in the embodiment of the present application. Figure 8 In the embodiment, the memory 802, the processor 801 and the communication interface 803 are connected via a bus 804. Figure 8 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0125] In the embodiment of the present application, the processor 801 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware processor to be executed, or the hardware and software modules in the processor can be combined and executed.
[0126] In an embodiment of the present application, the memory 802 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), such as a random access memory (RAM). The memory is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory in the embodiment of the present application may also be a circuit or any other device that can implement a storage function, for storing program instructions and / or data.
[0127] Optionally, an embodiment of the present application further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing a computer program, the computer program being executed by the processor to implement all or part of the steps performed by the electronic device in the battery performance acquisition method described in the above embodiments.
[0128] Optionally, an embodiment of the present application further provides a computer-readable medium storing a computer program, which is executed by a processor to implement all or part of the steps performed by an electronic device in the battery performance acquisition method described in the above embodiments.
[0129] Optionally, an embodiment of the present application also provides a computer program product, which stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the battery performance acquisition method described in the above embodiments, and all or part of the steps performed by the electronic device.
[0130] It should be noted that: when the device provided in the above embodiment performs the control of the electronic device, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0131] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0132] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0133] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for obtaining battery performance, characterized in that: Applied to electronic equipment, the method comprises: Acquiring charging data of the battery during the charging process, wherein the charging data includes charging parameters collected during multiple charging periods; The charging data is input into a preset model combination to obtain the target performance of the battery, wherein the preset model combination is at least two layers of models, each layer of models includes at least one model, the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models.
2. The method according to claim 1, characterized in that The preset model combination includes a base model layer and a fusion model layer, the base model layer includes N base models, N is an integer greater than or equal to 2, each base model is used to calculate the target performance of the battery according to the charging data, and the calculation logic of each base model is different; The fusion model layer includes at least one fusion model, and the at least one fusion model is used to receive and fuse the output data of each of the connected M base models to obtain the target performance of the battery, where M is an integer less than or equal to N.
3. The method according to claim 2, characterized in that The step of inputting the charging data into a preset model combination to obtain the target performance of the battery includes: Input the charging data into each base model in the base model layer, and obtain output data of each base model; The output data of each base model is input into the fusion model layer to obtain the target performance of the battery.
4. The method according to claim 2, characterized in that: Before acquiring charging data of the battery during the charging process, the method further includes: Acquire a training sample data set, wherein the training sample data set includes charging parameters of multiple charging durations acquired by monitoring the battery; The models of each layer in the preset model combination are trained according to the training sample data set to obtain the trained preset model combination.
5. The method according to claim 4, characterized in that The step of training each model of each layer in the preset model combination according to the training sample data set to obtain the trained preset model combination includes: Dividing the training sample data set into a first sample data set and a second sample data set; Inputting the first sample data set into each base model in the base model layer for training, and obtaining each base model after training; Inputting the second sample data set into each of the trained base models to obtain output results obtained by each of the trained base models; The output results obtained from each of the trained base models are input into each fusion model in the connected fusion model layer for training, so as to obtain each fusion model after training.
6. The method according to any one of claims 1 to 5, characterized in that: The charging data also includes various types of charging parameters. Before inputting the charging data into the preset model combination, the following is also included: Normalizing various types of charging parameters according to preset types of charging parameters to obtain normalized charging data; The step of inputting the charging data into a preset model combination comprises: The normalized charging data is input into the preset model combination.
7. The method according to any one of claims 1 to 5, characterized in that: The obtaining of charging data of the battery during the charging process includes: Acquire a collection time, where the collection time is the time taken by the electronic device to collect the charging data; Determining a smoothing processing amount according to the collection time, wherein the smoothing processing amount is the amount of data selected each time when smoothing the collected charging data; According to the smoothing amount, the collected charging data is smoothed to obtain processed charging data.
8. A battery performance acquisition device, characterized in that: Applied to electronic equipment, the device comprises: A first acquisition module is used to acquire charging data of the battery during the charging process, wherein the charging data includes charging parameters collected during multiple charging durations; The second acquisition module is used to input the charging data into a preset model combination to obtain the target performance of the battery. The preset model combination is at least two layers of models, each layer of models includes at least one model, the output data of the previous layer of models is used as the input data of the next layer of models, and the number of models included in the previous layer of models is greater than the number of models included in the next layer of models.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is executed by the processor to implement the battery performance acquisition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is executed by a processor to implement the battery performance acquisition method as described in any one of claims 1 to 7.