Battery state determination method, apparatus, device, and storage medium

CN123012810APending Publication Date: 2026-10-30TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611115556.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,现有蒸馏方法多面向图像分类任务,依赖类别概率分布作为知识载体

Benefits of technology

本申请实施例中,区别于现有技术中保持教师网络不变、仅让学生网络去模仿教师的常规做法,以学生网络的预测层结构为基准对教师网络的输出层进行对齐重构,变“教师主导”为“学生导向”,使跨架构知识蒸馏不再受限于师生网络结构差异过大的瓶颈。这种逆向对齐思路突破了传统知识蒸馏在异构网络场景下的适用性限制,显著拓展了知识蒸馏技术的应用范围。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012810A_ABST
    Figure CN123012810A_ABST
Patent Text Reader

Abstract

The application provides a battery state determination method, device and equipment and a storage medium. The method takes a predicted layer structure of a student network as a benchmark, performs alignment reconstruction processing on an output layer of a teacher network, obtains a reconstructed teacher network, and then performs supervised training on the reconstructed teacher network by using a battery data sample set to obtain a trained teacher network. The battery data sample set includes a plurality of battery data sequence samples, and each battery data sequence sample includes battery data in a time window. Network parameters of the trained teacher network are fixed, the battery data sample set is used to perform knowledge distillation training on the student network to obtain a trained student network, and the trained student network is used to predict a battery state of a target battery, wherein the battery state includes at least one of a state of charge, a state of health, a state of power and a remaining useful life state. The application can improve the accuracy of battery state prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery management technology, and more specifically, to a method, apparatus, device, and storage medium for determining battery state. Background Technology

[0002] As battery management systems evolve towards distributed and intelligent architectures, the need for deploying high-precision state estimation algorithms on edge devices is becoming increasingly urgent. Traditional data-driven neural networks face a dilemma: large models offer high accuracy but are difficult to run in real-time on resource-constrained embedded hardware; lightweight models, while suitable for edge deployment, often fail to meet the accuracy requirements of practical applications.

[0003] Knowledge distillation offers a feasible solution to this contradiction by transferring knowledge from the teacher model to the student model, achieving model compression while preserving performance. However, existing distillation methods are mostly geared towards image classification tasks, relying on class probability distributions as knowledge carriers. In time-series regression tasks such as battery state estimation, the network output is a continuous numerical value rather than a probability distribution, making it difficult for traditional responsive distillation to provide effective supervision beyond the true labels. Summary of the Invention

[0004] In view of this, this application provides a method, apparatus, device and storage medium for determining battery state, so as to at least solve the problems existing in the related art.

[0005] Specifically, this application is implemented through the following technical solution: This application provides a method for determining battery state, including: Access to student and faculty networks; Based on the prediction layer structure of the student network, the output layer of the teacher network is aligned and reconstructed to obtain the reconstructed teacher network. A battery data sample set is obtained, and the reconstructed teacher network is trained in a supervised manner using the battery data sample set to obtain a trained teacher network; the battery data sample set includes multiple battery data sequence samples, and the battery data sequence samples include battery data within a time window; The network parameters of the trained teacher network are fixed, and the student network is trained by knowledge distillation using the battery data sample set to obtain a trained student network. The operating data of the target battery is acquired and input into the trained student network to obtain the battery state of the target battery; the battery state includes at least one of state of charge, state of health, state of power and remaining service life.

[0006] This application also provides a battery state determination device, including: The network acquisition module is used to acquire student and teacher networks; The network reconstruction module is used to perform alignment and reconstruction processing on the output layer of the teacher network based on the prediction layer structure of the student network, so as to obtain a reconstructed teacher network. A network training module is used to acquire a battery data sample set and use the battery data sample set to perform supervised training on the reconstructed teacher network to obtain a trained teacher network; the battery data sample set includes multiple battery data sequence samples, and the battery data sequence samples include battery data within a time window; The distillation training module is used to fix the network parameters of the trained teacher network and use the battery data sample set to perform knowledge distillation training on the student network to obtain a trained student network. The state prediction module is used to acquire the operating data of the target battery, input the operating data into the trained student network, and obtain the battery state of the target battery; the battery state includes at least one of state of charge, state of health, power state, and remaining service life state.

[0007] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the battery state determination method described in any of the foregoing embodiments.

[0008] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the battery state determination method described in any of the foregoing embodiments.

[0009] This application also provides a computer program product, including a computer program that, when run by a processor, performs the steps of any of the possible battery state determination methods described above.

[0010] The technical solutions provided by the embodiments of this application may include the following beneficial effects: In this embodiment, unlike the conventional approach in existing technologies where the teacher network remains unchanged and only the student network imitates the teacher, the output layer of the teacher network is aligned and reconstructed based on the prediction layer structure of the student network. This changes the approach from "teacher-led" to "student-oriented," freeing cross-architecture knowledge distillation from the bottleneck of significant differences in teacher and student network structures. This reverse alignment approach breaks through the applicability limitations of traditional knowledge distillation in heterogeneous network scenarios, significantly expanding the application scope of knowledge distillation technology.

[0011] Furthermore, after training with structural alignment and knowledge distillation, the lightweight student network can inherit the high-precision prediction capabilities of the teacher network. Compared to the small model trained directly, the student network trained by distillation achieves a significant improvement in accuracy on the battery state estimation task, and still maintains prediction performance close to that of the teacher network under the condition of a significant reduction in the number of parameters.

[0012] Furthermore, the student network employs a lightweight architecture with a significantly smaller number of parameters compared to the teacher network. After knowledge distillation training, the student network can run in real-time on resource-constrained embedded hardware platforms, exhibiting low inference latency and minimal memory footprint. This meets the stringent real-time requirements of the battery management system, achieving a balance between high precision and lightweight design.

[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating a battery state determination method according to an exemplary embodiment of this application; Figure 2 This is a schematic diagram of the structure of a student network shown in an exemplary embodiment of this application; Figure 3 This is a flowchart illustrating a reconstructed teacher network generation process according to an exemplary embodiment of this application; Figure 4 This is a schematic diagram illustrating the structure of a reconstructed teacher network according to an exemplary embodiment of this application; Figure 5 This is a schematic diagram illustrating a training method for reconstructing a teacher network, as shown in an exemplary embodiment of this application. Figure 6 This is a flowchart illustrating a knowledge distillation training method as shown in an exemplary embodiment of this application; Figure 7 This is a schematic diagram illustrating knowledge distillation training of a student network according to an exemplary embodiment of this application; Figure 8 This is a complete flowchart illustrating a cross-model knowledge distillation framework as shown in an exemplary embodiment of this application; Figure 9 This is a comparison chart of predicted battery state results shown in an exemplary embodiment of this application; Figure 10 This is a schematic diagram illustrating the performance comparison of battery state prediction in an exemplary embodiment of this application; Figure 11 This is a schematic diagram of the structure of a battery state determination device shown in an exemplary embodiment of this application; Figure 12This is a hardware structure diagram of a computer device illustrated in an exemplary embodiment of this application. Detailed Implementation

[0015] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0016] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0017] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0018] The relevant technical terms will be introduced first below.

[0019] Knowledge distillation, also known as model distillation, is an artificial intelligence model compression technique based on a teacher-student model. It aims to reduce deployment costs and improve inference efficiency by transferring knowledge from a large teacher network to a small student network.

