Battery voltage prediction method and device, electronic equipment and readable storage medium

By using the pre -training Transformer model or fine -tuning the FT Transformer model in the battery voltage prediction, selecting suitable models according to the battery type to predict, solve the problem of the existing model in insufficient data volume and generalization capabilities, and achieve higher predictions accuracy.

CN119375715APending Publication Date: 2025-01-28CHINA TOWER CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411449279.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

Existing battery voltage prediction models are greatly affected by training data, especially when the data volume is small, the prediction accuracy is poor, and lacks generalization ability, so they cannot be applied to different types of batteries.

Method used

Adopt a pre -trained Transformer model or fine -tuning the FT Transformer model to determine the appropriate voltage prediction model based on the type of battery, and predict the target timing data set input model.

Benefits of technology

By selecting suitable voltage prediction models, it can be generalized to various types of batteries for voltage prediction, which improves predictive accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119375715A_ABST
    Figure CN119375715A_ABST
Patent Text Reader

Abstract

The invention discloses a battery voltage prediction method and apparatus, an electronic device and a readable storage medium. The method comprises the steps of obtaining a target time sequence data set of a battery in a target time period; determining a voltage prediction model of the battery according to the type of the battery; inputting the target time sequence data set into the voltage prediction model, and predicting the target voltage of the battery; wherein the voltage prediction model comprises a pre-training Transform model or a fine tuning FT (Fourier Transform) Transform model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of voltage prediction, and specifically relates to a method, device, electronic device and readable storage medium for predicting battery voltage. Background Art

[0002] Base station batteries are an indispensable and important part of communication base stations. They are mainly used to provide continuous and stable power support for base station equipment when the power supply is unstable or interrupted. The performance of base station batteries is directly related to the operating stability and communication quality of the base station. The battery management system monitors the relevant parameters of the battery in real time and controls the charging and discharging of the battery to ensure the safe and efficient use of the battery. The prediction of battery voltage not only helps to optimize the efficiency of battery use, but also effectively prevents equipment failures or safety hazards caused by low or high battery voltage. The prediction of battery voltage is usually achieved by collecting and analyzing various data generated during the battery operation process, establishing a prediction model, and realizing real-time dynamic prediction of battery voltage.

[0003] However, related prediction models such as shallow recurrent neural networks are greatly affected by training data, and their prediction accuracy is poor when the amount of data is small. For example, the grayscale model is only suitable for batteries of the same type and lacks generalization ability. Summary of the invention

[0004] The embodiments of the present application provide a battery voltage prediction method, device, electronic device and readable storage medium, which can solve the problem that the relevant prediction model is greatly affected by training data and lacks generalization ability.

[0005] In a first aspect, an embodiment of the present application provides a method for predicting battery voltage, the method comprising: obtaining a target time series data set of a battery in a target time period; determining a voltage prediction model of the battery according to the type of the battery; inputting the target time series data set into the voltage prediction model to predict the target voltage of the battery; wherein the voltage prediction model comprises a pre-trained Transformer model or a fine-tuned FT Transformer model.

[0006] In a second aspect, an embodiment of the present application provides a battery voltage prediction device, which includes: an acquisition module for acquiring a target time series data set of a battery in a target time period; a determination module for determining a voltage prediction model of the battery according to the type of the battery; a prediction module for inputting the target time series data set into the voltage prediction model to predict the target voltage of the battery; wherein the voltage prediction model includes a pre-trained Transformer model or a fine-tuned FT Transformer model.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or instructions, and when the program or instructions are executed, the steps of the method described in the first aspect are implemented.

[0011] In an embodiment of the present application, a target time series data set of a battery in a target time period is obtained; a voltage prediction model of the battery is determined according to the type of the battery; the target time series data set is input into the voltage prediction model to predict the target voltage of the battery; wherein the voltage prediction model includes a pre-trained Transformer model or a fine-tuned FTTransformer model, so that a suitable voltage prediction model is selected according to the type of battery, so that it can be generalized to various types of batteries for voltage prediction and achieve higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flowchart of a method for predicting battery voltage provided in an embodiment of the present application; Figure 2 is a flow chart of another method for predicting battery voltage provided in an embodiment of the present application; Figure 3 It is a structural diagram of a Transformer model provided in an embodiment of the present application; Figure 4 It is a structural schematic diagram of a battery voltage prediction device provided in an embodiment of the present application; Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

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

