Fault type identification method and device for unbalanced samples
By constructing a fault category hierarchical tree and using transfer learning techniques, a fault feature extraction network is created by screening similar sample sets from the source domain. This solves the classification bias problem caused by imbalanced samples and improves the accuracy of fault type identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NO 719 RES INST CHINA SHIPBUILDING IND
- Filing Date
- 2022-10-31
- Publication Date
- 2026-07-14
AI Technical Summary
Existing fault diagnosis models exhibit classification bias when faced with imbalanced samples, resulting in decreased predictive ability for minority class samples and low classification accuracy.
By constructing a fault category hierarchical tree, a set of source domain fault class samples with the highest similarity to the target domain category is selected from the source domain. A fault feature extraction network is created, and a target classifier is trained using transfer learning techniques. Feature extraction and sample equalization are then performed by combining data-driven algorithms and preset knowledge rules.
It improves the accuracy of fault classification and identification by extracting transferable similarity features of fault samples in the target domain from the source domain using hierarchical relationships between classes, thus achieving efficient identification of target domain categories.
Smart Images

Figure CN115687925B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault classification and identification technology, and in particular to a method, apparatus, electronic device and storage medium for fault type identification of imbalanced samples. Background Technology
[0002] Fault diagnosis involves identifying faults that have already occurred. However, existing fault diagnosis models require a balance in the amount of data across each category, but in reality, the amount of data across different categories is often imbalanced, sometimes severely so. For example, there might be a large number of normal samples and a small number of fault samples, or a large number of frequently occurring fault samples and a small number of occasionally occurring fault samples. This imbalance in the number of samples across different categories can severely bias the classification model, thus affecting its accuracy. Imbalanced data processing techniques can address this imbalance problem and improve the diagnostic model's ability to identify faults with small sample sizes.
[0003] Imbalanced datasets are primarily a problem in supervised machine learning tasks. Most common machine learning algorithms do not perform well on imbalanced datasets. For the tail classes, which have fewer samples, their weak statistical properties easily lead to the loss of the tail classes being overwhelmed by the loss of the head classes when training traditional uniformly distributed classification models. When directly using imbalanced data to train classification models, traditional classification algorithms, which aim for overall classification accuracy, often overfit to the majority class (head classes), neglecting the minority classes (tail classes) during prediction, resulting in a decline in the ability to predict minority class samples. For example, if the positive to negative ratio in a binary classification dataset is 99:1, the classifier could achieve a 99% accuracy by simply classifying all predictions as positive, but such a classifier lacks generalization ability and is worthless.
[0004] Most existing imbalanced dataset algorithms interpolate the original data, leading to issues such as overlap between the generated and original data, and insufficient data volume resulting in centralized data distribution, thus causing low accuracy in fault classification and identification. Deep neural networks, on the other hand, have become increasingly popular and developed rapidly in recent years. They possess superior learning capabilities, can extract deeper features from data, and exhibit better fitting ability. Summary of the Invention
[0005] This invention provides a method and apparatus for identifying fault types in imbalanced samples, thereby addressing the shortcomings of existing technologies in terms of low accuracy in fault classification and identification of imbalanced samples.
[0006] In a first aspect, the present invention provides a method for identifying fault types in imbalanced samples, comprising:
[0007] Based on the pre-established fault category hierarchical tree, a source domain fault class sample set with the highest similarity to the target domain category is selected from the source domain, and a fault feature extraction network for the source domain fault class sample set is created.
[0008] The supporting sample set of the target domain category is input into the fault feature extraction network to obtain the fault feature vector set of the supporting sample set;
[0009] A target classifier is trained based on the fault feature vector set to identify the fault category of the target domain.
[0010] According to the fault type identification method for imbalanced samples provided by the present invention, before selecting the source domain fault class sample set with the highest similarity to the target domain category in the target domain based on a pre-established fault category hierarchical tree, and creating a fault feature extraction network for the source domain fault class sample set, the method further includes:
[0011] Construct semantic vectors of class labels using fault class labels from the source and target domains;
[0012] By combining data-driven algorithms and pre-defined knowledge rules, a hierarchical tree of the fault categories is constructed using a hierarchical clustering algorithm.
[0013] According to the present invention, a method for identifying fault types in imbalanced samples, wherein constructing a class label semantic vector using fault class label description texts from the source and target domains includes:
[0014] The fault category tag description text is segmented to generate multiple fault category tag sub-description texts;
[0015] The pre-defined semantic vector generation model is used to train all the fault class label sub-description texts to generate corresponding class label semantic vectors.
[0016] According to the present invention, a fault type identification method for imbalanced samples is provided, wherein the fault category hierarchical tree is constructed by combining a data-driven algorithm and preset knowledge rules through a hierarchical clustering algorithm, including: constructing an undirected graph of the class label semantic vectors; performing community detection on the undirected graph based on a spectral clustering community detection algorithm to construct an initial fault category hierarchical tree; optimizing the initial fault category hierarchical tree based on preset knowledge rules to generate the fault category hierarchical tree; wherein the preset knowledge rules include at least: faults occurring on the same component are clustered into the same superclass.
[0017] According to the fault type identification method for imbalanced samples provided by the present invention, before constructing a class label semantic vector using the fault class label description text of the source domain and the target domain, the method further includes: performing data equalization processing on the source domain fault samples in the source domain by using oversampling or undersampling.
[0018] According to the present invention, a fault type identification method for imbalanced samples is provided, which performs data equalization processing on source domain fault samples in the source domain by oversampling, including: obtaining multiple nearest neighbor minority class samples of any minority class sample in the source domain fault samples; and generating new minority class samples by linear difference between any minority class sample and any nearest neighbor minority class sample to expand the number of minority class samples.
[0019] According to the present invention, a fault type identification method for imbalanced samples generates a new minority class sample by using any minority class sample and any nearest neighbor minority class sample through a linear difference method. The specific formula is as follows:
[0020] x new =x+rand(0,1)*(x i -x)
[0021] Where, x new Let x be any minority class sample, and x be a new minority class sample. i Let be the i-th nearest neighbor minority class sample, and rand() be the random number generation function.
[0022] Secondly, the present invention also provides a fault type identification device for imbalanced samples, comprising:
[0023] The first processing module is used to select the source domain fault class sample set with the highest similarity to the target domain category in the target domain from the source domain according to the pre-established fault category hierarchical tree, and to create a fault feature extraction network for the source domain fault class sample set.
[0024] The second processing module is used to input the support sample set of the target domain category into the fault feature extraction network to obtain the fault feature vector set of the support sample set;
[0025] The third processing module is used to train and obtain a target classifier based on the fault feature vector set in order to identify the fault category of the target domain.
[0026] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the fault type identification method for imbalanced samples as described above.
[0027] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the fault type identification method for imbalanced samples as described above.
[0028] The present invention provides a method, apparatus, electronic device and storage medium for fault type identification of imbalanced samples. By utilizing the hierarchical relationship between classes, it extracts transferable similarity features of fault samples of the target domain category from the source domain fault class sample set in the source domain. Thus, it uses transfer learning technology to realize fault category identification of the target domain category and improves the accuracy of fault classification and identification. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0030] Figure 1 This is a flowchart illustrating the fault type identification method for imbalanced samples provided by the present invention.
[0031] Figure 2 This is a schematic diagram of the process for constructing a fault category hierarchy tree provided by the present invention;
[0032] Figure 3 This is a schematic diagram of the fault type identification device for unbalanced samples provided by the present invention;
[0033] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0035] It should be noted that in the description of the embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The terms "upper," "lower," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly, for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0036] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more.
[0037] The following is combined Figures 1-4 This invention describes the method, apparatus, electronic device, and storage medium for identifying fault types in unbalanced samples provided by embodiments of the present invention.
[0038] Figure 1 This is a flowchart illustrating the fault type identification method for imbalanced samples provided by the present invention, as shown below. Figure 1 As shown, including but not limited to the following steps:
[0039] Step 101: Based on the pre-established fault category hierarchical tree, select the source domain fault class sample set with the highest similarity to the target domain category in the target domain from the source domain, and create a fault feature extraction network for the source domain fault class sample set.
[0040] The fault category hierarchical tree can be obtained using a hierarchical clustering algorithm.
[0041] Based on the hierarchical structure of the fault category hierarchy tree, at a certain superclass level, source and target classes belonging to the same superclass set tend to have more similar fault features, making them easier to transfer. Conversely, source and target classes belonging to different superclasses are less likely to acquire effective transferable features, and may even lead to "negative transfer," thus reducing classification performance for the target class. For example, cats and tigers belonging to the same superclass obviously share more features than cats and birds belonging to different superclasses.
[0042] Based on the superclass-subclass membership relationship provided in the fault category hierarchy tree, the source domain fault class samples that are most similar to the target domain category are selected to construct the source domain fault class sample set.
[0043] Furthermore, a fault feature extraction network model is pre-trained using the source domain fault class sample set. This fault feature extraction network model can extract transferable fault features that include fault category hierarchical structure information by utilizing fault class hierarchical encoding information.
[0044] Step 102: Input the support sample set of the target domain category into the fault feature extraction network to obtain the fault feature vector set of the support sample set.
[0045] The supporting samples are labeled fault samples from the target domain. The network model structure and weight parameters of the fault feature extraction network are reused to generate fault feature vectors for the supporting samples in the target domain.
[0046] Step 103: Train and obtain a target classifier based on the fault feature vector set to identify the fault category of the target domain.
[0047] The target classifier can be a Logistic regression model, the nearest neighbor algorithm (KNN), the nearest neighbor centroid classification (NC), a linear support vector machine (SVM), etc.
[0048] Finally, the fault feature vector set of the supporting samples of the obtained target domain category is used to train the target classifier to perform multi-class fault identification.
[0049] The fault type identification method for imbalanced samples provided by this invention utilizes the hierarchical relationship between classes to extract transferable similarity features of fault samples in the target domain from the source domain fault class sample set in the source domain. This allows for the identification of fault categories in the target domain using transfer learning techniques, thereby improving the accuracy of fault classification and identification.
[0050] As an optional embodiment, in order to facilitate understanding of the technical solution of the present invention, the process of transfer learning based on deep learning will be further explained below.
[0051] First, by leveraging the semantic hierarchy of fault class labels in the source and target domains, and based on the principle of positive transfer that is beneficial to the classification task in the target domain, only fault samples from the source domain belonging to the same superclass as the target domain are selected to participate in the learning of transferable features.
[0052] Then, a Restricted Feature Extraction Network (RFN) is pre-trained using these source class samples. This invention uses this RFN model to extract prior knowledge encoded in the class hierarchy and learn transferable fault features, thereby effectively assisting in small-sample fault diagnosis tasks in the target domain.
[0053] It should be noted that a multilayer prediction network (HPN) was constructed during the pre-training phase. HPN uses features extracted by the randomized recurrent network (RFN) to predict class / superclass labels for each layer. Its first function is to predict labels across different class / superclass layers, so that shared superclasses between the source and target classes can generate transferable features suitable for representing the target class. Its second function is to encode the hierarchical structure of the class / superclass layers. Specifically, it combines the prediction results of a given superclass layer and its lower layers to infer the superclass label for that layer. Since the hierarchical structure between adjacent layers is shared and transferable between the source and target classes, hierarchical encoding can further improve the transferability of the learned features.
[0054] Finally, once an RFN model instance is trained using the selected source class data, it can be used to extract transferable features from samples in the target domain (including support samples and test samples). The fault feature vectors of a small number of support samples from these target domain categories are then used to train an appropriate classifier to infer the class of unknown fault samples in the target domain.
[0055] Based on the above embodiments, as an optional embodiment, the fault type identification method for imbalanced samples provided by the present invention further includes, before selecting the source domain fault class sample set with the highest similarity to the target domain category in the target domain according to the pre-established fault category hierarchical tree, and creating the fault feature extraction network for the source domain fault class sample set, the method further includes: constructing class label semantic vectors using fault class label description texts of the source domain and the target domain; and constructing the fault category hierarchical tree by combining data-driven algorithms and preset knowledge rules through a hierarchical clustering algorithm.
[0056] Optionally, constructing class label semantic vectors using fault class label description texts from the source and target domains includes: performing word segmentation on the fault class label description texts to generate multiple fault class label sub-description texts; and training all the fault class label sub-description texts using a preset semantic vector generation model to generate corresponding class label semantic vectors.
[0057] The preset semantic vector generation model can be the Doc2Vec model, where each class label semantic vector can be represented as a 100-dimensional semantic vector.
[0058] Figure 2 This is a flowchart illustrating the process of constructing a fault category hierarchy tree provided by the present invention, as follows: Figure 2 As shown, the steps for constructing the fault category hierarchical tree using a hierarchical clustering algorithm, combining data-driven algorithms and preset knowledge rules, include:
[0059] Step 201: Construct an undirected graph of the class label semantic vector.
[0060] For the semantic vectors of all fault category label texts, cosine distance is used to measure similarity, an inter-class similarity matrix is established, and an undirected graph G is constructed.
[0061] Step 202: Using a community detection algorithm based on spectral clustering, perform community detection on the undirected graph to construct an initial fault category hierarchical tree.
[0062] For an undirected graph G, a community detection algorithm based on spectral clustering is adopted to recursively detect communities layer by layer in order to construct an initial fault category hierarchical tree.
[0063] Step 203: Optimize the initial fault category hierarchy tree based on preset knowledge rules to generate the fault category hierarchy tree.
[0064] For example, regarding the preset knowledge rules, faults occurring on the same component are clustered into the same superclass; for related components, if the fault phenomena are very similar, they can also be clustered into the same superclass.
[0065] Based on the above embodiments, as an optional embodiment, before constructing the class label semantic vector using the fault class label description text of the source domain and the target domain, the method further includes: performing data equalization processing on the source domain fault samples in the source domain using oversampling or undersampling. The oversampling and undersampling algorithms that can be used in this invention are described below. When performing equalization processing, a suitable algorithm can be selected to equalize the fault samples according to actual needs.
[0066] Undersampling balances a dataset by reducing the size of the majority class. The undersampling method first retains all minority class samples, then randomly selects samples from the majority class (which has the same number of samples as the minority class) to match the number of samples in the majority class. This balanced new dataset can then be used for further modeling.
[0067] Optionally, undersampling algorithm A randomly selects a small number of samples from the majority class and combines them with the original minority class samples to form a new training dataset. There are two specific types of undersampling algorithm A: "with replacement" and "without replacement".
[0068] Undersampling algorithm A modifies the sample distribution by changing the proportion of majority class samples, thus making the sample distribution more balanced. However, this also leads to some new problems. For random undersampling, since the sampled sample set is smaller than the original sample set, some information loss is inevitable. In other words, deleting majority class samples may cause the classifier to lose important information about the majority class.
[0069] The undersampling algorithm B randomly samples n times with replacement from the majority class, selecting a number of samples similar to the number of samples in the minority class each time, thus obtaining n sample sets and achieving sample equalization.
[0070] The undersampling algorithm C uses Adaboost as the base classifier. Its basic steps are as follows: First, in each training round, an Adaboost base classifier is trained using a training set with an equal number of majority and minority classes. Then, the classifier is used to predict all majority classes, and the false positive rate is controlled by controlling the classification threshold. All correctly judged classes are deleted. Finally, in the next iteration, the number of majority classes is reduced.
[0071] Generally, undersampling can be considered when there are enough samples in the minority class. Conversely, oversampling can be used when the number of samples is insufficient. Oversampling balances the dataset by increasing the number of samples in the minority class, rather than removing samples from the majority class.
[0072] Oversampling algorithm D increases the proportion of minority class samples by repeatedly performing random sampling with replacement. Since this requires copying minority class samples to expand the dataset, it increases the complexity of model training. Furthermore, because random oversampling simply replicates the initial samples, the rules learned by the learner become overly specific, which is detrimental to the learner's generalization performance and can easily lead to overfitting.
[0073] To address the overfitting problem caused by random oversampling while maintaining dataset balance, an oversampling algorithm E is proposed. Oversampling algorithm E generates samples using a method similar to K-nearest neighbors. The oversampling algorithm E provided in this invention obtains multiple nearest-neighbor minority class samples from any minority class sample in the source domain fault samples; then, using a linear interpolation method, it generates new minority class samples to expand the number of minority class samples.
[0074] Specifically, for each minority class sample, its K nearest neighbors are calculated by Euclidean distance from other minority class samples. Then, several nearest neighbor minority class samples are randomly selected from its K nearest neighbors, and new minority class samples are generated by linear interpolation of the samples according to the following formula:
[0075] x new =x+rand(0,1)*(x i -x)
[0076] Where, x new Let x be any minority class sample, and x be a new minority class sample. i Let be the i-th nearest neighbor minority class sample, and rand() be the random number generation function.
[0077] The oversampling algorithm E abandons the practice of randomly oversampling and copying samples, which can prevent the problem of overfitting that is easy to occur in random oversampling. Practice has proven that this method can improve the balance of data.
[0078] Figure 3 This is a schematic diagram of the fault type identification device for unbalanced samples provided by the present invention, as shown below. Figure 3 As shown, the device includes: a first processing module 301, a second processing module 302, and a third processing module 303.
[0079] The first processing module 301 is used to select the source domain fault class sample set with the highest similarity to the target domain category in the target domain from the source domain according to the pre-established fault category hierarchical tree, and create a fault feature extraction network for the source domain fault class sample set.
[0080] The second processing module 302 is used to input the support sample set of the target domain category into the fault feature extraction network to obtain the fault feature vector set of the support sample set;
[0081] The third processing module 303 is used to train and obtain a target classifier based on the fault feature vector set in order to identify the fault category of the target domain.
[0082] It should be noted that the fault type identification device for unbalanced samples provided in this embodiment of the invention can execute the fault type identification method for unbalanced samples described in any of the above embodiments during actual operation, which will not be elaborated in this embodiment.
[0083] The fault type identification device for imbalanced samples provided by this invention extracts transferable similarity features of fault samples of the target domain category from the source domain fault class sample set in the source domain using inter-class hierarchical relationships, thereby realizing fault category identification of the target domain category by using transfer learning technology and improving the accuracy of fault classification and identification.
[0084] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device may include a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a fault type identification method for imbalanced samples. The method includes: selecting a source domain fault class sample set with the highest similarity to the target domain category in the target domain from the source domain according to a pre-established fault category hierarchical tree, and creating a fault feature extraction network for the source domain fault class sample set; inputting the support sample set of the target domain category into the fault feature extraction network to obtain a fault feature vector set of the support sample set; and training a target classifier based on the fault feature vector set to perform fault category identification for the target domain category.
[0085] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0086] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer is able to execute the fault type identification method for imbalanced samples provided in the above embodiments, the method including: according to a pre-established fault category hierarchical tree, selecting a source domain fault class sample set with the highest similarity to the target domain category in the target domain from the source domain, and creating a fault feature extraction network for the source domain fault class sample set; inputting the support sample set of the target domain category into the fault feature extraction network to obtain a fault feature vector set of the support sample set; training a target classifier based on the fault feature vector set to perform fault category identification of the target domain category.
[0087] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the fault type identification method for imbalanced samples provided in the above embodiments. The method includes: selecting a source domain fault class sample set from the source domain that has the highest similarity to the target domain category in the target domain according to a pre-established fault category hierarchical tree, and creating a fault feature extraction network for the source domain fault class sample set; inputting a support sample set of the target domain category into the fault feature extraction network to obtain a fault feature vector set of the support sample set; and training a target classifier based on the fault feature vector set to perform fault category identification for the target domain category.
[0088] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. 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 the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0089] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for fault type identification of imbalanced samples, characterized in that, include: Construct semantic vectors of class labels using fault class labels from the source and target domains; By combining data-driven algorithms and preset knowledge rules, a hierarchical tree of the fault categories is constructed using a hierarchical clustering algorithm. Based on the pre-established fault category hierarchical tree, a source domain fault class sample set with the highest similarity to the target domain category is selected from the source domain, and a fault feature extraction network for the source domain fault class sample set is created. The supporting sample set of the target domain category is input into the fault feature extraction network to obtain the fault feature vector set of the supporting sample set; A target classifier is trained based on the fault feature vector set to identify fault categories in the target domain. The step of constructing the fault category hierarchical tree by combining data-driven algorithms and preset knowledge rules through a hierarchical clustering algorithm includes: Construct an undirected graph of the semantic vectors of the class labels; A community detection algorithm based on spectral clustering is used to detect communities in the undirected graph in order to construct an initial fault category hierarchical tree. The initial fault category hierarchy tree is optimized based on preset knowledge rules to generate the fault category hierarchy tree; the preset knowledge rules include at least: faults occurring on the same component are clustered into the same superclass.
2. The fault type identification method for imbalanced samples according to claim 1, characterized in that, The construction of class label semantic vectors using fault class labels describing text from the source and target domains includes: The fault category tag description text is segmented to generate multiple fault category tag sub-description texts; The pre-defined semantic vector generation model is used to train all the fault class label sub-description texts to generate corresponding class label semantic vectors.
3. The fault type identification method for imbalanced samples according to claim 1, characterized in that, Before constructing the class label semantic vector using the fault class label description text of the source domain and the target domain, the method further includes: The source domain fault samples in the source domain are processed by oversampling or undersampling to equalize the data.
4. The fault type identification method for imbalanced samples according to claim 3, characterized in that, The source domain fault samples in the source domain are subjected to data equalization processing using oversampling, including: Obtain multiple nearest neighbor minority class samples of any minority class sample in the source domain fault samples; New minority class samples are generated by using any minority class sample and any nearest neighbor minority class sample in a linear difference manner to expand the number of minority class samples.
5. The fault type identification method for imbalanced samples according to claim 4, characterized in that, Using any minority class sample and any nearest neighbor minority class sample, a new minority class sample is generated by linear interpolation, specifically using the following formula: ; in, x new For new minority class samples, x For any minority class sample, x i For the first i The nearest neighbor minority class samples, rand () is a random number generation function.
6. A fault type identification device for imbalanced samples, characterized in that, include: The first processing module is used to construct semantic vectors of class labels using the fault class label description text of the source domain and the target domain; Combining data-driven algorithms and pre-defined knowledge rules, a hierarchical tree of fault categories is constructed using a hierarchical clustering algorithm. Based on the pre-established hierarchical tree of fault categories, a set of source domain fault class samples with the highest similarity to the target domain category is selected from the source domain, and a fault feature extraction network for the source domain fault class sample set is created. The second processing module is used to input the support sample set of the target domain category into the fault feature extraction network to obtain the fault feature vector set of the support sample set; The third processing module is used to train and obtain a target classifier based on the fault feature vector set in order to identify the fault category of the target domain. The first processing module is specifically used for: Construct an undirected graph of the semantic vectors of the class labels; A community detection algorithm based on spectral clustering is used to detect communities in the undirected graph in order to construct an initial fault category hierarchical tree. The initial fault category hierarchy tree is optimized based on preset knowledge rules to generate the fault category hierarchy tree; the preset knowledge rules include at least: faults occurring on the same component are clustered into the same superclass.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the fault type identification method for imbalanced samples as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the fault type identification method for imbalanced samples as described in any one of claims 1 to 5.
Citation Information
Patent Citations
CN114048811A
CN114692697A