Semantization-based battery fault diagnosis large language model algorithm and battery interaction management platform

Through the semantic-based large-language model algorithm, the real-time data of new energy vehicle batteries is processed and diagnosed, and the problem of poor dependence on fault data and small sample generalization capabilities in the existing technology is solved, and accurate fault detection and efficient battery management are achieved in the case of small samples.

CN120146101APending Publication Date: 2025-06-13ANHUI UNIV +1
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202510201442.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Existing battery fault diagnosis technology relies on high-quality and high-quantity fault data, and has poor generalization capabilities in small samples, high computing resources consumption, and poor interpretability.

Method used

The semantic-based large language model algorithm is adopted to clean and process the real-time data of new energy vehicle batteries, extract relevant statistical features, build a semantic propt and fine-tuning data set of battery fault diagnosis, fine-tuning the pre-trained large language model, deploy it on a cloud server, inference and diagnosis of real-time data, and establish a battery knowledge database and retrieval knowledge base, and build an intelligent analysis and interaction battery fault diagnosis platform.

Benefits of technology

It has good generalization and accurate fault detection capabilities in small samples, providing stronger fault interpretability and intelligent battery data management and maintenance capabilities, achieving efficient battery management, and enhancing the interpretability of large models for battery failure detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146101A_ABST
    Figure CN120146101A_ABST
Patent Text Reader

Abstract

The invention relates to a battery fault diagnosis large language model algorithm based on semantization and a battery interaction management platform. The algorithm comprises the following steps: cleaning and processing real-time data of a new energy automobile battery; carrying out the selection design of related statistical characteristics according to the real-time data of the new energy automobile battery; constructing battery fault diagnosis semantics and a fine tuning data set which are respectively used for instruction input and fine tuning training of the large language model; performing fine tuning on the pre-trained large language model to obtain a fine-tuned battery fault diagnosis large language model; deploying the fine-tuned battery fault diagnosis large language model and performing reasoning diagnosis on real-time data; and establishing a battery knowledge database, a retrieval knowledge base and an intelligent analysis and interaction battery fault diagnosis platform. Under the condition of small samples, by combining the functions of a large model, stronger fault interpretability and intelligent battery data management and maintenance capability are provided, and the method has the advantages of good generalization and accurate fault detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of battery fault diagnosis, and particularly to a large language model algorithm for battery fault diagnosis based on semanticization and a battery interaction management platform. Background Art

[0002] With the intensification of the global energy crisis and the improvement of environmental awareness, new energy vehicles have gradually become an important choice for addressing climate change and promoting green development, and have developed rapidly in recent years. Taking China as an example, from January to May 2024, the market penetration rate of new energy vehicles has reached 33.9%, and it further increased to 39.5% in May. At the same time, the export volume of new energy vehicles in China has also been increasing. From January to April 2024, the export volume reached 663,000 vehicles, a year-on-year increase of 27%. These figures demonstrate the strong growth of the new energy vehicle market. However, while new energy vehicles are developing rapidly, the safety issue of power batteries has become increasingly important. The power battery is the core part of a new energy vehicle, directly affecting the vehicle's endurance, service life, and safety. According to statistics, more than 60% of new energy vehicle fire accidents are caused by power battery failures. Once a battery fails, it may cause the vehicle to fail to start, abnormal charging, or even serious accidents such as explosions or fires, threatening the lives of drivers and passengers and may also have a negative impact on the industry.

[0003] Therefore, the power battery fault diagnosis technology is particularly important. The data-driven method for battery fault diagnosis has been widely used in new energy vehicles and other fields in recent years. Its main advantage is that it can quickly detect potential battery fault problems by analyzing a large amount of historical data, reducing the need for human intervention. However, the data-driven fault diagnosis method is highly dependent on data, and the quality and quantity of relevant fault data often affect the accuracy and generalization ability of the model. Secondly, the imbalance problem between normal data and various types of data also affects the trained model. In addition, the data-driven model has poor interpretability and consumes a large amount of computing resources.

