Interactive fault diagnosis method and device for unbalanced sample and storage medium
By using the sliding window algorithm and conditional generative adversarial network balanced dataset in fault diagnosis, combined with SHAP and focal loss function to train LightGBM, the problems of feature offset and insufficient recognition of minority class faults caused by imbalanced sample distribution in traditional methods are solved, and high-precision and explainable fault diagnosis is achieved.
Patent Information
- Application Number
- CN202510976880.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-16
AI Technical Summary
In unbalanced and dynamically changing industrial scenarios, traditional fault diagnosis methods suffer from feature offset and insufficient ability to identify minority faults due to imbalanced sample distribution. In addition, they lack a feature quantification and screening mechanism for human-machine collaboration, resulting in limited model diagnostic accuracy and poor dynamic adaptability.
The time domain and frequency domain features are extracted through the sliding window algorithm to construct a hybrid feature vector. The conditional generative adversarial network (CGAN) is used to balance the data set. The Shapley additive interpretation algorithm (SHAP) and human-computer interaction feedback are combined to screen the top-K key features. The feature adaptive weighted fusion network and focal loss function are used to train the lightweight gradient boosting network (LightGBM) for fault diagnosis.
It achieves stable extraction of fault features, interpretable screening of key features, and high-precision diagnosis of minority faults in non-equilibrium dynamic industrial scenarios, improving the diagnostic performance and reliability of the model.
Smart Images

