Small sample fault diagnosis method and system based on Meta-GraphSage network

By using the Meta-GraphSage network to update node states with GRU and optimize parameters through meta-learning, the problems of model overfitting and high data dependence in small sample fault diagnosis of gearboxes are solved, and fast and accurate fault diagnosis results are achieved.

CN117892194BActive Publication Date: 2024-11-22LANZHOU UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410036841.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2024-11-22
Estimated Expiration
2044-01-10

AI Technical Summary

Technical Problem

Existing technologies for gearbox fault diagnosis suffer from problems such as model overfitting under small sample conditions and excessive dependence on data, making it difficult to effectively utilize the correlation between samples.

Method used

A few-sample fault diagnosis method based on Meta-GraphSage network is adopted. The state of GraphSage network nodes is updated by gated recurrent unit (GRU), and the initial parameters of the network are optimized by meta-learning strategy to construct Meta-GraphSage fault diagnosis model. Fault diagnosis is performed by combining spectral image feature data.

Benefits of technology

It achieves fast and accurate fault diagnosis under small sample conditions, effectively handles dynamic interactions and dependencies between neighboring nodes, and improves the model's adaptability and diagnostic accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117892194B_ABST
    Figure CN117892194B_ABST
Patent Text Reader

Abstract

The present invention discloses a small sample fault diagnosis method and system based on Meta-GraphSage network. It belongs to the field of fault diagnosis technology. The method of the present invention includes fault data set acquisition, Meta-GraphSage fault diagnosis model construction, Meta-GraphSage fault diagnosis model training, and fault diagnosis. The Meta-GraphSage fault diagnosis model uses an improved GraphSage network to extract features to better handle the dynamic interactions and dependencies between neighboring nodes; in addition, the meta-learning algorithm can quickly and accurately adapt to new tasks using only a small number of samples by training good initialization parameters through multiple tasks, and on this basis, performs one or more gradient adjustment steps to achieve the purpose of quickly adapting to new tasks using only a small amount of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault diagnosis, and more specifically to a small sample fault diagnosis method and system based on a Meta-GraphSage network. Background Art

[0002] The reliability and effectiveness of industrial equipment are crucial to production operations. Gearboxes, as a common transmission device, play an important role in industrial production. However, due to long-term use and harsh working conditions, they are prone to failure, resulting in economic losses and major accidents. Fault diagnosis is a key link to ensure the normal operation of equipment and production efficiency.

[0003] In the field of fault diagnosis, since equipment in actual engineering usually works under normal conditions and rarely fails, and the cost of obtaining exactly the same fault data in the laboratory is high, it is very difficult to build a training dataset containing a large amount of labeled data, making fault diagnosis in actual industrial scenarios a typical small sample problem.

[0004] The existing small sample fault diagnosis methods include data-based methods and model-based methods. Data-based methods refer to expanding the amount of data or improving the data quality. Data augmentation methods represented by generative adversarial networks (GAN) are one of the classic methods to solve the small sample problem. However, when the number of samples is very small, this method also has problems such as gradient disappearance and mode collapse. Therefore, from the perspective of data generation, deep generative models require a lot of computing resources and the model is difficult to train. Moreover, the effect of data generation depends on sufficient real data. When the real data is insufficient or the features are not obvious, the generation effect is poor. Model-based methods generally include using regularization to avoid model overfitting, using transfer learning, meta-learning, etc. to design a high-performance model, etc. Compared with data-based methods that solve the small sample problem from the source of the data, model-based methods are committed to obtaining more useful information from small samples. However, although model-based methods can solve the small sample problem, most of them rely on large computing resources and training time.

[0005] Graph Neural Network (GNN) is a new diagnostic method that can solve the small sample problem. There are two major advantages of using graph data modeling in small sample gearbox fault diagnosis: (1) Graph data contains more information than Euclidean data, and contains both node information and relationship information; (2) In actual industrial processes, sensor signals and their relationships can be represented by graph data in the form of nodes and edges. Although GCN has advantages in processing graph data, in the small sample fault diagnosis problem, GCN is prone to overfitting problems and it is difficult to fully utilize the correlation between samples.

[0006] Therefore, how to solve the problem that the fault diagnosis model is prone to overfitting under the condition of limited gearbox fault samples and the high dependence of traditional deep learning on data are issues that technical personnel in this field urgently need to solve. Summary of the invention