[0004] The present invention proposes a battery fault diagnosis algorithm and system based on a large language model, which can reduce the high-quality and high-quantity requirements of traditional models for fault data, and has good generalization and accurate fault detection in the case of small samples. At the same time, an intelligent interaction management platform based on this system is designed and developed to achieve efficient management of the battery and enhance the interpretability of the detection results of the large model for battery faults. Summary of the Invention

[0005] In view of the deficiencies of the prior art, the present invention provides a semantic-based large language model algorithm for battery fault diagnosis and a battery interaction management platform, which solves the problem of the dependence of traditional models on high-quality and high-quantity fault data. In the case of small samples, the present invention provides stronger fault interpretability and intelligent battery data management and maintenance capabilities in combination with the functions of large models, has good generalization and accurate fault detection advantages, and at the same time designs and develops an intelligent interaction management platform based on this system to achieve efficient management of batteries and enhance the interpretability of the detection results of battery faults by large models.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: A semantic-based large language model algorithm for battery fault diagnosis, comprising the following steps:

[0007] S1. Clean and process the real-time data of new energy vehicle batteries;

[0008] S2. Select and design relevant statistical features for the real-time data of new energy vehicle batteries as the input for the training and inference of the LLM large language model;

[0009] S3. Construct a battery fault diagnosis semantic prompt and a fine-tuning data set for the input instructions and fine-tuning training of the large language model respectively;

[0010] S4. Fine-tune the pre-trained large language model to obtain a fine-tuned large language model for battery fault diagnosis;

[0011] S5. Deploy the fine-tuned large language model for battery fault diagnosis and perform inference diagnosis on real-time data;

[0012] S6. Establish a battery knowledge database and a retrieval knowledge base, and use the inference and generation capabilities of the large language model to establish an intelligent analysis and interactive battery fault diagnosis platform.

[0013] Further, in step S1, when cleaning and processing the real-time data of new energy vehicle batteries, specifically for the abnormal data outside the effective range and the default data, the spline interpolation method is used for data correction and filling.

[0014] Further, in step S2, when selecting and designing relevant statistical features for the real-time data of new energy vehicle batteries, the specific selection and design process includes the following steps:

[0015] S21. In the historical data, within the time interval Δt collected for a single vehicle, respectively extract the relevant statistical features of the battery cells, the relationship between adjacent battery cells, and the battery pack within the time interval Δt;

[0016] S22. For each battery cell, extract the mean and standard deviation of the voltage of each battery cell, extract the sum and mean and standard deviation of the voltages of all cells, and extract the maximum and minimum values of the voltages of all battery cells;

[0017] S23. For the relationship between adjacent battery cells, extract the mean and standard deviation of the voltage differences between adjacent battery cells, extract the mean and standard deviation of the voltage differences of all adjacent battery cells, and extract the maximum and minimum values of the voltage differences of all adjacent battery cell pairs;

[0018] S24. For the battery pack, extract the mean, standard deviation, maximum value, and minimum value of the total voltage, total current, and total resistance.

[0019] Further, in step S3, the input instructions for the large language model specifically include: The instruction structure follows the Alpaca format, and the specific structure consists of three parts: instruction, input, and output; among them, the instruction part contains a simple instruction description of the task objective; the input part contains battery-related supplementary information, including the connection method of battery cells, the number of battery cells, the charge and discharge state of the battery, the average speed of the vehicle, and the statistical characteristics of the above battery-related data; the output part is whether a fault occurs in the output answer of the large language model.

[0020] Further, in step S3, to construct a fine-tuning dataset, the specific process includes the following steps:

[0021] S31. Construct a normal dataset, and collect normal data segments within a specified time window interval size from multiple perspectives of different time periods, different vehicles, different charging states, and different vehicle mileage;

[0022] S32. Construct a fault dataset, select fault data segments within a specified time window interval size near the fault point. To increase the number of fault samples, various methods are adopted to increase the data: supplement data by sliding the time window, enhance data by adding Gaussian noise, and synthesize new data by mixing different fault data;

[0023] S33. Balance the proportion of the normal dataset and the fault dataset, and balance the proportion of data of different fault types. For the fine-tuning dataset constructed in the above steps, divide the training set and the test set according to a ratio of 8:2.