[0020] A teacher network typically refers to a neural network with a large number of parameters, a complex structure, and excellent performance. It provides stable supervision signals (such as intermediate layer features), and its parameters are frozen during student training and do not participate in backpropagation gradient calculation.

[0021] A student network typically refers to a network with a small number of parameters and a lightweight structure, designed to learn the teacher's "tacit knowledge" and perform end-to-end optimization by minimizing the difference between the network's output and the teacher's output (distillation loss) and the loss of the true label.

[0022] The core purpose of the "teacher-student" architecture is knowledge distillation, which transfers the generalization ability of large models to small models for model compression, self-supervised learning, or semi-supervised learning scenarios.

[0023] State of Charge (SOC): This reflects the current percentage of remaining battery capacity.

[0024] State of Health (SOH): Used to reflect the degree of battery aging and capacity retention.

[0025] State of Power (SOP): The maximum power that the battery can output.

[0026] Remaining Useful Life (RUL): The remaining number of battery cycles or the remaining time.

[0027] As battery management systems evolve towards distributed and intelligent architectures, the need for deploying high-precision state estimation algorithms on edge devices is becoming increasingly urgent. Traditional data-driven neural networks face a dilemma: large models offer high accuracy but are difficult to run in real-time on resource-constrained embedded hardware; lightweight models, while suitable for edge deployment, often fail to meet the accuracy requirements of practical applications.

[0028] Knowledge distillation offers a feasible solution to this contradiction by transferring knowledge from the teacher model to the student model, achieving model compression while preserving performance. However, existing distillation methods are mostly geared towards image classification tasks, relying on class probability distributions as knowledge carriers. In time-series regression tasks such as battery state estimation, the network output is a continuous numerical value rather than a probability distribution, making it difficult for traditional responsive distillation to provide effective supervision beyond the true labels.

[0029] Based on the above research, this disclosure provides a method for determining battery state. The method first acquires a student network and a teacher network; then, using the prediction layer structure of the student network as a benchmark, it aligns and reconstructs the output layer of the teacher network to obtain a reconstructed teacher network; next, it acquires a battery data sample set and uses this set to perform supervised training on the reconstructed teacher network to obtain a trained teacher network; the battery data sample set includes multiple battery data sequence samples, each including battery data within a time window; further, it fixes the network parameters of the trained teacher network and uses the battery data sample set to perform knowledge distillation training on the student network to obtain a trained student network; finally, it acquires the operating data of the target battery and inputs this operating data into the trained student network to obtain the battery state of the target battery; the battery state includes at least one of state of charge, state of health, state of power, and remaining service life.

[0030] In this embodiment, unlike the conventional approach in existing technologies where the teacher network remains unchanged and only the student network imitates the teacher, the output layer of the teacher network is aligned and reconstructed based on the prediction layer structure of the student network. This changes the approach from "teacher-led" to "student-oriented," freeing cross-architecture knowledge distillation from the bottleneck of significant differences in teacher and student network structures. This reverse alignment approach breaks through the applicability limitations of traditional knowledge distillation in heterogeneous network scenarios, significantly expanding the application scope of knowledge distillation technology.

[0031] Furthermore, after training with structural alignment and knowledge distillation, the lightweight student network can inherit the high-precision prediction capabilities of the teacher network. Compared to the small model trained directly, the student network trained by distillation achieves a significant improvement in accuracy on the battery state estimation task, and still maintains prediction performance close to that of the teacher network under the condition of a significant reduction in the number of parameters.

[0032] Furthermore, the student network employs a lightweight architecture with a significantly smaller number of parameters compared to the teacher network. After knowledge distillation training, the student network can run in real-time on resource-constrained embedded hardware platforms, exhibiting low inference latency and minimal memory footprint. This meets the stringent real-time requirements of the battery management system, achieving a balance between high precision and lightweight design.

[0033] To facilitate understanding of this embodiment, a detailed description of the battery state determination method disclosed in this disclosure is provided first. The execution entity of the battery state determination method provided in this disclosure is generally a computer device. This computer device can be a server, which can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms. In other embodiments, the computer device can also be a terminal device, which can be a mobile device, terminal, handheld device, computing device, vehicle-mounted device, etc.

[0034] In other embodiments, the method can also be applied to an implementation environment consisting of computer equipment and servers, or an implementation environment consisting of terminal equipment and servers. Furthermore, the battery state determination method can also be implemented by a processor calling computer-readable instructions stored in memory.

[0035] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0036] Please see the appendix Figure 1 The above is a flowchart illustrating a battery state determination method as shown in an exemplary embodiment of this application. Figure 1 As shown, the battery state determination method in this embodiment may include the following steps S101~S105: S101: Obtain student network and teacher network.

[0037] In this step, the network architecture of the teacher network can adopt a time-series prediction model, such as an Informer neural network or a Transformer neural network.

[0038] The network architecture of the student network includes a feature extraction layer, a prediction layer, and a first feature dimensionality reduction layer. The prediction layer includes a first temporal modeling layer and a feature fusion layer. The first temporal modeling layer can adopt different types of lightweight neural networks, such as recurrent neural networks (RNN) and long short-term memory networks (LSTM), depending on the needs of the target task.

[0039] In this embodiment of the application, the main architecture of the teacher network is an Informer network and the main architecture of the student network is an RNN network, which will be described in detail as an example.

[0040] Specifically, the teacher network includes a timing prediction layer and an output layer. The timing prediction layer includes an Informer encoder and an Informer decoder.

[0041] The feature extraction layer in the student network is based on two linear layers, the prediction layer includes an RNN network, the feature fusion layer (including two linear layers), and the first feature dimensionality reduction layer (including a first dimensionality reduction layer for reducing the feature dimension and a second dimensionality reduction layer for reducing the time dimension, both of which are linear layers).

[0042] The network architecture of the student network will be explained below using the data flow processing procedure.

[0043] a) Input data undergoes feature extraction through a feature extraction layer (including two linear layers), as shown in formula (1): (1) in, For input data, The features output by the feature extraction layer, and This is the function representation for the corresponding linear layer.

[0044] b) The output features of the feature extraction layer are used for temporal modeling through an RNN layer, as shown in formula (2): (2) in, For the functional representation of RNN, These are intermediate features output by the RNN layer.

[0045] c) The RNN layer output is fused with features through two linear layers, as shown in formula (3): (3) in, For the first modeling intermediate features, and It is a linear layer.

[0046] d) Finally, the estimated SOC state is obtained through the first feature reduction layer (including two linear reduction layers), as shown in formulas (4) to (5): (4) in, This is the first intermediate feature in the dimensionality reduction. This is the first feature reduction layer.

[0047] (5) in, For the output of the student network, This is the second feature dimensionality reduction layer.

[0048] Please see Figure 2 This is a schematic diagram of the structure of a student network provided as an exemplary embodiment of this application. Figure 2 As shown, the student network includes a feature extraction layer, a prediction layer, and a feature dimensionality reduction layer. The feature extraction layer uses two linear layers ( and ) Input data Feature extraction is performed to obtain the input features. Then input features The input is fed into the RNN network of the prediction layer, and the RNN network outputs intermediate features. and will Input to the feature fusion layer (including two linear layers) and The first intermediate features of the modeling were obtained. This will then transform the intermediate features of the first modeling process. Input to the feature dimensionality reduction layer (including the first feature dimensionality reduction layer) and the second feature dimensionality reduction layer ),in, Output the first intermediate feature after dimensionality reduction. Output battery status.