[0007] In view of this, the present invention provides a small sample fault diagnosis method and system based on Meta-GraphSage network.

[0008] In order to achieve the above object, the present invention adopts the following technical solution:

[0009] On the one hand, the present invention discloses a small sample fault diagnosis method based on Meta-GraphSage network, comprising the following steps:

[0010] Fault data set acquisition:

[0011] Acquire a fault data set of the gearbox, and divide the fault data set into a training set and a test set;

[0012] Meta-GraphSage fault diagnosis model construction:

[0013] Building a Meta-GraphSage fault diagnosis model based on the model-agnostic meta-learning framework MAML, wherein the Meta-GraphSage fault diagnosis model includes a GraphSage network;

[0014] Using a gated recurrent unit as an aggregation function to update the node states in the GraphSage network;

[0015] Use meta-learning strategy to learn the initial parameters of the network in the GraphSage network after the node status is updated;

[0016] Meta-GraphSage fault diagnosis model training:

[0017] Use the training set to train the constructed Meta-GraphSage fault diagnosis model;

[0018] Troubleshooting:

[0019] Use the trained Meta-GraphSage fault diagnosis model to perform small sample fault diagnosis.

[0020] Furthermore, in the step of acquiring the fault data set, the fault data set of the gearbox is acquired by the following steps:

[0021] The collected gearbox vibration signal is converted into a frequency spectrum image containing fault information through fast Fourier transform, and frequency domain feature data is extracted according to the frequency spectrum image, and the frequency domain feature data is used as the gearbox fault data set.

[0022] Furthermore, the frequency domain characteristic data includes main frequency and harmonics, side frequencies, spectrum shape, spectrum amplitude, and phase information.

[0023] Furthermore, in the step of building the Meta-GraphSage fault diagnosis model, the GraphSage network is obtained through the following steps:

[0024] Calculate the Euclidean distance between frequency domain feature data, and construct a spectrum sample KNN graph based on the Euclidean distance;

[0025] A GraphSage network is established according to the node set and the connection relationship between the nodes in the spectrum sample KNN graph.

[0026] Furthermore, the Euclidean distance between the frequency domain feature data is expressed using the KNN algorithm as follows:

[0027]

[0028] Among them, Lij represents the node and nodes distance; Representation Node The l-th dimension feature of j (l) Representation Node The l-th dimension feature of .

[0029] Furthermore, in the step of constructing the Meta-GraphSage fault diagnosis model, the gated recurrent unit is used as an aggregation function to update the node status in the GraphSage network, which specifically includes the following steps:

[0030] Aggregate the features of the k neighboring nodes of the target node v to obtain the aggregated feature representation:

[0031] h_agg_v=GRU(h v ,h u1 ,h u2 ,...,h uk )

[0032] Among them, {h v ,h u1 ,h u2 ,...,h uk} represents the feature representation of the sampled neighbor nodes;

[0033] Concatenate the feature representation h_v of the target node v and the aggregated feature representation h_agg_v, and input the concatenated result into the multi-layer perceptron MLP;

[0034] In the multi-layer perceptron MLP, the concatenation result is mapped to a new feature vector h_v' through calculations of multiple fully connected layers.

[0035] Furthermore, in the step of building the Meta-GraphSage fault diagnosis model, a meta-learning strategy is used to learn the initial network parameters in the GraphSage network after the node status is updated, which specifically includes the following steps:

[0036] Obtain the support set and query set of the meta-learning task;

[0037] Enter subtask T i x of all samples in the support set S i to the GraphSage network, outputting the vector y i ';

[0038] The loss is calculated using the cross entropy loss function and the network parameters θ are updated by gradient descent.

[0039] Furthermore, obtaining the support set and query set of the meta-learning task specifically includes the following steps:

[0040] According to the N-way K-shot task, N fault categories are randomly selected from the training set or test set;

[0041] Randomly select K samples from each fault category in N fault categories to form the support set S of the subtask = {x S ,y S}, the support set is used as the training set in the subtask training process;

[0042] Select K' samples from each category that are different from the K samples in the support set to form the query set Q of the subtask = {x Q ,y Q}, the query set is used as the test set in the subtask training process;