[0024] Further, in step S32, supplement data by sliding the time window, enhance data by adding Gaussian noise, and synthesize new data by mixing different fault data. The specific process includes the following steps:

[0025] S321. For the sliding time window method, when processing time series data, a fixed-size window is slid over the original data to generate new data points. Suppose the original data is X = {x 1 , x 2 , …, x n}, the size of the sliding window is w, and the step size is s. The new data points generated by the sliding window can be expressed as:

[0026] X new = {x 1 , x 2 , …, x m};

[0027] S52. Adding Gaussian noise method. If the original data is X = {x 1 , x 2 , …, x n}, enhanced data is generated by adding a Gaussian noise with a mean of 0 and a standard deviation of σ to each data point

[0028]

[0029] where N(0, σ²) is the Gaussian noise with a mean of 0 and a standard deviation of σ;

[0030] S53. Mixed data sample method. New data samples are generated by combining different fault data. If there are two sets of different fault data X 1 = {x 1 , x 2 , …, x n} and X 2 = {y 1 , y 2 , …, y n}, we can generate new data through weighted average

[0031]

[0032] where α ∈ [0, 1] is the mixing ratio, and this formula generates a synthetic sample that balances between the two sets of fault data.

[0033] Furthermore, perform LoRA fine-tuning training on the pre-trained large language model to obtain a fine-tuned large language model suitable for battery fault diagnosis, specifically including: The adjustment of the weight matrix W by LoRA can be expressed as:

[0034] W′ = W + ΔW = W + AB

[0035] Where ΔW = AB is the adaptive adjustment term we introduced, and A and B are low-rank matrices obtained through fine-tuning learning.

[0036] Furthermore, deploy the fine-tuned large language model for battery fault diagnosis and perform inference diagnosis on real-time data, specifically including: Deploy the fine-tuned large language model for battery fault diagnosis on a cloud server, and perform the deployment and inference of the large language model through vLLM and load balancing. The rules for real-time data inference are as follows. For the real-time data of the battery of a single new energy vehicle, the real-time data of the relationship between adjacent battery cells, and the real-time data of the battery pack, every period of time t, collect and infer once for the past period of time Δt.

[0037] Furthermore, in step S6, use RAG to construct a battery knowledge base and a retrieval knowledge base, and its specific process includes the following steps:

[0038] S61. Collection and preprocessing of battery materials. Collect multi-source battery materials, including papers, patents, technical documents, and industry reports, and preprocess them using methods such as format conversion, content extraction, and metadata annotation;

[0039] S62. Dynamically divide the processed documents into blocks, which can be divided into blocks according to document titles and chapter rules and retain an overlapping window of n tokens;

[0040] S63. Use an embedding model to convert the text into vectors, and then build an index with a FAISS vector database for efficient similarity retrieval. At the same time, synchronize the metadata to Elasticsearch to support hybrid queries;

[0041] S64. Re-rank the initially retrieved documents and pass the retrieved documents to the large language model for generating results.

[0042] Furthermore, the present invention also provides a battery interaction management platform, which specifically includes four parts: a user layer, a model service layer, a database layer, and a data support layer, where:

[0043] User layer: Used to support service access on the Web side and APP side, and support conversational access to the large model;

[0044] Model service layer: Based on the RAG retrieval-enhanced generation technology and the powerful Function Call function call ability of the large language model, build a function tool library for model calls and optimize the relevant function answers. The main optimizations support functions such as battery fault Q&A, data statistical analysis, historical data retrieval, fault detection, and proactive warning;

[0045] Database layer: Build a battery knowledge base based on vector databases, time series databases, and relational databases, and store real vehicle data and system data to support the model service layer and platform services;

[0046] Data support layer: mainly includes a data collection module and a data cleaning and preprocessing module.

[0047] By means of the above technical solutions, the present invention provides a large language model algorithm for battery fault diagnosis based on semanticization and a battery interaction management platform, which at least has the following beneficial effects:

[0048] A battery fault diagnosis algorithm and system based on a large model, and an intelligent interaction management platform based on this system, are helpful in solving the problem of fault diagnosis under small sample data in terms of fault diagnosis, providing stronger fault interpretability and intelligent battery data management and maintenance capabilities in combination with the functions of the large language model, having good generalization and accurate fault detection advantages. At the same time, design and develop an intelligent interaction management platform based on this system to achieve efficient management of the battery and enhance the interpretability of the detection results of the large model for battery faults. Description of the Drawings

[0049] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:

[0050] Figure 1 It is a schematic diagram of the overall block diagram of the solution provided by the embodiment of the present invention;

[0051] Figure 2 It is a schematic diagram of the fine-tuning method flow for making the large model applicable to battery fault diagnosis provided by the embodiment of the present invention;

[0052] Figure 3 It is a schematic diagram of the battery fault diagnosis process based on the fine-tuned large model provided by the embodiment of the present invention;

[0053] Figure 4 It is a schematic diagram of a battery management platform and application for intelligent analysis and interaction based on the large model provided by the embodiment of the present invention. Detailed Embodiments

[0054] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments. Thereby, a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects can be obtained and implemented accordingly.

[0055] Those of ordinary skill in the art can understand that all or part of the steps in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0056] Please refer to Figures 1-4 , which shows a specific implementation manner of this embodiment. This embodiment helps to solve the problem of fault diagnosis under small-sample data in terms of fault diagnosis, provides stronger fault interpretability and intelligent battery data management and maintenance capabilities in combination with the functions of a large language model, has the advantages of good generalization and accurate fault detection, and at the same time designs and develops an intelligent interaction management platform based on this system to achieve efficient management of the battery and enhance the interpretability of the large model for battery fault detection results.

[0057] Please refer to Figure 1 , this embodiment proposes a large language model algorithm for battery fault diagnosis based on semanticization. The method includes the following steps:

[0058] S1. Clean and process the real-time data of new energy vehicle batteries;

[0059] As a preferred implementation manner of step S1, in step S1, when cleaning and processing the real-time data of new energy vehicle batteries, specifically for abnormal data outside the effective range and default, spline interpolation is used for data correction and filling.

[0060] S2. Select and design relevant statistical features for the real-time data of new energy vehicle batteries as the input for the training and inference of the LLM large language model;

[0061] As a preferred implementation manner of step S2, in step S2, when selecting and designing relevant statistical features for the real-time data of new energy vehicle batteries, the specific process of selection and design includes the following steps:

[0062] S21. In the historical data, within the time interval Δt collected for a single vehicle, respectively extract the relevant statistical features of the battery cells, the relationship between adjacent battery cells, and the battery pack within the time interval Δt;

[0063] S22. For the battery cells, extract the mean and standard deviation of the voltage of each battery cell, extract the sum of the voltages of all cells and the mean and standard deviation, and extract the maximum and minimum values of the voltages of all battery cells;

[0064] S23. For the relationship between adjacent battery cells, extract the mean and standard deviation of the voltage differences between adjacent battery cells, extract the mean and standard deviation of the voltage differences of all adjacent battery cells, and extract the maximum and minimum values of the voltage differences of all adjacent battery pairs;

[0065] S24. For the battery pack, extract the mean, standard deviation, maximum, and minimum values of the total voltage, total current, and total resistance.

[0066] S3. Construct a battery fault diagnosis semantic prompt and a fine-tuning dataset for the input instructions and fine-tuning training of the large language model respectively;

[0067] As a preferred implementation of step S3, in step S3, the input instructions for the large language model specifically include: the instruction structure follows the Alpaca format, and the specific structure consists of three parts: instruction, input, and output; among them, the instruction part contains a simple instruction description of the task objective; the input part contains battery-related supplementary information, including the connection method of battery cells, the number of battery cells, the charge and discharge state of the battery, the average speed of the vehicle, and the statistical characteristics of the above battery-related data; the output part is whether a fault occurs in the output answer of the large language model.

[0068] In this embodiment, an example of the prompt structure for battery fault diagnosis semanticization is given in the following table:

[0069]

[0070]