[0049] S102: Based on the prediction layer structure of the student network, the output layer of the teacher network is aligned and reconstructed to obtain the reconstructed teacher network.

[0050] Here, alignment and reconstruction refers to the process of structurally modifying the output layer of the teacher network using the prediction layer structure of the student network as a reference. Specifically, the modification includes dimensionality adaptation of the features before the output layer of the teacher network, adding feature reconstruction layers and feature dimensionality reduction layers corresponding to the structure of the student network, so that the teacher network and the student network form a correspondence in the feature dimensions at the output end, thus obtaining the reconstructed teacher network.

[0051] Please see Figure 3 This is a flowchart illustrating the generation process of a reconstructed teacher network, provided as an exemplary embodiment of this application. Figure 3 As shown, for step S102, when the output layer of the teacher network is aligned and reconstructed based on the prediction layer structure of the student network to obtain the reconstructed teacher network, the following steps S1021~S1023 are included: S1021: Based on the input dimension, structural information, and output dimension of the feature estimation layer, a feature reconstruction layer is added to the teacher network; the feature reconstruction layer is connected to the temporal prediction layer and is located after the temporal prediction layer.

[0052] It's understandable that teacher networks typically map high-dimensional temporal representations directly to the final predicted values, and the input feature dimension of their output layer differs from that of the lightweight student network's prediction layer. To achieve cross-architecture distillation by ensuring structural similarity between teacher and student networks with different architectures, the high-dimensional features before the teacher network's output layer are first reconstructed to possess dimensions suitable for structures similar to student networks. Specifically, the feature reconstruction layer includes a feature mapping layer and a temporal modeling layer. Therefore, when adding a feature reconstruction layer to the teacher network that matches the input dimension information of the feature estimation layer, the following steps (1) to (2) can be included: (1) Add a feature mapping layer to the teacher network that matches the input dimension information of the first temporal modeling layer; the feature mapping layer is connected to the temporal prediction layer and is located after the temporal prediction layer.

[0053] In this embodiment, the feature mapping layer can be implemented using a convolutional neural network (CNN). Specifically, it can be implemented using two one-dimensional convolutional layers (Conv1D, kernel size=1), as shown in formula (6): (6) in, and They are one-dimensional convolutional layers. For the time-series prediction layer in the teacher network Informer Intermediate features output by the decoder These are the intermediate features for remapping output from the feature mapping layer.

[0054] (2) Add a time-series modeling layer to the teacher network with the same layer structure as the first time-series modeling layer; the time-series modeling layer is connected to the feature mapping layer and is located after the feature mapping layer; the output dimension information of the feature mapping layer is the same as the input dimension of the time-series modeling layer.

[0055] Following the example above, the first temporal modeling layer of the student network adopts an RNN network. Therefore, the temporal modeling layer of the teacher network also adopts the same RNN network. That is, the network structures of the two RNN networks are the same, as shown in formula (7).

[0056] (7) in, The intermediate features output by the temporal modeling layer are used for reconstruction. This is the functional representation of an RNN network.

[0057] S1022: Add a feature dimensionality reduction layer identical to the first feature dimensionality reduction layer to the teacher network; the feature dimensionality reduction layer is connected to the feature reconstruction layer and is located after the feature reconstruction layer.

[0058] Here, the feature reduction layer includes two linear layers, namely the first reduction layer and the second reduction layer, as shown in formulas (8) to (9).

[0059] (8) in, The second intermediate feature of the dimensionality reduction output of the first dimensionality reduction layer of the teacher network; (9) in, For the output characteristics of the teacher network, This is the first dimensionality reduction layer. This is the second dimensionality reduction layer, with one linear layer used to reduce the feature dimension and the other linear layer used to reduce the time dimension.

[0060] Here, by adding a feature dimensionality reduction layer to the network design, the teacher features and student features that were originally obtained through different feature processing methods and have the same dimension are projected to the same output dimension, thus making feature-level error measurement and knowledge transfer operable.

[0061] S1023: Based on the temporal prediction layer, the feature reconstruction layer, the feature dimensionality reduction layer, and the hierarchical connection relationship, the reconstructed teacher network is obtained.

[0062] Thus, by adding feature mapping layers, feature reconstruction layers, and feature dimensionality reduction layers to the teacher network, a reconstructed teacher network can be constructed based on the existing temporal prediction layer, the newly added feature mapping layers, feature reconstruction layers, feature dimensionality reduction layers, and hierarchical connection relationships.

[0063] Please see Figure 4 This is a schematic diagram illustrating a reconstructed teacher network structure, provided as an exemplary embodiment of this application. Figure 4 As shown, the reconstructed teacher network includes the original network structure and a newly added network structure. The original network structure includes an Informer encoder and an Informer decoder, while the newly added network structure includes a feature reconstruction layer and a feature dimensionality reduction layer similar to a student network. First, the Informer encoder is used to process the input data... Encode the features and input them into the Informer decoder. The Informer decoder then outputs intermediate features. The feature reconstruction layer includes a feature mapping layer (CNN), a temporal modeling layer (RNN), and intermediate features. The input is fed into the feature mapping layer CNN, and the CNN output remaps the intermediate features. The intermediate features are then fed into the temporal modeling layer RNN to obtain the reconstructed intermediate features. This will then reconstruct intermediate features. The input is fed into a feature reduction layer, which includes a first reduction layer. Second dimensionality reduction layer First, the intermediate features will be reconstructed. The input is fed into the first dimensionality reduction layer to obtain the second dimensionality reduction intermediate features. Then, the second dimensionality reduction intermediate feature Inputting the second dimensionality reduction layer yields the output of the teacher network. (That is, the battery status).

[0064] In this embodiment, a systematic alignment and reconstruction process is performed on the output layer of the teacher network, including feature dimension adaptation, the addition of a feature reconstruction layer, and the addition of a dimensionality reduction layer with the same structure. This enables the teacher network and the student network to form a correspondence at each level of feature dimensions at the output end. This design allows for effective feature-level knowledge transfer between heterogeneous networks with vastly different structures, overcoming the shortcomings of traditional methods that make it difficult to define effective distilled knowledge due to the large differences in the teacher and student network architectures.

[0065] S103: Obtain a battery data sample set and use the battery data sample set to perform supervised training on the reconstructed teacher network to obtain a trained teacher network; the battery data sample set includes multiple battery data sequence samples, and the battery data sequence samples include battery data within a time window.

[0066] In this step, a sample set containing multiple battery data sequence samples is first obtained. Each sample includes battery data within a time window. The battery data includes battery operating data (time-series data such as voltage, current, and temperature) and battery state data, which includes at least one of the following: State of Charge (SOC), State of Health (SOH), State of Power (SOP), and Remaining Life (RUL). Then, this sample set is used to perform supervised training on the aligned and reconstructed teacher network, i.e., directly using the real labels as supervision signals to optimize the parameters of the teacher network.

