Fault detection method and device and storage medium
By performing vector space conversion and gated recurrent unit processing on the original signal time series of new energy vehicles, long and short trend features are extracted, which solves the problem of low fault detection accuracy in the existing technology and achieves higher fault detection accuracy.
Patent Information
- Application Number
- CN202510699872.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-12
AI Technical Summary
The fault detection method based on signal size analysis in the existing technology has low detection accuracy and is difficult to accurately identify the fault type of new energy vehicles.
By obtaining the original signal time series of the target detection component, it is mapped into a knowledge-enhanced feature sequence using vector space conversion processing, and the gated recurrent unit is used to extract long and short trend features to identify fault characteristics and fault types.
The accuracy of fault detection is improved, the problem of inaccurate fault detection caused by signal size judgment is avoided, and the fault type of new energy vehicles can be identified more accurately.
Smart Images

Figure CN120632675A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things technology, and in particular to a fault detection method, device, and storage medium. Background Art
[0002] With the rapid development of new energy vehicle technology, the complexity of new energy vehicles continues to increase. In order to ensure the safety of new energy vehicles, it is necessary to perform fault detection on new energy vehicles. When performing fault detection, it is necessary to detect various signals emitted by new energy vehicles and compare the signal values of each signal with their corresponding signal thresholds, so as to identify abnormal signals in these signals and query the fault type corresponding to the abnormal signal, and then troubleshoot the new energy vehicle according to the fault type. Summary of the Invention
[0003] The present application provides a fault detection method, device and storage medium to solve the problem of low detection accuracy of fault detection methods based on signal size analysis.
[0004] In order to solve the above technical problems, the technical solution of this application is solved through the following embodiments:
[0005] An embodiment of the present application provides a fault detection method, including: obtaining an original signal time series corresponding to a target detection component; mapping the original signal time series into a knowledge-enhanced feature sequence by performing vector space conversion processing on the original signal time series; extracting long-short trend features from the knowledge-enhanced feature sequence using a gated recurrent unit; and determining, based on the long-short trend features, a fault feature corresponding to the target detection component and identifying the fault type corresponding to the fault feature.
[0006] Wherein, the original signal time series is mapped into a knowledge-enhanced feature sequence by performing vector space conversion processing on the original signal time series, including: inputting the original signal time series into a pre-trained first model and obtaining the knowledge-enhanced feature sequence output by the first model; wherein, the first model includes: a sequentially connected encoder, a divergence constraint unit and a decoder; using the encoder to encode the original signal time series located in the first vector space into a latent space feature vector located in the second vector space; using the divergence constraint unit, according to the standard normal distribution, performing relative entropy divergence constraint on the latent space feature vector; using the decoder to map the latent space feature vector after the relative entropy divergence constraint back to the first vector space to obtain the knowledge-enhanced feature sequence.
[0007] Among them, in the process of training the first model, it includes: for each signal type, according to the vector values corresponding to the signal type at each time step in the latent space feature vector, determining the variance and mean corresponding to the signal type; according to the variance and mean corresponding to the signal type, the signal values corresponding to the signal type at each time step in the original signal time series, and the feature values corresponding to the signal type at each time step in the knowledge enhanced feature sequence, determining the loss value corresponding to the signal type; accumulating the loss values corresponding to each of the signal types to obtain the loss value corresponding to the first model and when it is determined that the first model meets the preset model convergence condition according to the loss value corresponding to the first model, determining that the first model has completed training.
[0008] Wherein, the use of the gated recurrent unit to extract the long-short trend features from the knowledge enhancement feature sequence includes: inputting the knowledge enhancement feature sequence into a pre-trained second model and obtaining the long-short trend features corresponding to the last time step output by the second model; wherein, the second model includes: a plurality of extraction modules corresponding one to one to each time step in the knowledge enhancement feature sequence; each of the extraction modules is connected to the extraction modules corresponding to the first two time steps according to the corresponding time step; each extraction module includes: a sub-line gated recurrent unit, an attention unit and a main-line gated recurrent unit connected in sequence; the sub-line gated recurrent unit is used to generate the current time step according to the main-line hidden state features corresponding to the first two time steps and the sub-line hidden state features corresponding to the previous time step. The attention unit is used to determine the short-term fluctuation feature corresponding to the current time step according to the main-line hidden state feature corresponding to the previous time step and the secondary-line hidden state feature corresponding to the current time step; and the fused output feature corresponding to the current time step is determined according to the short-term fluctuation feature corresponding to the current time step and the main-line hidden state feature corresponding to the previous time step; the main-line gated recurrent unit is used to determine the main-line hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step in the knowledge enhancement feature sequence, the fused output feature corresponding to the previous time step, and the fused output feature corresponding to the current time step; and the main-line hidden state feature corresponding to the current time step is determined as the long-short trend feature corresponding to the current time step.
[0009] Wherein, generating the secondary line hidden state feature corresponding to the current time step based on the main line hidden state features corresponding to the first two time steps and the secondary line hidden state features corresponding to the previous time step includes: determining the difference between the main line hidden state features corresponding to the first two time steps; determining the secondary line update gate and the secondary line reset gate corresponding to the current time step based on the difference and the secondary line hidden state feature corresponding to the previous time step; determining the secondary line candidate hidden state feature corresponding to the current time step based on the difference, the secondary line reset gate corresponding to the current time step, and the secondary line hidden state feature corresponding to the previous time step; determining the secondary line hidden state feature corresponding to the current time step based on the secondary line update gate corresponding to the current time step, the secondary line hidden state feature corresponding to the previous time step, and the secondary line candidate hidden state feature corresponding to the current time step.
[0010] Among them, the short-term fluctuation characteristics corresponding to the current time step are determined based on the main-line hidden state characteristics corresponding to the previous time step and the sub-line hidden state characteristics corresponding to the current time step, including: determining the attention score corresponding to the current time step based on the main-line hidden state characteristics corresponding to the previous time step and the sub-line hidden state characteristics corresponding to the current time step; determining the attention weight corresponding to the current time step based on the attention score corresponding to the current time step and the attention scores corresponding to all time steps before the current time step; determining the short-term fluctuation characteristics corresponding to the current time step based on the attention weight corresponding to the current time step and the sub-line hidden state characteristics corresponding to the current time step.
[0011] Wherein, the determining the mainline hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step, the fusion output feature corresponding to the previous time step and the fusion output feature corresponding to the current time step in the knowledge enhancement feature sequence includes: determining the mainline update gate and the mainline reset gate corresponding to the current time step according to the feature value corresponding to the current time step and the fusion output feature corresponding to the previous time step; determining the mainline candidate hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step, the mainline reset gate corresponding to the current time step and the fusion output feature corresponding to the previous time step; determining the mainline hidden state feature corresponding to the current time step according to the mainline candidate hidden state feature corresponding to the current time step, the mainline update gate corresponding to the current time step and the fusion output feature corresponding to the current time step.
[0012] Among them, determining the fault characteristics corresponding to the target detection component and identifying the fault type corresponding to the fault characteristics based on the long-short trend characteristics includes: performing linear conversion processing on the long-short trend characteristics to obtain the fault characteristics corresponding to the target detection component; and identifying the fault type corresponding to the target detection component based on the fault characteristics corresponding to the target detection component.
[0013] An embodiment of the present application also provides a fault detection device, including: an acquisition module for acquiring an original signal time series corresponding to a target detection component; a conversion module for mapping the original signal time series into a knowledge-enhanced feature sequence by performing vector space conversion processing on the original signal time series; an extraction module for extracting long-short trend features from the knowledge-enhanced feature sequence using a gated cyclic unit; and a detection module for determining, based on the long-short trend features, the fault features corresponding to the target detection component and identifying the fault type corresponding to the fault features.
[0014] An embodiment of the present application also provides a fault detection device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the processor is configured to: execute a fault detection program stored in the memory to implement any of the above-mentioned fault detection methods.
[0015] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed to implement any of the above-mentioned fault detection methods.
[0016] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application can obtain the original signal time series of the target detection component; by performing vector space conversion processing on the original signal time series, the original signal time series is mapped into a knowledge enhanced feature sequence; the gated recurrent unit is used to extract long and short trend features from the knowledge enhanced feature sequence; based on the long and short trend features, the fault features corresponding to the target detection component are determined and the fault type corresponding to the fault features is identified. The embodiment of the present application does not directly determine the fault type by collecting the signal value at a single time point, but because the state of the target detection component is a continuous development process, the original signal time series of the target detection component is obtained, and the long and short trend features are extracted based on the original signal time series. The fault type of the target detection component is identified based on the long and short trend features that can reflect the long and short trends of the target detection component. The fault detection method of the embodiment of the present application not only has a high fault detection accuracy, but also can avoid the problem of inaccurate fault detection caused by fault identification based on signal size. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0020] Figure 1 is a flow chart of a fault detection method according to an embodiment of the present application;
[0021] Figure 2 1 is a structural diagram of a first module according to an embodiment of the present application;
[0022] Figure 3 is a flowchart of the steps of vector space conversion processing according to an embodiment of the present application;
[0023] Figure 4 is a structural diagram of a second model according to an embodiment of the present application;
[0024] Figure 5 A flowchart of the steps for extracting long-short trend features according to an embodiment of the present application;
[0025] Figure 6 is a structural diagram of a fault detection device according to an embodiment of the present application;
[0026] Figure 7 2 is a structural diagram of a fault detection device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0028] The disclosure below provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0029] The present application embodiment provides a fault detection method. Figure 1 FIG. 1 is a flow chart of a fault detection method according to an embodiment of the present application.
[0030] Step S110: Acquire the original signal time series corresponding to the target detection component.
[0031] The target detection component refers to the component to be detected for faults. Types of target detection components include, but are not limited to, motors in new energy vehicles.
[0032] The original signal time series refers to a time series formed by detection signals obtained by performing signal detection on a target detection component using a preset detection device.
[0033] The original signal time series includes signal values detected at multiple time steps. Furthermore, the original signal time series includes signal values of at least one signal type detected at multiple time steps. A time step refers to the time interval between signal detections. The detection device can be controlled to detect a signal value once at each time step, and the signal values are arranged in descending order according to the time steps to form the original signal time series.
[0034] Furthermore, the number of detection devices is at least one. The signal type of the detection signal is at least one. The types of detection devices include, but are not limited to, current detection devices and voltage detection devices. The signal types of the detection signal include, but are not limited to, current and voltage.
[0035] Furthermore, the original signal time series can be a matrix. The original signal time series includes at least one row and at least one column, and the elements in the original signal time series are signal values. In the original signal time series, signal values in the same row correspond to the same signal type, and signal values in the same column correspond to the same time step. From the first column to the last column of the original signal time series, the signal values can be arranged in ascending order of time step.
[0036] For example: the original signal time series is a matrix with 2 rows and 20 columns. The first row corresponds to the signal value of the current signal, the second row corresponds to the signal value of the voltage signal, the first column is the signal value detected at 10:00 am, the second column is the signal detected at 10:01 am, the third column is the signal value detected at 10:02 am, and so on. The 20th column is the signal value detected at 10:20 am.
[0037] Step S120 , mapping the original signal time series into a knowledge-enhanced feature sequence by performing vector space conversion processing on the original signal time series.
[0038] Vector space conversion processing refers to compressing the original signal time series from the signal value in high-dimensional space to the feature value in low-dimensional space.
[0039] The knowledge-enhanced feature sequence is a low-dimensional spatial representation of the original signal time series. The eigenvalues in the knowledge-enhanced feature sequence correspond one-to-one to the signal values in the original signal time series. That is to say, the knowledge-enhanced feature sequence includes: the eigenvalues corresponding to the signal values detected in multiple time steps. Furthermore, the knowledge-enhanced feature sequence includes: the eigenvalues corresponding to the signal values of at least one signal type detected in multiple time steps. In this way, the knowledge-enhanced feature sequence can also be a matrix, the elements are the eigenvalues corresponding to the signal values, the rows correspond to the signal types, the columns correspond to the time steps, and the number of rows and columns is the same as the original signal time series.
[0040] Step S130 , using a gated recurrent unit to extract long and short trend features from the knowledge enhanced feature sequence.
[0041] The Gated Recurrent Unit (GRU) is used to extract the long-short trend features corresponding to each time step in the knowledge augmentation sequence based on the feature value of that time step and the state information conveyed by the feature value before that time step. In other words, the process of extracting long-short trend features is a recursive process. The long-short trend features corresponding to each time step carry information conveyed by the previous time step. This recursive process also reflects that the state of the target detection component is a continuously changing process.
[0042] Furthermore, in the case where the knowledge-enhanced feature sequence includes feature values corresponding to multiple signal types, a gated recurrent unit can be used in the knowledge-enhanced feature sequence to extract, for each time step, the long-short trend features corresponding to the time step based on the feature values corresponding to each signal type at the time step and the state information conveyed by the feature values of each signal type before the time step.
[0043] The long and short trend characteristics are used to reflect the long-term trend state and short-term fluctuation state of the signal.
[0044] Furthermore, the long-short trend features include: long-term trend features within a first time length and short-term fluctuation features within a second time length. The long-term trend features are used to reflect the long-term trend state of the signal within the first time length. The short-term fluctuation features are used to reflect the short-term fluctuation state of the signal within the second time length. The first time length is greater than the second time length. The first time length can be the time difference between the start time of the first time step and the end time of the last time step in the original signal time series, that is, the time length corresponding to all time steps. The second time length can be the time length corresponding to two adjacent time steps.
[0045] Step S140 : determining the fault feature corresponding to the target detection component according to the long-short trend feature and identifying the fault type corresponding to the fault feature.
[0046] Fault signatures are features obtained by linearly transforming long-short trend features. Since the dimensions of long-short trend features tend to be large when there are many signal types, linear transformation can be used to reduce the number of dimensions of the long-short trend features to a preset number of dimensions, thereby reducing the tensor size of the long-short trend features.
[0047] The fault type refers to the type of fault corresponding to the target detection component. For example, fault types include but are not limited to: poor contact between the brush and commutator, damaged rotor bearings, aging of the magnetic circuit, or demagnetization of the magnet.
[0048] Furthermore, since the state change process of the target detection component is continuous, in order to cope with this continuous change, the embodiment of the present application analyzes this continuous change so as to identify whether there is a fault in the target detection component during the continuous change. In this way, the process of extracting long-short trend features in the embodiment of the present application is a recursive process, and the long-short trend features corresponding to the last time step can best represent the current state of the target detection component. Therefore, the fault features corresponding to the target detection component can be determined based on the long-short trend features corresponding to the last time step, and the fault type corresponding to the target detection component can be identified based on the fault features.
[0049] In an embodiment of the present application, the original signal time series of the target detection component is obtained; the original signal time series is mapped into a knowledge-enhanced feature sequence by performing vector space conversion processing on the original signal time series; the long-short trend features are extracted from the knowledge-enhanced feature sequence using a gated cyclic unit; based on the long-short trend features, the fault features corresponding to the target detection component are determined and the fault type corresponding to the fault features is identified. The embodiment of the present application does not directly determine the fault type by collecting the signal value at a single time point, but because the state of the target detection component is a continuously evolving process, the original signal time series of the target detection component is obtained, and the long-short trend features are extracted based on the original signal time series. The fault type of the target detection component is identified based on the long-short trend features that can reflect the long-short trend of the target detection component. The fault detection method of the embodiment of the present application not only has a high fault detection accuracy, but also can avoid the problem of inaccurate fault detection caused by fault identification based on signal size.
[0050] In order to make the embodiments of the present application easier to understand, the fault detection method of the embodiments of the present application will be further described below.
[0051] In the embodiments of the present application, since the signal can reflect the operating status of the target detection component, after determining the target detection component, the original signal time series corresponding to the target detection component within a preset detection time period can be obtained. The start and end times of the detection time period can be set as required. For example, the original signal time series of the target detection component within the previous two hours can be obtained.
[0052] In an embodiment of the present application, after obtaining the original signal time series corresponding to the target detection component, the original signal time series can be mapped into a knowledge-enhanced feature sequence by performing vector space conversion processing on the original signal time series.
[0053] Specifically, the original signal time series located in the first vector space can be encoded into a latent space feature vector located in the second vector space; the latent space feature vector can be constrained by relative entropy divergence (Kullback Leibler Divergence, abbreviated as KL divergence) according to the standard normal distribution; and the latent space feature vector after the relative entropy divergence constraint can be mapped back to the first vector space to obtain the knowledge-enhanced feature sequence.
[0054] The first vector space refers to the vector space where the original signal time series is located.
[0055] The second vector space refers to the latent vector space.
[0056] The latent space feature vector refers to the feature vector obtained by mapping the original signal time series from the first vector space to the second vector space. The latent space feature vector includes: the vector values corresponding to the signal values of the at least one signal type detected in multiple time steps. In other words, the latent space feature vector can also be a matrix, the elements are the vector values corresponding to the signal values, the rows correspond to the signal types, the columns correspond to the time steps, and the number of rows and columns is the same as the original signal time series. The embodiment of the present application can extract the deep features of the signal in the original signal time series through the transformation of the latent vector space.
[0057] The relative entropy divergence constraint is used to force the latent space feature vector to follow the standard normal distribution. The relative entropy divergence constraint involves calculating the KL divergence between the latent space feature vector and the standard normal distribution N(0,1), and encoding the latent space feature vector based on the KL divergence so that the latent space feature vector approximates the standard normal distribution in terms of probability density shape.
[0058] Furthermore, the first model can be used to map the signal realization sequence to the knowledge-enhanced feature sequence. The original signal time series can be input into the pre-trained first model and the knowledge-enhanced feature sequence output by the first model can be obtained.
[0059] The first model is used to perform vector space conversion processing on the original signal time series, mapping the original signal time series into a knowledge-enhanced feature sequence. The first model is an unsupervised knowledge-enhanced model. The first model type includes but is not limited to: a variational autoencoder.
[0060] like Figure 2FIG2 is a schematic diagram of the structure of the first module according to an embodiment of the present application. The first model includes: an encoder, a divergence constraint unit, and a decoder connected in sequence. Thus, the encoder, divergence constraint unit, and decoder connected in sequence can be used to perform vector space conversion processing on the original signal time series, mapping the original signal time series into a knowledge-enhanced feature sequence.
[0061] Figure 3 4 is a flowchart of the steps of vector space conversion processing according to an embodiment of the present application.
[0062] Step S310 : Using the encoder, encode the original signal time series in the first vector space into a latent space feature vector in the second vector space.
[0063] Step S320 : Using the divergence constraint unit, perform relative entropy divergence constraint on the latent space feature vector according to the standard normal distribution.
[0064] The divergence constraint unit performs relative entropy divergence constraint on the latent space feature vector, which can prevent the encoder from overfitting, promote the decoupling and generalization capabilities of feature representation, and improve the robustness and generation capability of the first model.
[0065] Step S330 : Mapping the latent space feature vector after the relative entropy divergence constraint back to the first vector space using the decoder to obtain the knowledge enhanced feature sequence.
[0066] The knowledge-enhanced feature sequence is a feature sequence obtained by performing two vector space transformations on the original signal time series.
[0067] The knowledge-enhanced feature sequence integrates the information of the original signal in the original signal time series, and after divergence constraint, enhances the expressiveness of the eigenvalue, reduces data storage requirements and computational complexity, enhances the generalization ability of the model, and improves the accuracy of fault feature extraction.
[0068] In an embodiment of the present application, before using the first model, the first model can be trained, and a first loss function can be used to determine whether the loss value of the first model meets a preset model convergence condition.
[0069] Since the original signal time series includes: signal values of at least one signal type detected in multiple time steps; correspondingly, the latent space feature vector includes: vector values corresponding to the signal values of the at least one signal type detected in multiple time steps; the knowledge enhanced feature sequence includes: feature values corresponding to the signal values of the at least one signal type detected in multiple time steps. Therefore, for each signal type, the variance and mean corresponding to the signal type can be determined based on the vector values corresponding to the signal type in each time step in the latent space feature vector; the loss value corresponding to the signal type can be determined based on the variance and mean corresponding to the signal type, the signal values corresponding to the signal type in each time step in the original signal time series, and the feature values corresponding to the signal type in each time step in the knowledge enhanced feature sequence; the loss value corresponding to each signal type is accumulated to obtain the loss value corresponding to the first model, and when it is determined that the first model meets the preset model convergence condition based on the loss value corresponding to the first model, it is determined that the first model has completed training.
[0070] For example: the original signal time series, the latent space feature vector and the knowledge-enhanced feature sequence are all matrices with E rows and F columns, where each row in the E rows corresponds to a signal type and each column in the F columns corresponds to a time step; for each row in the latent space feature vector, the variance and mean of each vector value are calculated as the variance and mean corresponding to the signal type represented by the row; based on the variance and mean corresponding to the signal type, the signal values in the row corresponding to the signal type in the original signal time series and the feature values in the row corresponding to the signal type in the knowledge-enhanced feature sequence, the loss value corresponding to the signal type is determined.
[0071] For example, in the process of training the first model, the following first loss function is used to determine the loss value corresponding to each signal type in the original signal time series:
[0072]
[0073] Among them, x i Indicates the i-th signal type; L(x i ) represents the loss value corresponding to the i-th signal type; σ i represents the variance corresponding to the i-th signal type in the latent space feature vector; μ i represents the mean value corresponding to the i-th signal type in the latent space feature vector; λ represents a preset reconstruction error weight value; represents the signal value of the i-th signal type at the j-th time step in the original signal time series; Represents the feature value of the i-th signal type at the j-th time step in the knowledge enhanced feature sequence.
[0074] After determining the loss values corresponding to each signal type in the original signal time series, the loss values corresponding to each signal type are accumulated to obtain the loss value corresponding to the first model. When it is determined that the first model meets the preset model convergence conditions based on the loss value corresponding to the first model, it is determined that the first model has completed training.
[0075] The model convergence condition includes determining that the first model satisfies a preset model convergence condition when the loss value corresponding to the first model is less than a preset loss value threshold for a predetermined number of consecutive times. Of course, the model convergence condition can also be set to other conditions as needed. Furthermore, after the first model converges, the first model can be used to determine the knowledge-enhanced feature sequence corresponding to the original signal time series.
[0076] In an embodiment of the present application, after obtaining a knowledge enhancement feature sequence, a gated recurrent unit (GRU) may be used to extract long and short trend features from the knowledge enhancement feature sequence.
[0077] The Long Short Term Memory (LSTM) captures time series features through a single-line transmission method. As the time step increases, the information stored in its cell units gradually becomes full. Moreover, since the amount of information contained in steady changes is not as complex as that in non-steady changes, memory cells are more likely to remember long-term steady change features (long-term trend features) under limited information capacity, so LSTM is difficult to handle short-term non-steady features (short-term fluctuation features). However, the embodiment of the present application uses GRU to learn long-term trend features and short-term fluctuation features from the sequence at the same time, and store the long-term trend features and short-term fluctuation features in hidden state features. Between two adjacent hidden state features, the long-term trend feature only changes slightly, while the short-term fluctuation feature changes dramatically, so the short-term fluctuation feature can be extracted based on the difference between the two adjacent hidden state features.
[0078] Specifically, a gated recurrent unit can be set in the second model and the second model can be trained, the knowledge-enhanced feature sequence can be input into the pre-trained second model, and the long-short trend feature corresponding to the last time step output by the second model can be obtained.
[0079] Figure 4It is a structural diagram of the second model according to an embodiment of the present application. The second model includes: a plurality of extraction modules corresponding to each time step in the knowledge enhancement feature sequence. Each of the extraction modules is connected to the extraction modules corresponding to the first two time steps in the order of the (respectively corresponding) time steps. In other words, each extraction module is connected to the extraction modules corresponding to the first two time steps according to the corresponding time step. Each of the extraction modules includes: a sub-line gated loop unit, an attention unit and a main-line gated loop unit connected in sequence. In this way, for each time step, the sub-line gated loop unit, the attention unit and the main-line gated loop unit in the extraction module corresponding to the time step can be used to extract the long and short trend features corresponding to the time step in the knowledge enhancement feature sequence. Figure 4 The connection relationship of the four extraction modules is only schematically given, and the connection relationship of the secondary line gated recurrent unit, the attention unit and the main line gated recurrent unit is only schematically given in the extraction module 1.
[0080] The second module triggers each extraction module in sequence according to the order of time steps from the earliest to the latest, so that the extraction module extracts the long and short trend features corresponding to the corresponding time step. The following describes the process of extracting long and short trend features by the extraction module corresponding to one time step, and the same process can be used for other time steps. Figure 5 2 is a flowchart of the steps for extracting long-short trend features according to an embodiment of the present application.
[0081] Step S510 , using the secondary line gated recurrent unit to generate the secondary line hidden state features corresponding to the current time step based on the main line hidden state features corresponding to the previous two time steps and the secondary line hidden state features corresponding to the previous time step.
[0082] The mainline hidden state feature is the hidden state feature output by the mainline gated recurrent unit.
[0083] The secondary line hidden state feature is the hidden state feature output by the secondary line gated recurrent unit.
[0084] Hidden state features are internal state features of the gated recurrent units (GRUs) (sub-line GRUs and main-line GRUs). These features include historical information about feature values prior to the current time step in the knowledge-enhanced feature sequence. In other words, these hidden state features can be used to propagate information to subsequent time steps, capturing both long-term trends and short-term fluctuations.
[0085] The mainline hidden state features corresponding to the first two time steps include: based on the current time step t, the mainline hidden state features output by the mainline gated recurrent unit in the extraction modules corresponding to the first t-1 and first t-2 time steps respectively.
[0086] The secondary line hidden state feature corresponding to the previous time step includes: based on the current time step t, in the extraction module corresponding to the previous t-1 time steps, the secondary line hidden state feature output by the secondary line gated recurrent unit.
[0087] Specifically, the difference between the main line hidden state features corresponding to the first two time steps can be determined; based on the difference and the secondary line hidden state features corresponding to the previous time step, the secondary line update gate and the secondary line reset gate corresponding to the current time step can be determined; based on the difference, the secondary line reset gate corresponding to the current time step and the secondary line hidden state features corresponding to the previous time step, the secondary line candidate hidden state features corresponding to the current time step can be determined; based on the secondary line update gate corresponding to the current time step, the secondary line hidden state features corresponding to the previous time step and the secondary line candidate hidden state features corresponding to the current time step, the secondary line hidden state features corresponding to the current time step can be determined.
[0088] The difference between the mainline hidden state features corresponding to the first two time steps can represent the unstable fluctuation information between the two time steps. From this unstable fluctuation information, deep unstable features can be mined and stored in the secondary line hidden state features corresponding to the current time step.
[0089] The update gate (the secondary update gate and the subsequent main update gate) indicates the degree to which the hidden state features of the previous time step affect the hidden state features of the current time step. The update gate can determine how much information before the current time step can be retained until the current time step.
[0090] The reset gate (sub-line reset gate and subsequent main line reset gate) indicates the degree of influence of the hidden state features of the previous time step on the candidate hidden state features of the current time step.
[0091] For example, the secondary line gated recurrent unit can use the following algorithm to determine the secondary line hidden state features corresponding to the current time step:
[0092] D t =h t-1 -h t-2 ;
[0093]
[0094] Among them, D t Indicates the difference; h t-1 represents the main line hidden state feature corresponding to the t-1 time step; h t-2 Represents the main line hidden state feature corresponding to the t-2 time step; represents the sub-line update gate corresponding to the t time step; f1 is the preset first activation function; f2 is the preset second activation function; represents the first linear transformation matrix of the secondary line; N t-1 Represents the hidden state feature of the secondary line corresponding to the t-1 time step; represents the bias of the first linear transformation of the secondary line; Indicates the secondary line reset gate corresponding to time step t; represents the secondary line second linear transformation matrix; represents the bias of the secondary line second linear transformation; represents the hidden state feature of the secondary line candidate corresponding to the t time step; tanh represents the bilinear tangent function; represents the paralinear third linear transformation matrix; ⊙ represents the element-by-element multiplication operation of the matrix; Indicates the third linear transformation bias of the secondary line; N t Represents the hidden state feature of the secondary line corresponding to time step t. All can be determined during the training of the second model.
[0095] In this embodiment of the present application, the main line hidden state features, secondary line hidden state features, fusion output features, and attention score corresponding to time step t-1 can be obtained from the extraction module corresponding to time step t-1; the main line hidden state features and attention score corresponding to time step t-2 can be obtained from the extraction module corresponding to time step t-2; and so on, the required information can be obtained from the extraction module corresponding to the required time step. In other words, the extraction module corresponding to time step t has four inputs.
[0096] In this embodiment of the present application, in the extraction module corresponding to the first time step, the mainline hidden state feature output by the mainline gated recurrent unit is the first preset feature; in the extraction module corresponding to the second time step, the mainline hidden state feature output by the mainline gated recurrent unit is the second preset feature; in the extraction module corresponding to the first time step, the secondary hidden state feature output by the secondary gated recurrent unit is the third preset feature. In the extraction module corresponding to the second time step, the mainline hidden state feature corresponding to time step t-2 is the fourth preset feature. The first, second, third, and fourth preset features are all empirical values or features determined during the training of the second module.
[0097] Step S520: Using the attention unit, the short-term fluctuation feature corresponding to the current time step is determined based on the main line hidden state feature corresponding to the previous time step and the secondary line hidden state feature corresponding to the current time step, and the fusion output feature corresponding to the current time step is determined based on the short-term fluctuation feature corresponding to the current time step and the main line hidden state feature corresponding to the previous time step.
[0098] The short-term fluctuation characteristics are used to reflect the short-term fluctuation state of the signal.
[0099] The fused output features are the short-term fluctuation features corresponding to the current time step and the mainline hidden state features corresponding to the previous time step. The fused output features reflect both the short-term fluctuation state of the signal and certain long-term trend information, providing a comprehensive reflection of the fault status.
[0100] Specifically, the attention score corresponding to the current time step can be determined based on the main line hidden state features corresponding to the previous time step and the secondary line hidden state features corresponding to the current time step; the attention weight corresponding to the current time step can be determined based on the attention score corresponding to the current time step and the attention scores corresponding to all time steps before the current time step; the short-term fluctuation features corresponding to the current time step can be determined based on the attention weight corresponding to the current time step and the secondary line hidden state features corresponding to the current time step; and the fusion output features corresponding to the current time step can be determined based on the short-term fluctuation features corresponding to the current time step and the main line hidden state features corresponding to the previous time step.
[0101] The attention score is used to measure the feature correlation between the current time step and the previous time step. A large attention score indicates a high correlation between the features of the two time steps, while a small attention score indicates a low correlation between the features of the two time steps.
[0102] The attention weight is used to measure the proportion of the attention score corresponding to the current time step in all the calculated attention scores. The attention weight can reflect the importance of the hidden state features of the secondary line at different time steps.
[0103] For example, the attention unit can use the following algorithm to generate the secondary line hidden state feature corresponding to the current time step:
[0104] s(h t-1 ,N t )=V T tanh(W s h t-1 +U s N t );
[0105]
[0106] Ω t =α t ⊙N t ;
[0107] m t =f3(W m [Ω t ,h t-1 ]+b m );
[0108] Among them, s(h t-1,N t ) represents the attention score; V T represents the first linear transformation matrix of attention; W s represents the first linear transformation bias of attention; h t-1 Indicates the main line hidden state feature corresponding to the t-1 time step; U s Represents the second linear transformation matrix of attention; N t represents the hidden state feature of the secondary line corresponding to the t time step; α t represents the attention weight; exp represents the exponential function; exp(s(h j-1 ,N j ) represents the attention score corresponding to the time step t and the time step before h time steps, n≤t; Ω t Indicates short-term fluctuation characteristics; m t represents the fusion output feature corresponding to the t time step; f3 represents the preset third activation function; W m represents the third linear transformation matrix of attention; W t represents the fourth linear transformation matrix of attention; b m Represents the fourth linear transformation bias of attention. T 、W s 、U s 、W m 、W t and b m All can be determined during the training of the second model.
[0109] Step S530, using the mainline gated recurrent unit to determine the mainline hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step in the knowledge enhancement feature sequence, the fusion output feature corresponding to the previous time step, and the fusion output feature corresponding to the current time step, and determine the mainline hidden state feature corresponding to the current time step as the long-short trend feature corresponding to the current time step.
[0110] The long-short trend feature is used to reflect the short-term fluctuation state and long-term trend state of the signal. The long-short trend feature combines the long-term trend information and short-term fluctuation information of the signal to comprehensively and accurately reflect the core characteristics of the fault.
[0111] Specifically, according to the characteristic value corresponding to the current time step and the fusion output feature corresponding to the previous time step, the main line update gate and the main line reset gate corresponding to the current time step are determined; according to the characteristic value corresponding to the current time step, the main line reset gate corresponding to the current time step and the fusion output feature corresponding to the previous time step, the main line candidate hidden state feature corresponding to the current time step is determined; according to the main line candidate hidden state feature corresponding to the current time step, the main line update gate corresponding to the current time step and the fusion output feature corresponding to the current time step, the main line hidden state feature corresponding to the current time step is determined.
[0112] For example, the mainline gated recurrent unit can use the following algorithm to determine the long and short trend characteristics:
[0113]
[0114] in, Indicates the mainline update gate corresponding to time step t; f4 is the preset fourth activation function; f5 is the preset fifth activation function; represents the main line first linear transformation matrix; x t represents the eigenvalue corresponding to the t time step; m t-1 represents the fusion output feature corresponding to the t-1 time step; represents the bias of the first linear transformation of the main line; Indicates the mainline reset gate corresponding to time step t; represents the second linear transformation matrix of the main line; represents the second linear transformation bias of the main line; Indicates the hidden state feature of the main line candidate corresponding to the t time step; represents the main line third linear transformation matrix; represents the third linear transformation bias of the main line; h t Represents the mainline hidden state feature corresponding to the t time step. Among them, and can be determined in the process of training the second model. Furthermore, in the same time step, when there are signal values corresponding to multiple signal types, the signal values corresponding to the multiple signal types can be formed into a signal sequence, and the signal sequence is used as x t .
[0115] In an embodiment of the present application, the second model can output the long-short trend features corresponding to a time step after extracting the long-short trend features corresponding to a time step; or, after extracting the long-short trend features corresponding to each time step one by one, output the long-short trend features corresponding to the last time step.
[0116] In an embodiment of the present application, since the long-short trend characteristics corresponding to the last time step can best reflect the latest status of the target detection component, after the long-short trend characteristics corresponding to all time steps are determined one by one, the long-short trend characteristics corresponding to the last time step can be obtained. Based on the long-short trend characteristics, the fault characteristics corresponding to the target detection component can be determined and the fault type corresponding to the fault characteristics can be identified.
[0117] Specifically, a linear conversion process may be performed on the long-short trend feature to obtain a fault feature corresponding to the target detection component; and based on the fault feature corresponding to the target detection component, the fault type corresponding to the target detection component is identified.
[0118] Furthermore, a fully connected layer connected to the second module can be used to perform linear conversion processing on the long-short trend features to obtain the fault features corresponding to the target detection component.
[0119] Fault features refer to the long-short trend features after dimensionality reduction. Fault features can directly reflect the characteristics of the fault of the target detection component.
[0120] For example, the fully connected layer can use the following algorithm to perform linear transformation on the long and short trend features to obtain fault features:
[0121] o t =g(W t h t +b t );
[0122] Among them, t represents the fault feature corresponding to the t time step; g() represents the linear activation function; W t represents the transformation matrix of the fully connected layer; h t b represents the main line hidden state feature corresponding to the t time step, that is, the long and short trend features corresponding to the t time step; t represents the fully connected layer transformation bias.
[0123] Furthermore, a softmax layer connected to the fully connected layer can be used to identify the fault type corresponding to the target detection component based on the fault characteristics corresponding to the target detection component. Furthermore, through training, the softmax layer can be used to classify the fault characteristics to determine the fault type corresponding to the fault characteristics.
[0124] In an embodiment of the present application, information about the target detection component, the original signal time series corresponding to the target detection component, the knowledge-enhanced feature sequence, the long-short trend features, the fault features, and the actual fault type can be recorded to form a sample set. The sample set can be used to train the first model, the second model, the fully connected layer, and the softmax layer separately, or the first model, the second model, the fully connected layer, and the softmax layer can be used as a large model and the sample set can be used to jointly train the large model. Among them, a second loss function can be used to determine whether the second model has completed training. The second loss function can be a cross-entropy loss function.
[0125] In the embodiment of the present application, the second model uses a dual memory structure consisting of a main-line gated recurrent unit and a secondary-line gated recurrent unit to mine features. This allows it to capture both the long-term trend characteristics implicit in the original signal time series and the short-term fluctuation characteristics implicit in the original signal time series, thereby predicting whether the target detection component has failed and the corresponding fault type under complex operating conditions. Compared with traditional manual detection methods and detection methods based on signal magnitude analysis, the embodiment of the present application effectively improves detection efficiency and accuracy, reducing the possibility of misjudgments and missed detections. Among them, during the operation of new energy vehicles, the early prediction of motor failures is crucial to ensuring vehicle safety. The fault detection method of the embodiment of the present application can process large amounts of data in a short period of time, achieving real-time analysis of motor status and abnormality warnings, which helps to take timely countermeasures and avoid accidents. Moreover, the large model of the embodiment of the present application has good generalization capabilities and can adapt to the needs of new energy vehicle motor anomaly detection under different types and operating conditions. By adjusting the parameters and training data of the large model, effective prediction of motor failures of different brands and models can be achieved, improving the versatility and practicality of the detection system.
[0126] As the complexity of new energy vehicles continues to increase, the factors that cause abnormal signals are constantly changing, and new abnormal signals will gradually appear. For example, the motor of a new energy vehicle is a core component of the power system, and its internal structure and working principle are relatively complex. Motor abnormalities may involve a variety of reasons, such as poor contact between the brush and the commutator, damaged rotor bearings, aging of the magnetic circuit, or demagnetization of the magnetic steel. However, if fault detection is performed solely based on signal magnitude, the accuracy of the detection results is low. Moreover, if fault detection is performed based on signal magnitude, a large amount of engineering experience is required to determine the identification of abnormal signals and the correspondence between abnormal signals and fault types. As a result, fault detection technologies based on signal magnitude analysis require a long time to iterate. Moreover, during the iteration process, new causes of abnormal signals and new abnormal signals will continue to emerge. Fault detection technologies that cannot complete iterations have limitations and are prone to insufficient detection accuracy or even incomplete fault coverage. The embodiments of the present application can identify the fault type of the target detection component based on a large model. To ensure the accuracy of the large model, it is only necessary to retrain the large model every preset training time period. The training process is relatively convenient and the detection results are relatively accurate.
[0127] The present application also provides a fault detection device. Figure 6 , which is a structural diagram of a fault detection device according to an embodiment of the present application.
[0128] The fault detection device comprises:
[0129] The acquisition module 610 is used to acquire the original signal time series corresponding to the target detection component.
[0130] The conversion module 620 is configured to perform vector space conversion processing on the original signal time series to map the original signal time series into a knowledge-enhanced feature sequence.
[0131] The extraction module 630 is used to extract long and short trend features from the knowledge enhanced feature sequence using a gated recurrent unit.
[0132] The detection module 640 is configured to determine the fault feature corresponding to the target detection component and identify the fault type corresponding to the fault feature based on the long-short trend feature.
[0133] The functions of the device described in the embodiment of the present application have been described in the above method embodiment. Therefore, for any details not fully described in the description of this embodiment, please refer to the relevant description in the above embodiment and will not be repeated here.
[0134] The present application also provides a fault detection device, such as Figure 7 , which is a structural diagram of a fault detection device according to an embodiment of the present application.
[0135] The fault detection device includes: a processor 710, a communication interface 720, a memory 730 and a communication bus 740. The processor 710, the communication interface 720 and the memory 730 communicate with each other via the communication bus 740.
[0136] The memory 730 is used to store computer programs.
[0137] In one embodiment of the present application, the processor 710, when executing the program stored on the memory 730, implements the fault detection method provided by any of the aforementioned method embodiments, including: obtaining the original signal time series corresponding to the target detection component; mapping the original signal time series into a knowledge-enhanced feature sequence by performing vector space conversion processing on the original signal time series; extracting long-short trend features from the knowledge-enhanced feature sequence using a gated recurrent unit; determining the fault features corresponding to the target detection component based on the long-short trend features and identifying the fault type corresponding to the fault features.
[0138] Wherein, the original signal time series is mapped into a knowledge-enhanced feature sequence by performing vector space conversion processing on the original signal time series, including: inputting the original signal time series into a pre-trained first model and obtaining the knowledge-enhanced feature sequence output by the first model; wherein, the first model includes: a sequentially connected encoder, a divergence constraint unit and a decoder; using the encoder to encode the original signal time series located in the first vector space into a latent space feature vector located in the second vector space; using the divergence constraint unit, according to the standard normal distribution, performing relative entropy divergence constraint on the latent space feature vector; using the decoder to map the latent space feature vector after the relative entropy divergence constraint back to the first vector space to obtain the knowledge-enhanced feature sequence.
[0139] Among them, in the process of training the first model, it includes: for each signal type, according to the vector values corresponding to the signal type at each time step in the latent space feature vector, determining the variance and mean corresponding to the signal type; according to the variance and mean corresponding to the signal type, the signal values corresponding to the signal type at each time step in the original signal time series, and the feature values corresponding to the signal type at each time step in the knowledge enhanced feature sequence, determining the loss value corresponding to the signal type; accumulating the loss values corresponding to each of the signal types to obtain the loss value corresponding to the first model and when it is determined that the first model meets the preset model convergence condition according to the loss value corresponding to the first model, determining that the first model has completed training.
[0140] Wherein, the use of the gated recurrent unit to extract the long-short trend features from the knowledge enhancement feature sequence includes: inputting the knowledge enhancement feature sequence into a pre-trained second model and obtaining the long-short trend features corresponding to the last time step output by the second model; wherein, the second model includes: a plurality of extraction modules corresponding one to one to each time step in the knowledge enhancement feature sequence; each of the extraction modules is connected to the extraction modules corresponding to the first two time steps according to the corresponding time step; each extraction module includes: a sub-line gated recurrent unit, an attention unit and a main-line gated recurrent unit connected in sequence; the sub-line gated recurrent unit is used to generate the current time step according to the main-line hidden state features corresponding to the first two time steps and the sub-line hidden state features corresponding to the previous time step. The attention unit is used to determine the short-term fluctuation feature corresponding to the current time step according to the main-line hidden state feature corresponding to the previous time step and the secondary-line hidden state feature corresponding to the current time step; and the fused output feature corresponding to the current time step is determined according to the short-term fluctuation feature corresponding to the current time step and the main-line hidden state feature corresponding to the previous time step; the main-line gated recurrent unit is used to determine the main-line hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step in the knowledge enhancement feature sequence, the fused output feature corresponding to the previous time step, and the fused output feature corresponding to the current time step; and the main-line hidden state feature corresponding to the current time step is determined as the long-short trend feature corresponding to the current time step.
[0141] Wherein, generating the secondary line hidden state feature corresponding to the current time step based on the main line hidden state features corresponding to the first two time steps and the secondary line hidden state features corresponding to the previous time step includes: determining the difference between the main line hidden state features corresponding to the first two time steps; determining the secondary line update gate and the secondary line reset gate corresponding to the current time step based on the difference and the secondary line hidden state feature corresponding to the previous time step; determining the secondary line candidate hidden state feature corresponding to the current time step based on the difference, the secondary line reset gate corresponding to the current time step, and the secondary line hidden state feature corresponding to the previous time step; determining the secondary line hidden state feature corresponding to the current time step based on the secondary line update gate corresponding to the current time step, the secondary line hidden state feature corresponding to the previous time step, and the secondary line candidate hidden state feature corresponding to the current time step.
[0142] Among them, the short-term fluctuation characteristics corresponding to the current time step are determined based on the main-line hidden state characteristics corresponding to the previous time step and the sub-line hidden state characteristics corresponding to the current time step, including: determining the attention score corresponding to the current time step based on the main-line hidden state characteristics corresponding to the previous time step and the sub-line hidden state characteristics corresponding to the current time step; determining the attention weight corresponding to the current time step based on the attention score corresponding to the current time step and the attention scores corresponding to all time steps before the current time step; determining the short-term fluctuation characteristics corresponding to the current time step based on the attention weight corresponding to the current time step and the sub-line hidden state characteristics corresponding to the current time step.
[0143] Wherein, the determining the mainline hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step, the fusion output feature corresponding to the previous time step and the fusion output feature corresponding to the current time step in the knowledge enhancement feature sequence includes: determining the mainline update gate and the mainline reset gate corresponding to the current time step according to the feature value corresponding to the current time step and the fusion output feature corresponding to the previous time step; determining the mainline candidate hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step, the mainline reset gate corresponding to the current time step and the fusion output feature corresponding to the previous time step; determining the mainline hidden state feature corresponding to the current time step according to the mainline candidate hidden state feature corresponding to the current time step, the mainline update gate corresponding to the current time step and the fusion output feature corresponding to the current time step.
[0144] Among them, determining the fault characteristics corresponding to the target detection component and identifying the fault type corresponding to the fault characteristics based on the long-short trend characteristics includes: performing linear conversion processing on the long-short trend characteristics to obtain the fault characteristics corresponding to the target detection component; and identifying the fault type corresponding to the target detection component based on the fault characteristics corresponding to the target detection component.
[0145] The present application also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the steps of the fault detection method provided in any of the aforementioned method embodiments. Since the fault detection method has been described in detail above, any details not fully described in this embodiment are referred to the relevant descriptions in the aforementioned embodiments and are not further elaborated here.
[0146] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these models may be selected based on actual needs to achieve the objectives of this embodiment.
[0147] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiment.
[0148] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0149] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.
Claims
1. A fault detection method, characterized in that: include: Obtaining the original signal time series corresponding to the target detection component; By performing vector space conversion processing on the original signal time series, the original signal time series is mapped into a knowledge enhanced feature sequence; Using a gated recurrent unit to extract long and short trend features from the knowledge-enhanced feature sequence; According to the long-short trend characteristics, the fault characteristics corresponding to the target detection component are determined, and the fault type corresponding to the fault characteristics is identified.
2. The method according to claim 1, characterized in that The step of performing vector space conversion processing on the original signal time series to map the original signal time series into a knowledge-enhanced feature sequence includes: Inputting the original signal time series into a pre-trained first model and obtaining the knowledge-enhanced feature sequence output by the first model; wherein the first model comprises: an encoder, a divergence constraint unit, and a decoder connected in sequence; Encoding the original signal time series in the first vector space into a latent space feature vector in the second vector space using the encoder; Using the divergence constraint unit, according to the standard normal distribution, the relative entropy divergence constraint is performed on the latent space feature vector; The decoder is used to map the latent space feature vector after the relative entropy divergence constraint back to the first vector space to obtain the knowledge enhanced feature sequence.
3. The method according to claim 2, characterized in that The process of training the first model includes: For each signal type, determining the variance and mean corresponding to the signal type according to the vector values corresponding to the signal type at each time step in the latent space feature vector; Determine the loss value corresponding to the signal type according to the variance and mean corresponding to the signal type, the signal values corresponding to the signal type at each time step in the original signal time series, and the feature values corresponding to the signal type at each time step in the knowledge enhanced feature sequence; Accumulate the loss values corresponding to each of the signal types to obtain the loss value corresponding to the first model, and when it is determined that the first model meets the preset model convergence condition based on the loss value corresponding to the first model, determine that the first model has completed training.
4. The method according to claim 1, wherein The method of extracting long and short trend features from the knowledge enhanced feature sequence by using a gated recurrent unit includes: Inputting the knowledge-enhanced feature sequence into a pre-trained second model and obtaining the long-short trend feature corresponding to the last time step output by the second model; The second model includes: a plurality of extraction modules corresponding to each time step in the knowledge-enhanced feature sequence; each of the extraction modules is connected to the extraction modules corresponding to the previous two time steps according to the corresponding time step; each extraction module includes: a secondary line gated recurrent unit, an attention unit, and a main line gated recurrent unit connected in sequence; Generate the secondary line hidden state feature corresponding to the current time step using the secondary line gated recurrent unit according to the main line hidden state features corresponding to the previous two time steps and the secondary line hidden state feature corresponding to the previous time step; Determining, using the attention unit, a short-term fluctuation feature corresponding to the current time step based on the main line hidden state feature corresponding to the previous time step and the secondary line hidden state feature corresponding to the current time step; and determining a fusion output feature corresponding to the current time step based on the short-term fluctuation feature corresponding to the current time step and the main line hidden state feature corresponding to the previous time step; The mainline gated recurrent unit is used to determine the mainline hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step in the knowledge enhancement feature sequence, the fused output feature corresponding to the previous time step, and the fused output feature corresponding to the current time step; and the mainline hidden state feature corresponding to the current time step is determined as the long-short trend feature corresponding to the current time step.
5. The method according to claim 4, characterized in that The generating of the secondary line hidden state feature corresponding to the current time step according to the main line hidden state features corresponding to the previous two time steps and the secondary line hidden state feature corresponding to the previous time step includes: Determine the difference between the mainline hidden state features corresponding to the first two time steps respectively; Determine a secondary line update gate and a secondary line reset gate corresponding to a current time step according to the difference and the secondary line hidden state feature corresponding to the previous time step; Determine a candidate hidden state feature of the secondary line corresponding to the current time step according to the difference, the secondary line reset gate corresponding to the current time step, and the secondary line hidden state feature corresponding to the previous time step; The secondary line hidden state feature corresponding to the current time step is determined according to the secondary line update gate corresponding to the current time step, the secondary line hidden state feature corresponding to the previous time step, and the secondary line candidate hidden state feature corresponding to the current time step.
6. The method according to claim 4, characterized in that The determining of the short-term fluctuation feature corresponding to the current time step according to the main line hidden state feature corresponding to the previous time step and the secondary line hidden state feature corresponding to the current time step includes: Determining an attention score corresponding to the current time step according to the main line hidden state feature corresponding to the previous time step and the secondary line hidden state feature corresponding to the current time step; Determine the attention weight corresponding to the current time step according to the attention score corresponding to the current time step and the attention scores corresponding to all time steps before the current time step; Determine the short-term fluctuation feature corresponding to the current time step according to the attention weight corresponding to the current time step and the secondary line hidden state feature corresponding to the current time step.
7. The method according to claim 4, characterized in that The determining of the mainline hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step in the knowledge enhancement feature sequence, the fused output feature corresponding to the previous time step, and the fused output feature corresponding to the current time step includes: Determine the mainline update gate and the mainline reset gate corresponding to the current time step according to the feature value corresponding to the current time step and the fusion output feature corresponding to the previous time step; Determine the mainline candidate hidden state feature corresponding to the current time step according to the feature value corresponding to the current time step, the mainline reset gate corresponding to the current time step, and the fusion output feature corresponding to the previous time step; The mainline hidden state feature corresponding to the current time step is determined according to the mainline candidate hidden state feature corresponding to the current time step, the mainline update gate corresponding to the current time step, and the fusion output feature corresponding to the current time step.
8. The method according to claim 1, characterized in that The determining, based on the long-short trend feature, a fault feature corresponding to the target detection component and identifying a fault type corresponding to the fault feature includes: Performing linear conversion processing on the long-short trend feature to obtain a fault feature corresponding to the target detection component; According to the fault characteristics corresponding to the target detection component, the fault type corresponding to the target detection component is identified.
9. A fault detection device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein the processor is configured to: execute a fault detection program stored in the memory to implement the fault detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed to implement the fault detection method according to any one of claims 1 to 8.