[0071] More specifically, in step S3, to construct the fine-tuning dataset, the specific process includes the following steps:

[0072] S31. Construct a normal dataset, and collect normal data segments within a specified time window interval size from multiple perspectives of different time periods, different vehicles, different charging states, and different vehicle mileage;

[0073] S32. Construct a fault dataset, select fault data segments within a specified time window interval size near the fault point, and to increase the number of fault samples, adopt multiple methods to increase data: supplement data by sliding the time window, enhance data by adding Gaussian noise, and synthesize new data by mixing different fault data;

[0074] More specifically, supplement data by sliding the time window, enhance data by adding Gaussian noise, and synthesize new data by mixing different fault data. The specific process includes the following steps:

[0075] S321. For the sliding time window method, when processing time series data, by sliding a window of a fixed size over the original data to generate new data points, this is very effective for time series data (such as battery data) and can expand the scale of the training set. Assume the original data is X = {x 1 , x 2 , …, x n}. If the size of the sliding window is w and the step size is s, the new data points generated by the sliding window can be expressed as:

[0076] X new = {x 1 , x 2 , …, x m};

[0077] S52. Adding Gaussian noise method. Adding noise to the original data is a common data augmentation technique, especially suitable for enhancing the robustness of the model. If the original data is X = {x 1 , x 2 , …, x n}, the augmented data is generated by adding a Gaussian noise with a mean of 0 and a standard deviation of σ to each data point

[0078]

[0079] where N(0, σ2) is the Gaussian noise with a mean of 0 and a standard deviation of σ;

[0080] S53. Mixing data samples method. By combining different fault data to generate new data samples. If there are two sets of different fault data X 1 = {x 1 , x 2 , …, x n} and X 2 = {y 1 , y 2 , …, y n}, we can generate new data through weighted average

[0081]

[0082] where α ∈ [0, 1] is the mixing ratio. This formula generates a synthetic sample that balances between the two sets of fault data and can help the model learn more complex fault patterns;

[0083] S33. Balance the ratio of the normal data set and the fault data set, and balance the ratio of data of different fault types. For the fine-tuning data set constructed in the above steps, divide the training set and the test set according to the ratio of 8:2.

[0084] S4. Fine-tune the pre-trained large language model to obtain a fine-tuned large language model for battery fault diagnosis;

[0085] As a preferred implementation of step S4, perform LoRA fine-tuning training on the pre-trained large language model to obtain a fine-tuned large language model suitable for battery fault diagnosis, which specifically includes: LoRA (Low-Rank Adaptation) is a method for efficiently fine-tuning pre-trained language models. It reduces computational costs and memory usage by introducing low-rank matrix factorization on network weights, making the fine-tuning of large-scale models more efficient. The core idea of LoRA is to perform fine-tuning only in the low-rank subspace, avoiding directly modifying the weights of the original model. Instead, an additional small matrix is used to learn adaptive adjustments. The adjustment of the weight matrix W by LoRA can be expressed as:

[0086] W′ = W + ΔW = W + AB

[0087] In the formula, ΔW = AB is the adaptive adjustment term we introduced, and A and B are low-rank matrices obtained through fine-tuning learning.

[0088] In this embodiment, the LoRA fine-tuning process is specifically as follows:

[0089] Step 1, load the pre-trained general large model and the fine-tuning instruction dataset in Alpaca format;

[0090] Step 2, data formatting. The formatted data is used for the training input of the model;

[0091] Step 3, define the LoRA parameters and the parameters for model training;

[0092] Step 4, training and evaluation. Perform fine-tuning through the Trainer, optimize the low-rank matrix, and conduct evaluation;

[0093] Step 5, save the model and verify the fine-tuned model.

[0094] S5. Deploy the fine-tuned large language model for battery fault diagnosis and perform inference diagnosis on real-time data;