Figure CN120493026B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of fault diagnosis, and in particular to an interactive fault diagnosis method, device, and storage medium for unbalanced samples. Background Art
[0002] In modern industrial production, with the rapid development of digitalization and informatization in intelligent manufacturing technologies, large-scale machinery and equipment have become key productive forces in industrial production. Once a failure occurs, it not only leads to production interruptions and significant economic losses, but also may cause serious safety accidents and threaten personnel safety. Therefore, it is of great significance to monitor the operating status of equipment components and promptly and effectively identify and classify early fault characteristics.
[0003] Traditional fault diagnosis methods primarily rely on signal monitoring technology, collecting vibration signal waveforms and quantitative indicators during equipment operation and using manual analysis to determine health status. However, these methods require operators to have advanced signal processing knowledge and extensive diagnostic experience. With the development of machine learning technology, shallow classification models, including support vector machines, artificial neural networks, and random forests, have begun to play a role in fault identification. These models are widely used due to their nonlinear characteristics, self-learning capabilities, and adaptability, and can automatically identify fault characteristics in vibration signals. For example, the invention, entitled "Rotor Crack Fault Diagnosis and Model Construction Method and Apparatus," with publication number CN116662793A, collects vibration signals from the rotor of a rotating machine during operation. The vibration signals are subjected to singular value decomposition and singular spectrum analysis to extract multiple principal component singular values. These singular values are then input into a rotor crack fault diagnosis nSVDD model to obtain a rotor crack fault diagnosis result for the rotating machine. The rotor crack fault diagnosis nSVDD model is pre-trained based on a sample set of rotor vibration signals from historical operating history. Another example is the invention with publication number CN113869339A, titled "Deep Learning Classification Model and Fault Diagnosis Method for Fault Diagnosis." Through data collection, feature extraction, and fault diagnosis classification, it deeply explores the characteristic values of vibration signals, allowing the relationship between features and fault labels to be fully extracted before fault diagnosis data is trained, thereby improving the accuracy of fault classification and identification.
[0004] However, in real industrial scenarios, due to the complexity of the equipment's operating state, operating environment, and the tasks it carries, the frequency of different fault categories varies significantly, and the distribution of the number of normal and faulty samples is often severely unbalanced. When faced with unbalanced data, traditional neural network models tend to learn the features of majority class samples while neglecting minority class samples, leading to feature shift and reducing the model's diagnostic performance. Furthermore, traditional visualization methods focus solely on visually interpreting completed models, making it difficult to quantify the importance of features during the model design process. Furthermore, they lack access to expert knowledge and are unable to address feature shift, limiting the model's applicability to unbalanced data. Although some existing optimization algorithms improve model structure and loss functions to enable classifiers to focus more on minority classes, these methods primarily target datasets with a fixed ratio of samples per class. However, the imbalance rate of fault samples can change during the operation of mechanical equipment, limiting their effectiveness in diagnosing unbalanced faults.
[0005] Currently, no effective solution has been proposed to the technical problems that the traditional fault diagnosis methods in the above-mentioned existing technologies have limited model diagnosis accuracy and poor dynamic adaptability due to the imbalance of sample distribution, insufficient ability to identify minority faults, and lack of human-machine collaborative feature quantification screening mechanism in unbalanced and dynamically changing industrial scenarios. Summary of the Invention
[0006] The embodiments of the present disclosure provide an interactive fault diagnosis method, device and storage medium for unbalanced samples, so as to at least solve the technical problems existing in the prior art, such as the limited model diagnosis accuracy and poor dynamic adaptability caused by the imbalance of sample distribution, insufficient identification ability of minority class faults, and lack of a human-machine collaborative feature quantification screening mechanism, in the traditional fault diagnosis method of the prior art in unbalanced and dynamically changing industrial scenarios.
[0007] According to one aspect of an embodiment of the present disclosure, an interactive fault diagnosis method for unbalanced samples is provided, comprising: obtaining operation monitoring data of a target object of a fault type to be diagnosed; extracting time domain features and frequency domain features of the operation monitoring data using a sliding window algorithm to construct a first mixed feature vector; extracting feature values corresponding to a preset key feature set from the first mixed feature vector, inputting the extracted feature values into a trained fault diagnosis model, and outputting a fault type classification result of the target object; wherein the fault diagnosis model is pre-trained by the following steps: generating a conditional adversarial network with the sliding window algorithm integrated in the input layer, and classifying the sample failure. The original data set is converted into a balanced data set with a balanced number of samples; the global contribution of each feature column of all samples in the balanced data set is calculated based on the Shapley additive interpretation algorithm, and the Top-K feature columns are selected according to the contribution ranking in combination with human-computer interaction feedback to form a globally shared key feature set; and the feature values of the balanced data set on the key feature set are used as input to train a fault diagnosis model; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network.
[0008] According to another aspect of an embodiment of the present disclosure, a storage medium is further provided, the storage medium including a stored program, wherein when the program is run, a processor executes any one of the above methods.
[0009] According to another aspect of the embodiment of the present disclosure, an interactive fault diagnosis device for unbalanced samples is also provided, comprising: a data acquisition module for acquiring operation monitoring data of a target object of a fault type to be diagnosed; a feature extraction module for extracting time domain features and frequency domain features of the operation monitoring data using a sliding window algorithm to construct a first mixed feature vector; a fault diagnosis module for extracting feature values corresponding to a preset key feature set from the first mixed feature vector, inputting the extracted feature values into a trained fault diagnosis model, and outputting a fault type classification result of the target object; wherein the fault diagnosis model is pre-trained by the following steps: by integrating the sliding window algorithm in the input layer A conditional generative adversarial network is used to convert the original data set with sample imbalance into a balanced data set with a balanced number of samples of each type; the global contribution of each feature column of all samples in the balanced data set is calculated based on the Shapley additive interpretation algorithm, and the Top-K feature columns are selected according to the contribution ranking based on human-computer interaction feedback to form a globally shared key feature set; and the feature values of the balanced data set on the key feature set are used as input to train a fault diagnosis model; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network.
[0010] According to another aspect of the embodiment of the present disclosure, there is also provided an interactive fault diagnosis device for unbalanced samples, comprising: a processor; and a memory connected to the processor, for providing the processor with instructions for processing the following processing steps: obtaining operation monitoring data of a target object of a fault type to be diagnosed; extracting time domain features and frequency domain features of the operation monitoring data using a sliding window algorithm to construct a first mixed feature vector; extracting feature values corresponding to a preset key feature set from the first mixed feature vector, and inputting the extracted feature values into a trained fault diagnosis model to output a fault type classification result of the target object; wherein the fault diagnosis model is pre-trained by the following steps: by integrating the sliding window algorithm in the input layer A conditional generative adversarial network based on a moving window algorithm is used to convert an unbalanced original data set into a balanced data set with a balanced number of samples of each type; the global contribution of each feature column of all samples in the balanced data set is calculated based on the Shapley additive interpretation algorithm, and the Top-K feature columns are selected by contribution ranking in combination with human-computer interaction feedback to form a globally shared key feature set; and the feature values of the balanced data set on the key feature set are used as input to train a fault diagnosis model; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network.
[0011] During the application phase, this application first acquires operational monitoring data from the target object. It then dynamically extracts time-domain and frequency-domain features using a sliding window algorithm to construct a hybrid feature vector. Pre-set global key eigenvalues are then extracted from this hybrid feature vector and fed into a trained fault diagnosis model to directly output classification results. The fault diagnosis model training process achieves accurate diagnosis in unbalanced scenarios through the following innovations: A conditional generative adversarial network (CGAN) with an integrated sliding window is used to convert the original unbalanced data into a class-balanced dataset, achieving balanced expansion of sample data. The SHAP algorithm is used to quantify the global contribution of features, and a top-K key feature set is dynamically identified using human-computer interaction feedback. Using these key features as input, a feature adaptive weighted fusion network is used to enhance feature representation. A LightGBM classifier is trained using a focal loss function to focus on minority class samples, improving the diagnostic performance and reliability of the fault diagnosis model under unbalanced data. This approach enables stable fault feature extraction, interpretable key feature screening, and high-precision diagnosis of minority class faults in unbalanced dynamic industrial scenarios. This solves the technical problems existing in the existing technology of traditional fault diagnosis methods in unbalanced and dynamically changing industrial scenarios, such as feature offset and insufficient ability to identify minority faults due to imbalanced sample distribution, and lack of human-machine collaborative feature quantification screening mechanism, which leads to limited model diagnosis accuracy and poor dynamic adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of this application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0013] Figure 1 is a hardware structure block diagram of a computing device for implementing the method according to embodiment 1 of the present disclosure;
[0014] Figure 2 is a flowchart of the interactive fault diagnosis method for unbalanced samples according to Example 1 of the present application;
[0015] Figure 3 This is a training flow chart of the fault diagnosis model according to Example 1 of the present application;
[0016] Figure 4 This is a schematic diagram of the interactions between various network architectures involved in the fault diagnosis model training process according to Example 1 of the present application;
[0017] Figure 5 is a schematic diagram of the growth strategy according to Example 1 of the present application;
[0018] Figure 6It is a statistical indicator box plot according to Example 1 of the present application;
[0019] Figure 7 is a schematic diagram of t-SNE visualization of the data set described in Example 1 of the present application;
[0020] Figure 8 is a SHAP library map according to Example 1 of the present application;
[0021] Figure 9 This is a fault classification scatter plot according to Example 1 of the present application;
[0022] Figure 10 It is the accuracy curve and loss curve during the AD-LightGBM training process described in Example 1 of the present application;
[0023] Figure 11 is the confusion matrix of the AD-LightGBM on the test set according to Example 1 of the present application;
[0024] Figure 12 is a schematic diagram of an interactive fault diagnosis device for unbalanced samples according to Example 2 of the present application;
[0025] Figure 13 This is a schematic diagram of an interactive fault diagnosis device for unbalanced samples according to Example 3 of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. Example
[0028] According to this embodiment, a method embodiment of an interactive fault diagnosis method for unbalanced samples is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] The method embodiment provided in this embodiment can be executed in a server or similar computing device. Figure 1 The hardware structure block diagram of a computing device for implementing an interactive fault diagnosis method for unbalanced samples is shown. Figure 1 As shown, a computing device may include one or more processors (the processor may include, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA) or other processing device), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, transmission device, and input / output interface are connected to the processor via a bus. In addition, it may also include: a display, a keyboard, and a cursor control device connected to the input / output interface. Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0030] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be fully or partially integrated into any of the other components of the computing device. As discussed in the embodiments of the present disclosure, the data processing circuitry functions as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0031] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the interactive fault diagnosis method for unbalanced samples in the embodiments of the present disclosure. The processor executes the software programs and modules stored in the memory to perform various functional applications and data processing, thereby implementing the interactive fault diagnosis method for unbalanced samples of the aforementioned application. The memory can include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory can further include memory remotely located from the processor, and such remote memory can be connected to the computing device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0032] The transmission device is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communications provider of the computing device. In one embodiment, the transmission device includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0033] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computing device.
[0034] It should be noted that, in some optional embodiments, the above Figure 1 The computing device shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computing device described above.
[0035] In the above operating environment, according to the first aspect of this embodiment, an interactive fault diagnosis method for unbalanced samples is provided. Figure 2 A schematic diagram showing the process of the method is shown in FIG. Figure 2 As shown, the method includes:
[0036] S202: Acquire operation monitoring data of a target object of a fault type to be diagnosed.
[0037] S204: Using a sliding window algorithm to extract time domain features and frequency domain features of the operation monitoring data, and constructing a first mixed feature vector.
[0038] S206: Extracting feature values corresponding to a preset key feature set from the first mixed feature vector, inputting the extracted feature values into a trained fault diagnosis model, and outputting a fault type classification result of the target object.
[0039] Among them, such as Figure 3 As shown in Figure 2, the fault diagnosis model is pre-trained through the following steps:
[0040] S302: Converting the original dataset with unbalanced samples into a balanced dataset with a balanced number of samples of various types by integrating the conditional generative adversarial network with the sliding window algorithm in the input layer;
[0041] S304: Calculate the global contribution of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm, select the top-K feature columns based on the contribution ranking in combination with human-computer interaction feedback, and form a globally shared key feature set; and
[0042] S306: Using the feature values of the balanced data set on the key feature set as input, a fault diagnosis model is trained; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network.
[0043] In the embodiment of the present invention, the contents involved in the present invention are described in detail by taking a bearing as an example of a target object of a fault type to be diagnosed.
[0044] During the application phase, bearing operation monitoring data is first acquired (corresponding to step S202). Specifically, a vibration sensor (such as an accelerometer) mounted on the bearing seat or associated components can be used to collect the bearing's raw vibration signal in real time, providing data support for subsequent fault diagnosis.
[0045] Then, a sliding window algorithm is used to extract the time and frequency domain features of the operation monitoring data to construct a first hybrid feature vector (corresponding to step S204). Specifically, the original vibration signal of the bearing is segmented using a sliding window. The window length can be dynamically set based on the bearing speed (for example, covering 3-5 rotation cycles, corresponding to a window length of 1 second at a speed of 1800 rpm). The step size can be fixed at 0.2 seconds to achieve overlapping signal sampling. For the original vibration signal in each window, multiple statistical indicators such as the mean, variance, crest factor, kurtosis, and impulse index are calculated to quantify the signal amplitude distribution and impact characteristics, thereby obtaining the corresponding time domain features. After Fourier transforming the original vibration signal in each window, multidimensional features such as 1× / 2× / 3× frequency harmonic amplitude, sideband energy ratio, and spectral entropy are extracted to obtain the corresponding frequency domain features. The time and frequency domain features are then concatenated to obtain the first hybrid feature vector. Among them, taking the time domain features including 12-dimensional features and the frequency domain features including 9-dimensional features as an example, the first mixed feature vector obtained by splicing is a 21-dimensional mixed feature vector, and its form is, for example, [0.32, 1.85, ..., 4.76, 0.92]. An element in the vector corresponds to the eigenvalue of one dimension, for example, 0.32 is the mean, 1.85 is the variance, 4.76 is the 1× frequency conversion harmonic amplitude, and 0.92 is the spectral entropy.
[0046] Therefore, through the hybrid construction of time domain and frequency domain features, the dynamic impact and periodic damage characteristics of bearing faults are completely covered, providing high information density input for subsequent key feature screening.
[0047] Next, the eigenvalues corresponding to the preset key feature set are extracted from the first mixed feature vector, and the extracted eigenvalues are input into the trained fault diagnosis model to output the fault type classification result of the target object (corresponding to step S204). Specifically, the globally shared key feature set generated in the training phase is loaded from the local model configuration library (for example, the Top-15 features, including kurtosis, pulse index, 3× frequency amplitude, spectral entropy, etc.). The key feature set is dynamically locked through SHAP contribution ranking and human-computer interaction feedback during the model training phase. Then, according to the feature name and dimension order of the key feature set, the index position is matched from the mixed feature vector constructed in step S204 to extract the corresponding eigenvalue. Afterwards, the extracted dimensionality reduction feature vector is input into the trained fault diagnosis model, which dynamically learns the feature weights (such as kurtosis weight = 0.9) through the feature adaptive weighted fusion network, and then calculates the fault probability distribution through the LightGBM classifier optimized by the focal loss function, and finally outputs the bearing fault type classification result. For example:
[0048] If the fault probability vector = [normal: 0.02, inner race fault: 0.91, outer race fault: 0.05, rolling element fault: 0.02], the fault type classification result output by the model is "inner race fault".
[0049] Therefore, by extracting preset key features and inputting them into the diagnostic model, the computational efficiency and the accuracy of minority class fault identification can be significantly improved, and highly robust classification can be achieved in industrial real-time diagnosis scenarios.
[0050] The aforementioned application phase (S202-S206) relies on the trained fault diagnosis model to achieve real-time diagnosis, combined with Figure 4 As shown in Figure 3, the training process of the fault diagnosis model solves the core pain points of industrial imbalanced samples through the following innovative steps (S302-S306):
[0051] During the training phase, the present application uses a conditional generative adversarial network (CGN) with the sliding window algorithm integrated into its input layer to convert an unbalanced original dataset into a balanced dataset with a balanced number of samples across all categories (corresponding to step S302). Specifically, historical operating monitoring data of the bearing is obtained as the original dataset. The number of samples across all categories in this original dataset is unevenly distributed, for example, 70% are normal samples, 10% are inner race faults, 8% are outer race faults, 6% are rolling element faults, and 6% are cage faults. Then, the CGN with the sliding window algorithm integrated into its input layer extracts time-domain and frequency-domain features using the sliding window algorithm. Based on these time-domain and frequency-domain features, a collaborative conditional adversarial training mechanism combining the CGN and CGN is used to generate synthetic data for minority fault categories (e.g., inner race, outer race, rolling element, and cage faults). This effectively supplements the scarce fault category samples in the original dataset by controllably generating fault sample data of specific types and severities. Ultimately, a balanced dataset is constructed, containing both original and synthetic samples, with a balanced number of samples across each category (normal, inner race, outer race, rolling element, and cage faults).
[0052] Next, the global contribution of each feature column for all samples in the balanced dataset is calculated using the Shapley additive interpretation algorithm. Combined with human-computer interaction feedback, the top-K feature columns are selected by contribution ranking to form a globally shared key feature set (corresponding to step S304). Specifically, the Shapley additive interpretation algorithm (SHAP) is first used to calculate the SHAP values of each feature column for all samples in the balanced dataset as the global contribution. Combined with domain knowledge constraints entered by engineers (such as "must include time-domain energy features"), the top-K (e.g., K = 15) high-contribution feature columns that meet these constraints are selected from all feature columns. This achieves a deep fusion of data-driven adaptive feature screening and human-computer collaborative decision-making, automatically identifying the key feature set that is most explanatory for fault diagnosis and consistent with engineering practice, significantly improving model interpretability and feature engineering efficiency.
[0053] Finally, the fault diagnosis model is trained using the feature values of the balanced dataset on the key feature set as input, wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network (corresponding to step S306). Specifically, the feature values of the key feature set are first input into the feature adaptive weighted fusion network, and the contribution of each feature to the fault type is dynamically calculated using learnable attention weights to generate a weighted fusion feature vector; this fusion vector is then input into a lightweight gradient boosting network (LightGBM). During the training process, a focal loss function (Focal Loss) is used as the optimization objective. By adjusting the focus parameter γ, the loss weight of easily classified samples (such as normal samples of the majority class) is dynamically reduced, and the training attention to difficult-to-classify samples (such as cage faults of the minority class) is strengthened; the parameters of the feature weighted network and the LightGBM classifier are jointly optimized through backpropagation until the model converges. In this way, dynamic perception and adaptive fusion of feature contributions are achieved, significantly improving the discriminative expression of multi-source features. At the same time, the focus loss function effectively alleviates the classifier's tendency to overfit simple samples, allowing the model to focus on high-value difficult samples. Ultimately, while ensuring computational efficiency, the diagnostic accuracy and generalization ability of various bearing faults (especially scarce fault types) are greatly improved.
[0054] As described in the background, in actual industrial scenarios, due to the working state of the equipment, the running environment and the complexity of the bearing task, the occurrence frequency of different categories of faults is significantly different, and the number distribution of normal samples and fault samples is often seriously unbalanced. When facing unbalanced data, the traditional neural network model is prone to learn the characteristics of the majority class samples, ignoring the minority class samples, leading to feature drift problem, and thus reducing the diagnostic performance of the model. At the same time, the traditional visualization method only focuses on the visualization explanation of the completed model, and it is difficult to quantify the importance of the features in the model design process, and the expert knowledge cannot be accessed, which cannot solve the feature drift problem, and limits the applicability of the model under unbalanced data. Although in the prior art, some optimization algorithms improve the model structure and loss function to make the classifier pay more attention to the few-sample class. However, the algorithm optimization-based method is mainly for the case where the proportion of the number of samples of each class in the data set is fixed, and the unbalance rate of the fault samples will change during the running process of the mechanical equipment. Therefore, the algorithm optimization-based method is limited in solving the unbalanced sample fault diagnosis problem.
[0055] Therefore, in the application stage, the running monitoring data of the target object is first acquired, and the time domain / frequency domain features are dynamically extracted by a sliding window algorithm to construct a mixed feature vector. Then, the preset global key feature values are extracted from the mixed feature vector, and input into the trained fault diagnosis model to directly output the classification result. The training process of the fault diagnosis model realizes accurate diagnosis in the unbalanced scene through the following innovations: the integrated sliding window conditional generative adversarial network (CGAN) is used to convert the original unbalanced data into a balanced data set, realizing the balancing expansion of the sample data; the SHAP algorithm is used to quantify the global contribution of the features, and the Top-K key feature set is dynamically locked through human-computer interaction feedback, and the key features are input into the feature self-adaptive weighted fusion network to strengthen the feature representation, and the focal loss function is used to train the LightGBM classifier to focus on the minority class samples, improving the diagnostic performance and reliability of the fault diagnosis model under unbalanced data. Thus, the stable extraction of fault features, the interpretable selection of key features, and the high-precision diagnosis of minority class faults in the unbalanced dynamic industrial scene are realized. Further, the technical problems of the existing technology that the traditional fault diagnosis method is limited by the diagnostic precision and the dynamic adaptability due to the feature drift caused by the unbalanced sample distribution and the lack of human-computer collaborative feature quantization selection mechanism in the unbalanced dynamic industrial scene are solved.
[0056] Optionally, the conditional generative adversarial network comprises an input layer, a mode-specific normalization module and a conditional generative network and an adversarial network, and the operation of converting the original sample imbalanced data set into a balanced data set with balanced sample quantities of each type by the conditional generative adversarial network integrated with the sliding window algorithm in the input layer comprises: normalizing each type of fault sample in the original data set; inputting the normalized fault sample into the input layer, extracting the time domain feature and the frequency domain feature of the fault sample through the sliding window algorithm integrated in the input layer, and constructing a second hybrid feature vector based on the time domain feature and the frequency domain feature; inputting the second hybrid feature vector into the mode-specific normalization module to re-encode and normalize the feature values in the specific mode of the second hybrid feature vector, and outputting a new feature vector; and inputting the new feature vector, the fault type condition variable and the fault severity condition variable into the conditional generative network to generate synthetic data of the fault sample; and constructing a balanced data set based on all fault samples and corresponding synthetic data.
[0057] In the embodiment of the application, considering that in bearing fault diagnosis, due to the complexity of the working state, operating environment and bearing task, the number of fault samples of different categories often has a significant imbalance problem, which causes the model to pay excessive attention to the majority class samples in the training process, while ignoring the feature learning of the minority class samples, seriously affecting the diagnostic performance of the model. In order to solve this problem, the application proposes to apply the conditional generative adversarial network (CTGAN) to the field of bearing fault diagnosis, and adaptively improves the CTGAN according to the characteristics of bearing vibration signals, generates synthetic samples highly similar to real samples, balances the sample distribution in the data set, and significantly improves the diagnostic ability of the model for minority class samples.
[0058] Specifically, CTGAN continuously trains the generator and discriminator by introducing condition variables until high-quality pseudo data is generated. Compared with traditional GAN networks, the CTGAN network can effectively solve the class imbalance problem and solve the gradient disappearance problem by designing a mode-specific normalization. Although CTGAN has achieved remarkable results in image generation, table data generation and other fields, due to the strong time sequence of bearing vibration signals, the traditional CTGAN model has difficulty in capturing long-term dependencies in the signal when processing time series data, resulting in generated samples that cannot accurately reflect the time sequence characteristics of bearing faults, and the number of samples of different fault types in bearing fault diagnosis is more different, and the traditional CTGAN model has difficulty in effectively solving the sample imbalance problem when generating samples.
[0059] To capture the temporal characteristics of bearing vibration signals, this application introduces a sliding window algorithm into the input layer of the CTGAN to extract both time-domain and frequency-domain features of the bearing vibration signals and construct a hybrid feature vector. Furthermore, conditional variables based on fault type and severity are designed to ensure that the generated samples reflect the characteristics of different fault types. Furthermore, by dynamically adjusting the loss function weights of the generator and discriminator during training, the generator prioritizes the generation of minority class samples, balancing the sample distribution in the dataset.
[0060] In an embodiment of the present invention, the operation of constructing a balanced dataset using the adaptively improved conditional generative adversarial network is as follows:
[0061] (1) Data normalization. Specifically, the monitoring vibration signals of various bearing fault samples (including normal, inner race, outer race, rolling element, and cage faults) in the original data set are subjected to maximum-minimum normalization, and each eigenvalue is linearly mapped to the [0, 1] interval. This provides standardized input for subsequent sliding window feature extraction and avoids model training instability caused by differences in numerical ranges.
[0062] (2) Time domain and frequency domain feature extraction. Specifically, the normalized fault samples are input into the input layer of the integrated sliding window algorithm. A preset length window (e.g., 1024 sampling points) is used to slide and segment the vibration signal in steps. Within each window, multidimensional statistical features such as mean, variance, kurtosis, and peak factor are extracted to obtain time domain features. The spectrum is calculated through FFT transformation, and multidimensional features such as center of gravity frequency, mean square frequency, and frequency band energy ratio are extracted to obtain frequency domain features. The time domain and frequency domain features are then fused to construct a second mixed feature vector. It should be noted that the dimension of the second mixed feature vector can be the same as or different from that of the first mixed feature vector. Thus, the automatic extraction of multi-scale dynamic features from the original monitoring signal is achieved, significantly enhancing the expressive power of fault information (e.g., kurtosis captures the impact characteristics of local damage to the rolling element, and the spectrum energy distribution identifies the characteristic frequency of the outer ring fault).
[0063] (3) Mode-specific normalization. Specifically, the mixed feature vector is mode-decoupled based on the variational Gaussian mixture model (VGM), and the potential data distribution mode of each feature is automatically identified (such as the stable distribution of the normal state of the bearing and the pulse distribution of the fault state), and the statistical parameters of each mode are determined. Then, based on the physical characteristics of the feature value (such as the vibration amplitude), the probability of it belonging to each mode is calculated, and the most matching target mode is selected. Then, the feature value is normalized according to the target mode to eliminate the dimensional difference between the modes, and a unique hot encoding vector of the target mode is generated to clearly mark the physical state category to which the feature belongs. Finally, the normalized feature value is concatenated with the mode label vector to form a new feature representation that combines numerical information and physical state semantics. In this way, the distribution characteristics of different fault modes in the mixed features are accurately separated (such as distinguishing between rolling element periodic impact and cage stochastic resonance), the gradient vanishing problem caused by cross-mode feature confusion is eliminated, and the learning ability of the generated network for the physical mechanism of the fault is improved.
[0064] (4) Synthetic data generation. Specifically, the new feature vector after pattern normalization is input into the improved conditional generation network along with the fault type condition variable (e.g., "outer ring fault") and the fault severity condition variable (e.g., "moderate damage") to generate synthetic samples that meet the specified fault characteristics.
[0065] (5) Construct a balanced dataset. Specifically, the original fault samples and the fault samples synthesized by the conditional generative network are merged by category, so that the number of samples of all fault categories is equal. Finally, a balanced dataset containing balanced samples of all categories is constructed. In this way, the fault diagnosis model can simultaneously learn the characteristics of majority and minority class samples during training, improving the model's diagnostic ability for minority class samples.
[0066] Thus, the sample imbalance problem in bearing fault diagnosis is solved, providing a high-quality data foundation for subsequent feature screening and model training.
[0067] Furthermore, the aforementioned application phase of "Constructing a Balanced Dataset Using an Adaptively Improved Conditional GAN" relies on a trained conditional GAN to construct a balanced dataset. During the training of the adaptively improved conditional GAN, the preprocessed data is fed into the improved CTGAN model for training. The CTGAN generator generates pseudo samples using random noise vectors, while the discriminator is trained adversarially using real samples and generated samples. During training, the generator and discriminator are continuously optimized, ultimately generating synthetic samples with a distribution similar to that of real samples. Furthermore, during training, the CTGAN generator learns the distribution of real samples to generate synthetic samples that are highly similar to real samples. These synthetic samples effectively increase the number of minority class samples and balance the sample distribution in the dataset. The quality of the generated samples is evaluated using the Wasserstein distance and maximum mean difference (MMD) to ensure their similarity to real samples.
[0068] Optionally, the operation of inputting the second mixed feature vector into the mode-specific normalization module, re-encoding and normalizing the eigenvalues of the second mixed feature vector under a specific mode, and outputting a new feature vector includes: inputting the second mixed feature vector into the mode-specific normalization module, estimating the number of modes for each feature in the second mixed feature vector and fitting a Gaussian mixture using a variational Gaussian mixture model through the mode-specific normalization module; wherein the fitted Gaussian mixture is expressed as:
[0069] ;
[0070] Where, is the i-th feature in the second mixed feature vector Gaussian mixture of is the i-th feature The number of modes, is a Gaussian mixture model, and Respectively The weight and standard deviation fluctuations of the modes, For the The probability of a pattern occurring;
[0071] Based on the fitted Gaussian mixture, the probability density of each value of each feature in the second mixed feature vector under each mode distribution is calculated; wherein the calculation formula of the probability density is:
[0072] ;
[0073] Where, Features The jth value in In the The probability density under the distribution of modes, For the The probability of a pattern occurring, is a Gaussian mixture model, and Respectively The weight and standard deviation fluctuations of the modes;
[0074] According to the size of the probability density Sample a target pattern from the patterns, and Each value of Perform one-hot vector encoding and normalization to obtain the features A new representation of ; wherein the feature The new representation of is:
[0075] ;
[0076] Where, Indicates the characteristics The new expression, Representation characteristics The jth value in Normalized values within the target schema, Representation characteristics The jth value in The one-hot vector representing the target pattern, , is the total number of features in the mixed feature vector;
[0077] Based on the new representations of all features in the second mixed feature vector, a new feature vector is constructed and output.
[0078] Optionally, the operation of calculating the global contribution of each feature column of all samples in the balanced data set based on the Shapley additive interpretation algorithm, selecting the Top-K feature columns according to the contribution ranking in combination with human-computer interaction feedback, and forming a globally shared key feature set includes: calculating the SHAP value of each feature column of all samples in the balanced data set based on the Shapley additive interpretation algorithm as the global contribution; calculating the statistical distribution of the absolute values of the SHAP values of all feature columns in the balanced data set, and constructing an adaptive screening threshold; screening feature columns whose absolute values of the SHAP values meet the adaptive screening threshold from all feature columns of the balanced data set to generate a primary candidate feature set; using the primary candidate feature set as input, calculating the SHAP interaction values between features, screening feature combinations that meet a preset collaborative contribution threshold, and generating an optimized feature set; and receiving domain knowledge constraints input by an engineer, selecting the Top-K feature columns that meet the domain knowledge constraints from the optimized feature set to form a globally shared key feature set.
[0079] In this embodiment of the present invention, an interactive feature evaluation and selection mechanism based on the SHAP algorithm is proposed to enhance model reliability and achieve closed-loop decision-making through human-machine collaboration. This mechanism quantifies the contribution of each feature to the diagnostic result and combines it with the engineer's experience and knowledge to perform feature screening and modification. This forms a closed-loop process of model evaluation, manual intervention, and model optimization, thereby reducing model complexity while improving the reliability of diagnostic results.
[0080] SHAP is a model interpretation method based on game theory that aims to quantify the contribution of each feature to the model output. It measures the impact of each feature on the model's predictions by calculating its marginal contribution across all possible feature combinations. The SHAP value is calculated based on the Shapley value, a method used in game theory to fairly distribute the benefits of cooperation. It ensures that the contribution of each feature is fairly assessed. The calculation formula is as follows:
[0081]
[0082] in, represents the set of all features, represents a feature subset, Indicates the use of feature subsets The model output when Representation characteristics SHAP value of .
[0083] The proposed feature evaluation and selection mechanism plots a global contribution graph of SHAP values to show the contribution of each feature in the sample data to the model output. It also combines feature interaction analysis to reveal the synergistic effects between different features, helping engineers understand the model's decision-making process under complex fault conditions. Ultimately, they identify the most appropriate features and reintroduce them into the model for training, forming an interactive closed-loop process and realizing the human-machine collaborative concept of "assisting AI in understanding humans." The specific steps are as follows:
[0084] (1) Calculate the global contribution. Specifically, based on all samples in the balanced dataset, run the Shapley additive interpretation algorithm to calculate the SHAP value matrix (number of samples × number of features) for each feature column. By taking the absolute value and averaging it along the sample dimension, the global influence of each feature on the model output is quantified as the global contribution. This allows an objective measurement of feature importance and eliminates the subjective experience bias of traditional feature screening methods.
[0085] (2) Construct an adaptive screening threshold. Specifically, perform three sigma statistical analysis on the full-feature SHAP absolute value matrix (calculate the mean μ and standard deviation σ) and set the adaptive screening threshold: T adaptive =μ+2σ. For example, μ=0.15, σ=0.07, then the adaptive screening threshold T is calculated. adaptive =0.29. This ensures that key features can be adaptively retained in different fault scenarios, enabling adaptive identification of significant contribution features and avoiding the risk of over- or under-screening caused by manually setting fixed thresholds.
[0086] (3) Constructing a primary candidate feature set. Specifically, from all features, select features whose SHAP absolute value is greater than or equal to the adaptive screening threshold (e.g., selecting 15-dimensional features such as kurtosis and envelope spectrum peak from 21 dimensions) to generate a primary candidate set. This achieves data-driven feature initial screening.
[0087] (4) Generate an optimized feature set. Specifically, calculate the SHAP interaction value between features for the primary candidate set, screen the feature combinations that meet the preset collaborative contribution threshold (e.g., 0.1), and generate an optimized feature set. This allows for the mining of physically meaningful high-order feature interactions, prioritizing the retention of feature combinations with interaction contribution values ≥ the collaborative contribution threshold, forming an evidence chain of "main features + collaborative features," and improving the feature set's ability to characterize fault mechanisms.
[0088] (5) Generate a globally shared key feature set based on the concept of human-machine collaboration. Specifically, generate and display a three-dimensional explanatory chart to the engineer, including a global feature importance chart, a feature interaction effect chart, and a key sample decision explanation chart. Engineers can input corresponding domain knowledge constraints based on the displayed chart, such as "must include time domain energy features". After receiving the domain knowledge constraints input by the engineer, the top-K feature columns that meet the domain knowledge constraints are selected from the optimized feature set, such as selecting features that rank in the top 20% of the SHAP value and meet the domain knowledge constraints, to form a globally shared key feature set.
[0089] Compared to traditional visual interpretation methods, SHAP values are applicable to a wide range of complex machine learning models, including deep learning and ensemble learning models. By incorporating engineers' domain knowledge, they enable rapid feature identification and masking, as well as the supplementation of key features, ultimately improving the reliability and transparency of diagnostic results. This enables a closed-loop decision-making process: "quantitative analysis → dynamic screening → interactive mining → human-machine collaboration."
[0090] Optionally, before receiving the domain knowledge constraint conditions input by the engineer, the method further includes: generating and displaying the following explanatory charts: a global feature importance chart, a feature interaction effect chart, and a key sample decision explanation chart; wherein the global feature importance chart presents the average absolute SHAP value of each feature in a horizontal bar chart, arranged in descending order and marked with the contribution direction; the feature interaction effect chart displays the distribution of the joint influence of the main feature and the interaction feature on the SHAP value in the form of a scatter plot for each pair of feature combinations; the key sample decision explanation chart is used to indicate the prediction decision logic of samples with misdiagnosis or risk greater than a threshold, and decomposes the cumulative process of each feature contribution from the base value to the final predicted value of the sample through a waterfall chart; and based on the explanatory chart, assisting engineers in performing the following operations: identifying potential false features that the model depends on, analyzing whether there are synergistic effects that violate domain knowledge in the feature interaction dependency chart, and locating decision blind spots that require manual intervention.
[0091] In the embodiments of the present application, the feature importance global map is generated in the following manner: based on the SHAP algorithm, the global SHAP values of all samples in the balanced data set are calculated, the average absolute SHAP value is generated by taking the absolute value of each feature and then averaging, and then a horizontal bar chart is presented, arranged in descending order, with the feature name marked on the right side and the contribution direction encoded by color gradient on the left side (red for positive contribution and blue for negative contribution). Based on the feature importance global map, the operations performed by the engineer, for example, are: if the SHAP value of a certain feature (such as the average temperature) is close to 0, but the model mistakenly includes it in the key feature set, the engineer can mark it as a potential false feature and remove it through human-computer interaction. Or, the engineer confirms whether the high-frequency feature (such as the BPFO amplitude) is in the Top-5, and if it is missing, it indicates that the model has not captured the key physical mechanism.
[0092] The feature interaction effect diagram is generated in the following manner: for each pair of feature combinations (such as peak factor x kurtosis, 1 x rotation frequency x spectral entropy), the SHAP value change of the main feature (Feature A) under different values of the interaction feature (Feature B) is calculated. Among them, if the influence of the peak factor on the kurtosis is studied, the peak factor is the main feature and the kurtosis is the interaction feature. A scatter plot is displayed, with the X-axis representing the value of Feature B and the Y-axis representing the SHAP value of Feature A, and the color mapping representing the sample density, and the fitted curve reflecting the interaction trend. Based on the feature interaction effect diagram, the operations performed by the engineer, for example, are: if the interaction effect of a certain feature pair (such as time domain variance x frequency domain sideband energy) contradicts the domain knowledge (such as "high variance usually accompanied by increased sideband energy"), the engineer can mark it as an abnormal interaction and adjust the feature selection rules.
[0093] The key sample decision explanation diagram is generated in the following manner: for misdiagnosed samples (such as actual inner ring fault but predicted normal) or risk threshold exceeding samples (such as predicted probability <0.7), a waterfall chart is used to decompose the prediction path. Starting from the base value, the SHAP value is superimposed according to the feature contribution, and finally reaches the predicted value. Based on the key sample decision explanation diagram, the operations performed by the engineer, for example, are: if the contribution of a key feature (such as BPFI amplitude) in the decision path of a certain sample is abnormally low, it may be due to sensor loosening during data acquisition, which causes the feature to fail, and manual review needs to be triggered. If most of the misdiagnosed samples are concentrated in a certain fault type (such as the retainer fault), the focus loss weight (α) of this type can be increased when training the fault diagnosis module to force the model to pay attention.
[0094] Based on the above explanatory charts, the engineer can perform the following operations through the interactive interface:
[0095] Remove false features (such as average temperature);
[0096] Correct abnormal interaction rules (such as forcing the peak factor to be positively correlated with the kurtosis);
[0097] Mark the decision-making blind spot samples that require manual review.
[0098] For example, in bearing fault diagnosis, if the feature interaction effect plot shows that "spectral entropy is negatively correlated with peak factor," but domain knowledge requires that "high entropy should be accompanied by high impact," engineers can set a rule that states, "When spectral entropy is greater than 0.8, the peak factor SHAP value is forced to increase by 20%."
[0099] Thus, the feature set and sample labels corrected by the engineer can be re-input into the training process (steps S302-S306 above) to generate a new generation of models.
[0100] Optionally, the operation of training the fault diagnosis model using the feature values of the balanced data set on the key feature set as input includes: inputting the feature values of the balanced data set on the key feature set into the feature adaptive weighted fusion network in the fault diagnosis model, and outputting weighted fusion features; inputting the weighted fusion features into the lightweight gradient boosting network in the fault diagnosis model, and outputting the corresponding predicted fault type; and using the focal loss function to calculate the loss between the predicted fault type and the actual fault type, and synchronously optimizing the parameters of the feature adaptive weighted fusion network and the lightweight gradient boosting network through gradient back propagation.
[0101] In an embodiment of the present invention, during the training of a fault diagnosis model, the feature values of the balanced dataset on the key feature set are first input into the feature-adaptive weighted fusion network within the fault diagnosis model. The feature-adaptive weighted fusion network then performs a weighted fusion process on the input features, outputting weighted fused features that significantly enhance highly discriminative features while effectively weakening low-correlation features. Subsequently, the weighted fused features are input into a lightweight gradient boosting network within the fault diagnosis model, which performs classification and diagnosis on the weighted fused features and outputs the corresponding predicted fault type, achieving accurate identification of the fault type.
[0102] LightGBM is an efficient gradient boosting decision tree model with the advantages of fast training speed and low memory usage. It has significant advantages in processing high-dimensional feature data. The LightGBM network is developed from the gradient boosting decision tree. By splitting the leaf with the largest split gain in the current leaf, it effectively reduces the complexity of the model and improves the training speed. The growth strategy diagram is as follows Figure 5 shown.
[0103] Next, a focal loss function is used to calculate the loss between the predicted fault type and the actual fault type. Gradient backpropagation is then used to simultaneously optimize the parameters of the feature adaptive weighted fusion network and the lightweight gradient boosting network, achieving end-to-end joint optimization and targeted learning of unbalanced fault samples. By adjusting the weight factor α and the focusing parameter γ, the focal loss function significantly improves the model's sensitivity to rare fault samples (such as sudden faults with a probability of less than 1%) and easily confused samples (such as fault types with similar vibration modes). Furthermore, through the design of a differentiable decision tree, the LightGBM gradient can be backpropagated to the feature weighted network, achieving collaborative updates of the dual-module parameters. Ultimately, a lightweight, high-precision ADLightGBM fault diagnosis architecture is constructed.
[0104] Among them, the objective function of the fault diagnosis model can be expressed by the loss function and regularization terms that suppress model complexity Composition, the calculation formula is:
[0105]
[0106] Where, For the front The predicted value obtained by the trained model is For the The predicted value of the training.
[0107] The focal loss function is evolved based on the cross entropy function. It increases the weight of unstable and easily confused samples to improve the classification accuracy of the model. Its calculation formula is:
[0108]
[0109] Where, is the weight vector, are focusing parameters, which are used to balance the weight of easily confused samples. When , the focus loss function degenerates into the cross entropy loss function. The larger the value, the greater the penalty for easily confused samples.
[0110] By adjusting the focal loss function of The value increases the weight of easily confused samples in the loss function, making the model pay more attention to unstable samples, thereby improving the classification accuracy of the model.
[0111] Optionally, the operation of inputting the eigenvalues of the balanced data set on the key feature set into the feature adaptive weighted fusion network in the fault diagnosis model and outputting weighted fusion features includes: processing the input eigenvalues through multiple parallel feature extraction channels, each feature extraction channel outputting a feature map of the corresponding feature dimension; summing the intra-channel features of the feature map output by each feature extraction channel to generate a channel feature vector for each feature extraction channel; concatenating the channel feature vectors of all feature extraction channels and inputting them into the fully connected layer of the feature adaptive weighted fusion network, calculating the weights of the features extracted by each feature extraction channel through the Softmax function; and weightedly fusing the channel feature vectors of all feature extraction channels according to the weights to generate weighted fusion features.
[0112] In the embodiments of the present invention, most traditional methods use the concatenate mechanism to achieve simple feature concatenation and fusion, resulting in the loss of key feature information and affecting the diagnostic performance of the model. To address this issue, a feature weighting algorithm is proposed to further weight the fusion of the filtered key features. This algorithm draws on the attention mechanism to adaptively match different weights to frequency domain and frequency domain features. It also introduces a LightGBM network using the Focal Loss loss function, ultimately forming a feature weighted fusion network (AdaptiveLightGBM, ADLightGBM), which achieves high-precision fault diagnosis and classification.
[0113] In the process of weighted fusion, the input feature values are processed through multiple parallel feature extraction channels, and each feature extraction channel outputs a feature map of the corresponding feature dimension. ,in For the The feature output of the feature extraction channel, Output features No. numerical values, is the number of features, which is determined by the number of channels in the feature extraction module. The first Output features of channels Sum and get the corresponding features , as shown below:
[0114]
[0115] The features to be obtained Get the output through the fully connected layer , and then obtain the weight of the feature through the Softmax function , For the The weight of the features extracted by the feature extraction channels is mapped to the (0, 1) numerical space. The sum of the weights of the features of each channel is 1. The calculation process is shown in the following formula:
[0116]
[0117]
[0118] According to the above two formulas, the weighted features and fusion features It can be expressed as:
[0119]
[0120] After that, the weighted fusion features can be As the basis for fault diagnosis, the input is fed into the Lightweight Gradient Boosting Network (LightGBM, as a classifier) for fault classification, and the output category is as follows:
[0121]
[0122] Where, Represents the number of classification output layer units, that is, the number of fault categories, Representative The probability of the categories, and They represent the weight coefficient and bias vector of the lightweight gradient boosting network for nonlinear mapping during classification.
[0123] The following is a detailed example of the application scenario:
[0124] The experiments were conducted using the bearing fault datasets from the Electrical Engineering Laboratory of Case Western Reserve University (CWRU) in the United States and the School of Mechanical Engineering of Paderborn University (PU) in Germany.
[0125] Samples were selected from the CWRU dataset and the PU dataset to construct two unbalanced datasets. While ensuring that samples were non-duplicate, 1000 normal samples and 200 samples from each fault category were randomly selected from each dataset as the training set. Simultaneously, 200 normal samples and 200 samples from each fault category were randomly selected from each dataset as the test set. In the training set, the ratio of normal samples to samples from each fault category was set to 5:1 to simulate an unbalanced dataset.
[0126] The specific data samples are shown in Tables 1 and 2.
[0127] Table 1 CWRU bearing failure experiment sample information
[0128]
[0129] Table 2 PU bearing failure experiment sample information
[0130]
[0131] The computer configuration information for running the experiment is as follows: CPU: Intel(R) Core(TM) i7-11800H, running memory: DDR4 3200MHz 32G, graphics card: NVIDIA GeForce RTX 4060, programming language: Python 3.7, deep learning framework: Tensorflow 2.6.0.
[0132] In order to verify the effectiveness of the sample generation model based on the conditional generative adversarial network (CTGAN) proposed in this paper in data augmentation, the following three aspects are verified:
[0133] First, the generated samples and real samples are compared visually to analyze the sample generation effect; secondly, the sample similarity value is calculated through quantitative indicators, and the similarity between the generated samples and the original samples of the same type is verified through data dimensionality reduction method.
[0134] During the experiment, the following mainstream sample generation models were selected for comparative experiments.
[0135] GAN: The most classic generative model, consisting of two parts: a generator and a discriminator. The generator generates pseudo samples using random noise, while the discriminator performs adversarial training using real samples and generated samples.
[0136] CGAN: CGAN introduces conditional variables based on GAN. Both the generator and the discriminator use conditional variables as input during training. By introducing conditional variables, CGAN can generate samples of specific categories.
[0137] Copula GAN: Copula GAN is a generative model based on Copula theory that generates pseudo samples with a distribution similar to that of real samples by modeling the dependencies between features.
[0138] from Figure 6 It can be seen that the distance between the samples generated by the comparison model and the real samples is large, the sample similarity is small, and the fluctuation degree of the proposed generation model under various statistical indicators is smaller, indicating that it has good stability, and the medians are all the smallest, proving that the model proposed in this paper has better data generation ability and has achieved better performance than other methods in data augmentation tasks.
[0139] To further validate the effectiveness of the CTGAN sample generation model, we selected sample similarity evaluation metrics and conducted comparative experiments. These metrics included cosine similarity and the Pearson correlation coefficient. To mitigate the effects of chance, we repeated the experiment 10 times for each sample type and calculated the average. The calculation methods for the Pearson correlation coefficient (PCC) and cosine similarity (CS) are described below, respectively. The sample similarity results are shown in Table 3. CTGAN represents the proposed method, and the best results are highlighted in bold.
[0140] ;
[0141] ;
[0142] In the formula and Represent the image sample vectors, Represents the number of data points. The higher the value of PCC and CS, the higher the sample similarity.
[0143] Table 3 Sample similarity comparison
[0144]
[0145] As can be seen, the samples generated by the CTGAN model have the highest sample similarity. Compared with other models, the PCC index on the CWRU dataset is improved by 0.1686, 0.1307, and 0.0378, and the CS index is increased by 0.1515, 0.1364, and 0.029, respectively. On the PU dataset, the PCC index is increased by 0.1728, 0.1391, and 0.0375, respectively, and the CS index is increased by 0.172, 0.1257, and 0.0274, respectively. Although there is a gap between the similarity of the generated model samples and the original samples, when both indexes are above 0.9, it can be judged that the similarity is high. This shows that the CTGAN method proposed in this paper can effectively improve sample generation capabilities and solve the problem of generated sample ambiguity.
[0146] To further verify the similarity between the samples generated by the CTGAN generative model and the real samples, the t-distributed stochastic neighborhood embedding (t-SNE) method is used to reduce the dimensionality of the samples. A dataset obtained by randomly selecting 50 real samples from each type of fault samples in the two datasets and a new dataset obtained by adding 200 samples generated by the VAE-GAN sample generation model to the dataset are visualized separately. Figure 7, we can see that the distribution of the class fault data without the generated samples is more aliased. In contrast, the clustering phenomenon is more obvious among the fault data with the generated samples. This shows that the generated samples have a strong similarity with the real samples, which has a positive effect on sample clustering.
[0147] To demonstrate the closed-loop process of the proposed method and how to optimize specific features, a CWRU dataset was used as an example. Data from two vibration sensors, one at the drive end (DE) and the other at the fan end (FE), were sampled at 12,000 Hz for a motor operating at 1797 revolutions per minute (RPM). The following features were calculated for both sensors: peak-to-peak value, crest factor, root mean square (RMS), maximum value, minimum value, standard deviation, and kurtosis. Non-overlapping one-second time windows were used to calculate the features used in all experiments.
[0148] Taking inner race faults and rolling element faults as examples, the model was evaluated using different numbers of features, ranging from 1 to 10. The corresponding performance results are detailed in Table 4. It can be seen that when the number of features k = 2, this minimal feature set not only reduces complexity but also maintains the highest level of accuracy during classification. This shows that for bearing fault diagnosis tasks, using only a small number of key features can achieve high diagnostic accuracy. While using too many features may not significantly reduce model performance, it will increase model complexity and affect model training speed.
[0149] Table 4 Comparison of diagnostic results
[0150]
[0151] In order to deeply observe the influence of features on the diagnosis results, the SHAP library graph was used to further analyze the above features. Figure 8 The results shown are: the horizontal axis is the SHAP value, the vertical axis is the influencing factor of each feature, and different colors represent different degrees of influence.
[0152] from Figure 8As can be seen from the data, the root mean square (RMS) and peak-to-peak (PEAK) values have the greatest impact on fault classification, with high SHAP values, indicating that these two features play a key role in the model's decision-making. Crest factor and standard deviation are next, also contributing significantly to the model's decision-making. Maximum and minimum values have relatively little influence, while kurtosis has the least. This indicates that in bearing fault diagnosis, the RMS and PEAK values of vibration signals are the most important features, effectively reflecting the bearing's health. This can be evaluated based on preliminary results from expert experience, and features with less influence can be manually weighted down in subsequent training. Features with higher influence require further collaborative analysis.
[0153] In order to prove that the root mean square and peak-to-peak values are the key features in the fault diagnosis process, a scatter plot is further drawn with the root mean square as the horizontal axis and the peak-to-peak value as the vertical axis. The distribution of fault types is observed through collaborative analysis. The results are as follows: Figure 9 As shown in the figure, it can be seen that the samples of the two fault types are effectively segmented, indicating that the two fault types can be effectively diagnosed through the two features of root mean square and peak value. Therefore, root mean square and peak value are selected as key features for diagnosis, and the corrected feature weights are fed back to the model for online fine-tuning and re-evaluation until the diagnosis results meet the reliability requirements. Through this human-computer collaborative mechanism, the model can be continuously iterated and optimized, ultimately achieving improved accuracy and reliability of the diagnosis results. The SHAP algorithm is used to evaluate and screen data features, and the model design is guided and further optimized through the interpretation of feature attribution, thereby improving the reliability of the model. At the same time, the feature offset problem caused by unbalanced data is further improved. In order to confirm that the model after feature selection optimization has better diagnostic effect, this paper conducts further verification in subsequent comparative experiments.
[0154] In order to verify the diagnostic effect of the AD-LightGBM method proposed in this paper on various bearing faults under the condition of sample imbalance, four groups of experiments were set up for comparison:
[0155] (1) CNN: The data with unbalanced original sample size distribution is directly input into the CNN classification model for training to obtain the trained classification model, and the model effect is tested using the test set;
[0156] (2) AD-LightGBM: The data with unbalanced original sample size distribution is directly input into the AD-LightGBM classification model after feature selection for training;
[0157] (3) CTGAN+CNN: first generate fault samples through the CTGAN sample generation model, and then input the balanced data set after enhancement into the CNN for training;
[0158] (4) CTGAN+ AD-LightGBM: first generate fault samples through the CTGAN sample generation model, and then input the balanced data set after enhancement into the AD-LightGBM after feature selection for training.
[0159] Finally, the diagnostic results of each group of experiments are verified using the test set, and the accuracy (Accuracy, Acc), recall (Recall, Rec) and F1-score three indicators are compared. The results on the CWRU data set and the PU data set are shown in Table 5.
[0160] Table 5 Comparison of model results
[0161]
[0162] From Table 5, it can be seen that when the CNN model is directly trained using the unbalanced data set for diagnosis, the accuracy, recall value and F1-score value are relatively low. The values of the three evaluation indicators on the CWRU data set are 0.7425, 0.7425 and 0.7475, and the values of the three evaluation indicators on the PU data set are 0.7250, 0.7326 and 0.7347. In contrast to the third group of experiments CTGAN+CNN, after using the CTGAN sample generation model for sample balancing expansion, the CNN model is trained using the expanded balanced data set for diagnosis, and the diagnostic results are significantly improved. The values of the three evaluation indicators on the CWRU data set can reach 0.9375, 0.9400 and 0.9387, and the values of the three evaluation indicators on the PU data set can reach 0.9200, 0.9236 and 0.9218. The accuracy on the CWRU data set and the PU data set is improved by 19.50%. Therefore, after the CTGAN sample generation model is used for sample balancing expansion, the diagnostic model is trained using the sample number balanced data set, which can effectively improve the diagnostic effect of the model, proving that the CTGAN sample generation model can effectively generate pseudo samples and solve the problem of unbalanced number of fault samples.
[0163] From the results of training diagnosis of CNN and AD-LightGBM under unbalanced data sets, we can know that AD-LightGBM performs better than CNN in the face of unbalanced data, and the accuracy rates on the CWRU data set and PU data set are increased by 10.75% and 9.59% respectively; and from the results of training diagnosis of CNN and AD-LightGBM under the expanded balanced data set, we can know that AD-LightGBM also performs better than traditional CNN in the face of unbalanced data, and the accuracy rates on the CWRU data set and PU data set are increased by 5.00% and 3.50% respectively. It can be shown that AD-LightGBM has a better feature extraction effect. Finally, it can be seen that when facing unbalanced training data, the method proposed in the present invention can first be balanced and expanded through the CTGAN sample generation model, and then AD-LightGBM can be used to extract multiple features for diagnosis, with the best diagnostic results, proving the effectiveness of this method.
[0164] In order to clearly demonstrate the convergence speed of AD-LightGBM during training and the recognition of each type of samples, the process curve of its training on the CWRU dataset and PU dataset and the confusion matrix diagnosed on the test set are shown as follows: Figure 10 and Figure 11 As shown in the figure, the accuracy and loss curves contain data from the training and test sets. The horizontal axis represents the number of training rounds, and the vertical axis represents the accuracy. The confusion matrix represents the predicted classification on the horizontal axis and the true classification on the vertical axis. The confusion matrix can be used to obtain the classification accuracy of each test sample. AD-LightGBM converges quickly during training while maintaining high diagnostic accuracy. The accuracy curves on both datasets have good fit and high accuracy. On the PU dataset, although the accuracy and loss curves show some fluctuations in the first 20 rounds of training, after 50 rounds of training, the model stabilizes, showing high accuracy and convergence, maintaining good performance. Because the PU dataset is a real-world operational damage dataset with complex fault types, the fault type characteristics are more complex than those in the artificially damaged CWRU dataset. Therefore, the classification model is more difficult to extract fault features, requiring more training rounds to optimize the model parameters. Therefore, the training curve of the classification model on the PU dataset fluctuates more significantly than on the CWRU dataset.
[0165] The specific implementation process of this embodiment is as follows:
[0166] The original bearing fault data is preprocessed to construct a hybrid feature vector. The conditional generative adversarial network is improved to generate synthetic samples that are highly similar to real samples. The synthetic samples reflect the characteristics of different fault types, expand the number of minority class samples, and balance the sample distribution in the dataset. The generated synthetic samples are combined with real samples to form a new balanced dataset.
[0167] An interactive feature selection model based on the Shapley additive interpretation algorithm quantifies the contribution of each feature to the diagnostic results and uses engineers' experience to screen and modify features. These features are then reintroduced into the model for training and optimization until key features are identified.
[0168] The key features are fused through the feature adaptive weighting algorithm, and the LightGBM network using the Focal Loss loss function is introduced to form a feature weighted fusion network for fault diagnosis classification.
[0169] In summary, based on the concept of human-computer interaction and considering both data generation and algorithm optimization, this application proposes an interactive fault diagnosis method for unbalanced samples. This method constructs hybrid features through a sliding window algorithm and utilizes the CTGAN model to generate synthetic samples that are highly similar to real samples, achieving balanced expansion of sample data. Then, through a feature evaluation and selection module, based on feature attribution and combined with human-computer interaction to guide model design, the model feature extraction process is optimized, enhancing the model's transparency and reliability. Finally, the feature selection results are weighted and fused, combined with the LightGBM model for fault diagnosis, and a focal loss function is introduced to optimize the model's classification capabilities for minority class samples.
[0170] Experimental results show that the samples generated by the CTGAN model have a high degree of similarity to real samples and can effectively balance the sample distribution in the dataset. The AD-LightGBM model performs well under conditions of sample imbalance, significantly improving the model's diagnostic capabilities for minority class samples. By quantitatively analyzing feature factors using the SHAP method and adjusting feature weights based on engineers' experience and knowledge, a closed-loop decision-making process with human-machine collaboration is achieved. This method not only improves the accuracy and reliability of model diagnosis, but also enhances decision-making transparency through an interactive visualization interface, providing an efficient and reliable solution for bearing fault diagnosis in complex industrial scenarios.
[0171] It should be noted that in the above process, this embodiment only uses bearings as an example to illustrate the detailed steps of fault diagnosis. The target object can also be other mechanical equipment and its components in industrial scenarios. The corresponding fault diagnosis processes all follow the same technical framework, and their implementation paths and core algorithm mechanisms are universal, so they will not be described in detail.
[0172] In addition, reference Figure 1 As shown, according to a second aspect of this embodiment, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is run, a processor executes any one of the above methods.
[0173] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0174] Through the description of the above embodiments, those skilled in the art will clearly understand that the methods according to the above embodiments can be implemented using software plus the necessary general-purpose hardware platform. Of course, hardware can also be used, but in many cases the former is a more preferred embodiment. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, or optical disk) and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0175] Example 2
[0176] Figure 12 The interactive fault diagnosis device for unbalanced samples according to this embodiment is shown, which corresponds to the method according to embodiment 1. Figure 12As shown, the device includes: a data acquisition module 1210, which is used to obtain the operation monitoring data of the target object of the fault type to be diagnosed; a feature extraction module 1220, which is used to extract the time domain features and frequency domain features of the operation monitoring data using a sliding window algorithm to construct a first mixed feature vector; a fault diagnosis module 1230, which is used to extract the feature values corresponding to the preset key feature set from the first mixed feature vector, and input the extracted feature values into a trained fault diagnosis model to output the fault type classification result of the target object; wherein, the fault diagnosis model is pre-trained by the following steps: by integrating the conditional generative adversarial network with the sliding window algorithm in the input layer, The original data set with sample imbalance is converted into a balanced data set with a balanced number of samples of each type; the global contribution of each feature column of all samples in the balanced data set is calculated based on the Shapley additive interpretation algorithm, and the Top-K feature columns are selected according to the contribution ranking in combination with human-computer interaction feedback to form a globally shared key feature set; and the feature values of the balanced data set on the key feature set are used as input to train a fault diagnosis model; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network.
[0177] Therefore, according to this embodiment, during the application phase, operational monitoring data of the target object is first acquired. Time-domain and frequency-domain features are dynamically extracted using a sliding window algorithm to construct a hybrid feature vector. Pre-set global key feature values are then extracted from this hybrid feature vector and fed into a trained fault diagnosis model to directly output classification results. The fault diagnosis model training process achieves accurate diagnosis in unbalanced scenarios through the following innovations: A conditional generative adversarial network (CGAN) with an integrated sliding window is used to convert the original unbalanced data into a class-balanced dataset, achieving balanced expansion of sample data. The SHAP algorithm is used to quantify the global contribution of features, and a top-K key feature set is dynamically identified using human-computer interaction feedback. Using these key features as input, a feature adaptive weighted fusion network is used to enhance feature representation. A LightGBM classifier is trained using a focal loss function to focus on minority class samples, improving the diagnostic performance and reliability of the fault diagnosis model under unbalanced data. This approach enables stable fault feature extraction, interpretable key feature screening, and high-precision diagnosis of minority class faults in unbalanced dynamic industrial scenarios. This solves the technical problems existing in the existing technology of traditional fault diagnosis methods in unbalanced and dynamically changing industrial scenarios, such as feature offset and insufficient ability to identify minority faults due to imbalanced sample distribution, and lack of human-machine collaborative feature quantification screening mechanism, which leads to limited model diagnosis accuracy and poor dynamic adaptability.
[0178] Example 3
[0179] Figure 13 The interactive fault diagnosis device for unbalanced samples according to this embodiment is shown, which corresponds to the method according to embodiment 1. Figure 13 As shown, the device includes: a processor 1310; and a memory 1320, connected to the processor 1310, for providing the processor 1310 with instructions for processing the following processing steps: obtaining operation monitoring data of a target object of a fault type to be diagnosed; extracting time domain features and frequency domain features of the operation monitoring data using a sliding window algorithm to construct a first mixed feature vector; extracting feature values corresponding to a preset key feature set from the first mixed feature vector, and inputting the extracted feature values into a trained fault diagnosis model to output a fault type classification result of the target object; wherein the fault diagnosis model is pre-trained by the following steps: by integrating the condition of the sliding window algorithm in the input layer A generative adversarial network is used to convert an unbalanced original dataset into a balanced dataset with a balanced number of samples of each type; the global contribution of each feature column of all samples in the balanced dataset is calculated based on the Shapley additive interpretation algorithm, and the Top-K feature columns are selected by contribution ranking in combination with human-computer interaction feedback to form a globally shared key feature set; and the feature values of the balanced dataset on the key feature set are used as input to train a fault diagnosis model; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network.
[0180] Therefore, according to this embodiment, during the application phase, operational monitoring data of the target object is first acquired. Time-domain and frequency-domain features are dynamically extracted using a sliding window algorithm to construct a hybrid feature vector. Pre-set global key feature values are then extracted from this hybrid feature vector and fed into a trained fault diagnosis model to directly output classification results. The fault diagnosis model training process achieves accurate diagnosis in unbalanced scenarios through the following innovations: A conditional generative adversarial network (CGAN) with an integrated sliding window is used to convert the original unbalanced data into a class-balanced dataset, achieving balanced expansion of sample data. The SHAP algorithm is used to quantify the global contribution of features, and a top-K key feature set is dynamically identified using human-computer interaction feedback. Using these key features as input, a feature adaptive weighted fusion network is used to enhance feature representation. A LightGBM classifier is trained using a focal loss function to focus on minority class samples, improving the diagnostic performance and reliability of the fault diagnosis model under unbalanced data. This approach enables stable fault feature extraction, interpretable key feature screening, and high-precision diagnosis of minority class faults in unbalanced dynamic industrial scenarios. This solves the technical problems existing in the existing technology of traditional fault diagnosis methods in unbalanced and dynamically changing industrial scenarios, such as feature offset and insufficient ability to identify minority faults due to imbalanced sample distribution, and lack of human-machine collaborative feature quantification screening mechanism, which leads to limited model diagnosis accuracy and poor dynamic adaptability.
[0181] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0182] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0183] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0184] 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 units may be selected to achieve the purpose of this embodiment according to actual needs.
[0185] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0186] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0187] The above is only the preferred embodiment of the present application. It should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. An interactive fault diagnosis method for unbalanced samples, characterized in that: include: Obtaining operation monitoring data of the target object of the fault type to be diagnosed; Extracting time domain features and frequency domain features of the operation monitoring data using a sliding window algorithm to construct a first mixed feature vector; Extracting feature values corresponding to a preset key feature set from the first mixed feature vector, inputting the extracted feature values into a trained fault diagnosis model, and outputting a fault type classification result of the target object; The fault diagnosis model is pre-trained through the following steps: By integrating the conditional generative adversarial network with the sliding window algorithm in the input layer, the original dataset with unbalanced samples is converted into a balanced dataset with a balanced number of samples of various types; Calculating the global contribution of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm, selecting the top-K feature columns based on contribution ranking in combination with human-computer interaction feedback, and forming a globally shared key feature set; and The fault diagnosis model is trained using the feature values of the balanced data set on the key feature set as input; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network; The operations of calculating the global contribution of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm, selecting the top-K feature columns by contribution ranking in combination with human-computer interaction feedback, and forming a globally shared key feature set include: Calculate the SHAP value of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm as the global contribution; Calculate the statistical distribution of the absolute values of the SHAP values of all feature columns in the balanced data set and construct an adaptive screening threshold; Screening feature columns whose absolute values of SHAP values meet the adaptive screening threshold from all feature columns of the balanced data set to generate a primary candidate feature set; Taking the primary candidate feature set as input, calculating the SHAP interaction value between features, screening feature combinations that meet a preset collaborative contribution threshold, and generating an optimized feature set; and Receive the domain knowledge constraints input by the engineer, select the Top-K feature columns that meet the domain knowledge constraints from the optimized feature set, and form a globally shared key feature set; Before receiving the domain knowledge constraints input by the engineer, the following steps are also included: Generate and display the following explanatory charts: a global feature importance chart, a feature interaction effect chart, and a key sample decision explanation chart; the global feature importance chart presents the average absolute SHAP value of each feature in a horizontal bar chart, arranged in descending order and annotated with the contribution direction; the feature interaction effect chart displays the distribution of the joint impact of the main feature and the interaction feature on the SHAP value for each pair of feature combinations in the form of a scatter plot; the key sample decision explanation chart is used to indicate the prediction decision logic for samples with misdiagnosis or risk greater than a threshold, and decomposes the cumulative process of each feature contribution from the baseline value to the final predicted value of the sample through a waterfall chart; and Based on the explanatory diagram, the auxiliary engineer performs the following operations: identifying potential spurious features that the model depends on, analyzing whether there are synergistic effects that violate domain knowledge in the feature interaction dependency graph, and locating decision blind spots that require manual intervention.
2. The method according to claim 1, characterized in that The conditional generative adversarial network includes an input layer, a pattern-specific normalization module, a conditional generative network, and an adversarial network. The operation of converting an unbalanced original dataset into a balanced dataset with a balanced number of samples of various types by integrating the conditional generative adversarial network with the sliding window algorithm in the input layer includes: Normalizing various fault samples in the original data set; Inputting the normalized fault sample into the input layer, extracting the time domain features and frequency domain features of the fault sample through the sliding window algorithm integrated in the input layer, and constructing a second hybrid feature vector based on the time domain features and the frequency domain features; Inputting the second mixed feature vector into the mode-specific normalization module, re-encoding and normalizing the feature values of the second mixed feature vector in a specific mode, and outputting a new feature vector; and Inputting the new feature vector, the fault type condition variable and the fault severity condition variable into the condition generation network to generate synthetic data of the fault sample; A balanced dataset is constructed based on all fault samples and the corresponding synthetic data.
3. The method according to claim 2, characterized in that The operation of inputting the second mixed feature vector into the mode-specific normalization module, re-encoding and normalizing the feature values of the second mixed feature vector under the specific mode, and outputting a new feature vector includes: The second mixed feature vector is input into the mode-specific normalization module, and the mode-specific normalization module uses a variational Gaussian mixture model to estimate the number of modes for each feature in the second mixed feature vector and fit a Gaussian mixture; wherein the fitted Gaussian mixture is expressed as: Where, is the i-th feature C in the second mixed feature vector i Gaussian mixture, m i is the i-th feature C i The number of modes, N(·) is the Gaussian mixture model, μ k and φ k are the weight and standard deviation fluctuation of the kth mode, η k is the probability of the kth mode occurring; Based on the fitted Gaussian mixture, the probability density of each value of each feature in the second mixed feature vector under each mode distribution is calculated; wherein the calculation formula of the probability density is: r k =μ k N(C i,j ;or k ,f k ); Where, ρ k Characteristic C i The jth value C in i,j The probability density under the kth mode distribution, η k is the probability of the kth mode occurring, N(·) is the Gaussian mixture model, u k and φ k are the weight and standard deviation fluctuations of the kth mode respectively; According to the size of the probability density from m i Sample a target pattern from the patterns, and i Each value of C i,j Perform one-hot vector encoding and normalization to obtain the feature C i A new representation of ; wherein the feature C i The new representation of is: Where r j Represents the feature C i The new representation of α i,j Represents feature C i The jth value C in i,j Normalized value within the target mode, β i,j Represents feature C i The jth value C in i,j The one-hot vector used to represent the target pattern, i∈[1, N c ],N c is the total number of features in the mixed feature vector; Based on the new representations of all features in the second mixed feature vector, a new feature vector is constructed and output.
4. The method according to claim 1, wherein The operation of training the fault diagnosis model using the feature values of the balanced data set on the key feature set as input includes: Inputting the feature values of the balanced data set on the key feature set into the feature adaptive weighted fusion network in the fault diagnosis model, and outputting weighted fusion features; Inputting the weighted fusion features into the lightweight gradient boosting network in the fault diagnosis model, and outputting the corresponding predicted fault type; and A focal loss function is used to calculate the loss between the predicted fault type and the actual fault type, and the parameters of the feature adaptive weighted fusion network and the lightweight gradient boosting network are simultaneously optimized through gradient back propagation.
5. The method according to claim 4, characterized in that The operation of inputting the feature values of the balanced data set on the key feature set into the feature adaptive weighted fusion network in the fault diagnosis model and outputting the weighted fusion features includes: The input feature values are processed through multiple parallel feature extraction channels, and each feature extraction channel outputs a feature map of the corresponding feature dimension; The feature maps output by each feature extraction channel are summed up within the channel to generate the channel feature vector of each feature extraction channel; The channel feature vectors of all feature extraction channels are concatenated and input into the fully connected layer of the feature adaptive weighted fusion network, and the weight of the feature extracted by each feature extraction channel is calculated by the Softmax function; and The channel feature vectors of all feature extraction channels are weightedly fused according to the weights to generate weighted fusion features.
6. A storage medium, characterized in that The storage medium includes a stored program, wherein when the program is run, the processor executes the method according to any one of claims 1 to 5.
7. An interactive fault diagnosis device for unbalanced samples, characterized in that: include: A data acquisition module is used to obtain the operation monitoring data of the target object of the fault type to be diagnosed; A feature extraction module, configured to extract time domain features and frequency domain features of the operation monitoring data using a sliding window algorithm to construct a first hybrid feature vector; a fault diagnosis module, configured to extract feature values corresponding to a preset key feature set from the first mixed feature vector, input the extracted feature values into a trained fault diagnosis model, and output a fault type classification result of the target object; The fault diagnosis model is pre-trained through the following steps: By integrating the conditional generative adversarial network with the sliding window algorithm in the input layer, the original dataset with unbalanced samples is converted into a balanced dataset with a balanced number of samples of various types; Calculating the global contribution of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm, selecting the top-K feature columns based on contribution ranking in combination with human-computer interaction feedback, and forming a globally shared key feature set; and The fault diagnosis model is trained using the feature values of the balanced data set on the key feature set as input; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network; The operations of calculating the global contribution of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm, selecting the top-K feature columns by contribution ranking in combination with human-computer interaction feedback, and forming a globally shared key feature set include: Calculate the SHAP value of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm as the global contribution; Calculate the statistical distribution of the absolute values of the SHAP values of all feature columns in the balanced data set and construct an adaptive screening threshold; Screening feature columns whose absolute values of SHAP values meet the adaptive screening threshold from all feature columns of the balanced data set to generate a primary candidate feature set; Taking the primary candidate feature set as input, calculating the SHAP interaction value between features, screening feature combinations that meet a preset collaborative contribution threshold, and generating an optimized feature set; and Receive the domain knowledge constraints input by the engineer, select the Top-K feature columns that meet the domain knowledge constraints from the optimized feature set, and form a globally shared key feature set; Before receiving the domain knowledge constraints input by the engineer, the following steps are also included: Generate and display the following explanatory charts: a global feature importance chart, a feature interaction effect chart, and a key sample decision explanation chart; the global feature importance chart presents the average absolute SHAP value of each feature in a horizontal bar chart, arranged in descending order and annotated with the contribution direction; the feature interaction effect chart displays the distribution of the joint impact of the main feature and the interaction feature on the SHAP value for each pair of feature combinations in the form of a scatter plot; the key sample decision explanation chart is used to indicate the prediction decision logic for samples with misdiagnosis or risk greater than a threshold, and decomposes the cumulative process of each feature contribution from the baseline value to the final predicted value of the sample through a waterfall chart; and Based on the explanatory diagram, the auxiliary engineer performs the following operations: identifying potential spurious features that the model depends on, analyzing whether there are synergistic effects that violate domain knowledge in the feature interaction dependency graph, and locating decision blind spots that require manual intervention.
8. An interactive fault diagnosis device for unbalanced samples, characterized in that: include: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Obtaining operation monitoring data of the target object of the fault type to be diagnosed; Extracting time domain features and frequency domain features of the operation monitoring data using a sliding window algorithm to construct a first mixed feature vector; Extracting feature values corresponding to a preset key feature set from the first mixed feature vector, inputting the extracted feature values into a trained fault diagnosis model, and outputting a fault type classification result of the target object; The fault diagnosis model is pre-trained through the following steps: By integrating the conditional generative adversarial network with the sliding window algorithm in the input layer, the original dataset with unbalanced samples is converted into a balanced dataset with a balanced number of samples of various types; Calculating the global contribution of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm, selecting the top-K feature columns based on contribution ranking in combination with human-computer interaction feedback, and forming a globally shared key feature set; and The fault diagnosis model is trained using the feature values of the balanced data set on the key feature set as input; wherein the fault diagnosis model includes a feature adaptive weighted fusion network for fusing the input feature values and a lightweight gradient boosting network for classifying and diagnosing the fused features, and a focal loss function is used when training the lightweight gradient boosting network; The operations of calculating the global contribution of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm, selecting the top-K feature columns by contribution ranking in combination with human-computer interaction feedback, and forming a globally shared key feature set include: Calculate the SHAP value of each feature column of all samples in the balanced dataset based on the Shapley additive interpretation algorithm as the global contribution; Calculate the statistical distribution of the absolute values of the SHAP values of all feature columns in the balanced data set and construct an adaptive screening threshold; Screening feature columns whose absolute values of SHAP values meet the adaptive screening threshold from all feature columns of the balanced data set to generate a primary candidate feature set; Taking the primary candidate feature set as input, calculating the SHAP interaction value between features, screening feature combinations that meet a preset collaborative contribution threshold, and generating an optimized feature set; and Receive the domain knowledge constraints input by the engineer, select the Top-K feature columns that meet the domain knowledge constraints from the optimized feature set, and form a globally shared key feature set; Before receiving the domain knowledge constraints input by the engineer, the following steps are also included: Generate and display the following explanatory charts: a global feature importance chart, a feature interaction effect chart, and a key sample decision explanation chart; the global feature importance chart presents the average absolute SHAP value of each feature in a horizontal bar chart, arranged in descending order and annotated with the contribution direction; the feature interaction effect chart displays the distribution of the joint impact of the main feature and the interaction feature on the SHAP value for each pair of feature combinations in the form of a scatter plot; the key sample decision explanation chart is used to indicate the prediction decision logic for samples with misdiagnosis or risk greater than a threshold, and decomposes the cumulative process of each feature contribution from the baseline value to the final predicted value of the sample through a waterfall chart; and Based on the explanatory diagram, the auxiliary engineer performs the following operations: identifying potential spurious features that the model depends on, analyzing whether there are synergistic effects that violate domain knowledge in the feature interaction dependency graph, and locating decision blind spots that require manual intervention.
Citation Information
Patent Citations
Deep learning classification model for fault diagnosis and fault diagnosis method
CN113869339A
Rotor crack fault diagnosis method and device and rotor crack fault model construction method and device
CN116662793A
Multi-sensor data fusion intelligent fault diagnosis system and method thereof
CN119536202A
Multi-working-condition-oriented equipment fault diagnosis method based on unbalanced learning
CN119577603A