[0043] Among them, x S and S Respectively represent the sample data and sample labels of the support set; x Q and Q Represent the sample data and sample labels of the query set respectively; the subscript S indicates that it is used to train the Meta-GraphSage fault diagnosis model and provide feedback on the corresponding loss; the subscript Q indicates that it is used to evaluate the performance of the Meta-GraphSage fault diagnosis model after training.

[0044] Furthermore, the cross entropy loss function is used to calculate the loss and the network parameters θ are updated by gradient descent, specifically including:

[0045] In the first stage, the learning rate is set to α, and the initialization parameter θ of the Meta-GraphSage fault diagnosis model is updated by n (n∈[0,m]) steps of gradient descent to

[0046] in, Indicates that at this time subtask T i The loss gradient of the support set of ; α represents the learning rate of gradient descent;

[0047] The loss function is in the support set data S = {x S ,y S The specific mathematical representation in} is:

[0048] in, For parameters The inner loop network structure of x S and S Represent the sample data and sample labels of the support set respectively;

[0049] After the mth step of updating, the Meta-GraphSage network parameters are updated to the following expression:

[0050] in, represents the update parameters of the previous step;

[0051] Indicates that at this time subtask T i The loss gradient of the support set of θ represents the initialization parameter.

[0052] In the second stage, using the query set Q = {x Q ,y Q} Again, Optimize, the total loss value of all query set tasks is L Meta-GraphSage It is expressed by the following formula:

[0053]

[0054] Among them, L Meta-GraphSage It represents the gap between the predicted value of the fault diagnosis model and the true value. The optimization goal is to minimize the total loss L Meta-GraphSage To find model parameters suitable for each subtask; represents the total loss on all task query sets.

[0055] On the other hand, the present invention also discloses a small sample fault diagnosis system based on a Meta-GraphSage network, the system comprising a computer system, which when executed can implement any one of the small sample fault diagnosis methods based on a Meta-GraphSage network described in the present invention.

[0056] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a small sample fault diagnosis method and system based on the Meta-GraphSage network, which has the following beneficial effects:

[0057] An improved GraphSage network is used to extract features to better handle the dynamic interactions and dependencies between neighbor nodes; in addition, the meta-learning algorithm trains good initialization parameters through multiple tasks to quickly and accurately adapt to new tasks using only a small number of samples, and performs one or more gradient adjustment steps on this basis to achieve the purpose of quickly adapting to new tasks using only a small amount of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0059] Figure 1 A schematic flow chart of the method steps provided by the present invention.

[0060] Figure 2 This is a schematic diagram of the data acquisition platform provided by the present invention.

[0061] Figure 3 Schematic diagram of comparison of the effects of the method provided by the present invention DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] The embodiment of the present invention first discloses a small sample fault diagnosis method based on the Meta-GraphSage network, and the overall steps include fault data set acquisition, Meta-GraphSage fault diagnosis model construction, Meta-GraphSage fault diagnosis model training, and fault diagnosis. The main process is as follows Figure 1 As shown, the above method specifically includes:

[0064] 1) Construct a gearbox fault data set D and divide it into a training set Tr and a test set Te;

[0065] Gearbox fault data set D = {(X i ,Y i )|1≤i≤U}, where X i is the sample data of the i-th type of fault, Y i is the label set of the i-th type of fault sample, (X i ,Y i ) is the fault sample of the i-th fault, and U represents the number of gearbox fault state types.

[0066] The fault data set of the gearbox can be obtained by the following method: the collected gearbox vibration signal is converted into a spectrum image containing fault information through Fast Fourier Transform (FFT), and the frequency domain feature data is extracted according to the spectrum image, and the frequency domain feature data is used as the fault data set of the gearbox.

[0067] The spectrum image can be divided into spectrum images representing different fault categories according to the fault category. Therefore, the gearbox fault data set actually contains multiple fault sub-data sets of different categories.

[0068] 2) Construct a MAML-GraphSage fault diagnosis model. The fault diagnosis model in the present invention is a meta-learning fault diagnosis model constructed based on a model-agnostic meta-learning framework (MAML). The base model is an improved two-layer GraphSage network, which consists of an input layer, a SAGEConv layer, and a fully connected layer.

[0069] First, the original signal is processed by Fast Fourier Transform (FFT) to obtain the frequency domain features. The Euclidean distance is used to judge the adjacency relationship between all spectrum signal samples to construct the spectrum sample KNN graph, which can well reflect the local geometric properties between samples. The distance measurement formula of the KNN algorithm can be expressed as:

[0070]

[0071] Among them, L ij Representation Node and nodes distance; Representation Node The l-th dimension feature of; each node represents each spectrum sample after FFT. The construction of the edge in the spectrum sample KNN graph can be expressed as:

[0072] A ij =KNN(k,L ij ,Ω i ),A ij ∈A (2)

[0073] Among them, Ω i ={L i1 ,L i2 ,...,L in}yes The distance set to all nodes; k is the hyperparameter of the spectrum sample KNN graph; if L ij is Ω i If there are k smallest values ​​in the set, KNN(·)=1, otherwise KNN(·)=0.

[0074] Then, a GraphSage network is established based on the node set and the connection relationship between nodes in the spectrum sample KNN graph, and the parameterized function f θ represents the established GraphSage network, θ is the parameter of the GraphSage network, and the step size is α, β.

[0075] GraphSage network is an important method for processing non-Euclidean graph data. Its basic idea is to generate new higher-level node features by learning the features of adjacent nodes. The GraphSage graph can be represented as G = (V, E), where V is the set of all nodes in the constructed graph and E is the connection relationship between nodes. In order to learn the representation of node v It iterates over all nodes in its K-hop neighborhood. When iterating over a node v, it aggregates the current representations of v’s neighbors and with the current representation of v are connected and then sent to the fully connected layer. For the kth iteration:

[0076]

[0077]

[0078] The improved GraphSage network proposed in the present invention applies the gated recurrent unit GRU to the feature aggregation process of neighbor nodes. Specifically, for each node, the GRU unit can be used to update the representation vector of the current node, where the input is the feature vector of the current node and the feature vector of the neighbor node, and the output is the aggregated representation of the current node. In this way, the information of the neighbor nodes can be gradually transmitted and aggregated through multiple rounds of iterative GRU updates. The gating mechanism of GRU can adaptively control the update and retention of information, which helps to capture dependencies in complex graph structures. By introducing GRU as an aggregation function, the GraphSage network can better handle the dynamic interactions and dependencies between neighbor nodes, thereby improving the performance and effect of representation learning.

[0079] GRU is used as a message passing function to fuse information with a longer radius, generate new node representations to update the node status, and capture the dependencies between nodes. The features of the k neighbor nodes of the target node v are aggregated to obtain a new feature representation as shown in formula (5):

[0080] h_agg_v=GRU(h v ,h u1 ,h u2 ,...,h uk ) (5)

[0081] Among them, {h v ,h u1 ,h u2 ,...,h uk} represents the feature representation of the sampled neighbor nodes.

[0082] Afterwards, the feature representation h_v of the target node v and the aggregated feature representation h_agg_v are concatenated and input into the MLP. After calculations in multiple fully connected layers, they are mapped to h_v'. This new feature vector is the final representation of the target node v, as shown in formula (6):

[0083] h_v'=MLP([h_v,h_agg_v]) (6)

[0084] The tth task of meta-learning is to use the adjacency matrix A t and the feature matrix X t For Figure G t The standard two-layer GraphSage for node classification problem is shown in formula (7):

[0085]

[0086] At a given node Y tIn the case of labels, the cross entropy loss function is used for training, as shown in formula (8):

[0087]

[0088] Using the meta-learning strategy, i.e. learning the initial parameters of the GraphSag network model that are sensitive to task changes, we learn f θ The network initial parameters θ, the specific steps are as follows:

[0089] According to the N-way K-shot task, N fault categories are randomly selected from the training set Tr or the test set Te, and K samples from each category of the N fault categories are randomly selected to form the support set S = {x S ,y S}, the support set refers to the training set of the subtask; select K' samples from each category of N fault categories that are different from K samples in the support set to form the query set Q of the subtask = {x Q ,y Q}, the query set refers to the test set of the subtask. S is used to train the fault classification model and provide feedback on the corresponding loss, and Q is used to evaluate the performance of the trained model. S and S Respectively represent the sample data and sample labels of the support set; x Q and Q Represent the sample data and sample labels of the query set respectively.

[0090] Among them, the specific learning steps of a meta-learning task are as follows:

[0091] i. Input subtask T i x of all samples in the support set S i The parameter is a GraphSage network, and the output vector y i ';