[0067] Each battery data sequence sample is labeled with its battery status data at the last time point within the corresponding time window.

[0068] Specifically, when using the battery data sample set to perform supervised training on the reconstructed teacher network to obtain a trained teacher network, each battery data sequence sample can be input into the reconstructed teacher network to obtain the teacher's predicted battery state. Based on the difference between the teacher's predicted battery state and the corresponding label, the network loss is determined, and the network parameters of the reconstructed teacher network are adjusted based on the network loss until the first training requirement is met, thus obtaining a trained teacher network.

[0069] The first training requirement can be set according to actual needs, such as the first network loss being less than the first preset loss threshold, or the number of iterations reaching the preset threshold.

[0070] Here, when determining the first network loss based on the difference between each teacher's predicted battery state and the corresponding label, the mean squared error loss function can be used, as shown in formula (10): (10) in, This is the first network loss. The total number of samples. For the first Teacher-predicted battery status corresponding to each battery data sequence sample. For the first Labels for individual battery data sequence samples.

[0071] During training, the Adam optimizer can be used for optimization, and a preset learning rate adjustment strategy can be adopted to adjust the learning rate. When the loss decreases slowly, the learning rate is reduced. At the same time, an early stopping mechanism is introduced to stop training if the rate of decrease of the first network loss in several consecutive epochs does not meet the decrease rate threshold.

[0072] Please see Figure 5 This is a schematic diagram illustrating the training of a reconstructed teacher network, provided as an exemplary embodiment of this application. Figure 5 As shown, the reconstructed teacher network includes a complex main network (i.e., an Informer encoder and an Informer decoder), a feature reconstruction layer, and a feature dimensionality reduction layer (including a first dimensionality reduction layer for the feature dimension and a second dimensionality reduction layer for the time dimension). Input samples are fed into the reconstructed teacher network to obtain the teacher's predicted battery state. Then, based on the teacher's predicted battery state and the corresponding label, the network parameters of the reconstructed teacher network are adjusted.

[0073] After training, the teacher network achieves high prediction accuracy and stable feature representation ability in the battery state estimation task, and its parameters are fixed and used as the knowledge source for the subsequent distillation stage.

[0074] In this embodiment of the application, the battery data sample set is constructed through the following steps: (1) Obtain battery data under different operating conditions; the battery data includes battery operation data and battery status data, the battery operation data includes operation data at multiple time points; the operation data includes voltage, current and temperature; the battery status data includes the battery status at the multiple time points; the battery status includes at least one of state of charge, state of health, state of power and remaining service life.

[0075] Here, different operating conditions may include temperature operating conditions and test operating conditions. Temperature operating conditions include different temperature conditions, and test operating conditions may include at least one of Dynamic Stress Test (DST), US06 driving cycle, and Federal Urban Driving Cycle (FUDS).

[0076] In this embodiment, the Arbin BT2000 battery testing system is used to conduct charge and discharge experiments on A123 18650 cylindrical lithium iron phosphate (LFP) batteries. The different temperature conditions of the experiment include 0°C, 10°C, 25°C, 30°C, 40°C, 50°C and room temperature (dynamic temperature environment without temperature control chamber). In this way, battery data under different operating conditions can be obtained.

[0077] (2) Using a preset time window, the battery data is slidably extracted, and the battery data in each time window is used as a battery data sequence sample; the sample label of each battery data sequence sample is the battery state corresponding to the end time point of the sequence.

[0078] The preset time window can be set according to actual needs, and is not limited here.

[0079] In this way, by sliding and cropping the battery data, the battery data for each time window can be obtained, and the battery data for each time window can be used as a battery data sequence sample, with the battery state corresponding to the last time point in that time window (i.e., the end time point of the sequence) as the label.

[0080] (3) Generate the battery data sample set based on the multiple battery data sequence samples.

[0081] After constructing multiple battery data sequence samples, a battery data sample set can be generated based on these multiple battery data sequence samples.

[0082] In some implementations, each battery data sequence sample can be normalized. Optionally, the Z-score normalization method can be used for normalization, as shown in formula (11): (11) in, This is a normalized battery data sequence sample. This is a sample of battery data sequences. The mean of the battery data sequence samples. denoted as the standard deviation of the battery data sequence samples.

[0083] It should be noted here that normalizing the battery data sequence sample means normalizing each data point in the battery data sequence sample.

[0084] After the network inference outputs, the same mean is used again. with standard deviation Inverse normalization is performed to recover the SOC value with physical meaning.

[0085] Furthermore, to improve the robustness of the model under complex and incomplete data in actual BMS, this application introduces a data augmentation strategy to expand the training set before performing normalization processing. Specifically, when generating the battery data sample set based on the multiple battery data sequence samples, the following steps are included (3.1) to (3.3): (3.1) Obtain the sequence mask length; the sequence mask length is determined based on the right-skewed distribution function and the preset maximum mask length.

[0086] In this embodiment, to balance continuous prediction capability and incomplete sequence training, the maximum mask length is determined based on the right-skewed distribution function and the preset maximum mask length, as shown in formula (12): (12) in, Let be a random variable that follows a uniform distribution in [0,1]. This represents the maximum mask length.

[0087] In some implementations, the sequence mask length can also refer to the preamble length, which is the time period from the start of the sequence to the occurrence of the first valid SOC observation. The masking enhancement operation performs data masking and padding on this preamble.

[0088] (3.2) For each battery data sequence sample, starting from the sequence start time of the battery data sequence sample, the battery data sequence sample is subjected to mask enhancement processing based on the sequence mask length to obtain an enhanced battery data sequence sample.

[0089] Here, the mask enhancement process includes two types of enhancement strategies: state mask enhancement strategy and zero mask enhancement strategy. These two enhancement strategies can be used individually or in combination, and there is no limitation on this.

[0090] (1) The State Mask Enhancement Strategy (SOC-mask) is used to simulate battery data sequence samples under the battery resting scenario. The battery resting condition refers to the BMS briefly losing power and then recovering, the historical SOC is unavailable, but the current is zero.

[0091] The state mask enhancement strategy involves filling the SOC values ​​within the sequence mask length (preamble) with the last valid SOC value, setting the current to zero, and maintaining the observed values ​​for voltage and temperature. Specifically, the battery states of the target sequence segment covered by the sequence mask length within the battery data sequence sample can be replaced with the battery state at the last time point of the target sequence segment, and the current corresponding to each time point within the target sequence segment can be set to 0.

[0092] It's easy to understand that, under normal circumstances, the SOC of a battery remains unchanged when it is in a resting state. Therefore, after determining the target sequence segment (i.e., the leading segment), the battery state at the last time point is used to replace or fill the battery states corresponding to each time point within the target sequence segment. Similarly, the current is 0 when the battery is in a resting state, so the current corresponding to each time point within the target sequence segment needs to be set to 0. Also, the battery voltage tends to be stable and the temperature changes slowly when the battery is in a resting state, so the voltage corresponding to each time point within the target sequence segment can be kept unchanged (keeping the observed value unchanged), and the temperature corresponding to each time point within the target sequence segment can be kept unchanged.

[0093] SOC-mask allows the model to learn to make accurate estimates when some current information is known but the history is incomplete, strictly following the physical laws of a battery when it is at rest (current is zero, SOC remains unchanged, voltage and temperature tend to stabilize), and avoiding the introduction of samples that violate physical logic.

