Real vehicle battery pack fault segment detection method oriented to sample distribution imbalance
By constructing a graph model using the GraphSAGE neural network and employing an ensemble learning strategy, the problem of sample imbalance in lithium-ion battery fault detection is solved, achieving high-precision and robust fault detection. It can automatically extract deep information from the battery system, improving the accuracy and interpretability of fault detection.
Patent Information
- Application Number
- CN202510894119.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-11-07
AI Technical Summary
Existing technologies suffer from sample distribution imbalance when dealing with lithium-ion battery fault detection, causing the model to favor normal samples, misclassify or miss fault segments, and lack accuracy and robustness in fault detection.
A graph model is constructed using a GraphSAGE neural network. The coupling relationship of the battery system is described by a spatiotemporal adjacency matrix and node vectors. A weak learner is developed by combining the Bagging algorithm for random sampling. A strong learner is then formed by integrating the weak learners through an arithmetic averaging strategy. This automatically extracts deep information to detect fault segments.
It improves the accuracy and comprehensiveness of fault detection, enhances the robustness and automation level of the model, can accurately identify the fault risks of battery systems, and overcomes the low accuracy problem caused by sample imbalance.
Smart Images

Figure CN120908666A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of lithium ion battery fault diagnosis, and particularly relates to a sample distribution imbalance-oriented real vehicle battery pack fault segment detection method. BACKGROUND
[0002] In recent years, thermal runaway accidents of high specific energy lithium ion battery systems occur frequently. Although the design and manufacturing technology of the battery is continuously improved, most of the accident causes are still traced back to the problem of the battery itself. Extreme working conditions, such as electricity, heat and mechanical abuse, can accelerate the evolution of the internal structure of the battery, causing rapid rise of the temperature and pressure inside the battery, and then inducing battery safety failure. Severe failure can lead to the occurrence of battery thermal runaway. Accurate detection of battery failure helps to improve the safety and reliability of the battery system.
[0003] At present, in the process of battery fault detection, there is an unbalanced distribution in the battery data set. The number of normal segments far exceeds that of fault segments. This imbalance makes the model deviate to normal samples in the training process, leading to misclassification or missed detection of fault segments, and low accuracy of isolating fault vehicles. SUMMARY
[0004] In view of the problems and defects described in the prior art, the application provides a sample distribution imbalance-oriented real vehicle battery pack fault segment detection method, which can solve the problems of no abnormal signal representation before battery pack thermal runaway and unbalanced samples of fault segments and normal segments, timely discover potential thermal runaway risk and battery pack failure risk, and provide theoretical guidance for safe and stable operation of the battery system.
[0005] To this end, the application adopts the following technical scheme: on the one hand, the application provides a sample distribution imbalance-oriented real vehicle battery pack fault segment detection method, which comprises: Step 1: graph construction, the coupling relationship between physical quantities is determined, and a graph is constructed for each charging and discharging segment of each battery pack. Each graph contains a spatiotemporal adjacency matrix and a node vector; Step 2: learner modeling and training, the original data set is divided into four subsets, and a GraphSAGE model is developed as a weak learner. The spatiotemporal adjacency matrix and the node vector are used as input, and the advantages of the GraphSAGE neural network in processing non-fixed nodes and its powerful ability to automatically extract deep information reflecting the safety state of the battery are utilized; Step 3: integrated fault detection, arithmetic mean is used as an integration strategy, the outputs of the four weak learners are integrated, thereby forming a strong learner. This enhances the robustness of the model in solving classification problems under class imbalance conditions. The trained integrated GraphSAGE model is used to detect fault segments in the test set.
[0006] On the basis of the above technical scheme, the graph construction of step 1 clearly defines the coupling relationship between physical quantities and constructs a graph for each charging and discharging section of each battery pack. Each graph contains a space-time adjacency matrix and a node vector, and the method is as follows: All battery voltages, temperatures, module currents, and module SOCs of a specific charging or discharging section are connected to form an undirected graph.
[0007] Based on the relationship in the graph, the space-time adjacency matrix is defined as N , where N m + n +2). A Each element in the matrix can be represented by equation (1).
[0008] ; The time series data of physical quantities in a certain section are compressed into one hundred points. Each node contains one hundred data points and is defined as a node vector. Sections with less than one hundred sampling points will be excluded. Finally, the space-time adjacency matrix A and node vector obtained from the collected data of a certain section of the battery system are input into the GraphSAGE network.
[0009] On the basis of the above technical scheme, the learner modeling and training of step 2 divides the original data set into four subsets and develops a GraphSAGE model as a weak learner. The space-time adjacency matrix and node vector are input, and the GraphSAGE neural network is used to take advantage of its ability to handle fixed nodes and its powerful ability to automatically extract deep information reflecting the safety state of the battery. The method is as follows: An improved data sampling method based on Bagging algorithm random sampling is proposed. Specifically, random sampling without replacement is performed on normal sections in the training set, and all fault sections in the training set are attached to each training subset. Assume that the training set contains S samples, of which S 1 is a normal section, S 2 is a fault section, and the ensemble learning model is composed of n weak learners L j ( j =1, 2, … n ). The sampling steps are as follows: (1) For normal sections, a random sampling method without replacement is used to generate n training subsets. The number of normal samples in each weak learner training set is M norm : ; in This indicates rounding down to the nearest integer.
[0010] (2) Add S2 fault segments to the training subset of each weak learner. The number of fault samples in each weak learner's training subset... M abnorm and total sample size M all They are respectively: ; ; Based on the above technical solution, in step 3, fault detection is integrated using an arithmetic mean as the ensemble strategy, combining the outputs of the four weak learners to form a strong learner. This enhances the model's robustness in solving classification problems under class imbalance conditions. The trained ensemble GraphSAGE model is then used to detect fault segments in the test set, and the method is as follows: (1) Graph construction: As described in step (1), define the graph. G = ( V , E ),in V = { v 1, v 2, ..., v N} represents the diagram N 1 node E Represents an edge. (This is used to define a graph.) G Nodes in v For example, assuming it is the central node, the nodes directly connected to this central node are called nodes. v First-order neighbors, and nodes connected to first-order neighbors are nodes. v The second-order neighbors, and so on. The central node can be counted. v of K Neighbors.
[0011] (2) Forward Propagation of GraphSAGE: This process mainly consists of three steps. First, random sampling is performed on the neighboring nodes of each node in the graph; second, the information contained in the neighboring nodes is aggregated using an aggregation function; finally, the embeddings of all nodes in the graph are input into a fully connected (dense) layer to obtain the graph's labels. For the aggregation operation, the nodes... v In the ( k -1) Layer neighbor node embedding generates the first k This is an aggregate representation of these neighboring nodes. Then, the nodes... v In the (k -1) The embedding of the layer represents concatenation and the calculation of nodes by a nonlinear transformation v In the first k The embedding of the layer, as shown in equations (5)-(6): ; ; where, Aggregate represents the aggregation function of the sampled neighbor node embedding, N ( v ) is the set of sampled neighbor nodes of node v , σ is the activation function, W is the weight matrix, Concat represents the concatenation operation of the neighbor embedding and the embedding of node v itself. Finally, Readout The function combines the final embedding representation of all nodes into a global representation of the graph and inputs a fully connected layer to obtain the output probability, as shown in equation (7): ; (3) Backpropagation of GraphSAGE: In this study, GraphSAGE adopts supervised learning. Cross-entropy is used as the loss function for the fault detection classification task.
[0012] The structure of each weak learner is composed of 3-layer GraphSAGE neural network, Maxpooling (Readout function) and fully connected layer. The network gradually extracts and transforms effective information from the input graph. The fully connected layer at the end of the network integrates the features learned by GraphSAGE through Maxpooling and outputs the fault probability of the segment. In the whole process, without manually extracting the features of the battery system segment data, GraphSAGE will automatically learn the internal patterns and coupling relationships of voltage, current, temperature and SOC nodes.
[0013] The invention re-explores the mathematical model between the fault information hidden in the physical signal and the physical signal under actual working conditions, overcoming the limitations of existing battery theoretical models in low-frequency and low-precision data collection in practical applications. Finally, the four weak learners are fused into a strong learner through an average strategy, as shown in equation (8): ; where, n represents the number of weak learners, and is the output probability of the i th weak learner, x represents the input adjacency matrix and node vector matrix, Ha failure probability of the battery system represented by the segment outputted by the integrated model.
[0014] In another aspect, the present application also provides an electronic device comprising a memory and a processor, the memory being configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a sample distribution imbalance-oriented real vehicle battery pack failure segment detection method as described above.
[0015] The present application has the following beneficial technical effects: The present application can provide an effective solution to the problem of no abnormal signal representation before thermal runaway of the battery pack and the problem of imbalance between failure segments and abnormal segment samples. By converting the time series data of physical quantities of the battery system into a space-time graph, the potential correlation and dynamic evolution between physical quantities can be effectively described, the failure of the physical quantity deviating from the normal coupling relationship can be detected, and the hidden failure information can be mined from the data, thereby improving the accuracy and comprehensiveness of the failure detection. The proposed integrated GraphSAGE model automatically extracts deep features based on node adjacency relationships, avoiding the limitations of manual feature extraction and the constraints of existing rules, and significantly improving the automation level and accuracy of failure detection. At the same time, the model can explicitly output the failure risk probability of the battery system and quantitatively refine the safety state, thereby enhancing the explainability and practicality of the system. The introduced ensemble learning mechanism effectively solves the problem of low accuracy caused by the imbalance between failure segments and normal segments, overcomes the performance limitations of a single model by integrating multiple sub-models, and improves the robustness and generalization ability of the model. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 a flowchart of the method of the present application; Figure 2 an input graph of an embodiment of the present application; Figure 3 an adjacency matrix of the input graph of an embodiment of the present application; Figure 4 main steps of GraphSAGE of an embodiment of the present application; Figure 5 a weak learner structure of an embodiment of the present application; Figure 6 loss curves of four training subsets and a test set in four weak learners of an embodiment of the present application; Figure 7 changes in the accuracy of the training set during the training process of the four weak learners, changes in the accuracy of the test set after the application of the ensemble strategy, and changes in the recall rate of the failure segment of an embodiment of the present application; Figure 8 the final detection result of the test set of an embodiment of the present application. DETAILED DESCRIPTION
[0017] The application will be described in further detail below with reference to the accompanying drawings and specific embodiments.
[0018] As Figure 1 shown, it is a kind of sample distribution imbalance-oriented real vehicle battery pack fault fragment detection method flow chart, according to the following steps: Step 1: graph construction, clear the coupling relationship between physical quantities, and construct a graph for each battery pack for each charge and discharge section.Each graph contains a space-time adjacency matrix and node vector, and the method is as follows: Connect all battery voltages, temperatures, module currents and module SOC of a specific charging or discharging section to form a graph as Figure 2 shown.
[0019] In the graph, SOC (State of Charge) represents the state of charge of battery module, SOC 1、 SOC 2 and SOC 100 represent the 1st value, the 2nd value and the 100th value of the compressed SOC sequence respectively. I represents the battery module current, i 1、 i 2 and i 100 represent the 1st value, the 2nd value and the 100th value of the compressed current sequence respectively. U represents the battery cell voltage, U 1、 U 2 and U n represent the compressed voltage sequence of No.1 cell, No.2 cell and n No.100 cell respectively, u 1_1 , u 1_2 , u 1_100 represent the 1st value, the 2nd value and the 100th value of the compressed voltage sequence of No.1 cell, u 2_1 , u 2_2 , u 2_100 represent the 1st value, the 2nd value and the 100th value of the compressed voltage sequence of No.2 cell, u n_1 , u n_2 , u n_100 represent nThe 1st, 2nd and 100th values of the voltage sequence after compression of the single unit. T represents the temperature value collected by the temperature sensor, T 1, T 2 and T m represent the 1st, 2nd and 100th values of the temperature sequence after compression of the 1st, 2nd and 3rd temperature sensors, respectively. m T 1_1 , T 1_2 , T 1_100 represent the 1st, 2nd and 100th values of the temperature sequence after compression of the 1st temperature sensor. T 2_1 , T 2_2 , T 2_100 represent the 1st, 2nd and 100th values of the temperature sequence after compression of the 2nd temperature sensor. T m_1 , T m_2 , T m_100 represent the 1st, 2nd and 100th values of the temperature sequence after compression of the 3rd temperature sensor. m
[0020] Based on the relationship in the graph, a spatio-temporal adjacency matrix is defined, where N represents the number of nodes in the entire graph (in this case N = m + n + 2). A It can be expressed by formula (1) and is shown in Figure 3 , where the gray part represents the association between nodes.
[0021] ; As shown in Figure 3 , the time series data of physical quantities in a certain segment is compressed into one hundred points. Each node contains one hundred data points, which is defined as a node vector. Segments with less than one hundred sampling points will be excluded. Finally, the spatio-temporal adjacency matrix A and node vectors obtained from the collected data of a certain segment of the battery system are input into the GraphSAGE network.
[0022] In this example, data from 86 vehicles were used, each with battery systems containing different numbers of battery cells (e.g., 40, 96, 97, 104) and temperature sensors (e.g., 16, 24). From the charging and discharging segments, 102,095 graphs were constructed according to the method described above: 100,772 normal segments and 1,323 fault segments.
[0023] Step 2: Learner modeling and training, dividing the original dataset into four subsets and developing a GraphSAGE model as a weak learner. The spatiotemporal adjacency matrix and node vector are used as input, taking advantage of the GraphSAGE neural network's ability to handle non-fixed nodes and its powerful ability to automatically extract deep information reflecting the battery's safety state. The method is as follows: An improved data sampling method based on Bagging algorithm random sampling is proposed. Specifically, random sampling without replacement is performed on the normal segments in the training set, and all fault segments in the training set are added to each training subset. Assume that the training set contains S samples, of which S 1 is a normal segment, S 2 is a fault segment, and the ensemble learning model consists of n weak learners L ( j ( j =1, 2, … n ). The sampling steps are as follows: (1) For normal segments, use random sampling without replacement to generate n training subsets. The number of normal samples in each weak learner training set is M norm : ; where denotes the floor function.
[0024] (2) Add S2 fault segments to each weak learner's training subset. The number of fault samples in each weak learner training subset is M abnorm and the total number of samples is M all : ; ; In this example, the ratio of training set to test set is kept as 7:3. The training set consists of 70,297 normal segments and 1,077 fault segments from 60 vehicles, totaling 71,374 segments. The test set contains 30,475 normal segments and 246 fault segments from 26 vehicles, totaling 30,721 segments. Therefore, S 71,374. n is set to 4, indicating that there are 4 weak learners. S 1 (normal segments) is 70,297, S 2 (fault segments) is 1,077. The training set is divided into four subsets, each of which is input into a weak learner for training. According to formulas (2)-(3), each training subset contains 17,574 normal segments and 1,077 fault segments, so that the ratio of normal samples to fault samples (IR) is reduced from 65:1 (70,297:1,077) to 16:1 (17,574:1,077).
[0025] Step 3: Integrated fault detection, using arithmetic mean as integration strategy, integrating the output of four weak learners to form a strong learner. This enhances the robustness of the model in solving classification problems under class imbalance conditions. The trained integrated GraphSAGE model is used to detect fault segments in the test set, and the method is as follows: (1) Construction of graph: as described in step (1), define the graph G = ( V , E ), where V = { v 1, v 2,..., v N} represents the N nodes in the graph, E represents the edge. Taking node Figure 4 in v as an example, assuming it is the center node, the nodes directly connected to the center node are the first-order neighbors of node v , the nodes connected to the first-order neighbors are the second-order neighbors of node v , and so on. The v order neighbors of the center node K can be counted.
[0026] (2) Forward propagation of GraphSAGE: this process mainly consists of three steps. First, randomly sample the neighbor nodes of each node in the graph; second, aggregate the information contained in the neighbor nodes through the aggregation function (Aggregation function); finally, input the embedding of all nodes in the graph into the dense layer (Dense layer) to obtain the label of the graph, such asFigure 4 The nodes v at layer k -1) are embedded into a latent space. For the aggregation operation, the nodes k at layer v -1) are embedded into a latent space. Subsequently, the embeddings of the nodes k at layer v -1) are concatenated with the aggregated representation and the node k at layer -1) is computed by a non-linear transformation. The embedding of the node at layer -1) is computed as follows: where Aggregate is an aggregation function that takes the sampled neighbor node embeddings as input, N ( v ) is the set of sampled neighbor nodes of the node v , σ is an activation function, W is a weight matrix, Concat denotes the concatenation operation of the neighbor embeddings with the node v 's own embedding. Finally, Readout the function merges the final embedding representation of all nodes into a global representation of the graph and inputs a fully connected layer to obtain the output probability as follows: (3) Backpropagation of GraphSAGE: In this study, GraphSAGE adopts supervised learning. Cross-entropy is used as the loss function for the fault detection classification task.
[0027] The structure of each weak learner is shown in Figure 5 , which consists of a 3-layer GraphSAGE neural network, a Maxpooling (Readout function), and a fully connected layer. The network gradually extracts and transforms effective information from the input graph. The fully connected layer at the end of the network integrates the features learned by GraphSAGE through Maxpooling and outputs the fault probability of the segment. Throughout the process, there is no need for manual feature extraction of the battery system segment data. GraphSAGE automatically learns the intrinsic patterns and coupling relationships of voltage, current, temperature, and SOC nodes.
[0028] The invention re-explores the mathematical model between the fault information hidden in the physical signal and the physical signal under actual working conditions, overcoming the limitations of existing battery theoretical models in low-frequency and low-precision data collection in practical applications. Finally, the four weak learners are fused into a strong learner through an average strategy as follows: wherein, n denotes the number of weak learners, and i denotes the output probability of the x th weak learner, H denotes the input adjacency matrix and node vector matrix, denotes the failure probability of the battery system of the segment output by the ensemble model.
[0029] In this embodiment, the structure and hyperparameters of the four weak learners are the same. GraphSAGE adopts ReLU as the activation function to avoid gradient disappearance, and Maxpooling as the Readout function. Batch Normalization is applied after each layer of GraphSAGE to convert the data into a distribution with a mean of zero and a variance of one, and is executed before the activation function to prevent the data from entering the saturation region, thereby improving the stability and efficiency of network training. To prevent overfitting, the Dropout strategy is adopted for the fully connected layer, that is, some neurons are randomly ignored. Categorical cross-entropy is used as the loss function to evaluate the accuracy of the model, and the Adam optimizer updates the weights during the backpropagation process. The hyperparameters of the model to achieve the best performance are shown in Table 1. Figure 6 The loss curves of the four training subsets and the test set in the four weak learners are shown in Figure 7 The changes of the training set accuracy during the training process of the four weak learners, the changes of the test set accuracy after the application of the ensemble strategy, and the changes of the failure segment recall rate are shown in Figure 8 .
[0030] Table 1 Best hyperparameters In this embodiment, the input graph, the adjacency matrix of the input graph, the main steps of GraphSAGE, and the structure of the weak learners are shown in Figure 2 , Figure 3 , Figure 4 and Figure 5 .
[0031] In this embodiment, the loss curves of the four training subsets and the test set in the four weak learners are shown in Figure 6 , the changes of the training set accuracy during the training process, the changes of the test set accuracy after the application of the ensemble strategy, and the changes of the failure segment recall rate are shown in Figure 7 . The final detection results of the test set are summarized in Figure 8 .
[0032] Those skilled in the art will appreciate that embodiments of the present application can be readily used as software, hardware, or a combination of software and hardware. In a software embodiment, the present application can be implemented with computer programs (also called software) that are written in a computer programming language that can be understood by a computer or a processor. The programs can be stored in a computer readable storage medium (computer readable storage media, such as magnetic disks, optical disks, or any other computer storage device) that is readable by a general or special purpose computer or processor. The programs can be distributed over a network coupled computer storage media. Those skilled in the art will readily recognize that the present application can be practiced with a variety of computer systems and programming languages.
[0033] The present application is described in reference to the flowchart and / or block diagrams of the method, terminal device (system), and computer program product according to the present application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal devices to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal devices, create means for implementing the functions specified in the flowchart and / or block diagrams block or blocks. Figure One one or more functions specified by one or more blocks Figure One one or more functions specified by one or more blocks.
[0034] These computer program instructions can also be stored in a computer readable storage medium that can direct a computer or other programmable data processing terminal devices to function in a particular manner, such that the instructions stored in the computer readable storage medium produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagrams block or blocks. Figure One one or more functions specified by one or more blocks Figure One one or more functions specified by one or more blocks.
[0035] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices, such that a series of operational steps are carried out on the computer or other programmable terminal devices to create a computer implemented process so that the instructions executed on the computer or other programmable terminal devices provide steps for implementing the function specified in the flowchart and / or block diagrams block or blocks. Figure One one or more functions specified by one or more blocks Figure One one or more functions specified by one or more blocks.
[0036] The above described embodiments are merely illustrative for the technical solutions of the present application. It is clear that the present application is not limited to the described embodiments. Based on the embodiments in the present application, those skilled in the art can make various changes, but any change equivalent or similar to the present application falls within the scope of protection of the present application.
[0037] The contents not described in detail in the specification belong to the prior art known by the skilled in the art.
Claims
1. A method for real vehicle battery pack fault segment detection oriented to sample distribution imbalance, characterized in that, The method comprises the following steps: Step 1: graph construction, the coupling relationship between physical quantities is determined, and a graph is constructed for each charging and discharging section of each battery pack; each of the constructed graphs comprises a space-time adjacency matrix and a node vector; Step 2: learning model building and training, the original data set is divided into four subsets, and a graph sampling and aggregation network model is developed as a weak learning model; the space-time adjacency matrix and the node vector are used as inputs, and the advantages of GraphSAGE neural network in processing non-fixed nodes and the powerful ability of automatically extracting deep information reflecting the safety state of the battery are utilized; Step 3: integrated fault detection, the outputs of the four weak learning models are integrated using an arithmetic mean as an integration strategy, thereby forming a strong learning model; the integrated GraphSAGE model after training is used for detecting fault sections in a test set.
2. The method for real vehicle battery pack fault segment detection facing sample distribution imbalance according to claim 1, wherein, The step 1 specifically comprises: All battery voltages, temperatures, module currents and module SOCs of a specific charging or discharging section are connected to form an undirected graph; Based on the relationships in the undirected graph, a spatio-temporal adjacency matrix is defined wherein N denotes the number of nodes in the entire graph; A Each element in the matrix is expressed by formula (1): ; compressing the time series data of physical quantities in a certain segment into one hundred points; each node contains one hundred data points, defined as node vectors; segments with less than one hundred sampling points will be excluded; finally, the spatiotemporal adjacency matrix obtained from the collected data of a certain segment of the battery system A and the node vector are input into the GraphSAGE network.
3. The method for sample distribution imbalance-oriented real vehicle battery pack fault segment detection according to claim 2, characterized in that, The step 2 specifically comprises: The improved data sampling method based on Bagging algorithm random sampling is used; the data sampling method specifically includes: randomly sampling the normal segments in the training set without replacement, and attaching all the fault segments in the training set to each training subset; assuming that the training set contains S samples, wherein S 1 is a normal segment, S 2 is a fault segment, S, S 1 、S 2 is a natural number greater than or equal to 1; and the integrated learning model is composed of n weak learners L j , j =1, 2, … n ; the sampling step is specifically as follows: For normal fragments, a non-replacement random sampling method is used to generate n training subsets; the number of normal samples in each weak learner training set M norm is: ; wherein denotes rounding down; n is a natural number greater than or equal to 1; S2 fault fragments are added to each weak learner training subset; the number of fault samples in each weak learner training subset M abnorm and the total number of samples M all respectively: ; 。 4. The method for sample distribution imbalance-oriented real vehicle battery pack fault segment detection according to claim 3, characterized in that, The step 3 specifically comprises: Construction of graph: According to the step 1, define the graph G = ( V , E ), wherein V = { v 1, v 2,..., v N} represents the number of nodes in the graph, N E represents the edge; to define the node G in the graph v , for example, it is the center node, the node directly connected with the center node is the first-order neighbor of the node v , the node connected with the first-order neighbor is the second-order neighbor of the node v , and so on, to obtain the K order neighbor of the center node v ; Forward propagation of GraphSAGE: the forward propagation of GraphSAGE specifically comprises: Random sampling of neighbor nodes of each node in the graph; Aggregating the information contained in the neighbor nodes by an aggregation function; The embeddings of all nodes in the graph are input into a fully connected layer to obtain the graph's labels; for aggregation operations, the nodes... v In the ( k -1) Layer neighbor node embedding generates the first k The aggregation representation of these neighboring nodes; subsequently, the nodes... v In the ( k -1) Layer embedding and aggregation representation are concatenated, and nodes are computed through nonlinear transformation. v In the k The embedding of layers is shown in formulas (5)-(6): ; ; where, Aggregate is an aggregation function that represents the sampled neighbor node embeddings, N ( v ) is a set of sampled neighbor nodes of node v , σ is an activation function, W is a weight matrix, Concat denotes a concatenation operation of the neighbor embeddings with the node v 's own embedding; finally, Readout the function merges the final embeddings of all nodes into a global representation of the graph and inputs a fully connected layer to obtain the output probabilities as shown in equation (7): ; Back propagation of GraphSAGE: GraphSAGE adopts supervised learning, and cross-entropy is used as a loss function for the fault detection classification task; Each of the weak learning models comprises a GraphSAGE neural network, a Maxpooling or Readout function, and a fully connected layer; the network gradually extracts and converts effective information from the input graph; the fully connected layer at the end of the network integrates the features learned by GraphSAGE through Maxpooling and outputs the fault probability of the section; during the whole process, the features of the battery system section data do not need to be manually extracted, and GraphSAGE can automatically learn the internal patterns and coupling relationships of the voltage, current, temperature and SOC nodes; Finally, the four weak learning models are fused into a strong learning model through an average strategy, as shown in equation (8): ; wherein, n denotes the number of weak learners, is the output probability of the i th weak learner, x denotes the input adjacency matrix and node vector matrix, H denotes the failure probability of the battery system of the segment output by the ensemble model.
5. The method for sample distribution imbalance-oriented real vehicle battery pack fault segment detection according to claim 2, characterized in that, In step 1, N m n +2, Wherein, m represents the number of temperature sensors, and n represents the number of battery monomers.
6. An electronic device, comprising: A memory and a processor, the memory is used for storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to realize the sample distribution imbalance-oriented real vehicle battery pack fault section detection method according to any one of claims 1-5.