[0015] The battery voltage prediction method, device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0016] Figure 1 A schematic diagram of a method for predicting battery voltage provided by an embodiment of the present application is shown, and the method can be executed by an electronic device. Figure 1 , the method may include the following steps.

[0017] Step 102: Obtain a target time series data set of the battery in a target time period.

[0018] Among them, the target time period can be the time from the current time point to a certain historical time point. The target time series data set of the target time period can be selected according to the correlation with the battery voltage to be predicted. For example, compared with the time series data set of last week, this week's time series data set is more correlated with the battery voltage to be predicted next week, so this week's time series data set can be selected as the target time series data set for battery voltage prediction. For another example, time series data sets under the same type of weather conditions may have a greater correlation. The data in the target time series data set is in the form of a time series, and the data includes but is not limited to the current, voltage, charge and discharge capacity of the battery in the target time period.

[0019] Step 104: Determine a voltage prediction model for the battery according to the type of the battery.

[0020] The voltage prediction model includes a pre-trained Transformer model or a fine-tuned FT Transformer model. The battery may include an existing commonly used battery or an emerging battery that is not widely used.

[0021] Step 106: input the target time series data set into the voltage prediction model to predict the target voltage of the battery.

[0022] In an embodiment of the present application, a target time series data set of a battery in a target time period is obtained, and a voltage prediction model of the battery is determined according to the type of the battery, wherein the voltage prediction model includes a pre-trained Transformer model or a fine-tuned FT Transformer model. The target time series data set is then input into the voltage prediction model determined according to the type of the battery to predict the target voltage of the battery, so that a suitable voltage prediction model is selected according to the type of battery, thereby being generalized to various types of batteries for voltage prediction and achieving higher prediction accuracy.

[0023] In one implementation, the above-mentioned battery voltage prediction method may further include the following steps.

[0024] Step 1021 , obtaining historical time series data sets of various first type batteries.

[0025] Among them, the first type can be the type of existing and commonly used batteries. For these types of batteries, a large number of historical time series data sets can be obtained, such as the historical time series data sets of the first type of batteries stored on a private platform, and the historical time series data sets of the first type of batteries stored on a public platform. These historical time series data sets have a certain degree of universality and can all be used as training data for pre-training the Transformer model to capture as many features as possible from a large amount of data, so that the Transformer model can learn common features and can be migrated to multiple tasks.

[0026] Step 1022: input the historical time series data set into the Transformer model for pre-training to obtain the pre-trained Transformer model.

[0027] Optionally, before inputting the historical time series data set into the Transformer model for pre-training, the historical time series data set is subjected to data preprocessing, and the data preprocessing may include removing obvious outliers, filling missing values, and adding white noise data.

[0028] Optionally, before inputting the historical time series data set into the Transformer model for pre-training to obtain the pre-trained Transformer model, the method further includes: performing data enhancement on the historical time series data set to obtain an enhanced time series data set. Thus, the enhanced time series data set and the historical time series data set are input into the Transformer model for pre-training to increase the amount of data used to train the Transformer model. For example, the mixup data enhancement method can be used to enhance the historical time series data set, selecting the same type of indicators in the same time period. The data t of the historical time series data set is processed and calculated using the following formula: ,in, , k is the number of indicators.

[0029] In an embodiment of the present application, before using the determined voltage prediction model, the Transformer model is pre-trained based on the historical time series data sets of various first-type batteries to obtain a pre-trained Transformer model. Since the pre-trained Transformer model is trained based on a large number of historical time series data sets and has a large amount of data foundation, it can be used to predict the voltage of the second-type battery, which is an emerging or not widely used battery type. Compared with the case of training the voltage prediction model based on the time series data of the second-type battery with less data, the above-mentioned pre-trained Transformer model can provide higher prediction accuracy for the second-type battery.