[0095] As a preferred implementation of step S5, the fine-tuned large language model for battery fault diagnosis is deployed and reasoning diagnosis is performed on real-time data, specifically including: deploying the fine-tuned large language model for battery fault diagnosis on a cloud server. For better generation speed, reasoning speed, and support for RESTful API (a design style of Web service interfaces based on the HTTP protocol), the large language model is deployed and reasoned through vLLM and load balancing. The rules for real-time data reasoning are as follows. For the real-time data of the battery of a single new energy vehicle, the real-time data of the relationship between adjacent battery cells, and the real-time data of the battery pack, every period of time t, the data collected in the past period of time Δt is collected and reasoned once.

[0096] In this embodiment, in terms of deployment, based on the above-obtained large language model applicable to battery fault diagnosis, for a single model, the vLLM framework is used to deploy and reason on a single machine with multiple cards, and an accessible Restful API is opened to upper-layer applications; for higher access and reasoning requirements, multiple large models are deployed in a cluster, and an interface is opened to upper-layer applications using load balancing.

[0097] In terms of fault diagnosis reasoning, reasoning is performed based on the following rules: The vehicle collects data every 10s, and reasons about the data collected in the past two hours every 30 minutes to determine whether a fault has occurred. The specific steps are as follows:

[0098] Step 1, collect data and perform data cleaning, and store the original data and the cleaned data in the database respectively;

[0099] Step 2, when reasoning, extract features from the data in the past two hours and construct a prompt;

[0100] Step 3, input the prompt into the model to obtain the result.

[0101] S6. Establish a battery knowledge database and a retrieval knowledge base, and use the reasoning and generation capabilities of the large language model to establish an intelligent analysis and interactive battery fault diagnosis platform:

[0102] As a preferred implementation of step S6, in step S6, RAG is used to construct a battery knowledge base and a retrieval knowledge base, and its specific process includes the following steps:

[0103] S61. Collection and preprocessing of battery materials, collect multi-source battery materials, including papers, patents, technical documents, and industry reports, and preprocess them using methods such as format conversion, content extraction, and metadata annotation;

[0104] S62. Dynamically divide the processed documents into blocks, which can be divided into blocks according to rules such as document titles and chapters, and retain an overlapping window of n tokens;

[0105] S63. Use the embedding model to convert text into vectors, then build an index with the FAISS vector database for efficient similarity retrieval, and synchronize the metadata to Elasticsearch to support hybrid queries;

[0106] S64. Re-rank the initially retrieved documents and pass the retrieved documents to the large language model for result generation.

[0107] In this embodiment, first, build a battery knowledge base for power batteries, especially related to fault diagnosis. This knowledge base will integrate professional knowledge in fields such as battery performance, fault modes, fault causes, and diagnostic methods. Through the RAG (Retrieval-Augmented Generation) technology, the system can efficiently support fast knowledge retrieval, fault mode explanation, and diagnosis. This knowledge base will be associated with historical data to support in-depth analysis of the battery operating status and historical faults.

[0108] Second, combine the powerful generation, reasoning, and function call capabilities of the large language model (LLM) to build an intelligent analysis and interaction platform. This platform will have a conversational intelligent question-and-answer function. Users can query the battery fault causes, solutions, or relevant data through natural language. At the same time, the platform supports intelligent reasoning and returns a fault analysis report based on the input fault information. The support for historical data retrieval function can quickly analyze the user's needs through natural language dialogue with AI, helping users quickly find relevant battery status or fault history records. The support for statistical analysis function can obtain statistical analysis of the battery operation data through dialogue. The support for fault detection and early warning can perform intelligent proactive warning through the reasoning results of the fault detection large model and the analysis of historical data. Through such a system design, the platform can achieve automatic diagnosis, explanation, and intelligent response to battery faults, improving the efficiency and intelligent level of battery management.

[0109] Second, this application also provides a battery interaction management platform, which specifically includes four parts: a user layer, a model service layer, a database layer, and a data support layer, where:

[0110] User layer: Used to support service access on the Web side and APP side, and support conversational access to the large model;

[0111] Model service layer: Based on the RAG retrieval-enhanced generation technology and the powerful Function Call function call ability of the large language model, build a function tool library for model calls and optimize the relevant function answers. Mainly optimize the support for battery fault Q&A, data statistical analysis, historical data retrieval, fault detection, and proactive warning functions; borrow the ability of the large model to enhance the interpretability of system results;

