Power battery fault management and control method and system
By constructing a multi-task large model combined with a knowledge graph, accurate prediction and rapid diagnosis of power battery faults were achieved, solving the problem of low accuracy and efficiency in fault diagnosis of power batteries in new energy vehicles and improving fault identification and early warning capabilities.
Patent Information
- Application Number
- CN202510057136.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-01-14
AI Technical Summary
The existing fault diagnosis of power batteries for new energy vehicles has low accuracy and efficiency, and fault warnings are often untimely or false alarms occur frequently, making it difficult to quickly and accurately locate the fault point and take corresponding measures.
A multi-task large model is constructed, which combines fault datasets and knowledge graphs. The target fault management model is obtained through multi-task reasoning training. This model is then used to manage the faults of power batteries, realizing an automated process of fault keyword identification, cause analysis, and management decision-making.
It improves the accuracy and efficiency of power battery fault diagnosis, reduces manual intervention and decision-making time, ensures the ability of fault identification and early warning, and enhances the level of intelligence in fault decision-making.
Smart Images

Figure CN119858451B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery management technology, and in particular to a method and system for controlling power battery faults. Background Technology
[0002] With the global energy crisis and increasing environmental awareness, new energy vehicles, as an environmentally friendly and efficient means of transportation, have received widespread attention and rapid development. One of the core components of new energy vehicles is the power battery, whose performance directly affects the vehicle's range, driving experience, and safety. Currently, new energy vehicle power batteries may experience various malfunctions during actual use, including but not limited to excessive battery voltage differential, incomplete battery charging, reduced battery range, and loss of vehicle power. These malfunctions not only affect the normal use of the vehicle but may also pose potential threats to driving safety.
[0003] In related technologies, the Battery Management System (BMS) for new energy vehicles is constantly developing, but its fault identification and early warning capabilities for power batteries still need improvement, resulting in untimely or false alarms. Furthermore, once a power battery malfunctions, quickly and accurately locating the fault point and taking appropriate measures is crucial; however, current power battery fault handling efficiency is low, and emergency response mechanisms are not robust enough. Therefore, fault management of new energy vehicle power batteries still falls short in terms of diagnostic accuracy and efficiency. Summary of the Invention
[0004] In view of the shortcomings of the prior art, this application discloses a power battery fault management method and system to solve the technical problems of low accuracy and efficiency in power battery fault diagnosis in the prior art.
[0005] In a first aspect, this application provides a method for fault management and control of power batteries. The method includes: acquiring a fault dataset and a knowledge graph, wherein the fault dataset includes various signal time-frequency diagrams of the power battery and fault descriptions corresponding to each signal time-frequency diagram, the fault descriptions including fault phenomena and fault keywords, and the knowledge graph including the interrelationships between fault phenomena, fault keywords, fault causes, and management and control decisions; constructing a multi-task large model, and performing multi-task inference training on the multi-task large model based on the fault dataset to obtain an initial fault management and control model, wherein the multi-tasks include the identification of fault keywords, the analysis of fault causes, and the formulation of management and control decisions; using the interrelationships in the knowledge graph as inference constraints, performing multi-task inference optimization training on the initial fault management and control model to obtain a target fault management and control model; and using the target fault management and control model to manage and control the power battery faults.
[0006] In one embodiment of this application, the construction method of the multi-task large model includes: constructing a basic large model, the basic large model including at least one sub-model, the sub-model integrating a visual transformer structure and a bidirectional encoder representation transformation structure, the visual transformer structure being used to process the signal time-frequency graph, and the bidirectional encoder representation transformation structure being used to process the fault description; performing fine-grained processing on the feedforward network in the visual transformer structure and the bidirectional encoder representation transformation structure to obtain multiple fine-grained experts, and setting at least one shared expert among the multiple fine-grained experts, the fine-grained experts being used to process the unit features in the signal time-frequency graph or the fault description, and the shared expert being used to process the shared features of each of the unit features; initializing the gating values of each of the fine-grained experts and each of the shared experts, and constructing a cross-expert multi-task loss function to obtain a multi-task large model, the multi-task loss function being composed of a task loss function and an expert interaction loss function, and the multi-task large model being a cross-expert multi-task large model including at least one cross-expert multi-task sub-model.
[0007] In one embodiment of this application, the step of performing multi-task inference training on the multi-task large model based on the fault dataset to obtain an initial fault management model includes: labeling each group of signal time-frequency graphs and corresponding fault descriptions in the fault dataset with actual labels, the actual labels including actual fault keywords, actual fault causes, and actual management decisions; using the labeled fault dataset to perform multi-task inference training on the multi-task large model, iteratively updating the number of shared experts in the visual transformer structure and the bidirectional encoder representation transformation structure in the cross-expert multi-task sub-model, as well as the learning parameters of the path network in the cross-expert multi-task sub-model, the learning parameters including expert allocation weight matrix and noise adjustment weight matrix; and obtaining the initial fault management model when the loss value of the multi-task loss function converges to a preset loss value.
[0008] In one embodiment of this application, the construction of the multi-task loss function includes: constructing a sub-task loss function based on the prediction error of each sub-task in the multi-task, and determining the task loss function based on preset task weights of each sub-task and the sub-task loss function; for each cross-expert multi-task sub-model, constructing interaction information between the multi-task and the fine-grained expert and the shared expert, and determining the expert interaction loss function based on the interaction information corresponding to each cross-expert multi-task sub-model and preset information sharing influence weights; and constructing the multi-task loss function based on the task loss function and the expert interaction loss function.
[0009] In one embodiment of this application, constructing the interaction information between the multi-task, the fine-grained expert, and the shared expert includes: constructing a joint probability that any subtask is assigned to any expert, constructing a first marginal probability that any subtask is not assigned to any expert, and constructing a second marginal probability that any expert is not assigned any subtask; constructing a joint entropy between the multi-task, the fine-grained expert, and the shared expert based on the joint probability, constructing a first marginal entropy of the multi-task based on the first marginal probability, and constructing a second marginal entropy between the fine-grained expert and the shared expert based on the second marginal probability; and constructing the interaction information based on the joint entropy, the first marginal entropy, and the second marginal entropy.
[0010] In one embodiment of this application, the step of using the interrelationships in the knowledge graph as inference constraints to perform multi-task inference optimization training on the initial fault management model to obtain a target fault management model includes: inputting the fault dataset into the initial fault management model; extracting paths from the knowledge graph based on the fault phenomena and fault keywords corresponding to each signal time-frequency graph to determine an initial path set, wherein the path is from fault keywords to fault causes and then to management decisions; calculating the occurrence probability of each path in the initial path set, and performing retrieval inference on each path in the initial path set according to the occurrence probability to determine a target path set, wherein the occurrence probability of each path in the target path set is higher than a preset probability threshold; and performing multi-task inference optimization training on the initial fault management model based on each path in the initial path set and each path in the target path set to obtain the target fault management model.
[0011] In one embodiment of this application, the step of performing multi-task inference optimization training on the initial fault management model based on each path in the initial path set and each path in the target path set to obtain the target fault management model includes: constructing a composite loss function for multi-task inference optimization training, wherein the composite loss function consists of a first probability of generating a reliable path in path extraction and a second probability of generating a correct path in retrieval inference, wherein the first probability is determined by evaluating the reliability of each path in the initial path set and the second probability is determined by evaluating the correctness of each path in the target path set; and iteratively updating the weight parameters in the initial fault management model with the goal of maximizing the first probability and the second probability to obtain the target fault management model.
[0012] In one embodiment of this application, the cross-expert multi-task sub-model is multiple; before obtaining the large multi-task model, the method further includes: setting a regularization layer between two cross-expert multi-task sub-models, and performing residual connections on the multiple cross-expert multi-task sub-models; setting a learnable embedding vector in the hidden layer of each cross-expert multi-task sub-model, the embedding vector being used to realize the perception of the multi-task by each fine-grained expert and each shared expert.
[0013] In one embodiment of this application, the step of using the target fault management model to manage the fault of a power battery includes: acquiring a target signal time-frequency diagram and a corresponding target fault description of the power battery under test; inputting the target signal time-frequency diagram and the target fault description into the target fault management model to obtain the target fault keywords, target fault causes, and target management decisions corresponding to the power battery under test.
[0014] Secondly, this application provides a power battery fault management and control system, the system comprising: an acquisition module for acquiring a fault dataset and a knowledge graph, the fault dataset including various signal time-frequency diagrams of the power battery and fault descriptions corresponding to each signal time-frequency diagram, the fault descriptions including fault phenomena and fault keywords, and the knowledge graph including the interrelationships between fault phenomena, fault keywords, fault causes, and management and control decisions; a pre-training module for constructing a multi-task large model and performing multi-task inference training on the multi-task large model based on the fault dataset to obtain an initial fault management and control model, the multi-tasks including the identification of fault keywords, the analysis of fault causes, and the formulation of management and control decisions; an optimization training module for using the interrelationships in the knowledge graph as inference constraints to perform multi-task inference optimization training on the initial fault management and control model to obtain a target fault management and control model; and a management and control module for using the target fault management and control model to manage and control the power battery faults.
[0015] As described above, the power battery fault management method and system provided in this application have the following beneficial effects:
[0016] First, a fault dataset and knowledge graph are acquired. The fault dataset includes time-frequency graphs of various signals from the power battery and corresponding fault descriptions. Fault descriptions include fault phenomena and fault keywords. The knowledge graph includes the relationships between fault phenomena, fault keywords, fault causes, and control decisions. Then, a multi-task large-scale model is constructed, and multi-task inference training is performed on the large-scale model based on the fault dataset to obtain an initial fault control model. The multi-tasks include fault keyword identification, fault cause analysis, and control decision formulation. Next, the relationships in the knowledge graph are used as inference constraints to optimize the initial fault control model through multi-task inference training, obtaining the target... The fault management model is then used to manage the power battery faults. This model is obtained by combining a multi-task large model and a knowledge graph. Using this model, the fault keywords and causes of the power battery can be accurately predicted, and corresponding management decisions can be obtained. Furthermore, through an automated process of fault identification, cause analysis, and measure formulation, fault diagnosis can be completed quickly and corresponding measures can be obtained. This reduces manual intervention and decision-making time, improves the efficiency of fault decision-making and the level of intelligence in fault diagnosis, and ensures the fault identification and early warning capabilities of the power battery, thus guaranteeing the accuracy and efficiency of power battery fault diagnosis.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0019] Figure 1 This is a schematic diagram illustrating the implementation environment of a power battery fault management system, as shown in an exemplary embodiment of this application.
[0020] Figure 2 This is a flowchart illustrating a power battery fault management method in an exemplary embodiment of this application;
[0021] Figure 3 This is a structural diagram of a cross-expert multi-task large model illustrated in an exemplary embodiment of this application;
[0022] Figure 4 This is a structural diagram of a transformer architecture shown in an exemplary embodiment of this application;
[0023] Figure 5 This is a schematic diagram illustrating the evolution of sub-models in a cross-expert multi-task large model, as shown in an exemplary embodiment of this application.
[0024] Figure 6 This is a structural diagram illustrating a target fault management model, as shown in an exemplary embodiment of this application.
[0025] Figure 7 This is a block diagram illustrating a power battery fault management system as an exemplary embodiment of this application. Detailed Implementation
[0026] The embodiments of this application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.
[0027] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the illustrations only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the shape, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0028] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.
[0029] Currently, the types of faults in the power batteries of new energy vehicles are diverse, including but not limited to excessive battery voltage difference, incomplete battery charging, reduced battery range, and loss of vehicle power. These faults not only affect the normal use of the vehicle but may also pose a potential threat to driving safety. Although the BMS (Battery Management System) for new energy vehicles is constantly developing, its fault identification and early warning capabilities still need improvement. The inventors of this application have found that existing fault diagnosis methods often rely on fixed threshold judgments, which are difficult to adapt to complex and changing actual operating conditions, leading to untimely fault warnings or frequent false alarms. Furthermore, the ability to monitor and diagnose the internal micro-state of the battery is relatively weak, making it difficult to detect potential safety hazards in advance. Once a power battery fault occurs, it is crucial to quickly and accurately locate the fault point and take corresponding measures.
[0030] Therefore, please see Figure 1 , Figure 1 This is a schematic diagram illustrating an implementation environment of a power battery fault management system, as shown in an exemplary embodiment of this application. Figure 1 As shown, the implementation environment includes a vehicle 110 and a power battery fault management system 120. The power battery fault management system 120 is embedded in the vehicle 110 and is used to manage the faults of the power battery in the vehicle 110. The power battery fault management system 120 includes, but is not limited to, vehicle infotainment systems and onboard computers. It obtains a target fault management model by combining a multi-task large model and a knowledge graph. Using this target fault management model, it can accurately predict the fault keywords and causes of the power battery and obtain corresponding management decisions. Furthermore, through an automated process of fault identification, cause analysis, and measure formulation, it can quickly complete fault diagnosis and obtain corresponding measures, reducing manual intervention and decision-making time, improving fault decision-making efficiency and the level of intelligence in fault diagnosis, ensuring the fault identification and early warning capabilities of the power battery, and guaranteeing the accuracy and efficiency of power battery fault diagnosis.
[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating a power battery fault management method in an exemplary embodiment of this application. This method can be applied to... Figure 1 The implementation environment shown is intended to illustrate a method that can also be applied to other exemplary implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.
[0032] like Figure 2 As shown, in an exemplary embodiment, the power battery fault management method includes at least steps S210 to S240, which are described in detail below:
[0033] Step S210: Obtain the fault dataset and knowledge graph. The fault dataset includes time-frequency graphs of various signals of the power battery and fault descriptions corresponding to each time-frequency graph. The fault descriptions include fault phenomena and fault keywords. The knowledge graph includes the interrelationships between fault phenomena, fault keywords, fault causes and control decisions.
[0034] In this embodiment, the time-frequency diagrams of various signals include time-frequency diagrams of signals such as current, voltage, and temperature obtained by wavelet transform.
[0035] In one possible embodiment, the knowledge graph includes the relationships between fault keywords, fault phenomena, fault causes, and control decisions. Specifically, this includes causal relationships, response strategy relationships, fault cause composite relationships, fault concurrency relationships, and fault sequence relationships. For example, a causal relationship, such as the relationship between a fault cause and a fault keyword, indicates that a specific cause leads to the occurrence of a fault; similarly, the relationship between a fault keyword and a fault phenomenon indicates that a fault will exhibit a specific phenomenon. A response strategy relationship, such as the relationship between a fault keyword and a control decision, indicates the recommended control measures for a fault; similarly, the relationship between a fault cause and a control decision indicates the recommended control measures for a fault cause. A fault cause composite relationship, such as the relationship between fault causes, indicates that multiple causes work together to lead to a fault. A fault concurrency relationship, such as the relationship between fault keywords, indicates the situation where two or more faults occur simultaneously. A fault sequence relationship, such as the relationship between fault keywords, indicates the situation where one fault may lead to another fault.
[0036] Step S220: Construct a multi-task large model and perform multi-task inference training on the multi-task large model based on the fault dataset to obtain an initial fault control model. The multi-tasks include fault keyword identification, fault cause analysis, and control decision formulation.
[0037] Among them, the fault keywords are the fault type or fault name, the fault cause is the reason for a certain fault, and the control decision is the operation and maintenance measures corresponding to the specific fault.
[0038] In this embodiment, the time-frequency diagrams of various signals of the power battery and the corresponding fault descriptions are used as training samples and input into the multi-task large model. The multi-task large model is trained to identify fault keywords, analyze fault causes, and formulate control decisions. In this way, the automated process of fault identification, cause analysis, and measure formulation can be realized based on the large model, thereby improving the efficiency of power battery fault control and the level of intelligent fault diagnosis.
[0039] In one embodiment, the construction of a multi-task large model includes: constructing a basic large model, which includes at least one sub-model. The sub-model integrates a visual transformer structure and a bidirectional encoder representation transformation structure. The visual transformer structure is used to process the signal time-frequency plot, and the bidirectional encoder representation transformation structure is used to process the fault description. The forward feedback network in the visual transformer structure and the bidirectional encoder representation transformation structure is refined to obtain multiple refined experts. At least one shared expert is set among the multiple refined experts. The refined experts are used to process the unit features in the signal time-frequency plot or fault description, and the shared expert is used to process the shared features of each unit feature. The gating values of each refined expert and each shared expert are initialized, and a cross-expert multi-task loss function is constructed to obtain the multi-task large model. The multi-task loss function consists of a task loss function and an expert interaction loss function. The multi-task large model is a cross-expert multi-task large model including at least one cross-expert multi-task sub-model.
[0040] Please see Figure 3 , Figure 3 This is a structural diagram of a cross-expert multi-task large model illustrated in an exemplary embodiment of this application. For example... Figure 3As shown, the input of the cross-expert multi-task large model consists of various time-frequency graphs of power battery signals and corresponding fault descriptions. The output consists of three fault control sub-tasks: fault keywords, fault causes, and control decisions. This cross-expert multi-task large model is composed of several multi-task large model sub-modules (i.e., cross-expert multi-task sub-models) with VIT (Vision Transformer) and BERT (Bidirectional Encoder Representations from Transformers) structures. The VIT structure is used to capture high-dimensional features of the signal time-frequency graphs, and the BERT structure is used to capture textual features in the fault descriptions. The number of cross-expert multi-task sub-models can be specified according to the training data to meet the needs of feature mining at different data depths. In each cross-expert multi-task sub-model, both the VIT and BERT structures contain multiple transformer architectures. At the FFN (Feed-Forward Network) layer of the transformer architecture, a fine-grained expert strategy and a designated shared expert strategy are employed to introduce multiple experts. Specifically, in the transformer architecture, the FFN is first replaced by N smaller FFNs, each representing an expert, resulting in multiple fine-grained experts. This ensures consistency between expert parameters and model computation. At least one shared expert is designated. The transformer architecture includes multiple FFNs, allowing for the fine-graining of all FFNs, or the fine-graining of only some FFNs or different dimensional reductions, to meet the needs of different data feature mining. Additionally, each cross-expert multi-task sub-model includes a gating network to set the gating values for each expert, enabling the allocation of different unit feature tokens to different experts.
[0041] Please see Figure 4 , Figure 4 This is a structural diagram illustrating a transformer architecture, as shown in an exemplary embodiment of this application. Figure 4As shown, the left side represents the Encoder section, and the right side represents the Decoder section. In the Encoder section, data is first fed into the Input Embedding layer, which converts the input words into vector representations. This is then added to the Positional Encoding layer to preserve the positional information of the words in the input sequence. Next are multiple encoder layers (N layers), each containing a multi-head attention mechanism and a feedforward network. In each encoder layer, the multi-head attention mechanism captures the dependencies between words in the input sequence, and the feedforward network handles non-linear transformations. In the Decoder section, the output words are first converted into vector representations through the Output Embedding layer, and then added to the Positional Encoding layer. Encoding (positional embedding) is added to preserve the positional information of words in the output sequence. Next are multiple decoder layers (N layers). Each decoder layer contains a masked multi-head attention mechanism, a multi-head attention mechanism, and a feedforward network. In each decoder layer, the masked multi-head attention mechanism is used to capture the dependencies between words in the output sequence while preventing the decoder from accessing future information. The multi-head attention mechanism is used to capture the dependencies between the input and output sequences. The feedforward network is used for non-linear transformation. Finally, the decoder output passes through a linear layer and a softmax layer to generate the final output probability distribution.
[0042] The transformer architecture mainly includes attention mechanisms and FFN. The attention mechanism can be described as follows:
[0043]
[0044] Where T represents the number of tokens; Att represents the output sequence of all tokens in layer l; Att represents the attention mechanism. This indicates the hidden state of all tokens in the previous layer (l-1 layer); This indicates that an attention mechanism is applied to the hidden states of all tokens in the previous layer (l-1 layer); This means that the output sequence of all tokens in layer l is the sum of the original hidden state and the result adjusted by the attention mechanism. show It is a real matrix of size T×d.
[0045] The unrefined FFN can be described as:
[0046]
[0047] in, This represents the hidden state ultimately generated by the t-th token in layer l; FFN represents the feedforward network. This represents the result of layer l after adjusting the attention mechanism based on the output of the previous layer for the t-th token; Indicates will Implement a feedforward network; This indicates that the hidden state generated by the l-th layer with the t-th token is the direct addition of the output and input of the feedforward network. show It is a d-dimensional real vector.
[0048] In this embodiment, it is considered that when the number of experts is limited, each expert will learn a large amount of different knowledge, resulting in excessive computational load on the model and ineffective utilization of the knowledge. However, if each token is assigned to multiple experts, this diverse knowledge can be decomposed and thus made easier to learn.
[0049] Therefore, in this embodiment, experts are divided into finer-grained segments to enhance the flexibility and adaptability of expert collaboration, while ensuring consistency between expert parameters and model computational load. For example, the dimension of the FFN is reduced to the original... This results in mN smaller-granularity experts, improving the model's ability to learn diverse knowledge. The process of feature mining in each cross-expert multi-task sub-model after adopting the fine-grained expert strategy can be described as follows:
[0050]
[0051] in, The hidden state generated by the t-th token in layer l; N represents the number of experts before fine-graining; mN represents the number of experts after fine-graining; i represents the ith expert; This represents the result of adjusting the t-th token in layer l based on the attention mechanism of the previous layer's output; Indicates that the i-th expert will Perform a feedforward network, g i,t Let represent the gating value of the i-th expert for the t-th token.
[0052] The formula for calculating the gate value is:
[0053]
[0054] Among them, g i,t s represents the gating value of the i-th expert for the t-th token; i,t The i-th expert and the t-th token are represented by their relevance scores; mN represents the number of fine-grained experts; Topk({s j,t|1≤j≤mN},mK) represents the set of relevance scores of the top K experts most relevant to the t-th token from all experts associated with it; j is an index variable used to iterate through all experts (from 1 to mN), and for each expert j, calculate its relevance score to the t-th token.
[0055] The formula for calculating the relevance score is:
[0056]
[0057] Among them, s i,t This represents the relevance score between the i-th expert and the t-th token; Indicates will Transpose; Represents the i-th expert in the l-th layer; Softmax i (·) indicates normalization.
[0058] Furthermore, considering that when each token is assigned to multiple experts, the experts need to share certain knowledge to ensure faster model convergence, but this can also introduce redundancy in the model's parameters. Therefore, designated experts can be used to capture the knowledge shared by different tokens, thereby effectively mitigating redundancy.
[0059] In this embodiment, shared experts are designated from the fine-grained experts to share knowledge, thereby reducing model computation and alleviating parameter redundancy issues. In VIT, fine-grained experts are used to process unit features in the signal time-frequency plot, while shared experts are used for shared features among unit features in the signal time-frequency plot; in BERT, fine-grained experts are used to process unit features in the fault description, while shared experts are used for shared features among unit features in the fault description. The process of FFN feature mining in each cross-expert multi-task sub-model after adopting the designated shared expert strategy can be described as follows:
[0060]
[0061] Where mN represents the total number of experts; K s Indicates the number of shared experts; mN-K s Indicates the number of fine-grained experts; All results processed by shared experts; This represents the result of all granulation expert processing; g i,t This represents the gating value of the i-th fine-grained expert for the t-th token.
[0062] If the total number of experts is mN = 4, and the number of shared experts is K s =1, then the number of fine-grained experts is mN-K s =3.
[0063] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating the evolution of sub-models in a cross-expert multi-task large model, as shown in an exemplary embodiment of this application. Figure 5 As shown, before refining the FFN, there are a total of N experts; then the dimension of each FFN is reduced to the original value. The total number of experts then becomes 2N. If a shared expert is designated, i.e., the first expert is the shared expert, then the remaining 2N-1 experts are the fine-grained experts.
[0064] In this way, the cross-expert multi-task sub-model replaces all FFNs in the transformer architecture with smaller FFNs. Each small FFN represents an expert, and the fine-grained expert strategy and the specified shared expert strategy are adopted. This can improve the specificity of experts in the model, reduce the computational load of the model, and alleviate the parameter redundancy problem.
[0065] Furthermore, in this embodiment, considering the problem of inconsistent gradient directions and convergence speeds among multiple tasks leading to large differences in the magnitude of task loss values during multi-task large model training, a cross-expert multi-task loss function is constructed to alleviate this issue. Also, considering that the degree of information interaction among experts affects model accuracy, the process of expert collaboration in task processing is taken into account. Therefore, the multi-task loss function not only includes the task loss functions of each sub-task in the multi-task process but also adds an expert interaction loss function.
[0066] In this way, by combining the task loss function and the expert interaction loss function to form a multi-task loss function, the model convergence training is achieved, the gradient contradiction between multiple tasks is alleviated, and the effective interaction between different experts is ensured when processing multiple tasks, thereby improving the performance and accuracy of the model.
[0067] As one possible implementation, in the power battery fault management problem, there are three tasks T1, T2, T3 and a set of time-frequency signal graphs I1, I2, ..., I of the fault description and time-frequency signal graphs of the new energy vehicle power battery in Q segment. Q Task T can be defined as a set of raw data I composed of fault description and signal time-frequency diagram. q Mapped to task T(I) q If a function of ) is given, then the dataset D can be defined as the training pairs (I) q ;T i (I qThe set of data. In the power battery fault management problem, each task contains only one training pair, but the raw data consisting of a fault description and a signal time-frequency graph corresponds to three sub-tasks: fault keyword identification, fault cause analysis, and management decision formulation. The input of the cross-expert multi-task sub-model is the raw data I consisting of the fault description and the signal time-frequency graph. O It proceeds along a path connecting a series of experts E1, E2, ..., E N The path network G captures deep features of the input and outputs a weighted sum of fault features mined by each expert. The output of the cross-expert multi-task sub-model can be simplified to:
[0068]
[0069] Where y represents the output feature vector; N represents the number of all experts, including fine-grained experts and shared experts; x represents the input of each expert; E k (x) represents the fault feature discovered by the k-th expert, G k (x) represents the weight value corresponding to the k-th expert. That is, the feature vector of the final output is obtained by weighted summation of the fault features discovered by each expert.
[0070] For a path network G, it is a network with parameter W. g and W noise For a Top-K network, the formula for calculating expert weights is:
[0071] G(x) = TopK(Softmax(xW) g +N(0,1)Softplus(xW noise ))) Formula (10)
[0072] Where G(x) represents the expert's weight value; x represents the expert's input; Wg represents the expert's weight assignment matrix; W noise represents the noise adjustment weight matrix; Softplus represents the smoothing estimate of the ReLU function; Softmax represents the Softmax function; N(0,1) represents the standard normal distribution; TopK(·) represents setting all elements of the vector except the K largest values to 0.
[0073] The smooth estimate of the ReLU function is expressed as:
[0074] Softplus(x) = log(1 + exp(x)) (Formula 11)
[0075] In one embodiment, there are multiple cross-expert multi-task sub-models; before obtaining the large multi-task model, the method further includes: setting a regularization layer between two cross-expert multi-task sub-models, and performing residual connections on the multiple cross-expert multi-task sub-models; setting learnable embedding vectors in the hidden layers of each cross-expert multi-task sub-model, the embedding vectors being used to realize the perception of multi-task by each fine-grained expert and each shared expert.
[0076] In this context, regularization layers are used in neural network architectures to prevent overfitting; residual connections are used to address the vanishing or exploding gradient problem encountered during deep network training; and hidden layers can be input hidden layers.
[0077] In this embodiment, a regularization layer is placed between the two cross-expert multi-task sub-models to prevent overfitting, improve model generalization, and perform residual connections on multiple cross-expert multi-task sub-models, thereby alleviating the gradient vanishing and gradient exploding problems during model training. Furthermore, to ensure that each expert is aware of the multi-task fault management process, a learnable embedding vector is added to the hidden layer of each cross-expert multi-task sub-model. This further enhances the performance and accuracy of the model's multi-task inference.
[0078] Please continue reading Figure 3 A regularization layer is set between the two cross-expert multi-task sub-models, and learnable embedding vectors are set in the input hidden layer of each cross-expert multi-task sub-model.
[0079] In this embodiment, the output of the cross-expert multi-task sub-model after adding the embedding vector can be represented as:
[0080]
[0081] Where y represents the output feature vector; N represents the number of all experts, including fine-grained experts and shared experts; x represents the input of each expert; i represents the task ID; e i E represents the embedding vector of task i; k (x+e i ) indicates that the k-th expert combines e i Fault features discovered under such circumstances Let represent the weight value of the k-th expert for the i-th task.
[0082] As one possible implementation, in the multi-task management of power battery faults, regarding the embedding vector, for example, the embedding vector corresponding to the fault keyword identification task can be (0,0,1), the embedding vector corresponding to the fault cause analysis task can be (0,1,0), and the embedding vector corresponding to the management decision making task can be (1,0,0).
[0083] In one embodiment, a multi-task inference training is performed on a large multi-task model based on a fault dataset to obtain an initial fault management model. This includes: labeling each group of signal time-frequency diagrams and corresponding fault descriptions in the fault dataset with actual labels, including actual fault keywords, actual fault causes, and actual management decisions; using the labeled fault dataset to perform multi-task inference training on the large multi-task model, iteratively updating the number of shared experts in the visual transformer structure and bidirectional encoder representation transformation structure in the cross-expert multi-task sub-model, as well as the learning parameters of the path network in the cross-expert multi-task sub-model, including expert allocation weight matrices and noise adjustment weight matrices; and obtaining the initial fault management model when the loss value of the multi-task loss function converges to a preset loss value.
[0084] In this embodiment, the multi-task large model has powerful natural language processing and data analysis capabilities. By training a large amount of data with detailed labels through multi-task inference, the large model is used to deeply mine and analyze the operating data of the power battery. With the convergence of the multi-task loss function as the goal, an accurate fault management model is established, which enables the model to more accurately identify faults, analyze the causes of faults, and provide corresponding management decisions, thereby improving the robustness of the model.
[0085] In one embodiment, the construction of the multi-task loss function includes: constructing a sub-task loss function based on the prediction error of each sub-task in the multi-task, and determining a task loss function based on the preset task weights of each sub-task and the sub-task loss function; for each cross-expert multi-task sub-model, constructing the interaction information between the multi-task and the fine-grained experts and the shared experts, and determining the expert interaction loss function based on the interaction information corresponding to each cross-expert multi-task sub-model and the preset influence weight of information sharing; and constructing the multi-task loss function based on the task loss function and the expert interaction loss function.
[0086] In this embodiment, the multi-task loss function is:
[0087]
[0088] Where L1 represents the multi-task loss function; M represents the number of tasks; T i This represents the i-th task; This represents the task weight of the i-th task; Let represent the subtask loss function of the i-th task; This indicates that for multiple tasks T1, T2...T M The losses are weighted and accumulated; w MI The total interaction information represents the weight of the total loss (i.e., the pre-defined weight of information sharing); T represents the multi-task set {T1, T2, ..., T}. M};EY Let {E1, E2, ..., T} be the set of all fine-grained experts and shared experts in the cross-expert multi-task sub-model. K};I(T;E Y ) represents the task T and expert E in the cross-expert multi-task sub-model. Y Interactive information; This represents the relationship between task T and expert E in multiple cross-expert multi-task sub-models. Y The interactive information is summed.
[0089] In formula (13), Partially representing the task loss function, Partially representing the expert interaction loss function.
[0090] In this embodiment, the multi-task loss function, which combines the task loss function and the expert interaction loss function, can not only alleviate the gradient contradiction problem between multiple tasks, but also ensure the effective interaction between different experts when processing multiple tasks, thereby ensuring the performance and accuracy of multi-task inference of cross-expert multi-task large model.
[0091] In one possible embodiment, a sub-task loss function is constructed based on the prediction error of each sub-task in the multi-task system. That is, it is constructed based on the error between the predicted fault keywords and the actual fault keywords, the error between the predicted fault causes and the actual fault causes, and the error between the predicted control decisions and the actual control decisions. Each sub-task loss function can be a cross-entropy loss function.
[0092] In one embodiment, constructing interaction information between multi-tasks, fine-grained experts, and shared experts includes: constructing a joint probability that any subtask is assigned to any expert, constructing a first marginal probability that any subtask is not assigned to any expert, and constructing a second marginal probability that any expert is not assigned any subtask; constructing a joint entropy between multi-tasks, fine-grained experts, and shared experts based on the joint probability, constructing a first marginal entropy of multi-tasks based on the first marginal probability, and constructing a second marginal entropy of fine-grained experts and shared experts based on the second marginal probability; and constructing interaction information based on the joint entropy, the first marginal entropy, and the second marginal entropy.
[0093] In this embodiment, in order to simulate the process of experts collaborating to handle tasks, a probability model is defined on the task set T and the expert set E. When the model is initialized, a certain probability distribution is randomly assigned to the task T.
[0094] For each cross-expert multi-task sub-model, task T is connected through the path network G. j Assigned to expert E j The probability (joint probability) can be expressed as:
[0095]
[0096] Among them, E j T represents the j-th expert; i Represents the i-th task; P(E) j |T i ) indicates that task T i Assigned to expert E j The joint probability; Represents task T i The number of corresponding fault descriptions; Represents task T i By expert E j Handling from fault description I k eigenvector x k The probability of.
[0097] According to the joint probability calculation formula P(E,T)=P(E|T)P(T), we can obtain P(E=∑ T P(E, T). Considering that experts should possess a certain level of expertise in a specific task, interactive information is used to represent this. Interactive information can be represented as:
[0098]
[0099] Where T represents the multi-task set {T1, T2, ..., T} M}; E represents the set of all fine-grained experts and shared experts {E1, E2, ..., T}. K}; I(T;E) represents the interaction information between multi-task and fine-grained experts, and shared experts; M represents the number of tasks; N represents the number of experts; T i E represents the i-th task; j P(T) represents the j-th expert; i E j ) represents task T i Assigned to expert E j The joint probability; P(T) i ) represents task T i No expert E was assigned j The marginal probability; P(E) j Expert E) j Unassigned task T i The marginal probability.
[0100] Joint probability P(T) i E j ) refers to task T i With expert E j The probability of simultaneous occurrence; marginal probability P(T) i ) represents task T iThe probability of occurrence, without considering any specific expert; marginal probability P(E j Expert E) j The probability of being selected, without considering any specific task.
[0101] According to formula (15), if experts assign the same frequency to all tasks, the interaction information I(T;E) will be 0. If each expert assigns one task, the mutual communication between experts will be captured to the maximum extent, and the interaction information I(T;E) will reach a maximum value of 1. To better understand the interaction information, it can be further expressed as:
[0102]
[0103] Where T represents the multi-task set {T1, T2, ..., T} M}; E represents the set of all fine-grained experts and shared experts {E1, E2, ..., T}. K}; I(T;E) represents the interaction information between multi-task and fine-grained experts, and shared experts; M represents the number of tasks; N represents the number of experts; T i E represents the i-th task; j P(T) represents the j-th expert; i E j ) represents task T i Assigned to expert E j The joint probability; logP(T) i E j ) represents P(T i E j The natural logarithm of ). P(T) represents the joint entropy between task T and expert E; i ) represents task T i No marginal probability was assigned to expert Ej; logP(T) i ) represents P(T i The natural logarithm of ). P(E) represents the marginal entropy of task T not assigned to expert E; j Expert E) j Unassigned task T i The marginal probability; logP(E) j ) represents P(E j The natural logarithm of ). This represents the marginal entropy of expert E when no task T is assigned.
[0104] In this embodiment, the relationship between different subtasks and experts is quantified by defining joint probability, marginal probability, and entropy based on these probabilities. This constructs interactive information between multitasks and fine-grained experts, as well as shared experts. In this way, the synergistic effect between different types of tasks can be strengthened, enabling the model to perform better when dealing with complex multitask problems.
[0105] Furthermore, in formula (16), the first term represents P(T) i E j )=P(E j |T i )P(T i The negative entropy of ) maximizes this conditional distribution P(E) that is beneficial to the stimulus conditional distribution. j |T i The sharpness of P(T) is due to the fact that P(T) is sharp. i P(T) is a constant determined by the data distribution and is not affected by the model's weight parameters. The second term represents the result of P(T). i The constant determined by ) can be ignored. The third term represents P(E) j The entropy determined by ) maximizes this, allowing experts to use the dataset evenly. Therefore, -I(T;E) is used. Y ) and w MI A cross-expert multi-task loss function is constructed to ensure effective interaction between different experts when handling multiple tasks, alleviate gradient inconsistencies between multiple tasks, and effectively improve the performance of the model.
[0106] Step S230: Using the interrelationships in the knowledge graph as reasoning constraints, perform multi-task reasoning optimization training on the initial fault management model to obtain the target fault management model.
[0107] In this embodiment, considering that the large model itself is a generative model, it may experience the illusion problem when outputting answers, that is, generating problematic or inaccurate answers. Therefore, after the multi-task large model pre-training is completed and the initial fault management model is obtained, the graph reasoning method is used to mine knowledge in the knowledge graph to enhance the reasoning ability of the large model, thereby mitigating the error caused by the illusion problem of the large model and improving the accuracy and efficiency of intelligent operation and maintenance decision-making for power battery faults.
[0108] In this way, the cross-expert multi-task large model has powerful natural language processing and data analysis capabilities, enabling it to deeply understand the fault phenomena, causes, and effects of power batteries. Combined with knowledge graphs, it can systematize and structure the fault knowledge of power batteries, forming a complete fault knowledge base, making the fault identification and diagnosis process more accurate, quickly locating fault points, and reducing misdiagnosis and missed diagnosis.
[0109] In one embodiment, the relationships in the knowledge graph are used as inference constraints to perform multi-task inference optimization training on the initial fault management model to obtain the target fault management model. This includes: inputting a fault dataset into the initial fault management model; extracting paths from the knowledge graph based on the fault phenomena and fault keywords corresponding to the time-frequency graphs of each signal to determine an initial path set, where the path is from fault keywords to fault causes and then to management decisions; calculating the occurrence probability of each path in the initial path set and performing retrieval inference on each path in the initial path set based on the occurrence probability to determine a target path set, where the occurrence probability of each path in the target path set is higher than a preset probability threshold; and performing multi-task inference optimization training on the initial fault management model based on each path in the initial path set and each path in the target path set to obtain the target fault management model.
[0110] Because the cross-expert, multi-task large model lacks prior knowledge of the relationships between fault phenomena, fault keywords, fault causes, and control decisions in the knowledge graph, it cannot directly generate inference paths from the knowledge graph. Furthermore, the large model cannot correctly understand the inference paths and cannot perform appropriate reasoning based on the paths to arrive at the correct answer to the question.
[0111] Therefore, in this embodiment, the multi-task large model is first pre-trained using the signal time-frequency diagram and fault description of the power battery. Then, the pre-trained cross-expert multi-task large model is retrained using graph reasoning combined with a knowledge graph. This effectively solves the illusion problem of the large model by utilizing the interrelationships between fault phenomena, fault keywords, fault causes, and control decisions in the knowledge graph. Based on path extraction and retrieval reasoning, knowledge is extracted from the knowledge graph and incorporated into the cross-expert multi-task large model to generate reliable relational paths. The extracted paths drive the cross-expert multi-task large model for reasoning training. First, the knowledge graph is used to generate paths related to multiple tasks. Then, the paths are filtered, and the answers to multiple tasks are inferred from the filtered paths. This effectively improves the accuracy and efficiency of the target fault control model for power battery fault control.
[0112] Furthermore, the combination of a cross-expert, multi-task large-scale model with a knowledge graph ensures the accuracy of the model's predictions. This not only enables the development of targeted and reliable fault management strategies, including fault prevention and control measures such as early replacement of aging batteries and adjustment of charging strategies to reduce the failure rate and extend battery life, but also allows for the automatic recommendation of optimal solutions based on the fault type and its severity, improving decision-making efficiency and intelligence. Simultaneously, as a structured knowledge representation method, knowledge graphs facilitate knowledge sharing and collaborative work among different departments and teams. In the fault management of new energy vehicle power batteries, constructing a unified knowledge graph enables cross-departmental and cross-domain knowledge sharing and exchange, further enhancing the effectiveness of power battery fault management.
[0113] In this embodiment, each edge in the knowledge graph representing the relationship between fault phenomena, fault keywords, fault causes, and control decisions is assigned an edge weight. The edge weight represents the probability of a relationship existing between two entities and can be learned from historical fault data of the power battery. During the multi-task inference optimization training of the initial fault control model, firstly, based on the fault phenomena and fault keywords corresponding to the time-frequency graphs of each signal, all possible paths are determined from the knowledge graph to form an initial path set. Then, the occurrence probability of each path in the initial path set is calculated according to the edge weights, and paths with occurrence probabilities higher than a probability threshold are integrated into a target path set. Furthermore, the initial fault control model is constrained to ensure the credibility of paths in both the initial and target path sets, thus achieving multi-task inference optimization training. This further guarantees the predictive performance of the target fault control model.
[0114] Please see Figure 6 , Figure 6 This is a structural diagram illustrating a target fault management model, as shown in an exemplary embodiment of this application. Figure 6 As shown, the target fault management model comprises a cross-expert multi-task large model and a graph reasoning structure. First, the multi-task large model is pre-trained using the signal time-frequency diagram of the power battery and the corresponding fault description to obtain the cross-expert multi-task large model. Then, the pre-trained cross-expert multi-task large model is retrained using the graph reasoning structure in conjunction with a knowledge graph, thereby effectively solving the illusion problem of the cross-expert multi-task large model by utilizing the knowledge in the knowledge graph. The graph reasoning structure includes a path extraction module and a retrieval reasoning module. The path extraction module mainly uses the knowledge graph to generate paths related to the problem, while the retrieval reasoning module mainly filters the paths extracted by the path extraction module and infers the answer to the problem based on the selected paths.
[0115] In this embodiment, the graph reasoning method can be represented as:
[0116] P θ(a|q, G)=∑ z∈Z P θ (a|q,z,G)P θ (z|q) Formula (17)
[0117] Where θ represents the weight parameters of the cross-expert multi-task large model; P θ (a|q, G) represents the probability that the cross-expert multi-task large model generates the answer a given question q and knowledge graph G; z represents the path generated by the cross-expert multi-task large model; Z represents the set of possible paths; P θ (z|q) represents the prior probability of generating path z given problem q, which can be calculated by the path extraction module; P θ (a|q, z, G) represents the probability that the cross-expert multi-task large model generates the answer a given question q, path z, and knowledge graph G. It can be calculated through the retrieval and inference module. Furthermore, the given question q is based on inferring the cause of the fault and control decisions based on fault phenomena and fault keywords; the answer a is the path, which includes the reasoning route from fault keywords to fault causes and then to control decisions; path z is the reasoning route from question q to the potential answer a; path z is essentially a series of intermediate steps or reasoning processes, while the answer a is the final result, a specific answer derived through the guidance of path z and the model's learning and reasoning.
[0118] In one embodiment, based on each path in the initial path set and each path in the target path set, a multi-task inference optimization training is performed on the initial fault management model to obtain the target fault management model. This includes: constructing a composite loss function for multi-task inference optimization training, the composite loss function consisting of a first probability of generating a reliable path in path extraction and a second probability of generating a correct path in retrieval inference, the first probability being determined by evaluating the reliability of each path in the initial path set and the second probability being determined by evaluating the correctness of each path in the target path set; and iteratively updating the weight parameters in the initial fault management model with the goal of maximizing the first probability and the second probability to obtain the target fault management model.
[0119] In this embodiment, by maximizing the probability of generating a reliable path in path extraction and the probability of generating a correct path in retrieval inference, that is, by jointly optimizing path extraction and retrieval inference, the overall performance of the target fault management model can be significantly improved, making the model more efficient and reliable in power battery fault management.
[0120] In this embodiment, the variational lower bound in the optimization formula (17) is obtained as follows:
[0121] logP(a|q,G)≥E z~Q(z) [logP θ [a|q,z,G)]-DKL (Q(z)||P θ (z|q)) Formula (18)
[0122] Where P(a|q,G) represents the probability that the cross-expert multi-task large model generates the answer a given question q and knowledge graph G; z represents the path generated by the cross-expert multi-task large model; Q(z) represents the posterior distribution of the path z generated based on knowledge graph G, i.e., the probability distribution of generating path z after observing question q and knowledge graph G; P θ (a|q, z, G) represents the probability that a cross-expert multi-task large model generates the answer a given question q, path z, and knowledge graph G; P θ (z|q) represents the prior probability of generating path z given problem q; D KL (Q(z)||P θ (z|q) represents the prior probability P. θ The KL divergence (Kullback-Leibler Divergence, relative entropy) between (z|q) and the posterior distribution Q(z); E z~Q(z) [logP θ [a|q, z, G)] represents the expectation of generating reliable answers based on paths and knowledge graphs.
[0123] In Equation (17), it is necessary to minimize the KL divergence and maximize the expectation to promote the generation of reliable paths in the cross-expert multi-task large model. By maximizing this variational lower bound, an approximate optimal path distribution Q(z) is found, which makes the probability of the generated answer a as high as possible while maintaining the rationality of the path distribution.
[0124] In path extraction, knowledge is extracted from the knowledge graph and used to generate inference paths in a large model. The reliability of faulty inference paths is improved by minimizing KL divergence. For example, given a question q and an answer a, connection e can be obtained from the knowledge graph. q and e a Fault path w z (e q e a ) = e q The corresponding relation set z = {r1, r2, ..., r} l The posterior distribution Q(z) can be estimated as:
[0125]
[0126] Assume all paths follow a uniform distribution, where Q(z) represents the probability distribution of path z after observing question q and knowledge graph G; Q(z|a, q, G) represents the probability that the cross-expert multi-task large model generates answer a given question q, path z, and knowledge graph G; and Z represents the number of paths. This indicates that in the knowledge graph G, there exists a path between question q and answer a.
[0127] According to formula (19), the objective function for path extraction is:
[0128]
[0129] Among them, L plan D represents the objective function for path extraction. KL (Q(z)||P θ (z|q)) and the transformed D KL (Q(z|a,q,G)||P θ (z|q) represents the prior probability P. θ The KL divergence between (z|q) and the posterior distribution Q(z); z represents the path generated by the cross-expert multi-task large model; Z * Let q represent the set of reliable paths between question q and answer a; Z represents the set of reliable paths * The probability of each reliable path in the middle.
[0130] By optimizing formula (20), the probability of the cross-expert multi-task large model extracting knowledge from the knowledge graph and obtaining reliable paths can be maximized, and reliable paths with a probability exceeding a certain threshold can be integrated into the initial path set.
[0131] In retrieval inference, the cross-expert multi-task large model selects suitable paths from the initial path set obtained by path extraction and infers the answer to the question. The probability of performing retrieval inference on multiple reliable paths can be defined as:
[0132]
[0133] in, This indicates that a product operation is performed on each path in the initial path set Z.
[0134] By approximating the expected value using K path schemes, the objective function for retrieval inference can be expressed as:
[0135]
[0136] Among them, L reason This represents the objective function for retrieval reasoning; This represents the initial set of paths obtained from path extraction; This represents maximizing the expectation of generating the correct answer based on the path and knowledge graph.
[0137] Formula (22) can maximize the probability that the cross-expert multi-task large model can extract knowledge from the knowledge graph and obtain the correct path, and integrate the correct paths with a probability higher than a certain threshold into the target path set.
[0138] Therefore, in multi-task inference optimization training, the composite loss function of a cross-expert multi-task large model can be expressed as:
[0139]
[0140] Where L2 represents the composite loss function; This represents the objective function for path extraction. This represents the objective function for retrieval reasoning.
[0141] In one possible embodiment, path extraction primarily utilizes knowledge graphs to infer and generate faulty paths, designing the following prompt words and path formats:
[0142] <prompt>Please deduce the path based on the problem.
[0143] <question>
[0144] <response> <path>r1<SEP>r2<SEP>...<SEP>r l < / PATH>
[0145] in, <path>, <SEP>, < / PATH> represent the start point, separator, and end point of the path respectively, such as failure keywords, failure causes, and control decisions in sequence.
[0146] In a possible embodiment, the optimization objective in path extraction can be expressed as:
[0147] (t i |t < i, q; w z represents the probability of generating t z when given t < i, question q, and path w i .
[0155] As a possible embodiment, it is stated that the weight parameter θ of the model that maximizes the objective function needs to be found.
[0156] In a possible embodiment, the iterative update of the weight parameters in the initial fault control model includes the number of shared experts in the cross-expert multi-task large model and the learning parameters of the path network. The learning parameters include the expert assignment weight matrix and the noise adjustment weight matrix.
[0157] Step S240, using the target fault control model to perform fault control on the power battery.
[0158] Among them, performing fault control on the power battery includes obtaining the fault keywords, fault causes, and control decisions of the power battery.
[0159] In an embodiment, using the target fault control model to perform fault control on the power battery includes: obtaining the target signal time-frequency diagram and the corresponding target fault description of the power battery to be tested; inputting the target signal time-frequency diagram and the target fault description into the target fault control model to obtain the target fault keywords, target fault causes, and target control decisions corresponding to the power battery to be tested.
[0160] In this embodiment, the target fault control model is obtained by combining the cross-expert multi-task large model and the knowledge graph. Using the target fault control model to perform fault control on the power battery to be tested improves the efficiency and accuracy of the fault control of the power battery to be tested.
[0161] In a possible embodiment, using the target fault control model to perform fault control on the power battery can obtain the fault keywords, multiple fault causes corresponding to the fault keywords, and the control decisions corresponding to each fault cause.
[0162] The aforementioned power battery fault management method first acquires a fault dataset and a knowledge graph. The fault dataset includes time-frequency graphs of various signals from the power battery and corresponding fault descriptions for each signal. The fault descriptions include fault phenomena and fault keywords. The knowledge graph includes the relationships between fault phenomena, fault keywords, fault causes, and management decisions. Then, a multi-task large-scale model is constructed, and multi-task inference training is performed on the large-scale model based on the fault dataset to obtain an initial fault management model. The multi-tasks include fault keyword identification, fault cause analysis, and management decision formulation. Finally, the relationships in the knowledge graph are used as inference constraints to optimize the initial fault management model through multi-task inference. The training process yields a target fault management model, which is then used to manage power battery faults. This model is obtained through a combination of multi-task large-scale models and knowledge graphs. Using this model, fault keywords and causes of power batteries can be accurately predicted, and corresponding management decisions can be made. Furthermore, through an automated process of fault identification, cause analysis, and measure formulation, fault diagnosis can be completed quickly, reducing manual intervention and decision-making time, improving fault decision-making efficiency and the level of intelligence in fault diagnosis, and ensuring the fault identification and early warning capabilities of power batteries. This guarantees the accuracy and efficiency of power battery fault diagnosis.
[0163] Please see Figure 7 , Figure 7 This is a block diagram illustrating a power battery fault management system as an exemplary embodiment of this application. The system can be applied to... Figure 1 The implementation environment shown is intended to illustrate the system, but it should be understood that the system can also be applied to other exemplary implementation environments. This embodiment does not limit the implementation environment to which the system is applicable.
[0164] like Figure 7 As shown, in an exemplary embodiment, the power battery fault management system 700 includes at least an acquisition module 710, a pre-training module 720, an optimization training module 730, and a management module 770, which are described in detail below:
[0165] The acquisition module 710 is used to acquire fault datasets and knowledge graphs. The fault datasets include time-frequency diagrams of various signals of the power battery and fault descriptions corresponding to each time-frequency diagram. The fault descriptions include fault phenomena and fault keywords. The knowledge graphs include the relationships between fault phenomena, fault keywords, fault causes and control decisions.
[0166] The pre-training module 720 is used to build a multi-task large model and perform multi-task inference training on the multi-task large model based on the fault dataset to obtain an initial fault management model. The multi-tasks include fault keyword identification, fault cause analysis and management decision formulation.
[0167] The optimization training module 730 is used to use the interrelationships in the knowledge graph as reasoning constraints to perform multi-task reasoning optimization training on the initial fault management model and obtain the target fault management model.
[0168] The control module 740 is used to manage the faults of the power battery using the target fault management model.
[0169] It should be noted that the power battery fault management system provided in the above embodiments and the power battery fault management method provided in the above embodiments belong to the same concept. The content of the operation performed by each module has been described in detail in the method embodiments, and will not be repeated here.
[0170] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0171] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0172] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.< / path> < / path> < / response> < / question> < / prompt>
Claims
1. A method for fault management of power batteries, characterized in that, The method includes: Obtain a fault dataset and a knowledge graph. The fault dataset includes time-frequency graphs of various signals of the power battery and fault descriptions corresponding to each time-frequency graph. The fault descriptions include fault phenomena and fault keywords. The knowledge graph includes the interrelationships between fault phenomena, fault keywords, fault causes and control decisions. A multi-task large model is constructed, and multi-task inference training is performed on the multi-task large model based on the fault dataset to obtain an initial fault management model. The multi-task includes the identification of fault keywords, the analysis of fault causes, and the formulation of management decisions. Using the interrelationships in the knowledge graph as inference constraints, the initial fault management model is optimized and trained through multi-task inference to obtain the target fault management model. The aforementioned target fault management model is used to manage the faults of the power battery.
2. The power battery fault control method according to claim 1, characterized in that, The construction methods of the multi-task large model include: A basic large model is constructed, which includes at least one sub-model. The sub-model integrates a visual transformer structure and a bidirectional encoder representation transformation structure. The visual transformer structure is used to process the time-frequency diagram of the signal, and the bidirectional encoder representation transformation structure is used to process the fault description. The forward feedback network in the visual transformer structure and the bidirectional encoder representation transformation structure is fine-grained to obtain multiple fine-grained experts, and at least one shared expert is set among the multiple fine-grained experts. The fine-grained experts are used to process the unit features in the signal time-frequency diagram or the fault description, and the shared expert is used to process the shared features of each unit feature. Initialize the gating values of each of the fine-grained experts and each of the shared experts, and construct a cross-expert multi-task loss function to obtain the multi-task large model. The multi-task loss function is composed of a task loss function and an expert interaction loss function. The multi-task large model is a cross-expert multi-task large model that includes at least one cross-expert multi-task sub-model.
3. The power battery fault control method according to claim 2, characterized in that, The step of training the multi-task large model with multi-task inference based on the fault dataset to obtain an initial fault management model includes: Each signal time-frequency diagram and corresponding fault description in the fault dataset is labeled with actual tags, which include actual fault keywords, actual fault causes, and actual control decisions. The labeled fault dataset is used to train the multi-task large model for multi-task inference. The number of shared experts in the visual transformer structure and the bidirectional encoder representation transformation structure in the cross-expert multi-task sub-model, as well as the learning parameters of the path network in the cross-expert multi-task sub-model, are iteratively updated. The learning parameters include the expert allocation weight matrix and the noise adjustment weight matrix. The initial fault control model is obtained when the loss value of the multi-task loss function converges to the preset loss value.
4. The power battery fault control method according to claim 2, characterized in that, The construction method of the multi-task loss function includes: A subtask loss function is constructed based on the prediction error of each subtask in the multi-task, and the task loss function is determined based on the preset task weights of each subtask and the subtask loss function. For each of the cross-expert multi-task sub-models, the interaction information between the multi-task and the fine-grained expert and the shared expert is constructed, and the expert interaction loss function is determined based on the interaction information corresponding to each of the cross-expert multi-task sub-models and the preset influence weight of information sharing. The multi-task loss function is constructed based on the task loss function and the expert interaction loss function.
5. The power battery fault control method according to claim 4, characterized in that, The construction of the interaction information between the multi-task, the fine-grained expert, and the shared expert includes: Construct the joint probability that any subtask is assigned to any expert, construct the first marginal probability that any subtask is not assigned to any expert, and construct the second marginal probability that any expert is not assigned any subtask. The joint entropy between the multi-task, the fine-grained expert, and the shared expert is constructed based on the joint probability; the first marginal entropy of the multi-task is constructed based on the first marginal probability; and the second marginal entropy of the fine-grained expert and the shared expert is constructed based on the second marginal probability. The interaction information is constructed based on the joint entropy, the first marginal entropy, and the second marginal entropy.
6. The power battery fault control method according to claim 1, characterized in that, The step of using the interrelationships in the knowledge graph as inference constraints to perform multi-task inference optimization training on the initial fault management model to obtain the target fault management model includes: The fault dataset is input into the initial fault management model. Based on the fault phenomenon and fault keywords corresponding to each signal time-frequency graph, path extraction is performed from the knowledge graph to determine the initial path set. The path is from fault keywords to fault causes and then to management decisions. Calculate the occurrence probability of each path in the initial path set, and perform retrieval and reasoning on each path in the initial path set based on the occurrence probability to determine the target path set, wherein the occurrence probability of each path in the target path set is higher than a preset probability threshold. Based on each path in the initial path set and each path in the target path set, the initial fault management model is optimized and trained using multi-task reasoning to obtain the target fault management model.
7. The power battery fault control method according to claim 6, characterized in that, The step of performing multi-task inference optimization training on the initial fault management model based on each path in the initial path set and each path in the target path set to obtain the target fault management model includes: A composite loss function for multi-task reasoning optimization training is constructed. The composite loss function consists of a first probability of generating a reliable path in path extraction and a second probability of generating a correct path in retrieval reasoning. The first probability is determined by evaluating the reliability of each path in the initial path set, and the second probability is determined by evaluating the correctness of each path in the target path set. With the goal of maximizing the first probability and the second probability, the weight parameters in the initial fault management model are iteratively updated to obtain the target fault management model.
8. The power battery fault control method according to any one of claims 2 to 5, characterized in that, The cross-expert multi-task sub-model consists of multiple models; Before obtaining the aforementioned multi-task large model, the following is also included: A regularization layer is set between the two cross-expert multi-task sub-models, and residual connections are performed on the multiple cross-expert multi-task sub-models; Learnable embedding vectors are set in the hidden layers of each of the cross-expert multi-task sub-models. These embedding vectors are used to enable the perception of the multi-task by each of the fine-grained experts and each of the shared experts.
9. The power battery fault control method according to any one of claims 1 to 7, characterized in that, The method of using the target fault management model to manage the faults of the power battery includes: Obtain the time-frequency diagram of the target signal of the power battery under test and the corresponding target fault description; The target signal time-frequency diagram and the target fault description are input into the target fault management model to obtain the target fault keywords, target fault causes and target management decisions corresponding to the power battery under test.
10. A power battery fault management system, characterized in that, The system includes: The acquisition module is used to acquire a fault dataset and a knowledge graph. The fault dataset includes various signal time-frequency diagrams of the power battery and fault descriptions corresponding to each signal time-frequency diagram. The fault descriptions include fault phenomena and fault keywords. The knowledge graph includes the interrelationships between fault phenomena, fault keywords, fault causes and control decisions. The pre-training module is used to construct a multi-task large model and perform multi-task inference training on the multi-task large model based on the fault dataset to obtain an initial fault management model. The multi-task includes the identification of fault keywords, the analysis of fault causes, and the formulation of management decisions. The optimization training module is used to use the interrelationships in the knowledge graph as reasoning constraints to perform multi-task reasoning optimization training on the initial fault management model to obtain the target fault management model. The control module is used to manage the power battery faults using the target fault control model.
Citation Information
Patent Citations
Fault diagnosis method, system and device and storage medium
CN115718802A
Knowledge graph construction method for fault diagnosis and analysis of lithium ion battery of energy storage station
CN116384487A