[0030] In one implementation, the above-mentioned battery voltage prediction method may further include the following steps.

[0031] Step 1023: Obtain preset time series data sets of various batteries of the first type.

[0032] The preset time series data set is a time series data set with preset features in the historical time series data set. The preset time series data set has a small amount of data and has accurate labels. For example, the preset time series data set is a time series data set from the current time point to a certain historical time point, and the preset feature is the preset time period. For another example, the preset time series data set with the same sampling frequency is collected, and the preset feature is the same sampling frequency. For another example, the preset feature is preset weather conditions, temperature, load conditions, etc.

[0033] Step 1024: input the preset time series data set into the pre-trained Transformer model for fine-tuning training to obtain a fine-tuned FT Transformer model.

[0034] Optionally, before inputting the preset time series data set into the pre-trained Transformer model for fine-tuning training, the preset time series data set is subjected to data preprocessing, and the data preprocessing may include removing obvious outliers, filling missing values, and adding white noise data.

[0035] Optionally, an early stopping strategy is adopted in fine-tuning the pre-trained Transformer model. By monitoring the prediction effect of the pre-trained Transformer model on the test set, the training is stopped when the model performance begins to decline, so as to retain the parameters of the model with the best prediction effect.

[0036] In an embodiment of the present application, a pre-trained Transformer model obtained by pre-training based on a large number of historical time series data sets is fine-tuned based on a preset time series data set with preset features to obtain a fine-tuned (Fine Tune, FT) Transformer model. Since a preset time series data set with preset features can be obtained for a first type of battery with a large amount of data basis, the widely applicable pre-trained Transformer model can be further fine-tuned, so that the obtained fine-tuned FT Transformer model can be applicable to specific application scenarios or tasks, thereby further improving the prediction accuracy of the battery voltage.

[0037] In one implementation, the above step 104 determines the prediction model of the battery voltage according to the type of the battery, including the following.

[0038] (1) When the type of the battery is the first type, determining that the prediction model of the battery voltage is the fine-tuned FT Transformer model.

[0039] The first type of battery may be an existing and widely used battery, and the historical time series data set of the first type of battery may be relatively easy to obtain.

[0040] (2) When the type of the battery is the second type, determine that the prediction model of the battery voltage is the pre-trained Transformer model.

[0041] The second type of battery may be an emerging or not widely used battery, and the amount of data in the historical time series data set of the second type of battery is small or difficult to obtain.

[0042] In the embodiment of the present application, when the type of the battery is the first type, since the fine-tuning FT Transformer model is trained based on a large number of historical time series data sets of the first type of battery and a preset time series data set with preset features, the fine-tuning FT Transformer model is more targeted to the first type of battery, and thus the fine-tuning FT Transformer model is selected for the first type of battery, and the target time series data set is subjected to voltage prediction through the fine-tuning FT Transformer model, which can improve the prediction accuracy of the voltage of the first type of battery. As for the second type of battery, since more time series data sets with preset features cannot be obtained, a pre-trained Transformer model is selected for the second type of battery, and the target time series data set is subjected to voltage prediction through the pre-trained Transformer model, which can also improve the prediction accuracy of the voltage of the second type of battery compared to training the voltage prediction model based on the time series data of the second type of battery with less data and then performing voltage prediction.

[0043] In one implementation, the above-mentioned Transformer model includes an input layer, at least one encoder layer, at least one decoder layer and an output layer. Thus, the above-mentioned step 1022 inputs the historical time series data set into the Transformer model for pre-training to obtain the pre-trained Transformer model, which may include the following steps.

[0044] Step 1: divide the historical time series data set into a training data set and a test data set.

[0045] Step 2: Input the training data set into the input layer for conversion to obtain an embedding vector; wherein the embedding vector is added with a position code.

[0046] The input layer converts the training dataset into a vector and adds positional encoding to the vector.

[0047] Step 3: Input the embedding vector into the encoder layer for feature extraction to obtain a feature matrix.

