Intelligent fault diagnosis method and system based on tree label and hierarchical multi-granularity diagnosis network
Through the method based on tree labels and layered multi-grained diagnostic network, the problems of inaccurate models, incomplete data, difficult fine-grained classification and poor adaptability in multi-working conditions in rotary machinery fault diagnosis are solved, and high-precision, strong generalization ability and efficient fault diagnosis are achieved.
Patent Information
- Application Number
- CN202411866819.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-05-13
AI Technical Summary
Existing rotary machinery fault diagnosis methods are difficult to establish accurate mathematical models, deal with data missing and incomplete problems, extract fine-grained classification characteristics, and adapt to changes in multiple operating conditions.
The intelligent fault diagnosis method based on tree labels and hierarchical multi-grained diagnostic network is adopted to realize the ability to transfer knowledge across levels and classify fine-grained classification through tree structure labels and joint loss functions, and adapt to changes in multiple operating conditions.
It improves the accuracy and generalization ability of fault diagnosis, optimizes data utilization efficiency, reduces dependence on fine-grained annotations, and improves the scientific level of processing speed and maintenance decisions.
Smart Images

Figure CN119989164A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of rotating machinery fault diagnosis, and in particular relates to an intelligent fault diagnosis method and system based on tree tags and a hierarchical multi-granularity diagnosis network. Background Art
[0002] In modern industrial automation and equipment monitoring systems, rotating machinery fault diagnosis is a key technology to ensure the normal operation of mechanical equipment. Common shaft rotating machinery fault prediction methods are divided into model-driven fault diagnosis and data-driven fault diagnosis. Model-based fault diagnosis technology is to diagnose and predict the faults of rotating machinery by establishing a mathematical model of the bearing system and relying on prior knowledge such as mechanical structure, component characteristics and behavior patterns. Compared with model-based fault diagnosis methods, data-based fault diagnosis methods provide an economical and efficient method for real-time and online fault diagnosis of complex systems. To date, a large number of effective machine learning algorithms have been widely used in industrial equipment fault diagnosis problems, such as support vector machines, convolutional neural networks, recurrent neural networks, long short-term memory networks, and Transfomer, etc.
[0003] At present, traditional fault diagnosis algorithms face the following technical problems:
[0004] 1. It is difficult to establish an accurate mathematical model: The fault diagnosis method based on mathematical models is simple, intuitive and easy to understand, but it requires in-depth analysis of the structure and operating principles of complex equipment. It is difficult to establish an accurate analytical model for equipment with too complex internal structure and operating principles.
[0005] 2. Data missing and incompleteness: In existing data-driven fault diagnosis methods, the system usually relies on a large amount of historical operating data to train the fault diagnosis model. However, in actual industrial applications, since mechanical equipment is in normal working condition most of the time, actual failures are relatively rare, and it is difficult to obtain fault data under all operating conditions, especially some rare fault types and data under multiple working conditions. This incomplete data will seriously affect the training effect and diagnostic accuracy of the fault diagnosis model.
[0006] 3. Insufficient fine-grained classification: The features extracted by existing methods are mostly shallow features, which often cannot effectively handle multi-level, fine-grained classification problems. Their generalization ability for complex classification problems is subject to certain constraints, such as the specific location and size of the fault, which limits the accuracy and practicality of fault diagnosis. And for more fine-grained classification tasks, such as fault size, more powerful prior knowledge and high-quality deep annotation information are required. In actual situations, such deep information is often difficult to obtain, resulting in the network being unable to effectively learn these details, thus affecting the overall fault diagnosis performance.
[0007] 4. Adaptability to multiple working conditions: Industrial equipment often operates under a variety of different working environments and load conditions. These changing working conditions may significantly affect the performance of fault characteristics. Existing fault diagnosis systems, whether model-driven or data-driven, often have difficulty adapting to such changes in working conditions. Model-driven methods require readjustment or remodeling for each working condition, while data-driven methods require sufficient training data under each working condition, which is often not feasible in actual operations. Summary of the invention
[0008] The purpose of the present invention is to provide an intelligent fault diagnosis method and system based on tree tags and hierarchical multi-granularity diagnosis networks to solve the above technical problems.
[0009] The present invention provides an intelligent fault diagnosis method based on tree tags and hierarchical multi-granularity diagnosis network, comprising the following steps:
[0010] Step 1, obtaining fault data collected by the sensor, and performing cleaning and segmentation processing on the fault data;
[0011] Step 2: Label the multi-condition fault data set with tree structure labels according to multiple levels, and deconstruct the hierarchical labels from coarse to fine. The hierarchical label of each data is represented by a binary vector, and different regions of the vector represent the label information of different levels. The label vectors of all data in the data set form a label tree according to the hierarchical structure, and the breadth search result of the label tree is the label vector of a single data.
[0012] Step 3: Input the labeled data into the hierarchical multi-granularity diagnosis network for model training. The hierarchical multi-granularity diagnosis network is optimized using the joint loss of tree structure loss and multi-classification cross entropy loss. The semantic relationship between any two hierarchical labels is encoded through the tree structure loss, and cross-level knowledge transfer is achieved. The discriminative ability of leaf classes is increased by applying multi-class cross entropy loss to leaf classes.
[0013] Step 4: Use the model trained and optimized in step 3 to perform fault diagnosis and obtain a diagnosis result.
[0014] Furthermore, the tree structure label in step 2 is defined as follows:
[0015] Tree structure label T = (N,E h ,E e ), consisting of a set of nodes N = (n1, n2, n3, ..., n m ), directed edge and undirected edges Each node n∈N corresponds to a different category label; the number of nodes m is equal to the number of all labels in the tree structure; the directed edge (vi ,v j )∈E h is an inclusion edge, indicating that label i contains label j; any two nodes share inclusion edges and exclusion edges;
[0016] Each class label takes a binary value, namely v i ∈{0,1}, indicating whether the data sample belongs to this class; each edge defines the two labels of its associated nodes using binary value constraints to include the edge (v i ,v j )∈E h Distribution (v i ,v j )=(0,1) is illegal, in order to exclude the edge (v i ,v j )∈E e Distribution (v i ,v j )=(1,1) is also illegal); by defining all included edges and excluded edges through the constraints, the legal global assignment of all labels is the binary label vector y∈{0,1} m ; The set of all legal global assignments forms the state space of tree T State space S T Is a matrix, the size of the matrix is R (m +1)×m , where each row is a legal binary label vector y.
[0017] Furthermore, the calculation method of the tree structure loss in step 3 includes:
[0018] Assume that the number of sigmoid nodes is m, and each sigmoid node corresponds to a node in the tree structure label, that is, a class label; the binary labels assigned to all labels form a label vector y_i; given an input fault signal, the joint probability of all sigmoid output nodes of the label vector is calculated by formula (1):
[0019]
[0020] in, represents the sigmoid output of the i-th label node, represents the probability without normalization, The calculation formula is ψ i,j (y i ,y j ) represents the constraint defined in the tree structure label between any two labels in y, and its definition is shown in formula (2):
[0021]
[0022] Normalize the joint probability, that is where Z(x) is the value of all legal assignments in the state space of the tree T The partition function is defined as shown in formula (3):
[0023]
[0024] For the input fault signal x, after the model inference output, the output tree hierarchy is compared with the tree structure label to obtain all y i = 1, and the marginal probability Pr(y i =1|x), and its calculation formula is shown in formula (4):
[0025]
[0026] Given k training samples D = {x (l) ,y (l) ,g (l)},l=1,2,…,k, where g (l) ∈{1,2,…,k} represents the index of the observed label, and the probability classification loss, that is, the tree structure loss, is shown in formula (5):
[0027]
[0028] Furthermore, the calculation method of the joint loss in step 3 includes:
[0029] The tree structure loss and multi-class cross entropy loss are combined to form a joint loss. The joint loss of a single sample is defined as shown in formula (6):
[0030]
[0031] According to x (l) Whether it is marked as a fine-grained leaf category, and then whether to introduce multi-classification cross entropy loss L according to the formula ce , and then the total loss of k samples in the dataset D is obtained as shown in formula (7):
[0032]
[0033] Furthermore, the step 3 of increasing the discriminative ability of the leaf class by applying a multi-class cross entropy loss to the leaf class includes:
[0034] Based on the tree structure loss, multi-class cross entropy loss L is introduced ceA parallel softmax output is designed in the model to infer the output fine-grained leaf categories, where each node corresponds to a fine-grained leaf label in the tree structure label. The softmax is activated to ensure the mutual exclusion between the fine-grained leaf categories and keep them consistent with the mutual exclusion constraints between the same levels in the tree structure label.
[0035] Furthermore, the hierarchical multi-granularity diagnosis network in step 3 includes a global feature extractor, a hierarchical feature interaction module and two parallel output channels;
[0036] The global feature extractor is used to extract features from the input signal; the hierarchical feature interaction module includes a specific granularity feature extraction block and a shortcut connection; the specific granularity feature extraction blocks share the same structure, including two convolutional layers and two fully connected layers; each granularity feature extraction block is used to extract a dedicated feature of a hierarchical level; the features of the fine subclass and the features of the coarse superclass are linearly combined through residual connections, and nonlinear transformations are applied to the combined features to obtain nonlinear generalized features;
[0037] The first of the two output channels is used to calculate the probabilistic classification loss based on the tree structure labels, where each sigmoid node corresponds to a different label in the hierarchy, and the sigmoid nodes from each hierarchical level are organized in a tree structure to conform to the hierarchical constraints; the second output channel is used to calculate the multi-class cross entropy loss applied to the leaves so that mutually exclusive fine-grained classes receive more attention during training.
[0038] Furthermore, the hierarchical multi-granularity diagnostic network realizes hierarchical feature interaction through shortcut connections, and optimizes model parameters through cross-validation to improve diagnostic accuracy and network generalization ability.
[0039] The present invention also provides an intelligent fault diagnosis system based on tree tags and hierarchical multi-granularity diagnosis networks, including a fault diagnosis module, which executes the intelligent fault diagnosis method based on tree tags and hierarchical multi-granularity diagnosis networks.
[0040] The present invention also provides a non-transitory computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the intelligent fault diagnosis method based on tree tags and hierarchical multi-granularity diagnostic networks is implemented.
[0041] The present invention also provides an electronic device, comprising:
[0042] A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the intelligent fault diagnosis method based on tree tags and hierarchical multi-granularity diagnostic networks by executing the computer instructions.
[0043] By means of the above scheme, the intelligent fault diagnosis method and system based on tree labels and hierarchical multi-granularity diagnosis network have the following technical effects:
[0044] (1) Improved diagnostic accuracy: The hierarchical multi-granularity diagnostic network significantly improves the accuracy of fault diagnosis, especially at the fine-grained fault size level, by utilizing hierarchical processing and sophisticated loss function design. This precise fault diagnosis can help maintenance teams locate problems more accurately and develop more effective maintenance strategies.
[0045] (2) Enhanced generalization ability of the model: Through the optimization of training strategies and loss functions, the hierarchical multi-granularity diagnosis network shows robustness under different re-labeling ratios. Even under high re-labeling ratios, the performance degradation of the model is relatively limited. This enhanced generalization ability means that the model can better adapt to various operating environments and data changes.
[0046] (3) Optimizing data utilization efficiency: The joint loss enables the model to learn effectively when the annotation information is incomplete or the hierarchy is inconsistent, thereby maximizing the use of available data and reducing performance losses caused by data quality issues.
[0047] (4) Reduce the reliance on fine-grained annotation: In practical applications, obtaining fine-grained annotation information is often costly and time-consuming. The method of the present invention can maintain good fault diagnosis results with less support from fine-grained annotation data by utilizing joint loss and hierarchical structure.
[0048] (5) Improve processing speed and efficiency: The hierarchical multi-granularity diagnosis network processes fault diagnosis tasks hierarchically and step by step, making the processing process more efficient. After quickly identifying key issues in the initial stage, resources can be concentrated on more detailed analysis, thus saving time and computing resources.
[0049] (6) Promote scientific maintenance decisions: More accurate and reliable fault diagnosis results directly support the scientific maintenance and operation decisions, helping enterprises reduce maintenance costs, extend equipment life, and improve equipment operating efficiency and safety.
[0050] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flow chart of the intelligent fault diagnosis method based on tree label and hierarchical multi-granularity diagnosis network of the present invention;
[0052] Figure 2 This is a flow chart of the data collection and annotation phase and the model training phase of the present invention;
[0053] Figure 3 This is an example of data under the N15_M07_F10 and N09_M07_F10 working conditions in the PU data set in one embodiment of the present invention;
[0054] Figure 4 A tree structure tag in one embodiment of the present invention;
[0055] Figure 5 A diagram showing a hierarchical multi-granularity diagnosis network structure in one embodiment of the present invention;
[0056] Figure 6 It is a schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0057] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0058] Ginseng Figure 1 As shown, this embodiment provides an intelligent fault diagnosis method based on tree labels and a hierarchical multi-granularity diagnosis network (HMDH), comprising the following steps:
[0059] Step S1, acquiring fault data collected by the sensor, and performing cleaning and segmentation processing on the fault data;
[0060] Step S2, labeling the multi-condition fault data set with tree structure labels according to multiple levels, and deconstructing hierarchical labels from coarse to fine; wherein the hierarchical label of each data is represented by a binary vector, and different regions of the vector represent labeling information of different levels. The label vectors of all data in the data set form a label tree according to the hierarchical structure, and the breadth search result of the label tree is the label vector of a single data;
[0061] Step S3, input the labeled data into the hierarchical multi-granularity diagnosis network for model training, optimize the hierarchical multi-granularity diagnosis network using the joint loss of tree structure loss and multi-classification cross entropy loss, encode the semantic relationship between any two hierarchical labels through the tree structure loss, and realize cross-level knowledge transfer, and increase the discrimination ability of leaf classes by applying multi-class cross entropy loss to leaf classes;
[0062] Step S4, using the model trained and optimized in step S3 to perform fault diagnosis and obtain a diagnosis result.
[0063] The method uses a hierarchical multi-granularity diagnosis network, which processes diagnostic tasks of different accuracy levels in a hierarchical manner, from fault detection to fault location diagnosis, and then to the specific analysis of the fault size. The output of each layer provides input for the next layer, forming an orderly diagnostic process. This hierarchical approach allows the system to handle simpler and more urgent tasks first, and then gradually handle more complex diagnostic tasks.
[0064] This method implements tree structure labels to label a multi-condition fault data set according to the defect layer-(fault) location layer-(fault) size layer and other hierarchical levels, and deconstructs the hierarchical labels from coarse to fine for a single data. The hierarchical label of each data is represented by a binary vector, and different regions of the vector represent labeling information at different levels. The label vectors of all data in the data set form a label tree according to the hierarchical structure, and the breadth search result of the label tree is the label vector of a single data. This labeling method not only clarifies the hierarchical relationship between fault categories, but also improves the utilization efficiency of fault data and the labeling consistency of the teaching network through precise hierarchical data labeling.
[0065] This method adopts an adaptive training strategy and trains the diagnostic network by combining a hybrid loss function of tree structure loss and multi-class cross entropy loss. The tree structure loss defined at the tree level facilitates better transfer of hierarchical knowledge during training. In actual production, the number of samples labeled at the leaf node level is small, and the tree structure classification loss lacks the ability to separate fine-grained leaf classes. By increasing the weight proportion of fine-grained classification loss, the model's ability to learn leaf class classification can be improved. Multi-class cross entropy loss is applied to the leaf class to further strengthen the mutual exclusion constraints between fine-grained categories. This method effectively balances the need to learn fault labels at different levels, improves the generalization ability and diagnostic efficiency of the model under multiple working conditions, and overcomes the hierarchical feature learning that may be ignored by a single loss function.
[0066] The present invention is described in further detail below.
[0067] Ginseng Figure 2 As shown in the figure, the intelligent fault diagnosis method mainly includes two stages: data collection and annotation stage, and model training stage. First, complete the data collection and preprocessing. The mechanical fault data of the equipment is collected by sensors, and after cleaning and segmentation, the tree structure label is annotated. Then, the annotated data is input into the hierarchical multi-granularity diagnosis network for model training. The joint loss (combined loss) of the tree structure loss and the multi-classification cross entropy loss is used to optimize the hierarchical multi-granularity diagnosis network.
[0068] The specific contents are as follows:
[0069] 1. Data Collection
[0070] Paderborn University bearing fault datasets (PU datasets for short) include artificially induced and real bearing faults. The experimental working conditions consist of drive speed, bearing radial force and load torque. The experimental data is collected by a piezoelectric acceleration sensor installed on the bearing seat, and the sensor's acquisition frequency is 64kHz. The PU dataset contains a total of 32 different bearing experimental data: 12 bearing data with artificial damage, 14 bearing data damaged from acceleration experiments, and 6 healthy bearing data under different operating conditions. This embodiment selects 1 type of healthy bearing data and 8 types of faulty bearing data, and the details are shown in Table 2.
[0071] Table 1 Experimental conditions in the PU dataset
[0072]
[0073]
[0074] Table 2 Annotation information of 9 types of health data in PU dataset
[0075]
[0076] 2. Data cleaning and segmentation
[0077] First, the data of 9 health states and 4 working conditions were sorted to form 36 groups of data. Then, the 36 groups of data were segmented, and the sliding window was used for data enhancement during segmentation. Finally, 800 samples were obtained for each group of data, and the length of each sample was 1024×1, totaling 28,800 samples. In the subsequent steps, these 28,800 samples were labeled with tree structure as the experimental data set.
[0078] 70% of the samples of each health state were randomly selected, that is, 560 samples for each category, a total of 20160 samples, as the training set. The remaining 30% of the samples of each health state, that is, 240 samples for each category, a total of 8640 samples, were selected as the test set. Figure 3 Nine examples of health data samples under N15_M07_F10 and N09_M07_F10 conditions are shown.
[0079] 3. Tree structure label design and annotation
[0080] In mechanical fault diagnosis, there is annotation hierarchical information from coarse to fine granularity between different faults, similar to the "kingdom, phylum, class, order, family, genus, species" in biological classification. By analyzing the data and the original annotations, a multi-condition fault data set is annotated according to the levels of defect layer-(fault) position layer-(fault) size layer. For example, the "12k_Drive_End_B007_0_118" data under 0hp in the CWRU data set can naturally deconstruct the "fault-ball bearing fault-0.007inch" granularity level label of "defect layer-position layer-size layer" from the annotation information. A single data is deconstructed into hierarchical labels from coarse to fine. The hierarchical label of each data is represented by a 01 vector, and different areas of the vector represent annotation information at different levels. The label vectors of all data in the data set form a label tree according to the hierarchical structure, and the breadth search result of the label tree is the label vector of a single data. The tree structure label fully expresses the dependency and correlation between different data, such as Figure 4 As shown. The further definition of tree structure tags is as follows:
[0081] Tree structure label T = (N,E h ,E e ) consists of a set of nodes N = (n1, n2, n3, ..., n m ), directed edge and undirected edges Each node n∈N corresponds to a different category label. The number of nodes m is equal to the number of all labels in the tree structure. i ,v j )∈E h is an inclusion edge, indicating that label i contains label j. For example, "fault" under 0hp is the parent or superclass of "ball bearing fault". i ,v j )∈E e is an excluded edge, indicating that v i Class and v j are mutually exclusive. For example, in the CWRU dataset, all faults are single faults, that is, a fault sample cannot be both a "ball fault" and an "inner race fault". Any two nodes share both inclusion and exclusion edges.
[0082] Each class label takes a binary value, namely v i ∈{0,1}, indicating whether the data sample belongs to this class. Then, each edge defines the constraint that the two labels of its associated nodes can take binary values. i ,v j )∈E h Distribution (v i ,v j)=(0,1) is illegal (e.g., "ball failure" but not "failure"). i ,v j )∈E e Distribution (v i ,v j ) = (1,1) is also illegal (for example, both "ball failure" and "inner race failure"). All included and excluded edges are defined by these local constraints. The legal global assignment of all labels is the binary label vector y∈{0,1} m The set of all legal global assignments forms the state space of the tree T State space S T Is a matrix, the size of the matrix is R (m+1)×m , where each row is a legal binary label vector y.
[0083] In this implementation case, the 28,800 samples obtained are all labeled with tree structure labels as the experimental data set. First, by parsing the original annotation information, hierarchical annotation information from coarse-grained to fine-grained is obtained. Then, the parsed information is represented by a 01 label vector with a hierarchical interval, and the label vectors of all data constitute a label tree.
[0084] 4. Design of tree structure loss function
[0085] In order to further pass the information of the tree structure label to the model, this embodiment designs a combined loss. The combined loss consists of two forms of loss, namely tree structure loss and multi-class cross entropy loss. The tree structure loss defined at the tree level is intended to transfer hierarchical knowledge during training. In actual production, the number of samples labeled at the leaf node level is small, and the tree structure classification loss lacks the ability to separate fine-grained leaf classes. By increasing the weight ratio of fine-grained classification loss, the model's ability to learn leaf class classification can be improved. Therefore, a multi-class cross entropy loss is further applied to the leaf class to further strengthen the mutual exclusion constraints between fine-grained categories.
[0086] The following is a detailed derivation of the tree structure loss: First, assume that the number of sigmoid nodes is m, and each sigmoid node corresponds to a node in the tree structure label, that is, a class label. The binary labels assigned to all labels form a label vector y_i. Given an input fault signal, the joint probability of all sigmoid output nodes of the label vector can be calculated by formula (1):
[0087]
[0088] in represents the sigmoid output of the i-th label node, represents the probability without normalization, The calculation formula is ψ i,j (y i ,y j ) represents the constraint defined in the tree structure label between any two labels in y, and its definition is shown in formula (2).
[0089]
[0090] Then, the joint probability is normalized, that is, where Z(x) is the value of all legal assignments in the state space of the tree T The partition function is defined as shown in formula (3).
[0091]
[0092] If for the input fault signal x, after the model inference output, the output tree hierarchy can be compared with the tree structure label to obtain all y i = 1, and the marginal probability Pr(y i =1|x), and its calculation formula is shown in formula (4).
[0093]
[0094] The marginal probability of a leaf node in the tree T depends on the sum of its ancestral scores, because if the label of the leaf node takes the value 1, then all its ancestors must be 1, which allows the score of the parent node to influence the decision of the offspring. On the other hand, the marginal probability of the parent label is marginalized over all possible states of its offspring, that is, aggregating information from all its subclasses.
[0095] During training, the input labels may be at any level of the tree hierarchy, and the training goal is to maximize the marginal probability of the observed true label. Given k training samples D = {x (l) ,y (l) ,g (l)},l=1,2,…,k, where g (l) ∈{1,2,…,k} represents the index of the observed label, and the probability classification loss, i.e., the tree structure loss, is shown in formula (5).
[0096]
[0097] In order to further improve the ability to distinguish fine-grained leaf categories, a multi-class cross entropy loss L is introduced based on the tree structure loss. ceinto the model. A parallel softmax output is designed in the model to infer the output of fine-grained leaf categories, where each node corresponds to a fine-grained leaf label in the tree structure label. The activation of softmax ensures the mutual exclusion between fine-grained leaf classes, which is consistent with the mutual exclusion constraint between the same levels in the tree structure label. By combining the tree structure loss and the multi-class cross entropy loss, a joint loss is formed. The joint loss definition for a single sample is shown in formula (6):
[0098]
[0099] According to x (l) Whether it is marked as a fine-grained leaf category, and then whether to introduce multi-classification cross entropy loss L according to the formula ce , and then the total loss of k samples in the dataset D is obtained as shown in formula (7).
[0100]
[0101] 5. Construction of hierarchical multi-granularity diagnostic network
[0102] like Figure 5 As shown, the Hierarchical Multi-Granularity Diagnostic Network (HMDN) includes a global feature extractor, a hierarchical feature interaction module and two parallel output channels. The global feature extractor is used to extract features from the input signal, and any common convolutional neural network feature extraction layer is applicable. In an embodiment, the ResNet18 architecture widely used for feature extraction is used as the global feature extractor. In order to be suitable for one-dimensional data feature extraction, the traditional two-dimensional convolutional neural network ResNet18 is transformed into a one-dimensional convolutional feature extractor ResNet18_1D.
[0103] The hierarchical feature interaction module contains a specific granularity feature extraction block and a shortcut connection. The specific granularity feature extraction blocks share the same structure, containing two convolutional layers and two fully connected (FC) layers. Each granularity feature extraction block is designed to extract dedicated features at one hierarchical level. The residual connection first linearly combines the features of the fine subclass and the features of the coarse superclass. That is, the subclass not only has unique subclass feature attributes, but also inherits the superclass feature attributes. Then, a nonlinear transformation (ReLU) is applied to the combined features to obtain nonlinear generalization features.
[0104] Two output channels are set in the model. The first output channel is used to calculate the probabilistic classification loss based on the tree structure labels, where each sigmoid node corresponds to a different label in the hierarchy. The sigmoid activation function is used instead of the softmax activation function to perform nonlinear projection, because sigmoid reflects independent relationships, while softmax reflects mutually exclusive relationships. Then, the sigmoid nodes from each hierarchical level are organized in a tree structure to meet the hierarchical constraints. The second output channel calculates the multi-class cross entropy loss imposed on the leaves so that mutually exclusive fine-grained classes receive more attention during training.
[0105] 6. Model training and optimization
[0106] The labeled data is input into the hierarchical multi-granularity diagnostic network for model training. The model of this embodiment adopts a joint loss function containing a tree structure loss and an SGD optimizer to train and optimize the hierarchical multi-granularity diagnostic network. The tree structure loss encodes the semantic relationship between any two hierarchical labels and realizes cross-level knowledge transfer. Multi-class cross entropy loss increases the discrimination ability of leaf classes. The hierarchical multi-granularity diagnostic network realizes hierarchical feature interaction through shortcut connections. Model parameters are optimized through cross-validation and other technologies to improve the diagnostic accuracy and the generalization ability of the network. In addition, the cosine annealing algorithm is used to periodically adjust the learning rate.
[0107] Through the above technical solution, the present invention solves the following technical problems:
[0108] 1) Solved the problem of fault priority and difficulty not being distinguished: The prior art usually does not distinguish the priority and difficulty of the two tasks of fault location and fault size. The present invention introduces a priority distinction mechanism to specifically deal with the classification of diagnostic tasks, ensuring that more urgent and relatively easy fault location diagnosis is given priority, and then fine-grained diagnosis of fault size is performed as needed.
[0109] 2) Solve the problem of fine-grained diagnosis under multiple working conditions: Traditional methods often have difficulty maintaining the accuracy of fault diagnosis under different working conditions, especially in changing working conditions. The present invention enhances the adaptability and diagnostic accuracy of the system under different working conditions by designing a hierarchical multi-granularity diagnosis network, especially for fine-grained fault features (such as specific fault location and size).
[0110] 3) Solving the problems of data scarcity and labeling quality: Taking into account the difficulty in obtaining fault data and the possible quality problems of labeled data in practical applications, the present invention designs a learning algorithm that can effectively utilize limited labeled data, and improves the hierarchical consistency and utilization efficiency of labeled data through a tree structure label system, thereby reducing the impact of low data quality or insufficient data.
[0111] 4) Solved the problem of low efficiency in comprehensive utilization of fault data: The existing technology often affects the comprehensiveness and accuracy of fault diagnosis due to insufficient data utilization. The present invention optimizes the information utilization of the network through the combined use of tree structure loss and multi-class cross entropy loss, especially when facing complex fault data, it can more comprehensively understand and utilize the available information. These solutions provide innovative solutions to common problems in existing fault diagnosis technologies, significantly improving the performance and applicability of fault diagnosis systems.
[0112] This embodiment also provides an intelligent fault diagnosis system based on tree tags and hierarchical multi-granularity diagnosis networks, including a fault diagnosis module, which executes the intelligent fault diagnosis method based on tree tags and hierarchical multi-granularity diagnosis networks.
[0113] This embodiment also provides a non-transitory computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the intelligent fault diagnosis method based on tree tags and hierarchical multi-granularity diagnostic networks is implemented.
[0114] Ginseng Figure 6 As shown, this embodiment also provides an electronic device, including:
[0115] A memory 201 and a processor 202, wherein the memory 201 and the processor 202 are communicatively connected to each other, the memory 201 stores computer instructions, and the processor 202 executes the computer instructions to execute the intelligent fault diagnosis method based on tree labels and hierarchical multi-granularity diagnostic networks.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. An intelligent fault diagnosis method based on tree labeling and hierarchical multi-granularity diagnosis network, characterized in that: The steps include: Step 1, obtaining fault data collected by the sensor, and performing cleaning and segmentation processing on the fault data; Step 2: Label the multi-condition fault data set with tree structure labels according to multiple levels, and deconstruct the hierarchical labels from coarse to fine. The hierarchical label of each data is represented by a binary vector, and different regions of the vector represent the label information of different levels. The label vectors of all data in the data set form a label tree according to the hierarchical structure, and the breadth search result of the label tree is the label vector of a single data. Step 3: Input the labeled data into the hierarchical multi-granularity diagnosis network for model training. The hierarchical multi-granularity diagnosis network is optimized using the joint loss of tree structure loss and multi-classification cross entropy loss. The semantic relationship between any two hierarchical labels is encoded through the tree structure loss, and cross-level knowledge transfer is achieved. The discriminative ability of leaf classes is increased by applying multi-class cross entropy loss to leaf classes. Step 4: Use the model trained and optimized in step 3 to perform fault diagnosis and obtain a diagnosis result.
2. The intelligent fault diagnosis method based on tree labeling and hierarchical multi-granularity diagnosis network according to claim 1 is characterized in that: The definition of the tree structure tag in step 2 is as follows: Tree structure label T = (N,E h ,E e ), consisting of a set of nodes N = (n1, n2, n3, ..., n m ), directed edge and undirected edges Each node n∈N corresponds to a different category label; the number of nodes m is equal to the number of all labels in the tree structure; the directed edge (v i ,v j )∈E h is an inclusion edge, indicating that label i contains label j; any two nodes share inclusion edges and exclusion edges; Each class label takes a binary value, namely v i ∈{0,1}, indicating whether the data sample belongs to this class; each edge defines the two labels of its associated nodes using binary value constraints to include the edge (v i ,v j )∈E h Distribution (v i ,v j )=(0,1) is illegal, in order to exclude the edge (v i ,v j )∈E e Distribution (v i ,v j )=(1,1) is also illegal); by defining all included edges and excluded edges through the constraints, the legal global assignment of all labels is the binary label vector y∈{0,1} m ; The set of all legal global assignments forms the state space of tree T State space S T Is a matrix, the size of the matrix is R (m +1)×m , where each row is a legal binary label vector y.
3. The intelligent fault diagnosis method based on tree labeling and hierarchical multi-granularity diagnosis network according to claim 1 is characterized in that: The calculation method of the tree structure loss in step 3 includes: Assume that the number of sigmoid nodes is m, and each sigmoid node corresponds to a node in the tree structure label, that is, a class label; the binary labels assigned to all labels form a label vector y_i; given an input fault signal, the joint probability of all sigmoid output nodes of the label vector is calculated by formula (1): in, represents the sigmoid output of the i-th label node, represents the probability without normalization, The calculation formula is ψ i,j (y i ,y j ) represents the constraint defined in the tree structure label between any two labels in y, and its definition is shown in formula (2): Normalize the joint probability, that is where Z(x) is the value of all legal assignments in the state space of the tree T The partition function is defined as shown in formula (3): For the input fault signal x, after the model inference output, the output tree hierarchy is compared with the tree structure label to obtain all y i = 1, and the marginal probability Pr(y i =1|x), and its calculation formula is shown in formula (4): Given k training samples D = {x (l) ,y (l) ,g (l) },l=1,2,…,k, where g (l) ∈{1,2,…,k} represents the index of the observed label, and the probability classification loss, that is, the tree structure loss, is shown in formula (5):
4. The intelligent fault diagnosis method based on tree labeling and hierarchical multi-granularity diagnosis network according to claim 3 is characterized in that: The calculation method of the joint loss described in step 3 includes: The tree structure loss and multi-class cross entropy loss are combined to form a joint loss. The joint loss of a single sample is defined as shown in formula (6): According to x (l) Whether it is marked as a fine-grained leaf category, and then whether to introduce multi-classification cross entropy loss L according to the formula ce , and then the total loss of k samples in the dataset D is obtained as shown in formula (7):
5. The intelligent fault diagnosis method based on tree labeling and hierarchical multi-granularity diagnosis network according to claim 4 is characterized in that: In step 3, the discriminative ability of leaf classes is increased by applying multi-class cross entropy loss to leaf classes, including: Based on the tree structure loss, multi-class cross entropy loss L is introduced ce A parallel softmax output is designed in the model to infer the output fine-grained leaf categories, where each node corresponds to a fine-grained leaf label in the tree structure label. The softmax is activated to ensure the mutual exclusion between the fine-grained leaf categories and keep them consistent with the mutual exclusion constraints between the same levels in the tree structure label.
6. The intelligent fault diagnosis method based on tree labeling and hierarchical multi-granularity diagnosis network according to claim 5 is characterized in that: The hierarchical multi-granularity diagnosis network in step 3 includes a global feature extractor, a hierarchical feature interaction module and two parallel output channels; The global feature extractor is used to extract features from the input signal; the hierarchical feature interaction module includes a specific granularity feature extraction block and a shortcut connection; the specific granularity feature extraction blocks share the same structure, including two convolutional layers and two fully connected layers; each granularity feature extraction block is used to extract a dedicated feature of a hierarchical level; the features of the fine subclass and the features of the coarse superclass are linearly combined through residual connections, and nonlinear transformations are applied to the combined features to obtain nonlinear generalized features; The first of the two output channels is used to calculate the probabilistic classification loss based on the tree structure labels, where each sigmoid node corresponds to a different label in the hierarchy, and the sigmoid nodes from each hierarchical level are organized in a tree structure to conform to the hierarchical constraints; the second output channel is used to calculate the multi-class cross entropy loss applied to the leaves so that mutually exclusive fine-grained classes receive more attention during training.
7. The intelligent fault diagnosis method based on tree labeling and hierarchical multi-granularity diagnosis network according to claim 6 is characterized in that: The hierarchical multi-granularity diagnosis network realizes hierarchical feature interaction through shortcut connections, and optimizes model parameters through cross-validation to improve the diagnosis accuracy and the generalization ability of the network.
8. An intelligent fault diagnosis system based on tree tags and hierarchical multi-granularity diagnosis network, characterized in that: It comprises a fault diagnosis module, which executes the intelligent fault diagnosis method based on tree label and hierarchical multi-granularity diagnosis network as described in any one of claims 1-7.
9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the intelligent fault diagnosis method based on tree tags and hierarchical multi-granularity diagnosis networks as described in any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the intelligent fault diagnosis method based on tree labels and hierarchical multi-granularity diagnostic networks as described in any one of claims 1 to 7 by executing the computer instructions.
Citation Information
Cited By
Cable bridge fault positioning method and system based on multilayer sensing data fusion
CN120405320A