[0094] (2) The 0-mask enhancement strategy is used to simulate extreme scenarios where historical SOC information is completely unavailable or uninitialized. For example, when the BMS is powered on for the first time, there is no historical SOC record and the previous SOC status cannot be known at all. Or the sensor data (voltage, current, temperature) is available, but the SOC information is completely missing.

[0095] The zero-mask enhancement strategy refers to setting the SOC value within the sequence mask length (preamble) to zero, while keeping the current, voltage, and temperature at their original observed values. Specifically, the battery state corresponding to each time point within the target sequence segment of the battery data sequence sample is set to 0.

[0096] It is understandable that when the historical SOC is completely unknown, it can be filled with zeros. However, information such as current, voltage, and temperature is known. Therefore, it is necessary to ensure that the current, voltage, and temperature remain unchanged (keeping their respective observed values).

[0097] The 0-mask forces the model to learn to "guess blindly," that is, to infer the state of charge (SOC) based solely on the current voltage, current, and temperature, without relying on prior historical SOC values, thus improving the model's generalization ability when the initial SOC value is unknown.

[0098] The combined use of the two strategies enables the model to maintain good estimation accuracy under different scenarios of missing historical data (static recovery and first power-on), significantly improving the reliability of BMS engineering deployment.

[0099] Furthermore, the two masking strategies, combined with the mask length generated by the right-skewed distribution, ensure that the model is fully trained under different historical missing lengths, thus guaranteeing both prediction accuracy and robustness.

[0100] (3.3) Generate the battery data sample set based on the plurality of battery data sequence samples and each of the enhanced battery data sequence samples.

[0101] Here, after generating enhanced battery data sequence samples, the battery data sample set can be populated to enrich the sample set.

[0102] Through data augmentation strategies, limited raw battery test data is amplified into a large number of augmented samples with different missing patterns, which greatly improves data utilization and effectively reduces the risk of overfitting.

[0103] S104: Fix the network parameters of the trained teacher network, and use the battery data sample set to perform knowledge distillation training on the student network to obtain a trained student network.

[0104] In this step, with the teacher network parameters fixed, the student network is trained using the same battery data sample set. During the training process, the student network simultaneously receives supervision from the real labels, as well as supervision from the predicted values ​​output by the teacher network and the differences in intermediate features. This enables the student network to learn temporal patterns and feature representations from the teacher network. As mentioned earlier, since the teacher network and the student network have been structurally aligned, feature-level knowledge transfer can be achieved.

[0105] The training process for step S104 will be described in detail later (see [link]). Figure 6 ).

[0106] S105: Obtain the operating data of the target battery, input the operating data into the trained student network, and obtain the battery state of the target battery; the battery state includes at least one of state of charge, state of health, power state, and remaining service life state.

[0107] This step is the inference phase of the student network. In the deployment environment, the battery's operating data (such as voltage, current, temperature, etc.) can be collected in real time and input into the trained lightweight student network. The student network outputs an estimate of the battery's state in real time.

[0108] Since the student network has achieved prediction accuracy close to that of the teacher network through knowledge distillation, while maintaining the advantages of a lightweight structure, it is possible to achieve high-precision, low-latency real-time inference on resource-constrained embedded devices.

[0109] In some implementations, the student network can be deployed on edge computing devices, such as a battery management system (BMS).

[0110] As mentioned above, the battery data sample set can cover at least one battery state. Therefore, the above method can be widely applied to various battery state estimation tasks, including state of charge (SOC) estimation, state of health (SOH) estimation, state of power (SOP) estimation, and remaining useful life (RUL) prediction.

[0111] In this embodiment, unlike the conventional approach in existing technologies where the teacher network remains unchanged and only the student network imitates the teacher, the output layer of the teacher network is aligned and reconstructed based on the prediction layer structure of the student network. This changes the approach from "teacher-led" to "student-oriented," freeing cross-architecture knowledge distillation from the bottleneck of significant differences in teacher and student network structures. This reverse alignment approach breaks through the applicability limitations of traditional knowledge distillation in heterogeneous network scenarios, significantly expanding the application scope of knowledge distillation technology.

[0112] Furthermore, after training with structural alignment and knowledge distillation, the lightweight student network can inherit the high-precision prediction capabilities of the teacher network. Compared to the small model trained directly, the student network trained by distillation achieves a significant improvement in accuracy on the battery state estimation task, and still maintains prediction performance close to that of the teacher network under the condition of a significant reduction in the number of parameters.

[0113] Furthermore, the student network employs a lightweight architecture with a significantly smaller number of parameters compared to the teacher network. After knowledge distillation training, the student network can run in real-time on resource-constrained embedded hardware platforms, exhibiting low inference latency and minimal memory footprint. This meets the stringent real-time requirements of the battery management system, achieving a balance between high precision and lightweight design.

[0114] Please see Figure 6 This is a flowchart of a knowledge distillation training method provided as an exemplary embodiment of this application. Figure 6As shown, for step S104, when the network parameters of the trained teacher network are fixed, and the student network is trained using the battery data sample set to obtain a trained student network, steps S1041~S1046 are included: S1041: Fix the network parameters of the trained teacher network, input the battery data sequence sample into the trained teacher network to obtain a first predicted battery state, and obtain a first intermediate feature corresponding to the first predicted battery state; the first intermediate feature includes the reconstructed intermediate feature output by the feature reconstruction layer of the teacher network and the first dimensionality reduction intermediate feature output by the feature dimensionality reduction layer of the teacher network.

[0115] It is easy to understand that in the knowledge distillation process, the network parameters of the pre-trained teacher network are first fixed, and then the battery data sequence samples are input into the pre-trained teacher network to obtain the first predicted battery state.

[0116] During this process, the feature reconstruction layer of the teacher network will also output the intermediate reconstruction features, and the feature dimensionality reduction layer will also output the first dimensionality reduction intermediate features. It should be noted that, as mentioned above, the feature dimensionality reduction layer is implemented based on two linear layers. Therefore, the first dimensionality reduction intermediate features refer to the output of the linear layer in front. In this way, the first intermediate features corresponding to the first predicted battery state can be obtained.

[0117] S1042: Input the battery data sequence sample into the student network to obtain the second predicted battery state, and obtain the second intermediate feature corresponding to the second predicted battery state; the second intermediate feature includes the second modeling intermediate feature output by the first time series modeling layer of the student network and the second dimensionality reduction intermediate feature output by the first feature dimensionality reduction layer of the student network.

[0118] Furthermore, the battery data sequence samples are input into the student network to obtain the second predicted battery state. Similar to the teacher network, the intermediate layers of the student network also output intermediate features. That is, the first temporal modeling layer of the student network outputs the second modeling intermediate feature, and the first feature dimensionality reduction layer of the student network outputs the second dimensionality reduction intermediate feature.

[0119] It should also be noted that, similar to the teacher network, the first feature dimensionality reduction layer of the student network is also based on two linear layers, and the second intermediate feature of dimensionality reduction is also output by the preceding linear layer.

[0120] In other implementations, the samples input to the student network may be a subset of the samples input to the teacher network.