[0048] Among them, the encoder layer includes multi-head attention mechanism (Multi Head Attention), residual connection & normalization (Add&Normalize) and feedforward neural network. The multi-head attention mechanism expands the model's ability to focus on different positions. The addition of residual blocks prevents the problem of degradation during training. Normalization can speed up training and improve training stability. The feedforward neural network has a fully connected network with two layers of linear layers. By adding two layers of fully connected networks, the model's capabilities are enhanced to avoid the problem that the attention mechanism may not fit complex processes well enough.

[0049] Step 4: Input the training data set and the feature matrix into the decoder layer for feature decoding to obtain a prediction matrix.

[0050] The decoder layer includes Mask Multi Head Attention, Multi Head Attention, Add&Normalize, and a feedforward neural network. Mask Multi Head Attention adds mask codes, including paddingmask and sequence mask, to the Multi Head Attention mechanism to mask certain values ​​so that they have no effect when the model parameters are updated.

[0051] Step 5: Input the prediction matrix into the output layer for conversion to obtain a prediction result.

[0052] Among them, the output layer performs a linear transformation on the prediction matrix and converts it into probability through the softmax layer, and outputs the corresponding value with the largest output probability as the prediction result.

[0053] Step 6: Calculate the difference between the prediction result and the test data set through a loss function.

[0054] Among them, the loss function can be the mean absolute error (MAE): ,in, is the actual value (test data set), is the predicted value (prediction result), and n is the number of training data sets.

[0055] Step 7: Update the parameters of the Transformer model according to the difference until the Transformer model converges to obtain the pre-trained Transformer model.

[0056] In an embodiment of the present application, a training data set is input into a Transformer model, a prediction result is obtained after processing at each layer, and then the parameters of the Transformer model are updated based on the difference between the prediction result and the test data set calculated based on a loss function until the Transformer model converges, that is, a trained pre-trained Transformer model is obtained. The pre-trained Transformer model can be used to predict the second type of battery voltage, and further fine-tuned based on a preset time series data set with preset features to obtain a fine-tuned FT Transformer model, which can be used to predict the first type of battery voltage, thereby improving the prediction accuracy of the battery voltage.

[0057] Figure 2 A schematic diagram showing a flow chart of another method for predicting battery voltage provided in an embodiment of the present application is shown. Figure 2 , the method may include the following steps.

[0058] Step 201 : Collect historical time series data sets of various existing types of batteries.

[0059] This includes but is not limited to current, voltage, and charge and discharge capacity data. Historical time series data may include multiple data sources, such as private internal platforms and public external platforms.

[0060] Step 202 , preprocess the historical time series data set and enhance the historical time series data set to obtain an enhanced time series data set.

[0061] Among them, data preprocessing can include removing obvious outliers, filling missing values, and adding white noise data.

[0062] Step 203: pre-train the Transformer model based on the historical time series data set and the enhanced time series data set to obtain a pre-trained Transformer model.

[0063] in, Figure 3 A schematic diagram of the structure of a Transformer model provided in an embodiment of the present application is shown. Figure 3 , the Transformer model includes an input layer 31, an encoder layer 32, a decoder layer 33 and an output layer 34. The Transformer model processes the historical time series dataset and the enhanced time series dataset as follows.

[0064] S1. Convert the historical time series data set and the enhanced time series data set into vector tokens through the input layer. This also includes normalizing and binning the historical time series data set and the enhanced time series data set. The number of bins is M, and the form of tokens is the ID of each bin plus a special symbol, that is, Input_token=(t0, t1, ..., t n ), which incorporates positional encoding.

[0065] S2. Process Input_token through the encoder layer: Multi-head attention mechanism processing: Y1=MultiHead(Q,K,V)(Input_token); Residual connection and normalization processing: Y2=AddNorm(Y1); Feedforward neural network processing: Y3=FFN(Y2); Residual connection and normalization processing: encoder = AddNorm(Y3).

[0066] S3. Process the encoder through the decoder layer: Masked multi-head attention mechanism processing: Y4=MaskMultiHead(Q,K,V)(Input_token); Residual connection and normalization processing: Y5=AddNorm(Y4); Multi-head attention mechanism processing: Y6=MultiHead(Q,K,V)(encoder); Residual connection and normalization processing: Y7=AddNorm(Y5,Y6); Feedforward neural network processing: Y8=FFN(Y7); Residual connection and normalization processing: Y9=AddNorm(Y8).