[0092] ii. Calculate the loss using the cross entropy loss function and update the network parameters θ by gradient descent;

[0093] The way to calculate the loss using the cross entropy loss function is:

[0094] L(y i ',y i )=-y i log y i '-(1-y i )log(1-y i '),y i is x i The real label.

[0095] Repeat the above steps and update the network parameters from q to q i '; Input subtask T i x for all samples in the query set Q i To the parameter q i 'GraphSage network Output vector y i ”.

[0096] The cross entropy loss function is used to calculate the subtask T i Loss

[0097] L(y i ”,y i )=-y i log y i ”-(1-y i )log(1-y i ”), y i is x i The real label.

[0098] Repeat the above steps to obtain each subtask T i The training loss L Ti , and the loss of a subtask in a meta-learning task Add them together to get the loss for a meta-learning task.

[0099] iii. Meta-training: In the first stage, the learning rate is set to α, and the initialization parameter θ of the Meta-GraphSage fault diagnosis model is updated by n (n∈[0,m]) steps of gradient descent to process.

[0100]

[0101] in, It is task T i The loss gradient of the support set of ; α represents the learning rate of gradient descent. Formula (10) is the loss function in the support set data S = {x S ,y S} in specific mathematical representation:

[0102]

[0103] in, For parameters The inner loop network structure of x S and S Represent the sample data and sample labels of the support set respectively.

[0104] According to formula (9), after the mth step update, the Meta-GraphSage model parameters are updated as formula (11)

[0105]

[0106] in, represents the update parameters of the previous step; Represents task T i The loss gradient of the support set of ; θ represents the initialization parameter.

[0107] iv. In the second stage, using the query set Q = {x Q ,y Q} The classification model after updating the parameters for the i-th task again Optimize. Assume that the improved GraphSage network model is f θ To indicate that when adapting to the new task T i When , after one or more gradient descent steps, the model parameters are updated to θ i ', so use Represents the updated model. Combined with formula (11), the total loss value of all query set tasks is L Meta-GraphSage It is expressed by formula (12):

[0108]

[0109] v. Among them, L Meta-GraphSage Represents the gap between the model prediction value and the true value. The optimization goal is to minimize the total loss L Meta-GraphSage To find model parameters that are suitable for each task; represents the total loss on all task query sets; Formula (13) represents the update of the initialization parameter θ using the meta-learning rate β:

[0110]

[0111] The process of meta-training is the process of updating the initial parameters of the base model GraphSage network. The meta-learning method used in the present invention is model-agnostic meta-learning (MAML), and its framework consists of an inner loop structure and an outer loop structure, wherein the inner loop structure is an improved GraphSage network, which is used to extract the features of the task; the outer loop is a meta-learner, which learns the features between tasks by updating the initialization parameters of the inner loop model. Step ii is to repeatedly update the initial parameters of the network using gradient descent, and calculate the loss of the task using the cross entropy loss function, so that the loss function reaches a very small value, that is, it is smooth enough near the parameters. The first stage of step iii is to use the support set to update the updated parameters after m steps; the second stage is to use the query set to optimize the model again, calculate all loss values ​​and update the initial parameters, and then pass the parameters to the model testing stage.

[0112] Both phase one and phase two belong to the model training process. Phase one uses the support set to update the initialization parameters, and phase two uses the query set to optimize the GraphSage network to obtain the final optimization parameters, which are then passed to the model testing process for model fine-tuning.

[0113] In summary, the steps for training the MAML-GraphSage model using training set samples are summarized as follows:

[0114] (1) Generate Z training subtasks using the training set Tr;

[0115] (2) Train the MAML-GraphSage fault diagnosis model according to the above training method and learn the initial parameters of the GraphSage network.

[0116] After training is completed, use the test set samples to verify the trained MAML-GraphSage model. The specific steps are as follows:

[0117] (1) Generate Z' training subtasks using the training set Tr;

[0118] (2) Using the initial network parameters obtained through training, fine-tune the parameters of the GraphSage network using all samples in the support set S of each test task to adapt it to the new task category; the fine-tuning process is the same as step (3) above;

[0119] (3) Input all samples in each test task query set Q into the fine-tuned GraphSage network, output the classification results and calculate the diagnostic accuracy;

[0120] (4) Calculate the average of the diagnostic accuracy of all test tasks as the final diagnostic result of the model. On the other hand, the present invention also discloses a computer system, which includes a computer program capable of implementing any of the above-mentioned small sample fault diagnosis methods based on the Meta-GraphSage network.

[0121] The effectiveness of the present invention is verified by a specific simulation experiment.

[0122] First, the dataset used in the simulation experiment is introduced: In various mechanical systems, gears may have various types of faults and modes. The vibration signals collected from such systems are usually used to reveal their health status. The dataset used in this paper is derived from the gearbox dataset collected by the University of Connecticut. The sampling platform is as follows: Figure 2 As shown: It consists of a motor 1, a secondary reducer 2 with replaceable gears, an electromagnetic brake 3, an accelerometer 4 and a tachometer 5. The specific transmission schematic diagram of the secondary reducer 2 is shown in the figure. A 32-tooth pinion and an 80-tooth gear are installed on the first-stage input shaft 201, and the second stage 202 consists of a 48-tooth pinion and a 64-tooth gear. The speed of the input shaft 6 is measured by the tachometer 5, and the gear vibration signal is measured by the accelerometer 4. Figure 2 In the figure, 7 represents the output shaft and 8 represents the main shaft.

[0123] The signal is recorded by a dSPACE system (DS1006 processor board, dSPACE) with a sampling frequency of 20KHz. Nine different gear conditions are introduced to the pinion on the input shaft, including healthy state, missing teeth, cracks, spalling, and crack tips with five different severity levels. The number of sampling points for each sample is 3600, and there are 104 samples for each fault type, so there are a total of 104*9 samples. The details are shown in Table 1:

[0124] Table 1 Gearbox data set

[0125]

[0126] The experimental results and analysis process are as follows:

[0127] To avoid the contingency of the experimental results, all methods were repeated 5 times. The running configuration is: Python 3.7; Pytorch 1.6.0; GPU is NVIDIA Tesla K80; CPU is Intel Xeon E5-2678 v3. The main hyperparameters of the model are set as follows: the number of iterations is 200, and the Adam optimizer is used, the learning rate of gradient descent optimization is α=0.001, and the learning rate of the meta-learner is β=0.01.

[0128] In order to verify the diagnostic effectiveness of the proposed method under small sample conditions, all data are divided into a training set sample library of 73 samples and a test set of 31 samples for each type of working condition in a ratio of 7:3.

[0129] For each type of fault, four K-shot values ​​are selected for testing on the model, and their average accuracy is shown in Table 2:

[0130] Table 2 Average accuracy under different K-shots

[0131]

[0132]

[0133] It can be seen from Table 2 that a model with higher comprehensive performance can be trained with less labeled data. As the number of support set samples increases, the model performance gradually improves and the training time also increases.

[0134] To further analyze the impact of unbalanced fault samples on the model diagnosis effect, different K-shot values ​​were selected for the confusion matrix test in the fifth experiment. The labels 1-9 on the horizontal and vertical axes in the confusion matrix test effect diagram represent 9 types of faults, the horizontal axis represents the predicted label, and the vertical axis represents the actual label. The diagnostic accuracy is 0.9168 under 1-shot, 0.9361 under 3-shot, 0.9787 under 5-shot, and 0.9893 under 7-shot. The experimental results show that the superiority of Meta-GraphSage varies with the number of samples in the support set, that is, the fewer the samples, the more improvement Meta-GraphSage has over the baseline. This demonstrates the advantage of the proposed method, which is to apply meta-learning to the GNN model to achieve a small amount of graph learning.

[0135] To verify the effectiveness of the GraphSage network, meta-learning is introduced into Graph Convolutional Neural Networks (GCN) and Graph Attention Networks (GAT) for experimental comparison. Four K-shot values ​​are selected for each type of fault and tested on the model. The average accuracy is shown in Table 3.

[0136] Table 3 GNNs experimental comparison

[0137]

[0138] As can be seen from Table 3, in the small sample scenario, the effects of GAT-Meta and GCN-Meta are not as good as GraphSage-Meta. The first reason is that GraphSage uses the GRU unit as its aggregation function. The gating mechanism of GRU can adaptively control the update and retention of information, which helps the GraphSage network capture dependencies in complex graph structures. From the perspective of solving fault identification in small sample scenarios, the present invention introduces meta-learning to optimize the GraphSage network to learn better network parameter initialization, and can significantly improve the classification performance of a small number of nodes under the meta-learning paradigm.

[0139] In addition, several advanced meta-learning-based methods are used for comparison with traditional deep learning methods. Among them, the meta-learning-based methods include prototypical networks (PN)

[29] And the small sample learning model based on WDCNN (WDCNN-Few-shot)

[30] , traditional deep learning methods have pre-trained models based on transfer learning (Pre-trained)

[31] and WDCNN

[32] Method. Table 4 lists the average accuracy of the proposed method, the meta-learning-based method, and the traditional deep learning method in 5 experiments. The proposed method achieved accuracies of 0.9023, 0.9487, 0.9597, and 0.9826 under 1-shot, 3-shot, 5-shot, and 7-shot conditions, respectively, showing good diagnostic performance under small sample conditions.

[0140] In the performance comparison between the proposed method and the traditional deep learning method, the accuracy of the Pre-trained and WDCNN methods are 95.49% and 95.23%, respectively. This is significantly lower than the accuracy of the proposed method under 5-shot and 7-shot conditions. This is because the training of traditional deep learning methods requires a large amount of data, and for deep learning models, extracting effective features is the key. However, in the case of small sample fault diagnosis, due to the small number of samples, effective correlation feature information cannot be obtained, making the accuracy of traditional deep learning methods low. The experimental results show that the method proposed in the present invention can adapt well to these problems.

[0141] Table 4 Performance comparison of small sample methods

[0142]

[0143] In actual industry, gearboxes operate in a noisy working environment. To verify the robustness of the proposed method, Gaussian white noise with a signal-to-noise ratio (SNR) of -2dB to 2dB is added to the vibration signal to achieve the effect of noise interference. The calculation formula of the signal-to-noise ratio (SNR) is shown in formula (24):

[0144]

[0145] Among them, P signal Represents the original signal power, P noise represents the Gaussian noise power.

[0146] For the meta-learning-based method, we take the 9-way 5-shot classification task as an example to test the recognition effect of the model in different noise environments. The experimental results are as follows: Figure 3 As shown in the figure, it can be seen that under the condition of 2dB, the accuracy of the method proposed in the present invention, WDCNN-Few-shot and PN methods can reach 98.7542%, 97.1217% and 97.4512%. However, as the signal-to-noise ratio decreases, the accuracy of the three methods will decrease, but the method of the present invention still has good advantages.

[0147] The embodiment of the present invention proposes a diagnostic method based on Meta-GraphSage for the fault diagnosis problem under small sample conditions. The improved GraphSage network is used to extract features to better handle the dynamic interactions and dependencies between neighbor nodes; in addition, the meta-learning algorithm can quickly and accurately adapt to new tasks using only a small number of samples by training good initialization parameters through multiple tasks, and on this basis, one or more gradient adjustment steps are performed to achieve the purpose of quickly adapting to new tasks using only a small amount of data.

[0148] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0149] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in the present invention may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the present invention, but will conform to the widest scope consistent with the principles and novel features disclosed in the present invention.

Claims

1. A small sample fault diagnosis method based on Meta-GraphSage network, It is characterized in that The following steps are involved: Fault data set acquisition: Acquire a fault data set of the gearbox, and divide the fault data set into a training set and a test set; Meta-GraphSage fault diagnosis model construction: Building a Meta-GraphSage fault diagnosis model based on the model-agnostic meta-learning framework MAML, wherein the Meta-GraphSage fault diagnosis model includes a GraphSage network; Using a gated recurrent unit as an aggregation function to update the node states in the GraphSage network; Use meta-learning strategy to learn the initial parameters of the network in the GraphSage network after the node status is updated; The specific steps include: Obtain the support set and query set of the meta-learning task; Enter subtask T i x of all samples in the support set S i to the GraphSage network, outputting the vector y' i ; Use the cross entropy loss function to calculate the loss and update the network parameters θ by gradient descent; Among them, the cross entropy loss function is used to calculate the loss and the network parameter θ is updated by gradient descent, specifically including: In the first stage, the learning rate is set to α, and the initialization parameter θ of the Meta-GraphSage fault diagnosis model is updated by n,n∈[0,m] steps of gradient descent to in, Indicates that at this time subtask T i The loss gradient of the support set of ; α represents the learning rate of gradient descent; The loss function is in the support set data S = {x S ,y S The specific mathematical representation in} is: in, For parameters The inner loop network structure of x S and S Represent the sample data and sample labels of the support set respectively; After the mth step of updating, the Meta-GraphSage network parameters are updated to the following expression: in, represents the update parameters of the previous step; Indicates that at this time subtask T i The loss gradient of the support set of θ represents the initialization parameter. In the second stage, using the query set Q = {x Q ,y Q } Again, Optimize, the total loss value of all query set tasks is L Meta-GraphSage It is expressed by the following formula: Among them, L Meta-GraphSage It represents the gap between the predicted value of the fault diagnosis model and the true value. The optimization goal is to minimize the total loss L Meta-GraphSage To find model parameters suitable for each subtask; represents the total loss on all task query sets; Meta-GraphSage fault diagnosis model training: Use the training set to train the constructed Meta-GraphSage fault diagnosis model; Troubleshooting: Use the trained Meta-GraphSage fault diagnosis model to perform small sample fault diagnosis.

2. According to claim 1, a small sample fault diagnosis method based on Meta-GraphSage network, It is characterized in that In the step of acquiring the fault data set, the fault data set of the gearbox is acquired through the following steps: The collected gearbox vibration signal is converted into a frequency spectrum image containing fault information through fast Fourier transform, and frequency domain feature data is extracted according to the frequency spectrum image, and the frequency domain feature data is used as the gearbox fault data set.

3. According to claim 2, a small sample fault diagnosis method based on Meta-GraphSage network, It is characterized in that The frequency domain characteristic data includes main frequency and harmonics, side frequencies, spectrum shape, spectrum amplitude, and phase information.

4. According to claim 2, a small sample fault diagnosis method based on Meta-GraphSage network, It is characterized in that In the Meta-GraphSage fault diagnosis model construction step, the GraphSage network is obtained through the following steps: Calculate the Euclidean distance between frequency domain feature data, and construct a spectrum sample KNN graph based on the Euclidean distance; A GraphSage network is established according to the node set and the connection relationship between the nodes in the spectrum sample KNN graph.

5. According to claim 4, a small sample fault diagnosis method based on Meta-GraphSage network, It is characterized in that The Euclidean distance between the frequency domain feature data is expressed using the KNN algorithm as: Among them, L ij Representation Node and nodes distance; Representation Node The l-th dimension feature of j (l) Representation Node The l-th dimension feature of .

6. According to claim 1, a small sample fault diagnosis method based on Meta-GraphSage network, It is characterized in that In the step of building the Meta-GraphSage fault diagnosis model, the gated recurrent unit is used as an aggregation function to update the node status in the GraphSage network, which specifically includes the following steps: Aggregate the features of the k neighboring nodes of the target node v to obtain the aggregated feature representation: h_agg_v=GRU(h v ,h u1 ,h u2 ,…,h uk ) Among them, {h v ,h u1 ,h u2 ,…,h uk } represents the feature representation of the sampled neighbor nodes; Concatenate the feature representation h_v of the target node v and the aggregated feature representation h_agg_v, and input the concatenated result into the multi-layer perceptron MLP; In the multi-layer perceptron MLP, the concatenation result is mapped to a new feature vector h_v' through calculations of multiple fully connected layers.

7. According to claim 1, a small sample fault diagnosis method based on Meta-GraphSage network, It is characterized in that Obtaining the support set and query set of the meta-learning task includes the following steps: According to the N-way K-shot task, N fault categories are randomly selected from the training set or test set; Randomly select K samples from each fault category in N fault categories to form the support set S of the subtask = {x S ,y S }, the support set is used as the training set in the subtask training process; Select K' samples from each category that are different from the K samples in the support set to form the query set Q of the subtask = {x Q ,y Q }, the query set is used as the test set in the subtask training process; Among them, x S and S Respectively represent the sample data and sample labels of the support set; x Q and Q Represent the sample data and sample labels of the query set respectively; the subscript S indicates that it is used to train the Meta-GraphSage fault diagnosis model and provide feedback on the corresponding loss; the subscript Q indicates that it is used to evaluate the performance of the Meta-GraphSage fault diagnosis model after training.

8. A small sample fault diagnosis system based on Meta-GraphSage network, It is characterized in that The system includes a computer system, which, when executed, can implement the small sample fault diagnosis method based on the Meta-GraphSage network described in any one of claims 1 to 7.