[0112] Database layer: Build a battery knowledge base based on vector databases, time series databases, and relational databases, and store real vehicle data and system data to support the model service layer and platform services;

[0113] Data support layer: mainly includes a data collection module and a data cleaning and preprocessing module.

[0114] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0115] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or in combination with these instruction execution systems, apparatus, or devices.

[0116] The above embodiments have introduced the present invention in detail. Specific examples are used herein to elaborate on the principles and embodiments of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A semantic-based large language model algorithm for battery fault diagnosis, characterized in that: The following steps are involved: S1. Clean and process the real-time data of new energy vehicle batteries; S2. Select and design relevant statistical features for real-time data of new energy vehicle batteries as input for LLM large language model training and reasoning; S3, constructing battery fault diagnosis semantic prompt and fine-tuning datasets for input instructions and fine-tuning training of large language models respectively; S4. Fine-tune the pre-trained large language model to obtain a fine-tuned large language model for battery fault diagnosis; S5. Deploy the fine-tuned large language model for battery fault diagnosis and perform reasoning diagnosis on real-time data; S6. Establish a battery knowledge database and retrieval knowledge base, and use the reasoning and generation capabilities of large language models to establish an intelligent analysis and interactive battery fault diagnosis platform.

2. According to claim 1, a semantic-based large language model algorithm for battery fault diagnosis is characterized by: In step S1, the real-time data of the new energy vehicle battery is cleaned and processed, and the spline interpolation method is used to correct and fill the abnormal data outside the effective range and the default data.

3. The semantic-based large language model algorithm for battery fault diagnosis according to claim 1 is characterized by: In step S2, the relevant statistical features are selected and designed for the real-time data of the new energy vehicle battery. The specific selection and design process includes the following steps: S21. In the historical data, for a time interval Δt collected from a single vehicle, extract the relevant statistical features of the battery cells, the relationship between adjacent battery cells, and the battery pack within the time interval Δt; S22, for each battery cell, extract the mean and standard deviation of the voltage of each battery cell, extract the mean and standard deviation of the voltage of all cells, and extract the maximum and minimum values ​​of the voltage of all battery cells; S23, for the relationship between adjacent battery cells, extract the mean and standard deviation of the voltage difference between adjacent battery cells, extract the mean and standard deviation of the voltage difference between all adjacent battery cells, and extract the maximum and minimum values ​​of the voltage difference between all adjacent battery pairs; S24. For the battery pack, extract the mean, standard deviation, maximum value, and minimum value of the total voltage, total current, and total resistance.

4. The semantic-based large language model algorithm for battery fault diagnosis according to claim 1 is characterized by: In step S3, the input instructions for the large language model specifically include: the instruction structure follows the Alpaca format, and the specific structure consists of three parts: instruction, input, and output; wherein the instruction part contains a simple instruction description of the task objective; the input part contains battery-related supplementary information, including the connection method of the battery cells, the number of battery cells, the battery charging and discharging status, the average speed of the car, and the statistical characteristics of the above battery-related data; the output part is the output answer of the large language model whether a fault has occurred.

5. The semantic-based large language model algorithm for battery fault diagnosis according to claim 1 is characterized by: In step S3, a fine-tuning dataset is constructed. The specific process includes the following steps: S31, construct a normal data set, and collect normal data fragments within a specified time window interval size from multiple angles of different time periods, different vehicles, different charging states, and different vehicle mileage; S32, construct a fault data set, select fault data fragments within a specified time window interval size near the fault point, and adopt multiple methods to increase data in order to increase fault samples: supplement data by sliding time windows, enhance data by adding Gaussian noise, and synthesize new data by mixing different fault data; S33. Balance the ratio of the normal data set and the fault data set, and balance the data ratio of different fault types. For the fine-tuning data set constructed in the above steps, divide the training set and the test set into a ratio of 8:

2.

