Battery data processing methods, machine learning model training methods and equipment
By generating characteristic parameter information of the battery under normal conditions and using a machine learning model to predict the characteristic parameters under fault conditions, the problem of lack of fault status information during machine learning model training is solved, and the accuracy and efficiency of battery fault monitoring are improved.
Patent Information
- Application Number
- CN202211502073.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-11-28
AI Technical Summary
In the existing technology, the machine learning model training lacks characteristic parameter information of the battery in the fault state, which makes it difficult to effectively monitor battery failures.
By generating characteristic parameter information of the battery in normal state, using machine learning model to predict the characteristic parameters of the battery in fault state, combining battery model and unsupervised training method, the characteristic parameter information of the battery in fault state is generated.
The accuracy and efficiency of battery fault monitoring are improved, and the difficulty of obtaining characteristic parameter information under battery fault conditions is reduced.
Smart Images

Figure CN116050480B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a method for processing battery data, a method for training a machine learning model, and a device. Background Art
[0002] With the development of the times, the automobile industry has entered an era of change. The transformation of fuel vehicles to new energy vehicles is accelerating. As the core component of new energy vehicles, how to improve the safety of power batteries in vehicles is one of the most important topics in the current automotive industry.
[0003] The current solution includes fault detection of batteries in vehicles. Specifically, a machine learning model can be pre-trained. The input of the machine learning model is parameter information collected during the use of the battery in the vehicle. The prediction information output by the machine learning model is used to indicate whether there is a fault in the battery in the vehicle.
[0004] However, when training the above-mentioned machine learning model, a large amount of parameter information of the battery when used in a fault state is required. During vehicle operation, the battery is in a normal state most of the time and is in a fault state only for a very short period of time. As a result, only a small amount of parameter information of the battery when used in a fault state can be collected. Therefore, a solution for generating parameter information of the battery when used in a fault state is urgently needed. Summary of the Invention
[0005] The embodiments of the present application provide a method for processing battery data, a method for training a machine learning model, and a device, which utilize the battery's own characteristics in a normal state. Since the battery is in a normal state most of the time, the characteristic parameters of the battery itself in a normal state are easy to obtain, which reduces the difficulty of implementing this solution.
[0006] To solve the above technical problems, the embodiments of the present application provide the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for processing battery data, which can be used in the field of battery fault monitoring. The method includes: a first electronic device obtains first value information of at least one first characteristic parameter of each battery in n batteries, and generates second value information of at least one first characteristic parameter of each battery in n batteries based on the first value information of at least one first characteristic parameter of each battery; wherein each first characteristic parameter of the battery is a characteristic parameter of the battery itself, and the value of the first characteristic parameter of the battery cannot be directly collected during the use of the battery; the first value information includes the value of at least one first characteristic parameter of each battery in the normal state, and the second value information indicates the value of at least one first characteristic parameter of each battery in the fault state.
[0008] The first electronic device generates third value information of at least one second characteristic parameter of the n batteries at multiple time points when the n batteries are in a fault state based on the second value information of at least one first characteristic parameter of each battery in the n batteries; wherein each second characteristic parameter of the battery is a characteristic parameter of the battery during use, and the value of the second characteristic parameter of the battery can be directly collected during the use of the battery.
[0009] In this implementation, based on the value of the first characteristic parameter of the battery in a normal state, the value of the first characteristic parameter of the battery in a fault state is generated, and the first characteristic parameter is used to reflect the characteristics of the battery; and based on the value of the first characteristic parameter of the battery in the fault state, third value information of the second characteristic parameter of the battery in the fault state is generated, and the second characteristic parameter is used to reflect the characteristics of the battery during use; that is, based on the value of the characteristic parameter of the battery itself in a normal state, the value of the characteristic parameter of the battery itself in a fault state is generated, and then the value of the characteristic parameter used to reflect the battery during use in the fault state is generated, which provides a scheme for generating parameter information when the battery is used in a fault state, and since the battery is in a normal state most of the time, the characteristic parameters of the battery itself in the normal state are easy to obtain, which reduces the difficulty of implementing this scheme.
[0010] In one possible implementation of the first aspect, the second characteristic parameter includes any one or more of the following: voltage, current, or temperature. In this implementation, the specific types of parameters represented by the second characteristic parameter are disclosed, which is conducive to improving the integration of this solution with actual application scenarios.
[0011] In a possible implementation of the first aspect, the first value information of the first characteristic parameter is obtained by prediction through a first machine learning model. Optionally, the first electronic device obtains the first value information of at least one first characteristic parameter of each battery in the n batteries, which may include: the first electronic device can obtain a first vector from the first distribution space, and input the first vector into the first machine learning model, and obtain the first prediction information corresponding to the first vector output by the first machine learning model. The first vector comes from the first distribution space. For example, the vectors in the first distribution space can obey normal distribution, uniform distribution or other types of distribution space, etc.; the first prediction information includes simulated first value information corresponding to at least one first characteristic parameter of each battery in the multiple batteries, and the simulated first value information includes the value of each first characteristic parameter of the at least one first characteristic parameter of each battery.
[0012] In this implementation, the vector from the first distribution space is input into the machine learning model to obtain the simulated value information of the first characteristic parameter of the battery output by the first machine learning model, that is, the simulated first value information is generated by the machine learning model, and the value information of the first characteristic parameter of the battery is added value by the machine learning model. This is not only conducive to improving the acquisition speed of the first value information, but also conducive to obtaining more first value information, and then conducive to generating more value information of the second characteristic parameter.
[0013] In a possible implementation of the first aspect, the training process of the first machine learning model can adopt an unsupervised training method, and the training samples of the first machine learning model include real first value information. The real first value information can be obtained based on the value information of at least one second characteristic parameter collected from each battery during use at multiple time points and the battery model.
[0014] In this implementation, using the real first value information as the training sample of the first machine learning model is conducive to ensuring the similarity between the simulated first value information output by the first machine learning model and the real first value information, thereby facilitating ensuring the similarity between the value information of the generated second characteristic parameter and the real information.
[0015] In a possible implementation of the first aspect, the first electronic device obtains first value information of at least one first characteristic parameter of each battery in n batteries, which may include: the first electronic device generates first value information of at least one first characteristic parameter of each battery based on fourth value information of each second characteristic parameter of the n batteries in a normal state at multiple time points and a battery model.
[0016] The battery model includes a set of mathematical models, which include multiple first characteristic parameters and multiple second characteristic parameters. When the values of the multiple first characteristic parameters in the battery model are fixed, the battery model can reflect the relationship between the multiple second characteristic parameters of the battery; after collecting the values of the multiple second characteristic parameters at multiple time points during the use of the battery, the values of the multiple first characteristic parameters of the battery can also be obtained according to the battery model. For example, the battery model can be expressed as an equivalent circuit model (ECM), an electrochemical mechanism model (pseud two dimensional, P2D), a fractional frequency domain model or other types of battery models, etc.
[0017] In this implementation, another scheme for generating first value information of the first characteristic parameter of the battery is also provided, which improves the implementation flexibility of this scheme; in addition, since the first value information of the first characteristic parameter of the battery is generated based on the values of the second characteristic parameter of the battery when it is in a normal state at multiple time points, the authenticity of the generated first value information is guaranteed, which is conducive to improving the authenticity of the generated third value information.
[0018] In one possible implementation of the first aspect, the first characteristic parameter includes any one or more of the following: the battery's initial state of charge, the battery's capacity, the battery's ohmic internal resistance, or the battery's polarization internal resistance. This implementation discloses the specific types of parameters represented by the first characteristic parameter, which helps improve the integration of this solution with actual application scenarios.
[0019] In a second aspect, an embodiment of the present application provides a training method for a machine learning model, which can be used in the field of battery fault monitoring. The method includes: a second electronic device can obtain a first training sample from a training data set, and the first training sample includes third value information of at least one second characteristic parameter of each of n batteries at multiple time points in at least one state segment, wherein each state segment in the at least one state segment is a charging segment or a discharging segment, and each second characteristic parameter of the battery is a characteristic parameter of the battery during use. The value of the second characteristic parameter can be collected during the use of the battery, and the third value information includes the value of the second characteristic parameter when the battery is in a fault state.
[0020] The second electronic device inputs the first training sample into the second machine learning model to obtain second prediction information output by the second machine learning model. The second prediction information indicates the predicted state of the battery pointed to by the first training sample. The predicted state of the battery includes whether the battery is in a normal state or the battery is in a faulty state.
[0021] The second electronic device trains the second machine learning model based on the correct information corresponding to the first training sample, the second prediction information and the loss function, where the correct information indicates the correct state of the battery pointed to by the first training sample, and the aforementioned loss function indicates the similarity between the second prediction information and the correct information. The correct state of the battery includes the battery being in a normal state or the battery being in a faulty state.
[0022] The first training sample is obtained based on the second value information of at least one first characteristic parameter of each of the n batteries, and the second value information is obtained based on the first value information of at least one first characteristic parameter of each of the n batteries. The first characteristic parameter is used to reflect the characteristics of the battery. The first value information indicates the value of the first characteristic parameter when the battery is in a normal state, and the second value information indicates the value of the first characteristic parameter when the battery is in a fault state.
[0023] In a possible implementation of the second aspect, first value information of at least one first characteristic parameter of each of the n batteries is obtained by prediction through a first machine learning model.
[0024] In one possible implementation of the second aspect, the training data set further includes multiple second training samples, each second training sample including fourth value information of at least one second characteristic parameter of each of the n batteries at multiple time points in at least one state segment, where the fourth value information includes the value of the second characteristic parameter of the battery in a normal state. The multiple second training samples include real second training samples and simulated second training samples, the real second training samples being collected during normal battery use, and the simulated second training samples being obtained based on first value information of at least one first characteristic parameter of each of the n batteries generated by the first machine learning model.
[0025] In this implementation, since the simulated value information of the second characteristic parameter of the battery in a fault state is compared with the actual value information of the second characteristic parameter of the battery in a normal state, the difference not only includes the difference between the value information of the battery in a fault state and a normal state, but also includes the difference between the simulated data and the real data of the battery. In the training process of the second machine learning model, adding the actual value information of the second characteristic parameter of the battery in a fault state is beneficial to avoid the second machine learning model from learning the difference between the real data and the simulated data, but instead can learn the difference between the parameter information of the battery in a fault state and the parameter information in a normal state, which is beneficial to improving the accuracy of the prediction information output by the trained second machine learning model.
[0026] In a possible implementation of the second aspect, the second machine learning model includes a feature extraction network and a feature processing network, and the training goal of the feature extraction network also includes narrowing the similarity between the first feature information and the second feature information.
[0027] Among them, the first feature information is obtained by extracting features of the real fourth value information through the feature extraction network, and the second feature information is obtained by extracting features of the simulated fourth value information through the feature extraction network. The fourth value information includes the values of the second characteristic parameter of each battery of n batteries in normal state at multiple time points in at least one state segment; the real fourth value information is collected when the battery is used in normal state, and the simulated fourth value information is obtained according to the first value information of at least one first characteristic parameter of each battery in the n batteries generated by the first machine learning model.
[0028] In this implementation, since the simulated value information of the second characteristic parameter of the battery in a fault state is compared with the actual value information of the second characteristic parameter of the battery in a normal state, the difference includes not only the difference between the value information of the battery in a fault state and a normal state, but also the difference between the simulated data and the actual data of the battery, then the feature processing network of the second machine learning model is more difficult to learn the difference between the value information of the battery in a fault state and a normal state; and the training goal of the feature extraction network of the second machine learning model includes narrowing the similarity between the first feature information and the second feature information, that is, inputting the simulated value information of the second characteristic parameter of the battery in a fault state into the feature extraction network, and inputting the actual value information of the second characteristic parameter of the battery in a fault state into the feature extraction network, the feature extraction network can output similar feature information, so that the feature processing network only needs to learn the difference between the value information of the battery in a fault state and a normal state, which reduces the learning difficulty of the feature processing network and is conducive to improving the accuracy of the prediction information output by the entire second machine learning model.
[0029] In the second aspect of this application, the second electronic device can also be used to execute the steps performed by the first electronic device in the first aspect and various possible implementation methods of the first aspect. The specific implementation methods, meanings of terms and beneficial effects brought about by the steps in each possible implementation method of the second aspect can all be referred to the first aspect and will not be repeated here.
[0030] In a third aspect, an embodiment of the present application provides a battery data processing device that can be used in the field of battery fault monitoring. The device includes: an acquisition module for acquiring first value information of a first characteristic parameter of the battery, the first value information indicating the value of the first characteristic parameter when the battery is in a normal state, the first characteristic parameter including a characteristic parameter of the battery, and the value of the first characteristic parameter cannot be collected during the use of the battery;
[0031] a generating module, configured to generate second value information of the first characteristic parameter of the battery based on first value information of the first characteristic parameter, wherein the second value information indicates a value of the first characteristic parameter when the battery is in a fault state;
[0032] The generation module is also used to generate third value information of the second characteristic parameter when the battery is in a fault state based on the second value information of the first characteristic parameter, wherein the second characteristic parameter includes the characteristic parameter of the battery during use, and the value of the second characteristic parameter can be collected during the use of the battery.
[0033] In the third aspect of this application, the battery data processing device can also be used to execute the steps performed by the first electronic device in the first aspect and various possible implementation methods of the first aspect. The specific implementation methods, meanings of terms and beneficial effects brought about by the steps in each possible implementation method of the third aspect can all be referred to the first aspect and will not be repeated here.
[0034] In a fourth aspect, an embodiment of the present application provides a training device for a machine learning model that can be used in the field of battery fault monitoring. The device includes: an acquisition module for acquiring a first training sample from a training data set, the first training sample including third value information of a second characteristic parameter of the battery, wherein the second characteristic parameter includes a characteristic parameter of the battery during use, the value of the second characteristic parameter can be collected during the use of the battery, and the third value information includes the value of the second characteristic parameter when the battery is in a fault state;
[0035] a generating module, configured to input the first training sample into a second machine learning model to obtain second prediction information output by the second machine learning model, where the second prediction information indicates a predicted state of the battery indicated by the first training sample, where the predicted state of the battery includes whether the battery is in a normal state or in a faulty state;
[0036] a training module, configured to train a second machine learning model based on correct information corresponding to the first training sample, second prediction information, and a loss function, wherein the correct information indicates a correct state of the battery indicated by the first training sample, and the loss function indicates a similarity between the second prediction information and the correct information, wherein the correct state of the battery includes the battery being in a normal state or the battery being in a faulty state;
[0037] Among them, the first training sample is obtained based on the second value information of the first characteristic parameter of the battery, the second value information of the first characteristic parameter is obtained based on the first value information of the first characteristic parameter, the first characteristic parameter includes the characteristic parameter of the battery, the value of the first characteristic parameter cannot be collected during the use of the battery, the first value information indicates the value of the first characteristic parameter when the battery is in a normal state, and the second value information indicates the value of the first characteristic parameter when the battery is in a fault state.
[0038] In the fourth aspect of this application, the training device of the machine learning model can also be used to execute the steps performed by the second electronic device in the second aspect and various possible implementation methods of the second aspect. The specific implementation methods, meanings of terms and beneficial effects brought about by the steps in each possible implementation method of the fourth aspect can all be referred to the second aspect and will not be repeated here.
[0039] In a fifth aspect, an embodiment of the present application provides an electronic device, which is a first electronic device. The first electronic device includes a processor and a memory. The processor is coupled to the memory. The memory is used to store programs; the processor is used to execute programs in the memory, so that the first electronic device executes the battery data processing method of the first aspect mentioned above.
[0040] In the sixth aspect, an embodiment of the present application provides an electronic device, which is a second electronic device. The second electronic device includes a processor and a memory. The processor is coupled to the memory. The memory is used to store programs; the processor is used to execute programs in the memory, so that the second electronic device executes the training method of the machine learning model of the second aspect mentioned above.
[0041] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method described in the first or second aspect above.
[0042] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes a program. When the program runs on a computer, it enables the computer to execute the method described in the first or second aspect above.
[0043] In a ninth aspect, the present application provides a chip system, which includes a processor for supporting a terminal device or a communication device to implement the functions involved in the above aspects, for example, sending or processing the data and / or information involved in the above methods. In one possible design, the chip system also includes a memory, which is used to store program instructions and data necessary for the terminal device or communication device. The chip system can be composed of a chip or can include a chip and other discrete devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of the structure of the artificial intelligence main framework provided in the embodiment of the present application;
[0045] Figure 2 A system architecture diagram of a battery data processing system provided in an embodiment of the present application;
[0046] Figure 3 A flowchart of a method for processing battery data provided in an embodiment of the present application;
[0047] Figure 4 Another flowchart of the method for processing battery data provided in an embodiment of the present application;
[0048] Figure 5A schematic diagram of a process for obtaining third value information of a second characteristic parameter of a battery in a fault state by using a first neural network according to an embodiment of the present application;
[0049] Figure 6 A flowchart of a method for training a machine learning model provided in an embodiment of the present application;
[0050] Figure 7 A schematic diagram of a process for training a second neural network provided in an embodiment of the present application;
[0051] Figure 8 A schematic diagram of a structure of a battery data processing device provided in an embodiment of the present application;
[0052] Figure 9 A schematic diagram of the structure of a training device for a machine learning model provided in an embodiment of the present application;
[0053] Figure 10 This is a structural diagram of an electronic device provided in an embodiment of the present application;
[0054] Figure 11 A schematic diagram of the structure of the chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0056] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0057] First, the overall workflow of the artificial intelligence system is described. Figure 1 , Figure 1The following diagram illustrates a structural diagram of the AI framework. This framework is explained below from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it encompasses the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed progression from "data-information-knowledge-wisdom." The "IT value chain," encompassing the entire process from the underlying infrastructure of human intelligence, information (provided and processed by technology), to the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.
[0058] (1) Infrastructure
[0059] The infrastructure provides computing power support for artificial intelligence systems, enabling communication with the outside world and providing support through the basic platform. Communication with the outside world is achieved through sensors; computing power is provided by intelligent chips, which can specifically adopt hardware acceleration chips such as central processing units (CPUs), embedded neural network processing units (NPUs), graphics processing units (GPUs), application specific integrated circuits (ASICs), or field programmable gate arrays (FPGAs); the basic platform includes related platform guarantees and support such as distributed computing frameworks and networks, and can include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to obtain data, and this data is provided to the intelligent chips in the distributed computing system provided by the basic platform for calculation.
[0060] (2) Data
[0061] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0062] (3) Data processing
[0063] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
[0064] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0065] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0066] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
[0067] (4) General ability
[0068] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0069] (5) Smart products and industry applications
[0070] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart manufacturing, smart transportation, smart homes, smart medical care, smart security, autonomous driving, smart cities, etc.
[0071] The present application can be applied to various scenarios where battery fault detection is required. For example, in the field of autonomous driving, fault detection can be performed on multiple batteries in a vehicle. The aforementioned vehicles can be cars, trucks, motorcycles, buses, ships, airplanes, helicopters, lawn mowers, recreational vehicles, amusement park vehicles, construction equipment, trams, golf carts and trains, etc. The embodiments of the present application are not particularly limited.
[0072] For example, in many fields where robots may be used, such as smart terminals, smart manufacturing, and smart medical care, fault detection can be performed on multiple batteries in the robot; for example, in the field of smart homes, fault detection can be performed on batteries in the home, and so on. The application scenarios of the embodiments of the present application are not enumerated here.
[0073] In the above-mentioned application scenarios, in order to detect faults in the battery in the device, a machine learning model can be pre-trained. The input of the machine learning model is the value information of the characteristic parameters of the battery during use, and the output of the machine learning model is used to indicate whether the battery is in a faulty state. When training the aforementioned machine learning model, both the value information of the characteristic parameters when the battery is used in a normal state and the value information of the characteristic parameters when the battery is used in a faulty state are required. However, the battery in the device is in a normal state for most of the use time, which makes it difficult to collect the "value information of the characteristic parameters when the battery is used in a faulty state". In order to generate the value information of the characteristic parameters when the battery is used in a faulty state, the present application provides a method for processing battery data.
[0074] Before describing the processing method of the battery data provided by this application, please refer to Figure 2 , Figure 2 A system architecture diagram of a battery data processing system provided in an embodiment of the present application, Figure 2 In the embodiment, the battery data processing system 200 includes a first electronic device 210 , a second electronic device 220 , a database 230 , a third electronic device 240 , a data storage system 250 and a client device 260 , and the third electronic device 240 includes a computing module 241 .
[0075] Among them, the database 230 stores a training data set, the second electronic device 220 generates a machine learning model / rule 201, and uses the training data set to iteratively train the machine learning model / rule 201 to obtain a trained machine learning model / rule 201. The trained machine learning model / rule 201 is used to detect battery faults in the device; the machine learning model / rule 201 can be specifically expressed as a neural network or a non-neural network model. The subsequent embodiments of this application are explained only by taking the machine learning model / rule 201 expressed as a neural network as an example.
[0076] The training samples in the training data set may include the value information of the second characteristic parameter when the battery is in a normal state, or the training samples in the training data set may also include the value information of the second characteristic parameter when the battery is in a faulty state. The second characteristic parameter is used to reflect the characteristics of the battery during use, that is, the value of the second characteristic parameter of the battery can be collected during the use of the battery; illustratively, the second characteristic parameter of the battery may include voltage, current, temperature or other types of second characteristic parameters that can be collected during the use of the battery, etc., which are not exhaustively listed here. The first electronic device 210 is used to generate the value information of the second characteristic parameter when the battery is in a faulty state.
[0077] For details, please refer to Figure 3 , Figure 3 A flowchart of a method for processing battery data provided in an embodiment of the present application. In particular, 301, in order to obtain value information of a characteristic parameter used to reflect the use process of the battery in a faulty state, the first electronic device 210 may obtain first value information of a first characteristic parameter of the battery; wherein the aforementioned first value information indicates the value information of the first characteristic parameter of the battery when it is in a normal state, and the first characteristic parameter is a characteristic parameter of the battery itself, and the value of the first characteristic parameter cannot be directly collected during the use of the battery; illustratively, the first characteristic parameter of the battery may be the initial state of charge of the battery, the battery capacity, the ohmic internal resistance of the battery, the polarization internal resistance of the battery, or other characteristic parameters of the battery itself, etc., which are not limited here.
[0078] 302. After obtaining the first value information of the first characteristic parameter of the battery when it is in a normal state, the first electronic device 210 can generate second value information of the first characteristic parameter of the battery based on the aforementioned first value information, and the second value information indicates the value information of the first characteristic parameter of the battery when it is in a fault state.
[0079] 303. The first electronic device 210 can generate third value information of the second characteristic parameter of the battery based on the second value information of the first characteristic parameter when the battery is in a faulty state. The third value information indicates the value of the second characteristic parameter of the battery when the battery is in a faulty state. The second characteristic parameter of the battery is a characteristic parameter of the battery during use. The value of the second characteristic parameter of the battery can be directly collected during the use of the battery. Exemplarily, at least one second characteristic parameter of the battery may include any one or more of the following: voltage, current, temperature, or other characteristic parameters that can be collected during the use of the battery, etc., which are not exhaustively listed here.
[0080] Optionally, the aforementioned "third value information of the second characteristic parameter of the battery" can be used as a training sample for the machine learning model / rule 201. In the embodiment of the present application, by Figure 3 The corresponding embodiment provides a solution for generating parameter information of a battery when it is used in a faulty state. Since the battery is in a normal state most of the time, the characteristic parameters of the battery itself in the normal state are easy to obtain, thereby reducing the difficulty of implementing this solution.
[0081] After the second electronic device 220 obtains the trained machine learning model / rule 201, it deploys the trained machine learning model / rule 201 to the third electronic device 240. The third electronic device 240 can perform battery fault detection through the machine learning model / rule 201.
[0082] The third electronic device 240 can access data, codes, etc. in the data storage system 250, or store data, instructions, etc. in the data storage system 250. The data storage system 250 can be located in the third electronic device 240, or the data storage system 250 can be an external memory relative to the third electronic device 240.
[0083] In some embodiments of this application, please refer to Figure 2 The third electronic device 240 and the client device 260 can be independent devices. For example, the third electronic device 240 can be a cloud device corresponding to the client device 260. For example, the third electronic device 240 can be a cloud server, and the client device 260 can be a vehicle, a smart home appliance, or a robot, etc., which are not exhaustive here.
[0084] The third electronic device 240 is configured with an input / output (I / O) interface for exchanging data with the client device 260. For example, after obtaining the value information of the second characteristic parameter of the battery during use, the client device 260 can send the value information to the third electronic device 240 via the I / O interface. After the third electronic device 240 generates prediction information corresponding to the value information using the machine learning model / rule 201 in the computing module 241, the prediction information is returned to the client device 260 via the I / O interface.
[0085] Alternatively, the client device 260 may also pre-process the value information of the second characteristic parameter of the battery during use, and send the value information after the pre-processing operation to the third electronic device 240, and the third electronic device 240 may generate prediction information corresponding to the value information after the pre-processing operation, etc., which is not limited here.
[0086] It is worth noting that Figure 2 It is only a schematic diagram of the architecture of the processing system for two types of battery data provided by an embodiment of the present invention. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in other embodiments of the present application, the first electronic device 210 and the second electronic device 220 can also be the same device; or, the first electronic device 210, the second electronic device 220 and the third electronic device 240 can be the same device; or, the third electronic device 240 can be configured in the client device 260. For example, when the client device 260 is a vehicle, the third electronic device 240 can be a module in the vehicle's host processor (Host CPU) for performing fault detection on the battery in the vehicle. The third electronic device 240 can also be a neural network processor (NPU) in the vehicle. The NPU is mounted on the host processor as a coprocessor and is assigned tasks by the host processor, etc. The examples are not exhaustive here.
[0087] The battery data processing method provided in the embodiment of the present application may involve two stages: generating training samples and training a neural network for battery fault detection. The specific implementation processes of the above two stages will be described below.
[0088] 1. Generate training samples
[0089] In the embodiments of this application, please refer to Figure 4 , Figure 4 Another flowchart of the method for processing battery data provided in the embodiment of the present application is shown below in combination with Figure 4 The specific implementation process of the battery data processing method provided in the embodiment of the present application is described in detail. The battery data processing method provided in the embodiment of the present application may include:
[0090] 401. Obtain first value information of a first characteristic parameter of a battery, where the first value information indicates a value of the first characteristic parameter when the battery is in a normal state. The first characteristic parameter includes a characteristic parameter of the battery. The value of the first characteristic parameter cannot be collected during use of the battery.
[0091] In an embodiment of the present application, the first electronic device needs to obtain first value information of at least one first characteristic parameter of each battery in at least one battery, wherein each first characteristic parameter of each battery is a characteristic parameter of the battery itself, and the value of the first characteristic parameter of the battery cannot be directly collected during the use of the battery.
[0092] Exemplarily, at least one first characteristic parameter of the battery may include any one or more of the following: the initial state of charge of the battery, the battery capacity, the ohmic internal resistance of the battery, the polarization internal resistance of the battery, the liquid phase diffusion coefficient of the battery, the lithium ion concentration of the battery, or other parameters used to reflect the characteristics of the battery itself, etc. The examples here are only for the convenience of understanding this solution and are not used to limit this solution. In the embodiments of this application, the specific types of parameters represented by the first characteristic parameter are disclosed, which is conducive to improving the degree of integration of this solution with actual application scenarios.
[0093] The first electronic device can obtain the first value information of the first characteristic parameter of the battery in a variety of ways. In one implementation, the first electronic device can use the first neural network to generate the first value information of the aforementioned first characteristic parameter. In another implementation, the first electronic device can generate the first value information of the aforementioned first characteristic parameter based on the value information of the second characteristic parameter of the battery when it is in a normal state; wherein each second characteristic parameter of the battery is a characteristic parameter of the battery during use, and the value of the second characteristic parameter of the battery can be directly collected during the use of the battery. For example, at least one second characteristic parameter of the battery may include any one or more of the following: voltage, current, temperature, or other characteristic parameters that can be collected during the use of the battery, etc., which are not exhaustive here. The following describes the above two implementations in detail. In the embodiment of the present application, it is disclosed what types of parameters the second characteristic parameter specifically represents, which is conducive to improving the degree of integration of this solution with actual application scenarios.
[0094] (1) Generating first value information using the first neural network
[0095] In this implementation, after obtaining the first neural network that has performed a training operation, the first electronic device can obtain a first vector from the first distribution space. For example, the vectors in the first distribution space can obey a normal distribution, a uniform distribution, or other types of distribution spaces, etc., which are not exhaustively listed here.
[0096] The first electronic device inputs the aforementioned first vector into the first neural network, and obtains first prediction information corresponding to the first vector output by the first neural network. The first prediction information corresponding to the first vector includes first value information corresponding to at least one first characteristic parameter of each of the multiple batteries, and the first value information includes the value of each first characteristic parameter of the at least one first characteristic parameter of each of the aforementioned batteries.
[0097] For example, the first value information can be represented as an n-by-s matrix. In one implementation, n is the number of all batteries included in the at least one battery; in another implementation, n is a fixed value. s represents the number of characteristic parameter types included in the at least one first characteristic parameter, with both n and s being integers greater than or equal to 1. That is, the first value information can include s first characteristic parameter values for each of the n batteries.
[0098] Optionally, the training process of the first neural network may adopt an unsupervised training method.
[0099] In embodiments of the present application, multiple unsupervised training methods for the first neural network can be provided. In one implementation, the first neural network can be trained using a generative adversarial network (GAN). For example, during the training phase of the first neural network, a training device obtains a second vector from a first distribution space and then inputs the second vector into the first neural network to obtain first prediction information corresponding to the second vector output by the first neural network. The first prediction information corresponding to the second vector includes first value information for each first characteristic parameter of each battery in a plurality of batteries. The concepts of the second vector and the first vector are similar, except that the first vector is used during the execution phase of the first neural network, while the second vector is used during the training phase of the first neural network.
[0100] The training device can also obtain value information of at least one second characteristic parameter collected during use of each battery at multiple time points, and generate true first value information of the first characteristic parameter of each battery based on the value information of at least one second characteristic parameter collected during use of the battery at multiple time points and the battery model. The specific implementation of the aforementioned steps will be described in subsequent embodiments and will not be repeated here.
[0101] Among them, the battery model includes a set of mathematical models, which include multiple first characteristic parameters and multiple second characteristic parameters. When the values of the multiple first characteristic parameters in the battery model are fixed, the battery model can reflect the relationship between the multiple second characteristic parameters of the battery; after collecting the values of the multiple second characteristic parameters at multiple time points during the use of the battery, the values of the multiple first characteristic parameters of the battery can also be obtained according to the battery model.
[0102] For example, the battery model can be expressed as an equivalent circuit model (ECM), an electrochemical mechanism model (pseudonymous two dimensional, P2D), a fractional frequency domain model, or other types of battery models, etc., which are not exhaustive here. The types of first characteristic parameters used by different battery models may be the same or different, and are determined in combination with actual application scenarios and are not limited here.
[0103] The training device may input the actual first value information of at least one first characteristic parameter of each battery in the at least one battery and the first prediction information output by the first neural network into the discriminant network, respectively, to obtain third prediction information output by the discriminant network. The third prediction information corresponding to the actual first value information is used to indicate whether the actual first value information is real data or simulated data output by the neural network, and the third prediction information corresponding to the first prediction information is used to indicate whether the input first prediction information is real data or simulated data output by the neural network.
[0104] The training device trains the first neural network and the discriminant network using a first loss function. The first loss function may include a first loss function term and a second loss function term. The training objective of the first loss function term includes increasing the probability that the discriminant network recognizes the first prediction information as real data; the training objective of the second loss function term includes increasing the probability that the discriminant network recognizes the first prediction information as simulated data, and increasing the probability that the real first value information is recognized by the network device as real data.
[0105] Specifically, during the training process of the first neural network and the discriminant network, the training device can, under the premise of fixing the weight parameters of the first neural network, iteratively update the weight parameters of the discriminant network using the second loss function term. The training objectives when iteratively updating the weight parameters of the discriminant network include increasing the probability that the first prediction information is recognized as simulated data by the discriminant network, and increasing the probability that the real first value information is recognized as real data by the discriminant network device. Then, under the premise of fixing the weight parameters of the discriminant network, the weight parameters of the first neural network are iteratively updated using the first loss function term. The training objectives when iteratively updating the weight parameters of the first neural network include increasing the probability that the first prediction information is recognized as real data by the discriminant network. The training device can repeatedly perform the aforementioned operations to achieve iterative training of the first neural network and the discriminant network, thereby obtaining a first neural network that has undergone training operations.
[0106] In another implementation, the first neural network can be expressed as a decoder for performing a decompression operation, and the training device can obtain the values of at least one second characteristic parameter collected during the use of each battery at multiple time points, and generate the true first value information of the first characteristic parameter of each battery based on the values of at least one second characteristic parameter collected during the use of each battery at multiple time points and the battery model.
[0107] The training device inputs the real first value information into the encoder, performs a compression operation through the aforementioned encoder, and obtains a vector output by the encoder; the training device inputs the aforementioned vector into the first neural network (i.e., the decoder), performs a decompression operation on the aforementioned vector through the first neural network, and obtains the first prediction information output by the first neural network.
[0108] The training device iteratively trains the encoder and the first neural network (i.e., the decoder) using the second loss function until a convergence condition of the second loss function is satisfied, thereby obtaining a trained first neural network. The objectives of iteratively training the encoder and the first neural network (i.e., the decoder) using the second loss function include increasing the probability that the vector output by the encoder obeys the distribution law of the first distribution space, and increasing the similarity between the first prediction information output by the first neural network and the actual first value information input to the encoder.
[0109] In another implementation, the first neural network can be expressed as a reversible neural network, and the training device can generate the true first value information of the first characteristic parameter of each battery based on the values of at least one second characteristic parameter collected during the use of each battery at multiple time points and the battery model.
[0110] The training device inputs real first value information into the first neural network, and performs a noise addition operation on the input first value information through the first neural network to obtain first prediction information output by the first neural network. The training device iteratively trains the first neural network according to a third loss function to obtain a trained first neural network. The goal of performing the training operation using the third loss function includes improving the similarity between the first prediction information and white noise, where the white noise is represented by a vector that follows a normal distribution. Because the first neural network is reversible, after obtaining the trained first neural network, the first neural network can generate simulated first value information of the first characteristic parameter of each battery based on the vector that follows a normal distribution.
[0111] It should be noted that the examples of training methods for the first neural network described above are merely intended to demonstrate the feasibility of this solution. Other methods can also be used to train the first neural network, and these are not exhaustive. Furthermore, the training device and the first electronic device can be the same device or different devices, and this is not limited in the embodiments of this application.
[0112] In an embodiment of the present application, a vector from a first distribution space is input into a neural network to obtain simulated value information of a first characteristic parameter of a battery output by the first neural network, that is, the simulated first value information is generated by a neural network, and the value information of the first characteristic parameter of the battery is added value by using the neural network. This is not only beneficial to improving the acquisition speed of the first value information, but also beneficial to obtaining more first value information, and further beneficial to generating more value information of the second characteristic parameter.
[0113] In addition, using the real first value information as the training sample of the first neural network is conducive to ensuring the similarity between the simulated first value information output by the first neural network and the real first value information, thereby ensuring the similarity between the value information of the generated second characteristic parameter and the real information.
[0114] Optionally, since a large number of training samples are required during the training of the first neural network, each training sample of the first neural network includes true first value information of at least one first characteristic parameter of each battery in at least one battery. In order to obtain more training samples of the first neural network, an embodiment of the present application may also provide a method for augmenting the training samples of the first neural network.
[0115] Consistent with the representation of the first prediction information, each training sample of the first neural network can also be represented as an n-by-s matrix, where n is the number of all batteries included in the at least one battery, and s represents the number of types of characteristic parameters included in the at least one first characteristic parameter. That is, each training sample of the first neural network can include s types of first characteristic parameter values for each of the n batteries. For the update process of any training sample of the first neural network (hereinafter referred to as the "target training sample" for convenience of description), the training device can perform an update operation on the target training sample to obtain an updated target training sample. The aforementioned update operation includes but is not limited to any one or more of the following operations:
[0116] Changing the order of n batteries in the target training sample, for example, the target training sample is a matrix with n rows and s columns, and each row in the matrix includes s values of the first characteristic parameters of each battery, and "changing the order of n batteries" means changing the order of different rows in the target training sample; or
[0117] Changing the order between different battery modules in the target training sample, where n batteries in the target training sample are divided into multiple battery modules, each battery module includes at least one battery, for example, the target training sample is a matrix with n rows and s columns, and the aforementioned matrix with n rows and s columns is divided into at least two groups of values corresponding one-to-one to at least two battery modules, each group of values including at least one row of values in the target training sample, and "changing the order between different battery modules" means changing the order between different groups in the aforementioned at least two groups of values; or
[0118] Changing the order between different batteries in the same battery module. For example, the target training sample is a matrix of n rows and s columns, and the aforementioned matrix of n rows and s columns is divided into at least two groups of values corresponding one to one to at least two battery modules. "Changing the order between different batteries in the same battery module" means updating the order between different rows in at least one of the at least two groups of values; or, other updating methods can also be used, which are not exhaustive here.
[0119] Exemplarily, the training device may input the target training sample into a permutation function, and utilize the permutation function to perform the above-mentioned update operation on the target training sample to obtain an updated target training sample.
[0120] In an embodiment of the present application, since the training samples of the first neural network are obtained based on the actual values of the second characteristic data of the battery during use, the training samples of the first neural network are also real data. The training samples of the first neural network are updated in the above-mentioned manner. Since the updating method only adjusts the order between different batteries or different battery modules in the training samples, the values of each second characteristic parameter of each battery in the training sample are not changed, thereby ensuring that the updated training samples also include the values of the battery in a normal state, and ensuring that the values in the updated training samples are also real values, that is, the updated training samples are also real data; through the above-mentioned method, the training samples of the first neural network can also be augmented, which is beneficial to improving the accuracy of the first prediction information output by the trained first neural network.
[0121] (2) Generate first value information based on the value information of the second characteristic parameter when the battery is in a normal state
[0122] In this implementation, the first electronic device can also obtain fourth value information of each second characteristic parameter of each battery in a normal state at multiple time points, and the aforementioned fourth value information is real data collected from the device; the second electronic device generates first value information of at least one first characteristic parameter of at least one battery in a normal state based on the fourth value information of each second characteristic parameter of each battery in a normal state at multiple time points and the battery model. For example, the first value information is expressed as an n-by-s matrix, the number of the aforementioned at least one battery is n, and the number of types of the aforementioned at least one first characteristic parameter is s.
[0123] Specifically, the first electronic device can obtain the value information of each second characteristic parameter at multiple time points included in multiple state segments when each battery in the n batteries is in a normal state, and generate s values of the first characteristic parameters of each battery in the n batteries based on the aforementioned value information and the battery model (that is, obtain the first value information).
[0124] For example, using the Thevenin equivalent circuit model as an example of a battery model, the first electronic device can obtain the current value and voltage value (i.e., an example of the value of at least one second characteristic parameter of the battery) of each of the n batteries at multiple time points in multiple charging segments (or discharging segments) under normal conditions. Based on the obtained current value and voltage value and the Thevenin equivalent circuit model, the first electronic device generates the value of the initial state of charge, the value of the battery capacity, the value of the ohmic internal resistance of the battery, and the value of the polarization internal resistance of the battery (i.e., an example of the value of at least one first characteristic parameter of the battery) for each of the n batteries.
[0125] It should be noted that the above examples are only used to prove the feasibility of this solution. The Thevenin equivalent circuit model can also be replaced by other types of equivalent circuit models, or the Thevenin equivalent circuit model can be replaced by other types of battery models, etc. The specific implementation methods when using other types of battery models will not be given here.
[0126] Optionally, in this implementation, after obtaining the first value information of s first characteristic parameters of n batteries in a normal state, the electronic device can perform an update operation on the first value information to obtain updated first value information. The meaning and specific implementation method of the aforementioned update operation can be found in the description in the previous implementation and will not be repeated here.
[0127] It should be noted that if the n batteries include all batteries in the same device, since the number of batteries in different devices may be different, the number of n in different fourth value information may be the same or different. Correspondingly, the number of n in the first value information may be the same or different. The specific number can be determined in combination with the actual application scenario and is not limited here.
[0128] In an embodiment of the present application, another scheme for generating first value information of the first characteristic parameter of the battery is also provided, which improves the implementation flexibility of the present scheme; in addition, since the first value information of the first characteristic parameter of the battery is generated based on the values of the second characteristic parameter of the battery when it is in a normal state at multiple time points, the authenticity of the generated first value information is guaranteed, which is conducive to improving the authenticity of the generated third value information.
[0129] 402. Generate second value information of the first characteristic parameter of the battery based on first value information of the first characteristic parameter, where the second value information indicates a value of the first characteristic parameter when the battery is in a fault state.
[0130] In an embodiment of the present application, after obtaining first value information of s first characteristic parameters of each of n batteries, the first electronic device can change at least one value in the first value information according to a preset strategy to generate second value information of s first characteristic parameters of each of the n batteries; the second value information indicates the value of the first characteristic parameter when the battery is in a fault state.
[0131] The first electronic device may modify the value of at least one first characteristic parameter of at least one battery in the first value information according to a preset strategy to generate second value information.
[0132] For example, if the value of the characteristic parameter "battery capacity" exists among the s first characteristic parameters, the "battery capacity" of at least one of the n batteries can be changed to an extremely low value. The "at least one battery" can be randomly selected or selected according to a preset rule. For example, the extremely low value can be 1%, 2%, 3%, or other ratios of the smallest "battery capacity" among the n batteries. This example is provided for ease of understanding of this solution and is not intended to limit this solution.
[0133] For another example, if the value of the characteristic parameter "battery ohmic internal resistance" is included among the s first characteristic parameters, the "battery ohmic internal resistance" of at least one of the n batteries can be changed to an extremely high value. The "at least one battery" can be randomly selected or selected according to a preset rule. For example, the extremely high value can be 50 times, 60 times, 70 times, or other multiples of the largest "battery ohmic internal resistance" among the n batteries. This example is provided for ease of understanding of this solution and is not intended to limit this solution.
[0134] It should be noted that the above examples are only for the convenience of understanding the process of "modifying a first value information to obtain a second value information" and are not used to limit this solution. In actual application scenarios, the values of other types of first characteristic parameters can also be changed, or the values of multiple first characteristic parameters in the first value information can also be changed at the same time, etc., which are not limited here.
[0135] Optionally, the first electronic device may further generate a fault tag corresponding to each second value information, wherein the fault tag may indicate that the n batteries indicated by the second value information are in a fault state. Further, optionally, the fault tag may indicate the type of fault generated by the n batteries indicated by the second value information.
[0136] For example, the fault type caused by changing the "battery capacity" of at least one battery among n batteries to an extremely low value is a low capacity fault; for another example, the fault type caused by changing the "battery ohmic internal resistance" of at least one battery among n batteries to an extremely high value is a high internal resistance fault, etc. The examples here are only for the convenience of understanding this solution and are not used to limit this solution.
[0137] 403. Generate third value information of the second characteristic parameter when the battery is in a fault state based on the second value information of the first characteristic parameter, where the second characteristic parameter includes a characteristic parameter of the battery during use, and the value of the second characteristic parameter can be collected during use of the battery.
[0138] In an embodiment of the present application, after obtaining the second value information of s first characteristic parameters of each of the n batteries, the first electronic device can generate third value information of the second characteristic parameters of each of the n batteries at multiple time points in at least one charging segment (or discharging segment) in a fault state, that is, the third value information includes the value of each second characteristic parameter of each of the n batteries at each time point in each charging segment (or discharging segment).
[0139] Exemplarily, the first electronic device may generate one or more third value information based on the second value information and a battery model. For example, if the battery model uses a Thevenin equivalent circuit model, after obtaining the second value information, the second value information and the current values at multiple time points of at least one charging segment (or discharging segment) may be substituted into the Thevenin equivalent circuit model to obtain the voltage values of each of the n batteries at multiple time points of the at least one charging segment (or discharging segment), thereby obtaining the third value information. The third value information includes the current value and voltage value of each of the n batteries at multiple time points of the at least one charging segment (or discharging segment).
[0140] It should be noted that the current values at multiple time points when charging (or discharging) the battery can be statistically analyzed, and the change pattern of the current value in a charging segment (or discharging segment) can be different. For example, when charging the device with high power and charging the device with low power, the change pattern of the current value in the same charging segment can be different.
[0141] Furthermore, while maintaining the second value information unchanged, when current values with different variation patterns within a charging segment (or discharging segment) are substituted into the Thevenin equivalent circuit model, the resulting voltage values will also differ, thereby generating different third value information. Therefore, after obtaining a second value information, at least one third value information corresponding to the same second value information can be generated based on one or more current variation patterns.
[0142] Optionally, the third value information generated in step 403 can be used as a training sample for a second neural network, which is a neural network used to detect battery faults. Furthermore, optionally, the fault label generated in step 402 can be used as the fault label corresponding to the third value information. That is, during the subsequent training of the neural network performing fault detection, the fault label generated in step 402 can be used as the correct information corresponding to the third value information.
[0143] For a more intuitive understanding of this solution, please refer to Figure 5 , Figure 5 A schematic diagram of a process for obtaining third value information of a second characteristic parameter of a battery in a fault state using a first neural network according to an embodiment of the present application. A1: A training device generates a value of each first characteristic parameter for each of n batteries in a device (i.e., generates a true first value information) based on the values of the second characteristic parameters of n batteries in a normal state at multiple time points in multiple charging segments (or discharging segments); the training device repeatedly performs the aforementioned operations to generate multiple true first value information.
[0144] A2. The training device trains the first neural network using a generative adversarial approach based on the actual first value information to obtain a trained first neural network, wherein the input of the first neural network is a vector that obeys a normal distribution, and the output of the first neural network is the simulated first value information. The specific implementation of the aforementioned steps is described in step 401 and is not repeated here.
[0145] A3. The first electronic device inputs a vector obeying a normal distribution into the trained first neural network to obtain simulated first value information output by the trained first neural network, where the first value information includes the value of each of the four first characteristic parameters of each battery under a normal state, where the four first characteristic parameters include the initial state of charge of the battery, the battery capacity, the ohmic internal resistance of the battery, and the polarization internal resistance of the battery.
[0146] A4. The first electronic device modifies the value of at least one first characteristic parameter in the first value information to generate second value information, where the second value information includes the value of each of the four first characteristic parameters of each battery in the n batteries in a fault state.
[0147] A5. The first electronic device generates voltage values of each battery at multiple time points in each charging segment based on the Thevenin equivalent circuit model, the second value information, and the current values of each battery at multiple time points in each charging segment. The second characteristic parameter of the battery includes current and voltage, and the third value information includes the current and voltage of each battery at multiple time points in each charging segment. It should be understood that Figure 5 The examples are only for facilitating understanding of this solution and are not intended to limit this solution.
[0148] In an embodiment of the present application, through the above-mentioned scheme, the values of the characteristic parameters of the battery itself in a fault state are generated based on the values of the characteristic parameters of the battery itself in a normal state, and then the values of the characteristic parameters used to reflect the use of the battery in a fault state are generated, thereby providing a scheme for generating parameter information when the battery is used in a fault state. Since the battery is in a normal state most of the time, the characteristic parameters of the battery itself in a normal state are easy to obtain, which reduces the difficulty of implementing this scheme.
[0149] 2. Training a Neural Network for Battery Fault Detection
[0150] In the embodiments of this application, please refer to Figure 6 , Figure 6 A flowchart of a method for training a machine learning model provided in an embodiment of the present application is provided. The method for training a machine learning model provided in an embodiment of the present application may include:
[0151] 601. Obtain first characteristic information and second characteristic information, wherein the first characteristic information is obtained by feature extraction of actual fourth value information of a second characteristic parameter of the battery, and the second characteristic information is obtained by feature extraction of simulated fourth value information of the second characteristic parameter of the battery, and the fourth value information includes the value of the second characteristic parameter of the battery in a normal state.
[0152] In an embodiment of the present application, step 601 is an optional step. The second neural network used to detect battery faults may include a feature extraction network and a feature processing network. The second electronic device may obtain one or more true fourth value information. The fourth value information includes the value of the second characteristic parameter of each of the multiple batteries under normal conditions. The true fourth value information is collected when the battery is used under normal conditions. The second electronic device may input at least one true fourth value information into the feature extraction network, and perform a feature extraction operation on the true fourth value information through the aforementioned feature extraction network to obtain the above-mentioned first feature information.
[0153] The second electronic device can also obtain one or more simulated fourth value information, which is obtained based on the first value information generated by the first machine learning model and the battery model. The concept of the first value information can be referred to in the above description. The specific implementation method of "generating the fourth value information based on the first value information" is similar to the specific implementation method of "generating the third value information based on the second value information"; the difference is that the first value information indicates the value of the first characteristic parameter of the battery in a normal state, and the fourth value information indicates the value of the second characteristic parameter of the battery in a normal state; the second value information indicates the value of the first characteristic parameter of the battery in a faulty state, and the third value information indicates the value of the second characteristic parameter of the battery in a faulty state.
[0154] The second electronic device may further input at least one simulated fourth value information into the feature extraction network, and perform a feature extraction operation on the simulated fourth value information through the feature extraction network to obtain the second feature information.
[0155] Optionally, before inputting the true fourth value information into the second neural network, the second electronic device may further preprocess the true fourth value information to obtain processed true fourth value information. The second electronic device inputs the processed true fourth value information into the feature extraction network to obtain the first feature information generated by the feature extraction network.
[0156] Correspondingly, before inputting the simulated fourth value information into the second neural network, the second electronic device may further preprocess the simulated fourth value information to obtain processed simulated fourth value information. The second electronic device inputs the processed simulated fourth value information into the feature extraction network to obtain second feature information generated by the feature extraction network.
[0157] Exemplarily, a fourth value information includes value information of a second characteristic parameter of each battery in L state segments of n batteries, that is, a fourth value information includes the value of a second characteristic parameter of each battery at multiple time points in each state segment, L is an integer greater than or equal to 1, each state segment is a charging segment or a discharging segment, and the second characteristic parameter is used to reflect the characteristics of the battery during use. The expression form of the "second characteristic parameter" can be referred to above. Figure 3 The description in the corresponding embodiment is not repeated here. Then the second electronic device can use at least one fourth value information corresponding to the at least one second characteristic parameter to show the value information of at least one second characteristic parameter of each battery in the n batteries in the L state segments.
[0158] The preprocessing operation may include calculating a statistical value of a second characteristic parameter of a battery in the fourth value information at all time points within a state segment, and replacing the value of the second characteristic parameter of each battery in the fourth value information at all time points within the state segment with the statistical value of the second characteristic parameter of the battery in the state segment. The statistical value calculation method may include any one or more of the following: calculating the mean, variance, standard deviation, rate of change, or other statistical methods, which are not limited here.
[0159] Exemplarily, the fourth value information includes the voltage value of each of the 96 batteries at multiple time points in each of the 5 charging segments. The voltage values of a certain battery at multiple time points in a certain charging segment include: 5, 6, 7, 8, 9, 11, 11, 12, 14, 16, 18, 21. The statistical value of the voltage value of the battery in the charging segment can be 11.5 by averaging the aforementioned 12 values. The 12 values of the voltage value of the battery at 12 time points in the charging segment in the fourth value information are replaced with 11.5 (that is, replaced with the statistical value). It should be understood that the examples here are only for the convenience of understanding this solution and are not used to limit this solution.
[0160] 602. Train the feature extraction network according to a fourth loss function, where a goal of training using the fourth loss function includes narrowing the similarity between the first feature information and the second feature information.
[0161] In an embodiment of the present application, step 602 is an optional step, and the second electronic device can train the feature extraction network based on the first feature information, the second feature information and the fourth loss function, wherein the goal of training using the fourth loss function includes narrowing the similarity between the first feature information and the second feature information.
[0162] Specifically, in one implementation, the second electronic device may obtain, through step 601, a plurality of first feature information corresponding one-to-one to a plurality of real fourth value information, for example, the aforementioned plurality of real fourth value information may include a batch of real fourth value information; and obtain, through step 601, a plurality of second feature information corresponding one-to-one to a plurality of simulated fourth value information, for example, the aforementioned plurality of simulated fourth value information may include a batch of simulated fourth value information.
[0163] In step 602, the second electronic device may cluster the plurality of first feature information to obtain first category information and cluster the plurality of second feature information to obtain second category information. The second electronic device trains a feature extraction network based on the first category information, the second category information, and the fourth loss function.
[0164] Among them, the fourth loss function indicates the similarity between the first category information and the second category information. The goal of training using the fourth loss function includes narrowing the similarity between the first category information and the second category information, that is, achieving narrowing the similarity between the first feature information and the second feature information.
[0165] The second electronic device repeatedly performs steps 601 and 602 to implement iterative training of the feature extraction network until the convergence condition of the fourth loss function is met, thereby obtaining a feature extraction network that has performed a trained operation.
[0166] In another implementation, the second electronic device can train the feature extraction network using a generative adversarial approach. Specifically, the second electronic device can input the first feature information and the second feature information into the discriminant network, respectively, so that the discriminant network outputs fourth prediction information. The fourth prediction information corresponding to the first feature information is used to indicate whether the first feature information is real data or simulated data, and the fourth prediction information corresponding to the second feature information is used to indicate whether the second feature information is real data or simulated data.
[0167] The second electronic device uses the fourth loss function to train the feature extraction network and the discriminant network. The fourth loss function may include a third loss function term and a fourth loss function term; the training goal of the third loss function term includes increasing the probability that the second feature information is recognized as real data by the discriminant network; the training goal of the fourth loss function term includes increasing the probability that the first feature information is recognized as real data by the discriminant network, and increasing the probability that the second feature information is recognized as simulated data by the discriminant network. The specific implementation method of "using the fourth loss function and training the feature extraction network and the discriminant network through a generative-adversarial approach" can be found in the above Figure 3 The description in step 301 in the corresponding embodiment should be understood, and the specific implementation details will not be repeated here.
[0168] It should be noted that the second electronic device can also use other methods to train the feature extraction network to improve the similarity between the first feature information and the second feature information generated by the feature extraction network. The example here is only to prove the feasibility of this solution and is not used to limit this solution.
[0169] In the embodiment of the present application, since the simulated value information of the second characteristic parameter of the battery in a fault state is compared with the actual value information of the second characteristic parameter of the battery in a normal state, the difference not only includes the difference between the value information of the battery in a fault state and a normal state, but also includes the difference between the simulated data and the actual data of the battery, then the feature processing network of the second neural network is more difficult to learn the difference between the value information of the battery in a fault state and a normal state; and the training goal of the feature extraction network of the second neural network includes narrowing the similarity between the first feature information and the second feature information, that is, inputting the simulated value information of the second characteristic parameter of the battery in a fault state into the feature extraction network, and inputting the actual value information of the second characteristic parameter of the battery in a fault state into the feature extraction network, the feature extraction network can output similar feature information, so that the feature processing network only needs to learn the difference between the value information of the battery in a fault state and a normal state, which reduces the learning difficulty of the feature processing network and is conducive to improving the accuracy of the prediction information output by the entire second neural network.
[0170] 603. Obtain a first training sample from the training data set, where the first training sample includes third value information of a second characteristic parameter when the battery is in a fault state, the second characteristic parameter includes a characteristic parameter of the battery during use, and the value of the second characteristic parameter can be collected during the use of the battery.
[0171] In this embodiment of the present application, a training data set may be deployed in the second electronic device, and the training data set may include multiple first training samples and multiple second training samples. In step 603, the second electronic device may obtain one or more training samples from the training data set, as well as correct information corresponding to each training sample; each training sample may be a first training sample or a second training sample.
[0172] Wherein, each first training sample includes third value information of at least one second characteristic parameter of each battery in the n batteries at multiple time points of L state segments when the battery is in a fault state, and each first training sample may include at least one third value information corresponding to at least one second characteristic parameter. The first training sample can be obtained by Figure 3 The specific method of obtaining the corresponding embodiment can refer to the above Figure 3 The descriptions in the corresponding embodiments are not repeated here.
[0173] Each second training sample includes fourth value information of at least one second characteristic parameter of each battery in the n batteries when it is in a normal state at multiple time points in L state segments. Each second training sample may include at least one fourth value information corresponding one-to-one to at least one second characteristic parameter. The meanings of "third value information", "fourth value information" and "second characteristic parameter" can be found in the above description and will not be repeated here.
[0174] The multiple second training samples may only include real second training samples, which include real fourth prediction information, and the simulated second training samples include simulated fourth prediction information. The real second training samples are collected during normal use of multiple batteries.
[0175] Optionally, the multiple second training samples also include simulated second training samples. The simulated second training samples can be obtained based on the first value information generated by the first machine learning model and the battery model. The method for obtaining the "simulated second training samples" is similar to the method for obtaining the "simulated fourth prediction information" in step 601. Please refer to the description in the above step 601 and will not be repeated here.
[0176] In an embodiment of the present application, since the simulated value information of the second characteristic parameter of the battery in a fault state is compared with the real value information of the second characteristic parameter of the battery in a normal state, the difference not only includes the difference between the value information of the battery in a fault state and a normal state, but also includes the difference between the simulated data and the real data of the battery. In the training process of the second neural network, adding the real value information of the second characteristic parameter of the battery in a fault state is beneficial to avoid the second neural network from learning the difference between the real data and the simulated data, but instead can learn the difference between the parameter information of the battery in the fault state and the parameter information in the normal state, which is beneficial to improving the accuracy of the prediction information output by the trained second neural network.
[0177] 604. Input the first training sample into the second neural network to obtain second prediction information output by the second neural network, where the second prediction information indicates a predicted state of the battery pointed to by the first training sample, where the predicted state of the battery includes whether the battery is in a normal state or in a faulty state.
[0178] In an embodiment of the present application, the second electronic device may input the training samples obtained in step 603 into the second neural network to obtain second prediction information output by the second neural network; wherein the training samples obtained in step 603 include the first sample, and the second prediction information indicates the predicted state of the battery pointed to by the input training samples (including the first training sample), and the predicted state of the battery includes whether the battery is in a normal state or in a faulty state. The detailed process of "processing the first training sample using the second neural network" will be described in subsequent embodiments and will not be repeated here.
[0179] Optionally, if the correct information corresponding to the second training sample also includes the fault type pointed to by the second training sample, the predicted state of the battery includes that the battery is in a normal state or that the battery is in a fault state of a certain fault type.
[0180] It should be noted that steps 601 and 602 are optional steps. If steps 601 and 602 are performed, the feature extraction network in the second neural network is a neural network that has been trained using the fifth loss function. If steps 601 and 602 are not performed, step 603 may be performed.
[0181] Optionally, before inputting the training samples into the second neural network, the second electronic device may also preprocess the training samples to obtain processed training samples; the second electronic device inputs the processed training samples into the second neural network to obtain second prediction information output by the second neural network.
[0182] Among them, each training sample may include at least one fourth value information (or third value information) corresponding one-to-one to at least one second characteristic parameter. The specific implementation method of the second electronic device preprocessing each fourth value information (or third value information) in the training sample is similar to the specific implementation method of preprocessing the fourth value information in the above step 601. Please refer to it for understanding and will not be repeated here.
[0183] 605. Train the second neural network based on the correct information corresponding to the first training sample, the second prediction information, and the fifth loss function, wherein the correct information indicates the correct state of the battery pointed to by the first training sample, and the fifth loss function indicates the similarity between the second prediction information and the correct information.
[0184] In an embodiment of the present application, after obtaining the second prediction information output by the second neural network, the second electronic device can generate a function value of the fifth loss function based on the correct information corresponding to the training sample (including the first training sample) obtained in step 603 and the second prediction information, and train the second neural network based on the function value of the fifth loss function.
[0185] The correct information corresponding to the training sample (including the first training sample) obtained in step 603 indicates the correct state of the battery indicated by the training sample, where the correct state of the battery includes the battery being in a normal state or the battery being in a faulty state. Optionally, the correct information corresponding to the second training sample also includes the fault type indicated by the second training sample, that is, the correct state of the battery includes the battery being in a normal state or the battery being in a faulty state of a certain fault type.
[0186] The fifth loss function indicates the similarity between the correct information corresponding to the input training sample and the second prediction information. The purpose of using the fifth loss function to train the second neural network includes improving the similarity between the second prediction information and the aforementioned correct information.
[0187] The second electronic device repeatedly executes steps 603 to 605 to iteratively train the second neural network according to the fifth loss function until the convergence condition of the fifth loss function is met, thereby obtaining a trained second neural network.
[0188] It should be noted that the embodiment of the present application does not limit the execution order between steps 601 to 602 and steps 603 to 605. Steps 601 to 602 may be executed first, and then steps 603 to 605; or steps 603 to 605 may be executed first, and then steps 601 to 602. Alternatively, since the first feature information and the second feature information can also be generated in step 604, steps 601 and 604 can be combined and executed. In step 605, the second electronic device can train the second neural network according to the fourth loss function and the fifth loss function.
[0189] In addition, the second electronic device and the first electronic device may be the same device or different devices, which is not limited in the embodiments of the present application.
[0190] For a more intuitive understanding of this solution, please refer to Figure 7 , Figure 7 A schematic diagram of a process for training a second neural network provided in an embodiment of the present application is provided. Figure 7 In the example, the feature processing network is represented as a classifier. The second electronic device inputs the real second training sample, the simulated second training sample, and the first training sample into the feature extraction network, respectively, to obtain multiple feature information generated by the feature extraction network. The multiple feature information includes first feature information, second feature information, and third feature information. The first feature information is obtained by extracting features from the real second training sample, the second feature information is obtained by extracting features from the simulated second training sample, and the third feature information is feature information of the first training sample.
[0191] The second electronic device inputs the first feature information, the second feature information and the third feature information into the classifier respectively, and obtains the second prediction information corresponding to the first feature information, the second prediction information corresponding to the second feature information and the second prediction information corresponding to the third feature information output by the second neural network.
[0192] The second electronic device trains the feature extraction network using a generative adversarial approach based on the first feature information, the second feature information, and the fourth loss function. The specific implementation of the aforementioned steps can be found in the description of step 601 and will not be repeated here. The second electronic device also trains the second neural network based on the fifth loss function. The specific implementation of the aforementioned steps can be found in the description of step 605 and will not be repeated here.
[0193] The second electronic device repeatedly performs the above steps to implement iterative training of the second neural network until the convergence conditions of the fourth loss function and the fifth loss function are met, thereby obtaining a trained second neural network. It should be understood that Figure 7 The examples are only for facilitating understanding of this solution and are not intended to limit this solution.
[0194] exist Figures 1 to 7 On the basis of the corresponding embodiment, in order to better implement the above solution of the embodiment of the present application, the following also provides related equipment for implementing the above solution. Figure 8 , Figure 8 This is a schematic diagram of a battery data processing device according to an embodiment of the present application. The battery data processing device 800 includes:
[0195] An acquisition module 801 is configured to acquire first value information of a first characteristic parameter of the battery, where the first value information indicates a value of the first characteristic parameter when the battery is in a normal state. The first characteristic parameter includes a characteristic parameter of the battery, and the value of the first characteristic parameter cannot be acquired during use of the battery.
[0196] A generating module 802 is configured to generate second value information of the first characteristic parameter of the battery based on first value information of the first characteristic parameter, wherein the second value information indicates a value of the first characteristic parameter when the battery is in a fault state;
[0197] The generation module 802 is also used to generate third value information of the second characteristic parameter when the battery is in a fault state based on the second value information of the first characteristic parameter, wherein the second characteristic parameter includes the characteristic parameter of the battery during use, and the value of the second characteristic parameter can be collected during the use of the battery.
[0198] In a possible design, the second characteristic parameter includes any one or more of the following: voltage, current, or temperature.
[0199] In one possible design, the acquisition module 801 is specifically used to input the first vector into the first machine learning model to obtain the first prediction information corresponding to the first vector output by the first machine learning model, wherein the first vector comes from the first distribution space, and the first prediction information includes the first value information of the first characteristic parameter.
[0200] In a possible design, the acquisition module 801 is specifically configured to generate first value information of the first characteristic parameter according to fourth value information of the second characteristic parameter when the battery is in a normal state.
[0201] In a possible design, the first characteristic parameter includes any one or more of the following: an initial state of charge of the battery, a battery capacity, an ohmic internal resistance of the battery, or a polarization internal resistance of the battery.
[0202] It should be noted that the information interaction, execution process, etc. between the modules / units in the battery data processing device 800 are the same as those in this application. Figures 3 to 5 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0203] See also Figure 9 , Figure 9 A schematic diagram of a structure of a training device for a machine learning model provided in an embodiment of the present application, wherein the training device 900 for a machine learning model includes:
[0204] An acquisition module 901 is configured to acquire a first training sample from a training data set, where the first training sample includes third value information of a second characteristic parameter of the battery, wherein the second characteristic parameter includes a characteristic parameter of the battery during use, and the value of the second characteristic parameter can be collected during the use of the battery, and the third value information includes the value of the second characteristic parameter when the battery is in a fault state;
[0205] A generating module 902 is configured to input the first training sample into a second machine learning model to obtain second prediction information output by the second machine learning model, where the second prediction information indicates a predicted state of the battery indicated by the first training sample, where the predicted state of the battery includes whether the battery is in a normal state or in a faulty state.
[0206] a training module 903, configured to train a second machine learning model based on correct information corresponding to the first training sample, second prediction information, and a loss function, wherein the correct information indicates a correct state of the battery indicated by the first training sample, and the loss function indicates a similarity between the second prediction information and the correct information, wherein the correct state of the battery includes the battery being in a normal state or the battery being in a faulty state;
[0207] Among them, the first training sample is obtained based on the second value information of the first characteristic parameter of the battery, the second value information of the first characteristic parameter is obtained based on the first value information of the first characteristic parameter, the first characteristic parameter includes the characteristic parameter of the battery, the value of the first characteristic parameter cannot be collected during the use of the battery, the first value information indicates the value of the first characteristic parameter when the battery is in a normal state, and the second value information indicates the value of the first characteristic parameter when the battery is in a fault state.
[0208] In one possible design, the first value information of the first characteristic parameter is obtained by prediction through a first machine learning model.
[0209] In one possible design, the training data set further includes a plurality of second training samples, each second training sample includes fourth value information of the second characteristic parameter of the battery, and the fourth value information includes a value of the second characteristic parameter of the battery in a normal state;
[0210] Among them, the multiple second training samples include real second training samples and simulated second training samples. The real second training samples are collected during normal use of the battery, and the simulated second training samples are obtained according to the first value information generated by the first machine learning model.
[0211] In one possible design, the second machine learning model includes a feature extraction network and a feature processing network, and the training objective of the feature extraction network further includes increasing the similarity between the first feature information and the second feature information;
[0212] The first feature information is obtained by extracting features from real fourth value information through a feature extraction network, and the second feature information is obtained by extracting features from simulated fourth value information through a feature extraction network, where the fourth value information includes a value of the second characteristic parameter of the battery in a normal state.
[0213] The actual fourth value information is collected when the battery is used in a normal state, and the simulated fourth value information is obtained based on the first value information of the first characteristic parameter generated by the first machine learning model.
[0214] It should be noted that the information interaction, execution process, etc. between the modules / units in the training device 900 of the machine learning model are the same as those in the present application. Figures 6 and 7 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0215] Next, we will introduce an electronic device provided by an embodiment of the present application. Figure 10 , Figure 10 This is a structural diagram of an electronic device provided in an embodiment of the present application. Specifically, the electronic device 1000 is implemented by one or more servers. The electronic device 1000 may have relatively large differences due to different configurations or performances. It may include one or more central processing units (CPU) 1022 (for example, one or more processors) and memory 1032, and one or more storage media 1030 (for example, one or more massive storage devices) for storing application programs 1042 or data 1044. Among them, the memory 1032 and the storage medium 1030 can be short-term storage or persistent storage. The program stored in the storage medium 1030 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the electronic device. Furthermore, the central processing unit 1022 can be configured to communicate with the storage medium 1030 to execute a series of instruction operations in the storage medium 1030 on the electronic device 1000.
[0216] The electronic device 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058, and / or one or more operating systems 1041, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0217] In one embodiment of the present application, the central processing unit 1022 is configured to execute Figures 3 to 5 In the method for processing battery data executed by the first electronic device in the corresponding embodiment, it should be noted that the specific manner in which the central processing unit 1022 executes the aforementioned steps is the same as that in the present application. Figures 3 to 5 The corresponding method embodiments are based on the same concept, and the technical effects they bring are the same as those in this application. Figures 3 to 5 The corresponding method embodiments are the same. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0218] In another embodiment, the CPU 1022 is configured to execute Figures 6 and 7 In the training method of the machine learning model executed by the second electronic device in the corresponding embodiment, it should be noted that the specific manner in which the central processor 1022 executes the aforementioned steps is the same as that in the present application. Figures 6 and 7 The corresponding method embodiments are based on the same concept, and the technical effects they bring are the same as those in this application. Figures 6 and 7 The corresponding method embodiments are the same. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0219] The present application also provides a computer-readable storage medium in which a program for signal processing is stored. When the program is run on a computer, the computer executes the above-mentioned Figures 3 to 5 The steps performed by the first electronic device in the method described in the embodiment shown, or the steps of making the computer perform the above Figures 6 and 7 The illustrated embodiment describes the steps performed by the second electronic device in the method.
[0220] The present application also provides a computer program product which, when executed on a computer, enables the computer to execute the aforementioned Figures 3 to 5 The steps performed by the first electronic device in the method described in the embodiment shown, or the steps of making the computer perform the above Figures 6 and 7 The illustrated embodiment describes the steps performed by the second electronic device in the method.
[0221] The first electronic device, the second electronic device, the battery data processing device or the machine learning model training device provided in the embodiment of the present application can be specifically a chip, which includes: a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit. The processing unit can execute the computer execution instructions stored in the storage unit to enable the chip to execute the above Figures 3 to 7 The battery data processing method and the machine learning model training method described in the illustrated embodiment. Optionally, the storage unit is a storage unit within the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), etc.
[0222] For details, please refer to Figure 11 , Figure 11 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be represented as a neural network processor NPU 110. NPU 110 is mounted on the host CPU as a coprocessor and is assigned tasks by the host CPU. The core of the NPU is the arithmetic circuit 110, which controls the arithmetic circuit 1103 through the controller 1104 to extract matrix data from the memory and perform multiplication operations.
[0223] In some implementations, the arithmetic circuit 1103 includes multiple processing units (PEs). In some implementations, the arithmetic circuit 1103 is a two-dimensional systolic array. The arithmetic circuit 1103 may also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1103 is a general-purpose matrix processor.
[0224] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 1102 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 1101 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 1108.
[0225] Unified memory 1106 is used to store input and output data. Weight data is directly transferred to weight memory 1102 through the Direct Memory Access Controller (DMAC) 1105. Input data is also transferred to unified memory 1106 through the DMAC.
[0226] BIU stands for Bus Interface Unit, i.e., bus interface unit 1110 , which is used for interaction between the AXI bus, DMAC, and instruction fetch buffer (IFB) 1109 .
[0227] The bus interface unit 1110 (BIU) is used for the instruction fetch memory 1109 to obtain instructions from the external memory, and is also used for the storage unit access controller 1105 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0228] DMAC is mainly used to move input data in the external memory DDR to the unified memory 1106 or to move weight data to the weight memory 1102 or to move input data to the input memory 1101.
[0229] The vector calculation unit 1107 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.
[0230] In some implementations, the vector calculation unit 1107 can store the processed output vector to the unified memory 1106. For example, the vector calculation unit 1107 can apply a linear function and / or a nonlinear function to the output of the operation circuit 1103, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values to generate an activation value. In some implementations, the vector calculation unit 1107 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1103, such as for use in subsequent layers in a neural network.
[0231] An instruction fetch buffer 1109 connected to the controller 1104 is used to store instructions used by the controller 1104;
[0232] Unified memory 1106, input memory 1101, weight memory 1102, and instruction fetch memory 1109 are all on-chip memories. External memories are private to the NPU hardware architecture.
[0233] In which, the operations of each layer in the neural network shown in the above embodiments can be performed by the operation circuit 1103 or the vector calculation unit 1107.
[0234] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above-mentioned first aspect method.
[0235] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0236] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0237] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0238] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A method for processing battery data, characterized in that: The method comprises: Obtaining first value information of a first characteristic parameter of the battery, where the first value information indicates a value of the first characteristic parameter when the battery is in a normal state, the first characteristic parameter including a characteristic parameter of the battery, and the value of the first characteristic parameter cannot be collected during use of the battery; generating, based on first value information of the first characteristic parameter, second value information of the first characteristic parameter of the battery, wherein the second value information indicates a value of the first characteristic parameter when the battery is in a fault state; Based on the second value information of the first characteristic parameter, third value information of the second characteristic parameter of the battery when it is in a fault state is generated, wherein the second characteristic parameter includes the characteristic parameter of the battery during use, and the value of the second characteristic parameter can be collected during the use of the battery.
2. The method according to claim 1, characterized in that The second characteristic parameter includes any one or more of the following: voltage, current or temperature.
3. The method according to claim 1 or 2, characterized in that The first value information of the first characteristic parameter is obtained by prediction through a first machine learning model.
4. The method according to claim 1 or 2, characterized in that The obtaining of first value information of a first characteristic parameter of the battery includes: The first value information of the first characteristic parameter is generated according to the fourth value information of the second characteristic parameter when the battery is in a normal state.
5. The method according to claim 1 or 2, characterized in that The first characteristic parameter includes any one or more of the following: the initial state of charge of the battery, the battery capacity, the ohmic internal resistance of the battery, or the polarization internal resistance of the battery.
6. A method for training a machine learning model, characterized in that: The method comprises: Obtaining a first training sample from a training data set, the first training sample including third value information of a second characteristic parameter of a battery, wherein the second characteristic parameter includes a characteristic parameter of the battery during use, the value of the second characteristic parameter can be collected during use of the battery, and the third value information includes a value of the second characteristic parameter when the battery is in a fault state; Inputting the first training sample into a second machine learning model to obtain second prediction information output by the second machine learning model, where the second prediction information indicates a predicted state of the battery indicated by the first training sample, where the predicted state of the battery includes whether the battery is in a normal state or a faulty state; Training the second machine learning model based on correct information corresponding to the first training sample, the second prediction information, and a loss function, wherein the correct information indicates a correct state of the battery indicated by the first training sample, and the loss function indicates a similarity between the second prediction information and the correct information, wherein the correct state of the battery includes the battery being in a normal state or the battery being in a faulty state; The first training sample is obtained based on the second value information of the first characteristic parameter of the battery, the second value information of the first characteristic parameter is obtained based on the first value information of the first characteristic parameter, the first characteristic parameter includes the characteristic parameter of the battery, the value of the first characteristic parameter cannot be collected during the use of the battery, the first value information indicates the value of the first characteristic parameter when the battery is in a normal state, and the second value information indicates the value of the first characteristic parameter when the battery is in a faulty state.
7. The method according to claim 6, characterized in that The first value information of the first characteristic parameter is obtained by prediction through a first machine learning model.
8. The method according to claim 7, characterized in that The training data set further includes a plurality of second training samples, each of the second training samples includes fourth value information of the second characteristic parameter of the battery, and the fourth value information includes the value of the second characteristic parameter of the battery in a normal state; Among them, the multiple second training samples include real second training samples and simulated second training samples, the real second training samples are collected during normal use of the battery, and the simulated second training samples are obtained according to the first value information generated by the first machine learning model.
9. The method according to claim 7, characterized in that The second machine learning model includes a feature extraction network and a feature processing network, and the training goal of the feature extraction network further includes narrowing the similarity between the first feature information and the second feature information; The first feature information is obtained by extracting features from real fourth value information through the feature extraction network, and the second feature information is obtained by extracting features from simulated fourth value information through the feature extraction network, and the fourth value information includes the value of the second feature parameter of the battery in a normal state; The real fourth value information is collected when the battery is used in a normal state, and the simulated fourth value information is obtained based on the first value information of the first characteristic parameter generated by the first machine learning model.
10. A battery data processing device, characterized in that: The device comprises: an acquisition module, configured to acquire first value information of a first characteristic parameter of the battery, where the first value information indicates a value of the first characteristic parameter when the battery is in a normal state, the first characteristic parameter including a characteristic parameter of the battery, and the value of the first characteristic parameter cannot be acquired during use of the battery; a generating module, configured to generate second value information of the first characteristic parameter of the battery based on first value information of the first characteristic parameter, wherein the second value information indicates a value of the first characteristic parameter when the battery is in a fault state; The generation module is further used to generate third value information of the second characteristic parameter of the battery when it is in a fault state based on the second value information of the first characteristic parameter, wherein the second characteristic parameter includes the characteristic parameter of the battery during use, and the value of the second characteristic parameter can be collected during the use of the battery.
11. The device according to claim 10, characterized in that The second characteristic parameter includes any one or more of the following: voltage, current or temperature.
12. The device according to claim 10 or 11, characterized in that The first value information of the first characteristic parameter is obtained by prediction through a first machine learning model.
13. The device according to claim 10 or 11, characterized in that The acquisition module is specifically configured to generate first value information of the first characteristic parameter according to fourth value information of the second characteristic parameter when the battery is in a normal state.
14. The device according to claim 10 or 11, characterized in that The first characteristic parameter includes any one or more of the following: the initial state of charge of the battery, the battery capacity, the ohmic internal resistance of the battery, or the polarization internal resistance of the battery.
15. A training device for a machine learning model, characterized in that: The device comprises: an acquisition module, configured to acquire a first training sample from a training data set, the first training sample including third value information of a second characteristic parameter of the battery, wherein the second characteristic parameter includes a characteristic parameter of the battery during use, the value of the second characteristic parameter can be collected during use of the battery, and the third value information includes the value of the second characteristic parameter when the battery is in a faulty state; a generating module, configured to input the first training sample into a second machine learning model to obtain second prediction information output by the second machine learning model, wherein the second prediction information indicates a predicted state of a battery indicated by the first training sample, the predicted state of the battery including whether the battery is in a normal state or in a faulty state; a training module, configured to train the second machine learning model based on correct information corresponding to the first training sample, the second prediction information, and a loss function, wherein the correct information indicates a correct state of the battery indicated by the first training sample, the loss function indicates a similarity between the second prediction information and the correct information, and the correct state of the battery includes the battery being in a normal state or the battery being in a faulty state; The first training sample is obtained based on the second value information of the first characteristic parameter of the battery, the second value information of the first characteristic parameter is obtained based on the first value information of the first characteristic parameter, the first characteristic parameter includes the characteristic parameter of the battery, the value of the first characteristic parameter cannot be collected during the use of the battery, the first value information indicates the value of the first characteristic parameter when the battery is in a normal state, and the second value information indicates the value of the first characteristic parameter when the battery is in a faulty state.
16. The device according to claim 15, characterized in that The first value information of the first characteristic parameter is obtained by prediction through a first machine learning model.
17. The device according to claim 16, characterized in that The training data set further includes a plurality of second training samples, each of the second training samples includes fourth value information of the second characteristic parameter of the battery, and the fourth value information includes the value of the second characteristic parameter of the battery in a normal state; Among them, the multiple second training samples include real second training samples and simulated second training samples, the real second training samples are collected during normal use of the battery, and the simulated second training samples are obtained according to the first value information generated by the first machine learning model.
18. The device according to claim 16, characterized in that The second machine learning model includes a feature extraction network and a feature processing network, and the training goal of the feature extraction network further includes narrowing the similarity between the first feature information and the second feature information; The first feature information is obtained by extracting features from real fourth value information through the feature extraction network, and the second feature information is obtained by extracting features from simulated fourth value information through the feature extraction network, and the fourth value information includes the value of the second feature parameter of the battery in a normal state; The real fourth value information is collected when the battery is used in a normal state, and the simulated fourth value information is obtained based on the first value information of the first characteristic parameter generated by the first machine learning model.
19. An electronic device, characterized in that: The electronic device is a first electronic device, and the first electronic device includes a processor and a memory, and the processor is coupled to the memory. The memory is used to store programs; The processor is configured to execute the program in the memory so that the first electronic device executes the method according to any one of claims 1 to 5.
20. An electronic device, characterized in that: The electronic device is a second electronic device, the second electronic device includes a processor and a memory, the processor is coupled to the memory, The memory is used to store programs; The processor is configured to execute the program in the memory so that the second electronic device executes the method according to any one of claims 6 to 9.
21. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, and when the program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 5, or the computer is caused to execute the method according to any one of claims 6 to 9.
22. A computer program product, characterized in that The computer program product includes a program, and when the program is run on a computer, causes the computer to perform the method according to any one of claims 1 to 5 , or causes the computer to perform the method according to any one of claims 6 to 9 .
Citation Information
Patent Citations
Storage battery fault diagnosis method and device based on fault injection deep learning
CN112946497A
Neural network training method, data processing method and related equipment
CN113159315A