[0067] S4, process Y9 through the output layer: Linear conversion processing: Y10=Liner(Y9); Softmax layer processing: label = softmax(Y10), where the label corresponds to the ID in tokens.

[0068] Step 204: Collect preset time series data sets of various existing types of batteries, wherein the preset time series data sets are time series data sets with preset characteristics in the historical time series data sets.

[0069] Step 205 , fine-tune the pre-trained Transformer model based on a preset time series data set to obtain a fine-tuned FT Transformer model.

[0070] In one example, for existing types of batteries, the existing gradient tree model, pre-trained Transformer model, and fine-tuned FT Transformer model are evaluated using the loss function MAE, and the fine-tuned FT Transformer model has the best prediction effect.

[0071] Step 206: for existing types of batteries, input the target time series data set into the fine-tuned FT Transformer model for voltage prediction; for new types of batteries, input the target time series data set into the pre-trained Transformer model for voltage prediction.

[0072] In an embodiment of the present application, the target voltage of the battery is predicted by inputting the target time series data set into a voltage prediction model determined according to the type of battery, so that a suitable voltage prediction model is selected according to the type of battery, thereby being able to generalize to various types of batteries for voltage prediction and achieve higher prediction accuracy.

[0073] It should be noted that the battery voltage prediction method provided in the embodiment of the present application can be executed by a battery voltage prediction device, or a control module in the battery voltage prediction device for executing the battery voltage prediction method. In the embodiment of the present application, the battery voltage prediction method executed by the battery voltage prediction device is taken as an example to illustrate the battery voltage prediction device provided in the embodiment of the present application.

[0074] Figure 4 is a schematic diagram of the structure of a battery voltage prediction device provided according to an embodiment of the present application. Figure 4 As shown, the device 400 includes: an acquisition module 41, a determination module 42 and a prediction module 43.

[0075] Among them, the acquisition module 41 is used to obtain the target time series data set of the battery in the target time period; the determination module 42 is used to determine the voltage prediction model of the battery according to the type of the battery; the prediction module 43 is used to input the target time series data set into the voltage prediction model to predict the target voltage of the battery; wherein the voltage prediction model includes a pre-trained Transformer model or a fine-tuned FT Transformer model.

[0076] In one implementation, the apparatus 400 further includes a training module for acquiring historical time series data sets of various first-type batteries; and inputting the historical time series data sets into a Transformer model for pre-training to obtain the pre-trained Transformer model.

[0077] In one implementation, the above-mentioned training module can also be used to obtain a preset time series data set of various batteries of the first type; wherein the preset time series data set is a time series data set with preset features in the historical time series data set; the preset time series data set is input into the pre-trained Transformer model for fine-tuning training to obtain a fine-tuned FT Transformer model.

[0078] In one implementation, the above-mentioned determination module 42 can be used to determine that the prediction model of the battery voltage is the fine-tuned FT Transformer model when the type of the battery is the first type; when the type of the battery is the second type, determine that the prediction model of the battery voltage is the pre-trained Transformer model.

[0079] In one implementation, the above-mentioned Transformer model includes an input layer, at least one encoder layer, at least one decoder layer and an output layer. Thus, the above-mentioned training module can be used to divide the historical time series data set into a training data set and a test data set; input the training data set into the input layer for conversion to obtain an embedding vector; wherein the embedding vector is added with a position code; input the embedding vector into the encoder layer for feature extraction to obtain a feature matrix; input the training data set and the feature matrix into the decoder layer for feature decoding to obtain a prediction matrix; input the prediction matrix into the output layer for conversion to obtain a prediction result; calculate the difference between the prediction result and the test data set through a loss function; update the parameters of the Transformer model according to the difference until the Transformer model converges to obtain the pre-trained Transformer model.

[0080] In one implementation, the acquisition module 41 can also be used to perform data enhancement on the historical time series data set to obtain an enhanced time series data set. Thus, the training module can be used to input the enhanced time series data set and the historical time series data set into the Transformer model for pre-training to obtain the pre-trained Transformer model.