[0121] In some implementations, since the feature dimensionality reduction layer of the teacher network is the same as the first feature dimensionality reduction layer of the student network, after the self-supervised training of the teacher network is completed, the parameters of the feature dimensionality reduction layer of the teacher network can be directly reused in the first feature dimensionality reduction layer of the student network. During the knowledge distillation training process, the parameters of the first feature dimensionality reduction layer are fixed, thus reducing the consumption of training resources.

[0122] S1043: Determine the first loss based on the difference between the second predicted battery state and the corresponding tag.

[0123] In this embodiment, the root mean square error function is used to determine the first loss, as shown in formula (13).

[0124] (13) in, The first loss, For the first The second predicted battery state corresponding to each battery data sequence sample. For the first The label corresponding to each battery data sequence sample.

[0125] S1044: Determine a second loss based on the difference between the second predicted battery state and the corresponding first predicted battery state.

[0126] In this embodiment, the root mean square error function is used to determine the second loss, as shown in formula (14).

[0127] (14) in, This is the second loss. The first output for teachers' network The first predicted battery state corresponding to each battery data sequence sample. The first output for the student network The second predicted battery state corresponds to each battery data sequence sample.

[0128] S1045: Determine a third loss based on the difference between the first intermediate feature and the corresponding second intermediate feature.

[0129] As mentioned above, the first intermediate feature includes the reconstructed intermediate feature output by the feature reconstruction layer of the teacher network and the first dimensionality reduction intermediate feature output by the feature dimensionality reduction layer of the teacher network. The second intermediate feature includes the second modeling intermediate feature output by the first temporal modeling layer of the student network and the second dimensionality reduction intermediate feature output by the first feature dimensionality reduction layer of the student network.

[0130] Therefore, when determining the third loss, it can be based on the difference between the second modeling intermediate features of the student network and the reconstructed intermediate features of the teacher network, and the difference between the second dimensionality reduction intermediate features of the student network and the first dimensionality reduction intermediate features of the teacher network, as shown in formula (15): (15) in, As the third loss, These are weighting coefficients. The second intermediate feature output from the first feature reduction layer of the student network is a dimensionality reduction layer. The second intermediate modeling feature output by the prediction layer of the student network. This is the first intermediate feature output by the first dimensionality reduction layer of the teacher network. The intermediate features of the reconstructed features output by the feature reconstruction layer of the teacher network.

[0131] S1046: Based on the first loss, the second loss, and the third loss, determine the distillation loss, and based on the distillation loss, adjust the network parameters of the student network to obtain the trained student network.

[0132] In this step, the weighted sum of the first loss, the second loss and the third loss can be determined as the distillation loss, as shown in formula (16).

[0133] (16) in, For distillation loss, , , These are the corresponding weighting coefficients. .

[0134] In this way, after obtaining the distillation loss, the network parameters of the student network can be adjusted based on the distillation loss to obtain a well-trained student network.

[0135] Once the trained student network is obtained, it can be deployed in a battery management system to enable battery status monitoring.

[0136] It should be noted that in other implementations, different error functions may be used to determine the various losses mentioned above, such as mean square error, root mean square error, mean absolute error, etc., which are not limited here.

[0137] Please see Figure 7 This is a schematic diagram illustrating knowledge distillation training of a student network, provided as an exemplary embodiment of this application. Figure 7As shown, the feature reduction layer of the trained teacher network can be directly reused in the student network. During the knowledge distillation training process, the network parameters of the trained teacher network are fixed, and the input samples are input into the trained teacher network to obtain the first predicted battery state and obtain the corresponding first intermediate feature. At the same time, the input samples are input into the student network to obtain the second predicted battery state and obtain the corresponding second intermediate feature. Then, the model loss is determined and the network parameters of the student network are adjusted.

[0138] Please see Figure 8 The following is a complete flowchart of a cross-model knowledge distillation framework provided as an exemplary embodiment of this application. Figure 8 The complete technical architecture of Hybrid Knowledge Distillation (Hybrid KD) is shown. The original teacher network includes an Informer encoder, an Informer decoder, and an output layer. The output layer is then modified by deleting it and adding the same feature reconstruction and feature dimensionality reduction layers as the student network to align the teacher and student networks. Knowledge distillation training is then performed to obtain a trained student network, which is then deployed at the edge (for battery state inference).

[0139] Please see Figure 9 This is a comparison chart of predicted battery state results provided as an exemplary embodiment of this application. Figure 9 As shown, the horizontal axis represents the time step (0-7000 seconds), and the vertical axis represents the normalized SOC value (0-1). The black dashed line represents the SOC label, the blue solid line represents the SOC prediction result output by the student network without knowledge distillation training, and the red solid line represents the SOC prediction result output by the student network with knowledge distillation training.

[0140] The trends of the curves show that, for directly trained student networks, there is a significant deviation between the directly trained student networks and the actual labels in the key dynamic region of SOC estimation (1000~7000 seconds). The error is further amplified at certain time points (such as around 2000~2500 seconds and 5000~6000 seconds), indicating that lightweight networks that have not undergone distillation are unable to fully grasp the dynamic laws of SOC under complex working conditions through supervised learning alone.

[0141] For student networks distilled using the Hybrid KD method of this invention: the prediction curves of student networks distilled using this invention highly overlap with the label values ​​across the entire time range (0~7000 seconds), with only slight tracking lag at a few dynamic transition points. Compared to directly trained models, their prediction curves are closer to the true labels across the entire time axis, quantitatively corresponding to a performance improvement in MAE decreasing from 3.517% to 1.167% and a significant reduction in RMSE.

[0142] Please see Figure 10 This is a schematic diagram illustrating the performance comparison of battery state prediction as an exemplary embodiment of this application. Figure 10 The diagram illustrates the comparison of absolute errors (including mean absolute error MAE and maximum absolute error Max AE) between student networks trained directly (DT) and those distilled using Hybrid KD under different temperature conditions. The different temperature conditions include 0°C, 10°C, 25°C, 30°C, 40°C, and 50°C. 0-50°C represents the temperature range of the training set, room temperature dynamic environment (RT) serves as the test set temperature condition, and 25°C from the CALCE public dataset is used for cross-dataset generalization capability validation.

[0143] Under all training set temperature conditions, the MAE and Max AE of the student network distilled by Hybrid KD significantly outperformed the directly trained student network. The MAE reduction ranged from 48% to 78%, with the most significant improvement at 25 degrees Celsius (78% reduction). The improvement at 50 degrees Celsius was relatively smaller (48.3%), presumably related to the more drastic changes in battery dynamic characteristics at high temperatures, but still achieved a significant improvement.

[0144] Room temperature data (RT) was used as a test set temperature not used in training to directly verify the model's generalization ability. The MAE of the HybridKD student network decreased from 0.039 to 0.010, a reduction of 74.4%, indicating that the distilled model can still maintain high accuracy under unseen temperature conditions. The maximum absolute error decreased from 0.045 to 0.018, indicating that the distilled model also showed significant improvement in prediction error under worst-case conditions, demonstrating stronger robustness.