6. The semantic-based large language model algorithm for battery fault diagnosis according to claim 5 is characterized by: In step S32, data is supplemented by sliding the time window, data is enhanced by adding Gaussian noise, and new data is synthesized by mixing different fault data. The specific process includes the following steps: S321. For the sliding time window method, when processing time series data, a new data point is generated by sliding a fixed-size window on the original data. Assume that the original data is X = {x1, x2, ..., x n }, the size of the sliding window is w, the step size is s, and the new data points generated by the sliding window can be expressed as: X new ={x1,x2,…,x m }; S52, add Gaussian noise method, if the original data is X = {x1, x2, ..., x n }, the augmented data is generated by adding a Gaussian noise with a mean of 0 and a standard deviation of σ to each data point Where N(0,σ2) is Gaussian noise with mean 0 and standard deviation σ; S53, mixed data sample method, by combining different fault data to generate new data samples, if there are two different sets of fault data X1 = {x1, x2, ..., x n } and X2={y1,y2,…,y n }, we can generate new data by weighted average Where α∈[0,1] is the mixing ratio, and the formula generates a synthetic sample that is balanced between the two sets of fault data.

7. The semantic-based large language model algorithm for battery fault diagnosis according to claim 1 is characterized by: The pre-trained large language model is fine-tuned by LoRA to obtain a fine-tuned large language model suitable for battery fault diagnosis, including: LoRA adjustment of the weight matrix W can be expressed as: W'=W+ΔW=W+AB Where ΔW=AB is the adaptive adjustment term we introduced, and A and B are low-rank matrices obtained through fine-tuning learning.

8. The semantic-based large language model algorithm for battery fault diagnosis according to claim 1 is characterized by: The fine-tuned large language model for battery fault diagnosis is deployed and reasoning diagnosis is performed on real-time data, specifically including: deploying the fine-tuned large language model for battery fault diagnosis on a cloud server, deploying and reasoning the large language model through vLLM and load balancing, and the rules for real-time data reasoning are as follows: for the real-time battery data of a single new energy vehicle, the real-time data of the relationship between adjacent battery cells, and the real-time data of the battery pack, every time interval t, collect and reason once for a period of time Δt in the past.

9. The semantic-based large language model algorithm for battery fault diagnosis according to claim 1 is characterized by: In step S6, RAG is used to construct a battery knowledge base and a retrieval knowledge base, and the specific process includes the following steps: S61. Collection and preprocessing of battery data: Collect multi-source battery data, including papers, patents, technical documents, and industry reports, and preprocess them using format conversion, content extraction, and metadata annotation methods; S62, dynamically dividing the processed document into blocks, and dividing the blocks into blocks according to document titles and chapters, and retaining overlapping windows of n tokens; S63, use the embedding model to convert text into vectors, then use the FAISS vector database to build an index for efficient similarity retrieval, and synchronize metadata to Elasticsearch to support hybrid queries; S64: Re-rank the initially retrieved documents, and pass the retrieved documents to the large language model for generating results.

10. A battery interaction management platform, characterized in that: The platform specifically includes four parts: user layer, model service layer, database layer, and data support layer, among which: User layer: used to support service access on the Web and APP sides, and support conversational access to large models; Model service layer: Based on RAG retrieval enhancement generation technology and the powerful Function Call function calling capability of the large language model, a function tool library is built for model calling, and relevant function answers are optimized, mainly to support battery fault Q&A, data statistical analysis, historical data retrieval, fault detection, and active warning functions; Database layer: Build a battery knowledge base based on vector database, time series database, and relational database, store real vehicle data and system data, and support the model service layer and platform services; Data support layer: mainly includes data acquisition module and data cleaning and preprocessing module.

Citation Information

Cited By

  • Thermal runaway prediction method and device of power battery, storage medium and electronic equipment

    CN121276357A

  • Large model intelligent operation and maintenance method and system oriented to energy storage cluster time sequence understanding

    CN121329390A

  • Large model intelligent operation and maintenance method and system for energy storage cluster time sequence understanding

    CN121329390B

  • Power battery online safety detection system, method and equipment based on digital twinning and medium

    CN121432217A

  • Digital-twin-based power battery online safety detection system, method, device and medium

    CN121432217B