[0081] The battery voltage prediction device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device, and for example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.

[0082] The battery voltage prediction device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0083] The battery voltage prediction device provided in the embodiment of the present application can achieve Figure 1 or Figure 2 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0084] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned battery voltage prediction method. Figure 5 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor (processor) 501, a communication interface (Communications Interface) 502, a memory (memory) 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504. The processor 501 can call a computer program stored in the memory 503 and can be run on the processor 501 to execute the various steps of the above-mentioned battery voltage prediction method embodiment, and can achieve the same technical effect, so it will not be repeated here to avoid repetition.

[0085] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0086] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0087] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0088] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned battery voltage prediction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0089] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0090] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned battery voltage prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0091] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0092] An embodiment of the present application further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes a program or instruction. When the program or instruction is executed, each process of the above-mentioned battery voltage prediction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0093] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0095] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for predicting battery voltage, characterized in that: include: Obtain a target time series data set of the battery in a target time period; Determining a voltage prediction model of the battery according to the type of the battery; Inputting the target time series data set into the voltage prediction model to predict the target voltage of the battery; The voltage prediction model includes a pre-trained Transformer model or a fine-tuned FT Transformer model.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining a historical time series data set of various first type batteries; The historical time series data set is input into a Transformer model for pre-training to obtain the pre-trained Transformer model.

3. The method according to claim 2, characterized in that The method further comprises: Acquire preset time series data sets of various batteries of the first type; wherein the preset time series data sets are time series data sets with preset characteristics in the historical time series data sets; The preset time series data set is input into the pre-trained Transformer model for fine-tuning training to obtain a fine-tuned FTTransformer model.

4. The method according to claim 1, characterized in that The step of determining the prediction model of the battery voltage according to the type of the battery includes: In the case where the type of the battery is the first type, determining that the prediction model of the battery voltage is the fine-tuned FTTransformer model; When the type of the battery is the second type, the prediction model for determining the battery voltage is the pre-trained Transformer model.

5. The method according to claim 2, characterized in that: The Transformer model includes an input layer, at least one encoder layer, at least one decoder layer, and an output layer; the inputting the historical time series data set into the Transformer model for pre-training to obtain the pre-trained Transformer model includes: Dividing the historical time series data set into a training data set and a test data set; Input the training data set into the input layer for conversion to obtain an embedding vector; wherein the embedding vector is added with a position code; Inputting the embedding vector into the encoder layer for feature extraction to obtain a feature matrix; Inputting the training data set and the feature matrix into the decoder layer for feature decoding to obtain a prediction matrix; Inputting the prediction matrix into the output layer for conversion to obtain a prediction result; Calculate the difference between the prediction result and the test data set by using a loss function; The parameters of the Transformer model are updated according to the difference until the Transformer model converges to obtain the pre-trained Transformer model.

6. The method according to claim 2, characterized in that Before inputting the historical time series data set into the Transformer model for pre-training to obtain the pre-trained Transformer model, the method further includes: Performing data enhancement on the historical time series data set to obtain an enhanced time series data set; Inputting the historical time series data set into the Transformer model for pre-training to obtain the pre-trained Transformer model, including: The enhanced time series dataset and the historical time series dataset are input into the Transformer model for pre-training to obtain the pre-trained Transformer model.

7. A battery voltage prediction device, characterized in that: include: An acquisition module, used to acquire a target time series data set of a battery in a target time period; A determination module, used to determine a voltage prediction model of the battery according to the type of the battery; A prediction module, used for inputting the target time series data set into the voltage prediction model to predict the target voltage of the battery; The voltage prediction model includes a pre-trained Transformer model or a fine-tuned FT Transformer model.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for predicting the battery voltage as claimed in any one of claims 1 to 6.

9. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the method for predicting the battery voltage according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or an instruction, and when the program or the instruction is executed, the steps of the method for predicting the battery voltage according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Battery fault prediction method, model training method, equipment, system and medium

    CN120470387A

  • Battery failure prediction method, model training method, device, system, and medium

    CN120470387B