[0145] The CALCE (Center for Advanced Life Cyclic Engineering, University of Maryland) public dataset differs from the A123 battery data in terms of battery chemistry, testing protocols, and data acquisition equipment. The MAE of direct training is 0.020, while the MAE of Hybrid KD is 0.024. These two results are very close and at the same level (both with errors below 2.5%). This data demonstrates that even in extreme generalization scenarios across datasets and battery systems, the distillation method of this invention does not exhibit performance degradation and maintains estimation accuracy comparable to direct training. This verifies the cross-architecture and cross-data domain generalization capability of the Hybrid KD framework.

[0146] Corresponding to the embodiments of the aforementioned battery state determination method, this application also provides embodiments of a battery state determination device.

[0147] Please see Figure 11This is a schematic diagram illustrating the structure of a battery state determination device according to an exemplary embodiment of this application. Figure 11 As shown, the battery status determination device 1100 includes: Network acquisition module 1110 is used to acquire student networks and teacher networks; The network reconstruction module 1120 is used to perform alignment reconstruction processing on the output layer of the teacher network based on the prediction layer structure of the student network to obtain a reconstructed teacher network. The network training module 1130 is used to acquire a battery data sample set and use the battery data sample set to perform supervised training on the reconstructed teacher network to obtain a trained teacher network; the battery data sample set includes multiple battery data sequence samples, and the battery data sequence samples include battery data within a time window. The distillation training module 1140 is used to fix the network parameters of the trained teacher network and use the battery data sample set to perform knowledge distillation training on the student network to obtain a trained student network. The state prediction module 1150 is used to acquire the operating data of the target battery, input the operating data into the trained student network, and obtain the battery state of the target battery; the battery state includes at least one of state of charge, state of health, power state, and remaining service life state.

[0148] In some embodiments, the prediction layer of the student network includes a feature estimation layer and a first feature dimensionality reduction layer; the teacher network further includes a temporal prediction layer connected to the output layer and located before the output layer; the network reconstruction module 1120 is specifically used for: A feature reconstruction layer matching the input dimension information of the feature estimation layer is added to the teacher network; the feature reconstruction layer is connected to the temporal prediction layer and is located after the temporal prediction layer. Add a feature dimensionality reduction layer identical to the first feature dimensionality reduction layer to the teacher network; the feature dimensionality reduction layer is connected to the feature reconstruction layer and is located after the feature reconstruction layer; Based on the temporal prediction layer, the feature reconstruction layer, the feature dimensionality reduction layer, and the hierarchical connection relationships, the reconstructed teacher network is obtained.

[0149] In some implementations, the feature estimation layer of the student network includes a first temporal modeling layer; the network reconstruction module 1120 is specifically used for: A feature mapping layer matching the input dimension information of the first temporal modeling layer is added to the teacher network; the feature mapping layer is connected to the temporal prediction layer and is located after the temporal prediction layer. A temporal modeling layer with the same layer structure as the first temporal modeling layer is added to the teacher network; the temporal modeling layer is connected to the feature mapping layer and is located after the feature mapping layer; the output dimension information of the feature mapping layer is the same as the input dimension of the temporal modeling layer.

[0150] In some implementations, the feature dimensionality reduction layer includes a first dimensionality reduction layer for reducing the feature dimension and a second dimensionality reduction layer for reducing the time dimension.

[0151] In some embodiments, the distillation training module 1140 is specifically used for: The network parameters of the trained teacher network are fixed, and the battery data sequence samples are input into the trained teacher network to obtain a first predicted battery state, and a first intermediate feature corresponding to the first predicted battery state is obtained; the first intermediate feature includes the reconstructed intermediate feature output by the feature reconstruction layer of the teacher network and the first dimensionality reduction intermediate feature output by the feature dimensionality reduction layer of the teacher network. Battery data sequence samples are input into the student network to obtain a second predicted battery state, and a second intermediate feature corresponding to the second predicted battery state is obtained; the second intermediate feature includes the second modeling intermediate feature output by the first temporal modeling layer of the student network and the second dimensionality reduction intermediate feature output by the first feature dimensionality reduction layer of the student network. Based on the difference between the second predicted battery state and the corresponding tag, a first loss is determined; A second loss is determined based on the difference between the first predicted battery state and the corresponding second predicted battery state. The third loss is determined based on the difference between the first intermediate feature and the corresponding second intermediate feature; Based on the first loss, the second loss, and the third loss, a distillation loss is determined, and based on the distillation loss, the network parameters of the student network are adjusted to obtain the trained student network.

[0152] In some embodiments, the distillation training module 1140 is specifically used for: The third loss is determined based on the difference between the second modeling intermediate features of the student network and the reconstructed intermediate features of the teacher network, and the difference between the second dimensionality reduction intermediate features of the student network and the first dimensionality reduction intermediate features of the teacher network.

[0153] In some embodiments, the network training module 1130 is further configured to: Acquire battery data under different operating conditions; the battery data includes battery operation data and battery status data, the battery operation data includes operation data at multiple time points; the operation data includes voltage, current, and temperature; the battery status data includes the battery status at the multiple time points; the battery status includes at least one of state of charge, state of health, state of power, and remaining service life; The battery data is slidably captured using a preset time window, and the battery data within each time window is used as a battery data sequence sample; the sample label of each battery data sequence sample is the battery state corresponding to the end time point of the sequence. The battery data sample set is generated based on the multiple battery data sequence samples.

[0154] In some embodiments, the network training module 1130 is specifically used for: Obtain the sequence mask length; the sequence mask length is determined based on the right-skewed distribution function and a preset maximum mask length; For each battery data sequence sample, starting from the sequence start time of the battery data sequence sample, a mask enhancement process is performed on the battery data sequence sample based on the sequence mask length to obtain an enhanced battery data sequence sample. The battery data sample set is generated based on the plurality of battery data sequence samples and each of the enhanced battery data sequence samples.

[0155] In some embodiments, the network training module 1130 is specifically used for: Replace the battery state of the target sequence segment covered by the sequence mask length within the battery data sequence sample with the target battery state at the last time point of the target sequence segment, and set the current corresponding to each time point within the target sequence segment to 0; and / or, Set the battery state corresponding to each time point within the target sequence segment of the battery data sequence sample to 0.

[0156] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0157] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0158] Corresponding to the above-described battery state determination method, this disclosure also provides a computer device, such as... Figure 12 The diagram shown is a structural schematic of a computer device provided in an embodiment of this disclosure. Figure 12 As shown, the computer device 1200 includes a processor 1210, an internal bus 1220, memory 1230, a network interface 1240, and non-volatile memory 1250, and may also include other hardware required for its functions. One or more embodiments of this specification can be implemented in software, for example, the processor 1210 reads the corresponding computer program from the non-volatile memory 1250 into the memory 1230 and then runs it. Of course, besides software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0159] The memory 1230, also known as internal memory, is used to temporarily store the computational data in the processor 1210, as well as the data exchanged with non-volatile memory 1250 such as hard disk. The processor 1210 exchanges data with the non-volatile memory 1250 through the memory 1230.

[0160] In this embodiment, memory 1230 is specifically used to store application code that executes the solution of this application, and its execution is controlled by processor 1210. That is, when the computer device is running, processor 1210 communicates with network interface 1240, memory 1230 and non-volatile memory 1250 through internal bus 1220, so that processor 1210 executes the application code stored in memory 1230 and non-volatile memory 1250, thereby executing the battery state determination method described in the above method embodiment.

[0161] Processor 1210 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware microservices. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.

