Small sample cross-domain fault diagnosis method and system based on adaptive graph topology perception
By constructing an adaptive graph topology perception module and a graph convolution module through an adaptive graph topology perception method, the problems of domain offset and data scarcity in mechanical fault diagnosis are solved, and efficient and accurate cross-domain fault diagnosis with small samples is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV
- Filing Date
- 2024-01-19
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies for mechanical fault diagnosis suffer from problems such as inconsistent distribution of training and test data (domain offset) and data scarcity (small sample size), resulting in low accuracy and easy overfitting in cross-domain diagnosis.
An adaptive graph topology sensing method is adopted. By constructing an adaptive topology sensing module, a graph convolution module, and a cross-domain classifier, a complete graph of the source and target domains is generated using multi-channel sensor data. The graph topology structure is updated adaptively, and feature extraction and classification are performed by combining graph convolution and cross-domain classifier to achieve cross-domain fault diagnosis for small samples.
It improves the performance of cross-domain diagnostics, effectively handles small sample sizes of mechanical equipment fault data, achieves effective fault diagnosis in the target domain, reduces the risk of overfitting, and improves generalization ability.
Smart Images

Figure CN117909829B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis technology, specifically to a small-sample cross-domain fault diagnosis method and system based on adaptive graph topology perception. Background Technology
[0002] With the development of data acquisition technology and the improvement of data availability, deep learning methods can solve diagnostic problems in real-world industrial scenarios by processing massive amounts of supervised data. Compared to traditional machine learning methods, deep learning-based fault diagnosis methods do not require manually designed features based on prior knowledge. Instead, they integrate feature extraction and fault state classification into a unified framework to achieve end-to-end fault diagnosis. Commonly used deep learning models include convolutional neural networks, graph convolutional neural networks, and autoencoders. However, most successful applications of existing research in mechanical fault diagnosis rely on the assumption that training and test data follow the same distribution. In real-world scenarios, the operating conditions of mechanical equipment frequently change, making it difficult to collect full-condition data and meet the requirement that training and test data follow the same distribution. Furthermore, the collected data requires manual labeling, which is usually time-consuming and labor-intensive, resulting in very limited available supervised data. Therefore, the different distributions of training and test data, and the insufficient availability of supervised data, pose significant challenges to fault diagnosis.
[0003] The phenomenon where the distributions of training data (source domain) and test data (target domain) differ is called domain shift. In domain shift scenarios, the task of updating the diagnostic model using training data and then applying it to the test data is defined as a cross-domain task. Furthermore, in industrial settings, most in-service machinery operates under normal conditions. Obtaining fault data by injecting faults and collecting signals from normal equipment often requires significant financial resources, and the fault states of some components are difficult to simulate artificially, leading to a scarcity of fault data. Additionally, equipment operating information may involve industry secrets, and for data security reasons, large amounts of data may not be publicly released. Therefore, the available mechanical equipment fault data is usually small-sample. Thus, mechanical equipment fault diagnosis in these two scenarios is often referred to as small-sample cross-domain fault diagnosis.
[0004] With the development of sensing technology, collecting operational data of mechanical equipment through multi-channel sensors has become a common method for condition monitoring. Graph data, as a type of non-Euclidean spatial data, not only provides commonly used Euclidean features (such as one-dimensional signals, two-dimensional time-frequency graphs, etc.), but also introduces additional relevant information features, thus possessing a more powerful fault description capability. Therefore, graph neural networks have become one of the powerful tools for mechanical fault diagnosis.
[0005] Each channel in a multi-channel sensor is defined as a node. The multi-channel interaction graph constructed using graph modeling contains the original features of each channel as well as relevant information features between channels. Existing fault diagnosis methods based on Graph Convolutional Networks (GCNs) mostly extract the features of each channel signal (such as time-domain features, frequency-domain features, etc.) when modeling the multi-channel interaction graph, calculate the similarity between channels, and then determine the topological relationship between nodes in the graph by setting a threshold. The graph constructed by this graph modeling strategy maintains a fixed topology during training. However, the graph topology may also contain domain-specific information. A fixed topology may hinder the network from acquiring domain-consistent features through updates and hinder the improvement of cross-domain diagnostic accuracy. Existing research often implicitly represents graph topology information through the features after graph convolution, which may lead to the loss of fault information contained in the graph topology. Existing cross-domain diagnostic algorithms often suffer from overfitting in small sample cases, resulting in low generalization performance. Summary of the Invention
[0006] In order to overcome the defects in the existing technology, the purpose of this invention is to provide a small-sample cross-domain fault diagnosis method and system based on adaptive graph topology awareness.
[0007] To achieve the above-mentioned objectives of this invention, this invention provides a small-sample cross-domain fault diagnosis method based on adaptive graph topology awareness, comprising the following steps:
[0008] Acquire multi-channel operating data when mechanical equipment malfunctions, and divide the multi-channel operating data into labeled source domain data and unlabeled target domain data according to the operating conditions;
[0009] Generate a complete source domain graph and a complete target domain graph based on the source domain data and the target domain data;
[0010] A fault diagnosis network is constructed, which includes an adaptive topology sensing module, a graph convolution module, and a cross-domain classifier.
[0011] The fault diagnosis network is trained as follows: edge fraction matrices of the source domain complete graph and the target domain complete graph are constructed based on the adaptive topology awareness module, and the topology of the source domain graph and the target domain graph are adaptively updated according to the edge fraction matrices; the source domain graph representation and the target domain graph representation after the topology update are obtained based on the graph convolution module; the source domain graph representation and the target domain graph representation are input into the cross-domain classifier constructed based on the fully connected layer to update the parameters of the fault diagnosis network.
[0012] The test data is input into the trained fault diagnosis network for cross-domain fault diagnosis.
[0013] This method trains the fault diagnosis network using a small sample size of labeled source domain data and unlabeled target domain data, enabling effective fault diagnosis on the target domain test data. It can utilize mechanical equipment fault data that is prone to domain shift issues and has a small sample size to achieve cross-domain fault diagnosis.
[0014] In one alternative scheme of this adaptive graph topology-aware few-sample cross-domain fault diagnosis method, the steps for constructing the edge fraction matrices of the source domain complete graph and the target domain complete graph are as follows:
[0015] Represent the topology of the source domain complete graph / target domain complete graph using an adjacency matrix;
[0016] The node features of all interconnected node pairs in the source domain complete graph / target domain complete graph are used as the edge features of the edges between the two nodes; the edge features are input into a multilayer perceptron to calculate the importance score of each edge, forming the edge score matrix of the source domain complete graph / target domain complete graph.
[0017] This alternative approach learns edge scores to represent graph topology information and automatically updates the topology of source and target domain data during training. This decouples the graph topology from the graph convolutional features, which helps diagnostic algorithms obtain domain-consistent features and topology, and improves the performance of cross-domain diagnosis.
[0018] In one alternative scheme of this small-sample cross-domain fault diagnosis method based on adaptive graph topology awareness, the steps for updating the source domain graph topology and the target domain graph topology are as follows:
[0019] An auxiliary matrix is obtained by subtracting the edge fraction matrix of the source / target complete graph from a matrix of all 1s with the same size as the edge fraction matrix of the source / target complete graph. A random number matrix with the same size as the edge fraction matrix of the source / target complete graph is generated, and each element value in the random number matrix is randomly sampled from a uniform distribution U(0,1) between 0 and 1.
[0020] Compare the corresponding elements of the auxiliary matrix and the random number matrix, and update the auxiliary matrix to obtain a new auxiliary matrix;
[0021] Calculate the Hadamard product of the new auxiliary matrix and the adjacency matrix to obtain the updated adjacency matrix, thus completing the adaptive update of the source domain graph topology / target domain graph topology.
[0022] This alternative approach uses a matrix of all ones with the same size as the edge score matrix and subtracts it from the edge score matrix. The smaller the value of the originally important edge at its corresponding position in the new auxiliary matrix, the more likely the more important edge will have its value set to 1 when comparing it with the new auxiliary matrix using a random number matrix, while the less important edge will have its value set to 0. Compared to existing techniques that update the topology based on the obtained edge scores by setting a threshold or selecting the top k edges according to the top-k criterion, this alternative approach is parameter-free and can adaptively update the graph's topology. Furthermore, previous methods, by using thresholds or retaining a fixed number of edges, limit the diversity of graph topology updates, and when training samples are scarce, this method still inevitably suffers from overfitting. This invention, however, uses a uniform distribution U(0,1) between [0,1] to randomly select values, combined with the learned edge scores, to uncertainly discard or retain edges, thereby enhancing the graph data and improving the generalization performance of the method.
[0023] In one alternative scheme of this small-sample cross-domain fault diagnosis method based on adaptive graph topology awareness, the steps for obtaining the source domain graph representation and the target domain graph representation after topology update are as follows:
[0024] The updated source domain graph topology / target domain graph topology and source domain node features / target domain node features are input into the graph convolution module. The graph convolution module is used to extract features and calculate the mean and maximum value of each feature dimension in the extracted features to obtain the source domain graph representation / target domain graph representation.
[0025] Feature extraction is performed using the following formula:
[0026]
[0027]
[0028] Where Z represents the initial node feature matrix of the source or target domain data. Z represents the adjacency matrix of the updated source or target graph topology, W1 and W2 represent the convolution kernels of the first and second graph convolutional layers, respectively. 1 Z represents the feature matrix after the first layer of graph convolution. 2 Z represents the feature matrix after the second layer graph convolution, i.e., the extracted features. 2 ∈R N×d N is the number of nodes, d is the dimension of each node's feature, and ReLU represents a non-linear activation unit;
[0029] Calculate Z 2 The mean and maximum value of each feature dimension are used to obtain the source domain graph representation / target domain graph representation.
[0030] This alternative approach uses the connection vectors of the mean and maximum values of each feature dimension of the graph data as the source domain graph representation / target domain graph representation. While obtaining the most salient features and overall information of the graph data, it can effectively reduce the feature dimension of the entire graph data, making the features after graph convolution easier to input into the classification network for subsequent processing.
[0031] In one alternative scheme of this adaptive graph topology-aware few-sample cross-domain fault diagnosis method, the steps for updating the fault diagnosis network parameters are as follows:
[0032] The hidden features of the source domain data and target domain data of the penultimate fully connected layer of the cross-domain classifier are concatenated with their respective edge score matrices, and the concatenation result is used as the domain representation to calculate the domain loss.
[0033] Calculate the contrastive loss based on the hidden features of the source domain data from the penultimate fully connected layer of the cross-domain classifier;
[0034] Calculate the classification loss based on the output of the cross-domain classifier on the source domain data and its labels;
[0035] The fault diagnosis network parameters are updated based on the obtained contrast loss, domain loss, and classification loss.
[0036] This alternative approach improves the performance of cross-domain diagnosis by training the diagnostic model using domain loss, contrast loss, and classification loss.
[0037] In one alternative scheme of the small sample cross-domain fault diagnosis method based on adaptive graph topology awareness, the hidden features of the source domain data and target domain data of the penultimate fully connected layer of the cross-domain classifier are connected to their respective edge score matrices according to the formula h = concat(s,x). Here, h is the domain representation, concat represents the feature connection operation, x represents the hidden features of the source domain data or target domain data of the penultimate fully connected layer of the cross-domain classifier, and s represents the edge score of the source domain data or target domain data.
[0038] According to the formula
[0039]
[0040] Calculate the domain loss, where h s , h′ s This represents a vector obtained by concatenating the output features of the penultimate layer of the cross-domain classifier with the edge fractions, after passing through an adaptive topology-aware module, a graph convolution module, and a cross-domain classifier; h t , h′ trepresents a pair of samples sampled from the target domain, which are processed by an adaptive topology-aware module, a graph convolution module, and a cross-domain classifier, and are obtained by concatenating the output features of the penultimate layer of the cross-domain classifier with the edge fraction; k represents the Gaussian kernel function, and E(·) represents the expectation; and These represent the source domain and the target domain, respectively.
[0041] This alternative approach connects the hidden features of the source and target domain data in the penultimate fully connected layer of the cross-domain classifier to their respective edge score matrices, obtaining summative representations of the source and target domains. Compared to previous methods that only use the hidden features of the source and target domain data as domain representations, the introduction of edge score matrices provides richer domain-specific information from a graph topology perspective. This domain representation, aided by domain loss, can constrain the overall network to acquire a domain-consistent topology during training, thereby further promoting the acquisition of domain-consistent features and improving the overall network's cross-domain diagnostic performance.
[0042] In one alternative scheme of this small-sample cross-domain fault diagnosis method based on adaptive graph topology awareness, according to the formula
[0043] The contrastive loss is calculated by computing the hidden features of the source domain data, where C represents the number of fault categories. i Let C represent the i-th category cluster. j Let n represent the j-th category cluster. i n represents the number of samples in the i-th category cluster. j denoted by , dist(·), and x1 and x2, which represent the feature vectors output by the penultimate layer of the cross-domain classifier after passing through all modules before the penultimate layer of the cross-domain classifier, respectively.
[0044] This alternative scheme constrains the features and edge scores from the source domain data, exhibiting high intra-class similarity and inter-class dissimilarity. It is used to constrain the adaptive topology-aware module to learn an edge score matrix that is positively correlated with classification performance, and to constrain the augmented data obtained through uncertain edge perturbation to have compact class boundaries.
[0045] In one alternative scheme of this small-sample cross-domain fault diagnosis method based on adaptive graph topology awareness, according to the formula Calculate the classification loss, where N S y represents the number of samples in the source domain. i p represents the true class probability of the i-th sample in the source domain. i This represents the class probability predicted by the classifier for the i-th sample.
[0046] This alternative approach, based on source domain samples and their labels, allows for supervised training of the fault diagnosis network, enabling it to distinguish features and classification knowledge of different categories and thus equipping the network with fault diagnosis knowledge.
[0047] This invention also proposes a small-sample cross-domain fault diagnosis system, including a data acquisition module, a control module, and a storage module. The data acquisition module acquires source domain data and target domain data, and its signal output terminal is connected to the corresponding input terminal of the processing module to send the source domain data and target domain data to the processing module. The processing module and the storage module are communicatively connected, and the storage module is used to store at least one executable instruction. The executable instruction causes the processing module to perform the operation corresponding to the small-sample cross-domain fault diagnosis method based on adaptive graph topology perception described above, thereby realizing small-sample cross-domain fault diagnosis.
[0048] The beneficial effects of this invention are: it enables the training of a fault diagnosis network using both scarce labeled source domain data and scarce unlabeled target domain data, achieving effective fault diagnosis on target domain test data. Since scarce available data and domain offset are two very common problems in industrial scenarios, this invention has significant practical implications.
[0049] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0050] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0051] Figure 1 This is a flowchart illustrating the present invention. Detailed Implementation
[0052] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0053] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0054] like Figure 1As shown, this invention provides a small-sample cross-domain fault diagnosis method based on adaptive graph topology awareness, comprising the following steps:
[0055] First, acquire multi-channel operational data when mechanical equipment malfunctions. Divide this multi-channel operational data into labeled source domain data and unlabeled target domain data according to the operating conditions. Since the operational data generated when mechanical equipment malfunctions is relatively small, both the source and target domain data have small sample sizes. This data can be obtained from a database or through actual data collection.
[0056] A complete source domain graph and a complete target domain graph are generated based on the source domain data and target domain data. In this embodiment, each channel in the multi-channel source domain data is defined as a node in the source domain data. The spectrum of each channel signal is obtained through Fast Fourier Transform and used as the feature of each node. An initial node feature matrix of the source domain data is constructed. All nodes are then connected pairwise to construct the complete source domain graph. The topology of this complete source domain graph can be represented by an adjacency matrix A. Where A i,j =1 indicates that the i-th node and the j-th node in the graph are connected. Since the graph is a complete graph, all nodes are connected to each other, so all the values in the matrix are 1.
[0057] The construction of the complete target domain graph can be performed using the same steps as described above.
[0058] A fault diagnosis network is constructed, which includes an adaptive topology-aware module, a graph convolution module, and a cross-domain classifier.
[0059] The fault diagnosis network is trained using source domain data as training data and target domain data as test data. Details are as follows:
[0060] The edge fraction matrices of the source domain complete graph and the target domain complete graph are constructed based on the adaptive topology sensing module, and the topology of the source domain graph and the target domain graph are adaptively updated according to the edge fraction matrices.
[0061] When constructing the edge fraction matrices for the source domain complete graph and the target domain complete graph respectively, in this embodiment, the node features connecting all interconnected node pairs in the source domain complete graph are used as the edge features between the two nodes; the edge features are input into a multilayer perceptron, and the edge features are calculated according to the formula... Calculate the importance score for each edge, where the score ranges from [0,1]; where s i,j The weight score of the edge between node i and node j is represented by σ, which represents the sigmoid function. z represents the forward propagation operation of a multilayer perceptron. i ,z jThe node features of nodes i and j are represented respectively, and the edge score matrix of the complete graph of the source domain is formed based on the importance score of each edge.
[0062] The edge fraction matrix of the complete graph of the target domain can be obtained by following the same steps as described above.
[0063] When adaptively updating the source and target graph topologies based on their respective edge fraction matrices, this embodiment uses an auxiliary matrix M obtained by subtracting a matrix of all ones with the same size as the edge fraction matrix of the source complete graph from the edge fraction matrix of the source complete graph. Generate a random number matrix P with the same size as the edge fraction matrix of the complete graph of the source domain. Each element in the random number matrix P is randomly sampled from a uniform distribution U(0,1) between 0 and 1, i.e., P i,j ~U(0,1),stP∈R N×N Compare the corresponding elements of the auxiliary matrix M and the random number matrix P, and update the auxiliary matrix M to obtain the new auxiliary matrix. The updated formula is According to the formula Calculate the new auxiliary matrix The Hadamard product of the adjacency matrix A and the adjacency matrix A yields the updated adjacency matrix. Complete the adaptive update of the source domain graph topology.
[0064] The adaptive update of the target domain graph topology can be performed using the same steps as described above.
[0065] After adaptively updating the source and target graph topologies, the updated source and target graph representations are obtained respectively. In this embodiment, the updated source / target graph topologies and source / target node features are input into the graph convolution module for feature extraction. In this embodiment, an existing graph convolution module can be used; here, a graph convolution module with two layers is used. The feature extraction formula is:
[0066]
[0067]
[0068] Where Z represents the initial node feature matrix of the source or target domain data. Z represents the adjacency matrix of the updated source or target graph topology, W1 and W2 represent the convolution kernels of the first and second graph convolutional layers of the graph convolution module, respectively. 1 Z represents the feature matrix after the first layer of graph convolution. 2 Z represents the feature matrix after the second layer graph convolution, i.e., the extracted features. 2∈R N×d N is the number of nodes, d is the dimension of each node's feature, and ReLU represents a non-linear activation unit; the extracted feature Z is calculated. 2 The mean and maximum value of each feature dimension are used to obtain the source domain graph representation or the target domain graph representation g, g∈R. 1×2d .
[0069] Then, the source domain graph representation and the target domain graph representation are respectively input into the cross-domain classifier built based on the fully connected layer to update the fault diagnosis network parameters.
[0070] In this embodiment, the specific steps for updating the fault diagnosis network parameters are as follows:
[0071] In the penultimate fully connected layer of the cross-domain classifier, the hidden features of the source domain data and the target domain data are connected to their respective edge score matrices, and the connection result is used as the domain representation to calculate the domain loss, so that the fault diagnosis network has the ability to acquire domain consistent features and topology.
[0072] In this embodiment, the hidden features of the source domain data and target domain data of the penultimate fully connected layer of the cross-domain classifier are connected to their respective edge score matrices according to the formula h = concat(s,x). Here, h is the domain representation, concat represents the feature connection operation, x represents the hidden features of the source domain data or target domain data of the penultimate fully connected layer of the cross-domain classifier, and s represents the edge score of the source domain data or target domain data.
[0073] The respective concatenation results are used as inputs to the domain representation, based on the domain loss L derived from the maximum mean difference. D Mid-computation domain loss,
[0074]
[0075] Among them, h s , h′ s This represents a vector obtained by concatenating the output features of the penultimate layer of the cross-domain classifier with the edge fractions, after passing through an adaptive topology-aware module, a graph convolution module, and a cross-domain classifier; h t , h′ t represents a pair of samples sampled from the target domain, which are processed by an adaptive topology-aware module, a graph convolution module, and a cross-domain classifier, and are obtained by concatenating the output features of the penultimate layer of the cross-domain classifier with the edge fraction; k represents the Gaussian kernel function, and E(·) represents the expectation; and These represent the source domain and the target domain, respectively.
[0076] The contrastive loss is calculated based on the hidden features of the source domain data from the penultimate fully connected layer of the cross-domain classifier. In this embodiment, the loss is calculated according to the formula...
[0077] The contrastive loss is calculated using the hidden features of the domain data, where C represents the number of classes. i Let C represent the i-th category cluster. j Let n represent the j-th category cluster. i n represents the number of samples in the i-th category cluster. j denoted by , dist(·), and x1 and x2, which represent the feature vectors output by the penultimate layer of the cross-domain classifier after the two samples sampled from the source domain have passed through the aforementioned modules.
[0078] The classification loss is calculated based on the output of the cross-domain classifier on the source domain data and its labels. In this embodiment, the formula is used... Calculate the classification loss, where N s y represents the number of samples in the source domain. i p represents the true class probability of the i-th sample in the source domain. i This represents the class probability predicted by the classifier for the i-th sample.
[0079] Based on the obtained contrast loss, domain loss, and classification loss, the fault diagnosis network parameters are updated using the gradient descent algorithm. Once the maximum number of training iterations is reached, the network parameter update is complete, and the network parameters are retained.
[0080] The test data is input into the network whose parameters have been updated to predict the probability value of each fault category in the test data, thus completing the small-sample cross-domain fault diagnosis.
[0081] This invention also provides a small-sample cross-domain fault diagnosis system, including a data acquisition module, a control module, and a storage module. The data acquisition module acquires source domain data and target domain data, and its signal output terminal is connected to the corresponding input terminal of the processing module to send the source domain data and target domain data to the processing module. The processing module and the storage module are communicatively connected. The storage module is used to store at least one executable instruction. The executable instruction causes the processing module to perform the operation corresponding to the small-sample cross-domain fault diagnosis method based on adaptive graph topology awareness described above, thereby realizing small-sample cross-domain fault diagnosis.
[0082] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0083] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for small-sample cross-domain fault diagnosis based on adaptive graph topology awareness, characterized in that, Includes the following steps: Acquire multi-channel operating data when mechanical equipment malfunctions, and divide the multi-channel operating data into labeled source domain data and unlabeled target domain data according to the operating conditions; Generate a complete source domain graph and a complete target domain graph based on the source domain data and the target domain data; A fault diagnosis network is constructed, which includes an adaptive topology sensing module, a graph convolution module, and a cross-domain classifier. Training the fault diagnosis network: Edge fraction matrices are constructed for the source and target domain complete graphs based on the adaptive topology sensing module, respectively. The steps are as follows: Represent the topology of the source domain complete graph / target domain complete graph using an adjacency matrix; The node features of all interconnected node pairs in the source domain complete graph / target domain complete graph are used as the edge features between the two nodes; the edge features are input into a multilayer perceptron to calculate the importance score of each edge, forming the edge score matrix of the source domain complete graph / target domain complete graph. The source and target domain graph topologies are adaptively updated based on the edge fraction matrix, respectively, in the following steps: An auxiliary matrix is obtained by subtracting the edge fraction matrix of the source / target complete graph from a matrix of all ones with the same size as the edge fraction matrix of the source / target complete graph. Generate a random number matrix with the same size as the edge fraction matrix of the source domain complete graph / target domain complete graph. Each element value in the random number matrix is randomly sampled from a uniform distribution U(0,1) between 0 and 1. Compare the corresponding elements of the auxiliary matrix and the random number matrix, and update the auxiliary matrix to obtain a new auxiliary matrix; Calculate the Hadamard product of the new auxiliary matrix and the adjacency matrix to obtain the updated adjacency matrix, thus completing the adaptive update of the source domain graph topology / target domain graph topology; The source domain graph representation and target domain graph representation after topology update are obtained based on the graph convolution module; the source domain graph representation and target domain graph representation are input into the cross-domain classifier built based on the fully connected layer to update the fault diagnosis network parameters. The test data is input into the trained fault diagnosis network for cross-domain fault diagnosis.
2. The method for small-sample cross-domain fault diagnosis based on adaptive graph topology awareness according to claim 1, characterized in that, The steps to obtain the source domain graph representation and the target domain graph representation after topology update are as follows: The updated source domain graph topology / target domain graph topology and source domain node features / target domain node features are input into the graph convolution module. The graph convolution module is used to extract features and calculate the mean and maximum value of each feature dimension in the extracted features to obtain the source domain graph representation / target domain graph representation.
3. The method for small-sample cross-domain fault diagnosis based on adaptive graph topology awareness according to claim 2, characterized in that, Feature extraction is performed using the following formula: ; ; Where Z represents the initial node feature matrix of the source or target domain data. Z represents the adjacency matrix of the updated source or target graph topology, W1 and W2 represent the convolution kernels of the first and second graph convolutional layers of the graph convolution module, respectively. 1 Z represents the feature matrix after the first layer of graph convolution. 2 Z represents the feature matrix after the second layer graph convolution, i.e., the extracted features. 2 ∈R N×d N is the number of nodes, d is the dimension of each node's feature, and ReLU represents a non-linear activation unit; Calculate Z 2 The mean and maximum value of each feature dimension are used to obtain the source domain graph representation / target domain graph representation.
4. The method for small-sample cross-domain fault diagnosis based on adaptive graph topology awareness according to claim 1, characterized in that, The steps to update the fault diagnosis network parameters are as follows: The hidden features of the source domain data and target domain data of the penultimate fully connected layer of the cross-domain classifier are concatenated with their respective edge score matrices, and the concatenation result is used as the domain representation to calculate the domain loss. Calculate the contrastive loss based on the hidden features of the source domain data from the penultimate fully connected layer of the cross-domain classifier; Calculate the classification loss based on the output of the cross-domain classifier on the source domain data and its labels; The fault diagnosis network parameters are updated based on the obtained contrast loss, domain loss, and classification loss.
5. The small-sample cross-domain fault diagnosis method based on adaptive graph topology awareness according to claim 4, characterized in that, According to the formula h=concat(s,x) The hidden features of the source domain data and target domain data in the penultimate fully connected layer of the cross-domain classifier are concatenated with their respective edge score matrices. h For domain representation, concat denoted as feature connection operation, x represents the hidden features of the source domain data or target domain data in the penultimate fully connected layer of the cross-domain classifier, and s represents the edge score of the source domain data or target domain data; According to the formula Compute the domain loss, where, This represents a vector obtained by concatenating the output features of the penultimate layer of the cross-domain classifier with the edge scores after passing through an adaptive topology-aware module, a graph convolution module, and a cross-domain classifier. This represents a pair of samples sampled from the target domain, processed by an adaptive topology-aware module, a graph convolution module, and a cross-domain classifier, and concatenated by the output features of the penultimate layer of the cross-domain classifier and the edge fraction; k represents the Gaussian kernel function. Expressing expectations; and These represent the source domain and the target domain, respectively.
6. The method for small-sample cross-domain fault diagnosis based on adaptive graph topology awareness according to claim 4, characterized in that, According to the formula The contrastive loss is calculated by computed hidden features of the source domain data, where C represents the number of fault categories. Represents the i-th category cluster, This represents the j-th category cluster. This represents the number of samples within the i-th category cluster. This represents the number of samples within the j-th category cluster. Let x1 and x2 represent the cosine distance, and let x1 and x2 represent the feature vectors output by the penultimate layer of the cross-domain classifier after the two samples sampled from the source domain have passed through all modules before the penultimate layer of the cross-domain classifier.
7. The method for small-sample cross-domain fault diagnosis based on adaptive graph topology awareness according to claim 4, characterized in that, According to the formula Calculate the classification loss, where N S y represents the number of samples in the source domain. i p represents the true class probability of the i-th sample in the source domain. i This represents the class probability predicted by the classifier for the i-th sample.
8. A small-sample cross-domain fault diagnosis system, characterized in that, The system includes a data acquisition module, a processing module, and a storage module. The data acquisition module acquires source domain data and target domain data, and its signal output terminal is connected to the corresponding input terminal of the processing module to send the source domain data and target domain data to the processing module. The processing module and the storage module are communicatively connected. The storage module is used to store at least one executable instruction. The executable instruction causes the processing module to perform the operation corresponding to the small sample cross-domain fault diagnosis method based on adaptive graph topology perception as described in any one of claims 1-7, thereby realizing small sample cross-domain fault diagnosis.