[0162] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the computer device 1200. In other embodiments of this application, the computer device 1200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0163] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the battery state determination method described in the above-described method embodiments. The storage medium can be either volatile or non-volatile computer-readable storage.

[0164] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the battery state determination method in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0165] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0166] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.

[0167] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by dedicated logic circuitry—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as dedicated logic circuitry.

[0168] Computers suitable for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. Basic computer microservices include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.

[0169] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.

[0170] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.

[0171] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and microservices in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program microservices and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0172] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.

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

Claims

1. A method for determining battery state, characterized in that, include: Access to student and faculty networks; Based on the prediction layer structure of the student network, the output layer of the teacher network is aligned and reconstructed to obtain the reconstructed teacher network. A battery data sample set is obtained, and the reconstructed teacher network is trained in a supervised manner using the battery data sample set to obtain a trained teacher network; the battery data sample set includes multiple battery data sequence samples, and the battery data sequence samples include battery data within a time window; The network parameters of the trained teacher network are fixed, and the student network is trained by knowledge distillation using the battery data sample set to obtain a trained student network. The operating data of the target battery is acquired and input into the trained student network to obtain the battery state of the target battery; the battery state includes at least one of state of charge, state of health, state of power and remaining service life.

2. The method according to claim 1, characterized in that, The prediction layer of the student network includes a feature estimation layer and a first feature dimensionality reduction layer; the teacher network also includes a temporal prediction layer connected to the output layer and located before the output layer. The step of aligning and reconstructing the output layer of the teacher network based on the prediction layer structure of the student network to obtain the reconstructed teacher network includes: A feature reconstruction layer matching the input dimension information of the feature estimation layer is added to the teacher network; the feature reconstruction layer is connected to the temporal prediction layer and is located after the temporal prediction layer. Add a feature dimensionality reduction layer identical to the first feature dimensionality reduction layer to the teacher network; the feature dimensionality reduction layer is connected to the feature reconstruction layer and is located after the feature reconstruction layer; Based on the temporal prediction layer, the feature reconstruction layer, the feature dimensionality reduction layer, and the hierarchical connection relationships, the reconstructed teacher network is obtained.

3. The method according to claim 2, characterized in that, The feature estimation layer of the student network includes a first temporal modeling layer; adding a feature reconstruction layer to the teacher network that matches the input dimension information of the feature estimation layer includes: A feature mapping layer matching the input dimension information of the first temporal modeling layer is added to the teacher network; the feature mapping layer is connected to the temporal prediction layer and is located after the temporal prediction layer. A temporal modeling layer with the same layer structure as the first temporal modeling layer is added to the teacher network; the temporal modeling layer is connected to the feature mapping layer and is located after the feature mapping layer; the output dimension information of the feature mapping layer is the same as the input dimension of the temporal modeling layer.

4. The method according to claim 2, characterized in that, The feature dimensionality reduction layer includes a first dimensionality reduction layer for reducing the feature dimension and a second dimensionality reduction layer for reducing the time dimension.

5. The method according to claim 3, characterized in that, The process of fixing the network parameters of the trained teacher network and using the battery data sample set to perform knowledge distillation training on the student network to obtain a trained student network includes: The network parameters of the trained teacher network are fixed, and the battery data sequence samples are input into the trained teacher network to obtain a first predicted battery state, and a first intermediate feature corresponding to the first predicted battery state is obtained; the first intermediate feature includes the reconstructed intermediate feature output by the feature reconstruction layer of the teacher network and the first dimensionality reduction intermediate feature output by the feature dimensionality reduction layer of the teacher network. Battery data sequence samples are input into the student network to obtain a second predicted battery state, and a second intermediate feature corresponding to the second predicted battery state is obtained; the second intermediate feature includes the second modeling intermediate feature output by the first temporal modeling layer of the student network and the second dimensionality reduction intermediate feature output by the first feature dimensionality reduction layer of the student network. Based on the difference between the second predicted battery state and the corresponding tag, a first loss is determined; A second loss is determined based on the difference between the first predicted battery state and the corresponding second predicted battery state. The third loss is determined based on the difference between the first intermediate feature and the corresponding second intermediate feature; Based on the first loss, the second loss, and the third loss, a distillation loss is determined, and based on the distillation loss, the network parameters of the student network are adjusted to obtain the trained student network.

6. The method according to claim 5, characterized in that, The step of determining the third loss based on the difference between the first intermediate feature and the second intermediate feature includes: The third loss is determined based on the difference between the second modeling intermediate features of the student network and the reconstructed intermediate features of the teacher network, and the difference between the second dimensionality reduction intermediate features of the student network and the first dimensionality reduction intermediate features of the teacher network.

7. The method according to any one of claims 1-6, characterized in that, The battery data sample set was constructed through the following steps: Acquire battery data under different operating conditions; the battery data includes battery operation data and battery status data, the battery operation data includes operation data at multiple time points; the operation data includes voltage, current, and temperature; the battery status data includes the battery status at the multiple time points; the battery status includes at least one of state of charge, state of health, state of power, and remaining service life; The battery data is slidably captured using a preset time window, and the battery data within each time window is used as a battery data sequence sample; the sample label of each battery data sequence sample is the battery state corresponding to the end time point of the sequence. The battery data sample set is generated based on the multiple battery data sequence samples.

8. The method according to claim 7, characterized in that, The process of generating the battery data sample set based on the plurality of battery data sequence samples includes: Obtain the sequence mask length; the sequence mask length is determined based on the right-skewed distribution function and a preset maximum mask length; For each battery data sequence sample, starting from the sequence start time of the battery data sequence sample, a mask enhancement process is performed on the battery data sequence sample based on the sequence mask length to obtain an enhanced battery data sequence sample. The battery data sample set is generated based on the plurality of battery data sequence samples and each of the enhanced battery data sequence samples.

9. The method according to claim 8, characterized in that, The step of performing mask enhancement processing on the battery data sequence sample based on the sequence mask length, starting from the sequence start time of the battery data sequence sample, to obtain an enhanced battery data sequence sample, includes: Replace the battery state of the target sequence segment covered by the sequence mask length within the battery data sequence sample with the target battery state at the last time point of the target sequence segment, and set the current corresponding to each time point within the target sequence segment to 0; and / or, Set the battery state corresponding to each time point within the target sequence segment of the battery data sequence sample to 0.

10. A battery state determination device, characterized in that, include: The network acquisition module is used to acquire student and teacher networks; The network reconstruction module is used to perform alignment and reconstruction processing on the output layer of the teacher network based on the prediction layer structure of the student network, so as to obtain a reconstructed teacher network. A network training module is used to acquire a battery data sample set and use the battery data sample set to perform supervised training on the reconstructed teacher network to obtain a trained teacher network; the battery data sample set includes multiple battery data sequence samples, and the battery data sequence samples include battery data within a time window; The distillation training module is used to fix the network parameters of the trained teacher network and use the battery data sample set to perform knowledge distillation training on the student network to obtain a trained student network. The state prediction module is used to acquire the operating data of the target battery, input the operating data into the trained student network, and obtain the battery state of the target battery; the battery state includes at least one of state of charge, state of health, power state, and remaining service life state.

11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the battery state determination method according to any one of claims 1-9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the battery state determination method according to any one of claims 1-9.