Robot joint flexible gear diagnosis method and device based on small sample hypergraph attention

By constructing a hypergraph structure and a hypergraph attention neural network, and combining a redundancy elimination mechanism and a few-shot learning strategy, the problem of insufficient fault identification accuracy under few-shot conditions in the diagnosis of robot joint flexible wheels is solved, and high-precision and robust fault diagnosis is achieved.

CN122221041APending Publication Date: 2026-06-16GUANGZHOU UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU UNIVERSITY
Filing Date
2026-05-21
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing diagnostic methods for robot joint flexible wheels are difficult to adapt to a limited number of fault samples under small sample conditions, resulting in insufficient accuracy and generalization of fault identification. In particular, traditional graph neural networks are unable to represent complex high-order data relationships.

Method used

A hypergraph structure is constructed, and the attention weights of hyperedges are adaptively learned through a hypergraph attention neural network. Hyperedge information is aggregated, and feature redundancy is suppressed through a redundancy elimination mechanism. Fault diagnosis is performed by combining a few-shot learning strategy.

Benefits of technology

It achieves high-precision fault diagnosis with a very small number of labeled samples, enhances the discriminativeness and robustness of fault features, and solves the problem of insufficient fault identification accuracy in small sample scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122221041A_ABST
    Figure CN122221041A_ABST
Patent Text Reader

Abstract

The application relates to a robot joint flexible gear diagnosis method and device based on small sample hypergraph attention, which comprises the following steps: collecting vibration signals under each working condition when a robot joint module is running, adding a fault label to obtain a sample set; constructing a hypergraph with each sample as a vertex; designing a hypergraph attention neural network based on the hypergraph structure, adaptively learning the attention weights of different hyperedges, aggregating hyperedge information to update vertex features, and outputting structure perception features; performing decorrelation constraint on the structure perception features through a redundancy elimination mechanism, calculating decorrelation loss, and obtaining discriminative features; processing the discriminative features by adopting a small sample learning strategy based on prototype metric learning and scenario training, and calculating fault classification loss; combining the fault classification loss and the decorrelation loss to construct a total loss function for fault diagnosis, completing model training, optimization and updating, and obtaining a diagnosis model. The application solves the problem that existing methods are difficult to adapt to diagnosis tasks under limited fault samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot joint flexible wheel diagnostic technology, and in particular to a robot joint flexible wheel diagnostic method and apparatus based on few-sample hypergraph attention. Background Technology

[0002] Joint flexible wheels are a core component of robotic systems, and their operational reliability is crucial for the overall positioning accuracy and operational safety of the robot. With the rapid development of sensor technology, massive amounts of vibration data can be continuously collected from robot joints. However, in practical robot joint diagnosis scenarios, fault data is often scarce, imbalanced, and frequently unlabeled, forming a typical few-sample learning problem. How to achieve high-precision fault diagnosis under conditions of minimal labeled samples has become a pressing technical challenge in the field of intelligent robot operation and maintenance. Existing robot joint flexible wheel diagnosis methods are mainly divided into two categories: diagnostic methods based on traditional machine learning and diagnostic methods based on deep learning. The former, such as Support Vector Machines and Extreme Learning Machines, rely on manually extracted features, have limited feature representation capabilities, and require a significant amount of prior knowledge. The latter, such as Convolutional Neural Networks and Autoencoders, develop deep nonlinear mapping structures to perform gradient calculations on given complex problems. Deep learning methods establish iterative training processes based on large data streams to achieve knowledge extraction, demonstrating powerful capabilities in feature extraction. This type of method relies on large-scale labeled data. However, in actual robot joint diagnosis scenarios, fault data is usually scarce, imbalanced, and often unlabeled, forming a typical few-shot learning problem that greatly affects the final evaluation results.

[0003] In recent years, graph neural networks have attracted increasing research attention. These methods rely on graph topological modeling logic, using vertices to represent samples and edges to connect sample relationships, thus mapping data features. Conventional graph structures can only depict pairwise relationships, and their inherent structural constraints make them unsuitable for the complex high-order data relationships in robot joint diagnosis scenarios. Research shows that modeling high-order relationship features can accurately depict the inherent patterns of multi-condition data, thereby improving the accuracy and generalization of fault identification. Currently, many researchers are gradually introducing attention mechanisms into hypergraph theory, aiming to overcome the limitation of traditional graph models in representing single data structures by leveraging the high-order relationship representation capabilities of hyperedges. However, redundant connections and irrelevant features in hypergraph models tend to generate feature representations with poor robustness, making them unsuitable for diagnostic tasks with limited fault samples in small-sample scenarios. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a robot joint flexible wheel diagnosis method and apparatus based on few-sample hypergraph attention, in order to solve the problem that existing graph neural network-based diagnosis methods are difficult to adapt to robot joint flexible wheel diagnosis tasks with limited fault samples.

[0005] The technical solution adopted in this invention is as follows: This invention provides a robot joint flexible wheel diagnosis method based on few-shot hypergraph attention, comprising: Vibration signals of the robot joint module under various operating conditions are collected, fault labels are added to obtain samples, and a dataset is constructed. Using each sample as a vertex, a hypergraph structure is obtained by connecting the sample and its K nearest neighbors in the feature space through hyperedges; Based on the hypergraph structure, a hypergraph attention neural network is designed to adaptively learn the attention weights of different hyperedges, aggregate hyperedge information to update vertex features, and output structure-aware features. The structure-aware features are subjected to decorrelation constraints through a redundancy elimination mechanism, and the decorrelation loss is calculated to obtain discriminative features. The discriminative features are input into the few-shot learning module, which adopts a few-shot learning strategy based on prototype metric learning and context training. It calculates the prototype of each type of fault on the support set, calculates the probability of all fault categories on the query set through Euclidean distance, and calculates the fault classification loss. By combining the fault classification loss and the discorrelation loss, a total loss function for fault diagnosis is constructed, and the training, optimization and updating of the overall model are completed to obtain the diagnostic model; The redundancy elimination mechanism includes: The redundancy of the structure-aware features is quantified using an empirical feature covariance matrix; the solution correlation loss is defined by the sum of squares of all off-diagonal elements in the empirical feature covariance matrix, thereby reducing the correlation between different feature dimensions by constraining their covariance and achieving the purpose of suppressing redundancy.

[0006] As a preferred technical solution: The method of quantifying the redundancy of the structure-aware features using an empirical feature covariance matrix includes:

[0007] In the formula, The empirical feature covariance matrix, For the first A structurally perceptible feature N Let T be the total number of structure-aware features, and T be the matrix transpose. The calculation of the solution correlation loss includes:

[0008] In the formula, To mitigate the related losses, Indicates the first and the Correlation between structurally perceived features; This indicates the extraction of diagonal elements from the matrix; This represents the L2 norm.

[0009] The hypergraph attention neural network adaptively learns the attention weights of different hyperedges and aggregates hyperedge information to update vertex features, outputting structure-aware features, including: Through a learnable projection matrix Project the hyperedge features of the hypergraph structure into the attention space: , For super-edge e The hyperedge features, for Features after projection; The projected features are weighted to obtain the unnormalized attention score for each hyperedge: , For super-edge e Unnormalized attention score For learnable attention vectors, It is the ReLU activation function; Normalize the unnormalized attention scores to obtain the attention weight coefficients for each hyperedge:

[0010] In the formula, For super-edge Normalized attention weight coefficients For a set of superedges Any superedge in, Represents an exponential function with the natural constant as its base; Based on the attention weight coefficients, vertex features are updated by aggregating hyperedge information:

[0011] In the formula, For the updated vertices eigenvectors, and Both represent vertex indices. Indicates association with vertices The set of superedges It is a learnable weight matrix. As vertex The original input features; The structure-aware features are obtained by outputting all vertex features through an activation function.

[0012] The few-shot learning strategy adopts the N-way K-shot scenario training paradigm, including: The support set and query set samples in each training scenario are mapped to the embedding space through a shared hypergraph attention encoder, and the prototype vector of each fault category of the support set is computed in the embedding space. Each query set sample is compared with the prototype vector of each category to obtain the posterior probability that each query set sample is predicted to be the corresponding category.

[0013] The construction of the total loss function includes: Using the solution of correlation loss Constructing redundancy to eliminate losses : , Weighting coefficients for controlling the strength of redundancy suppression; Using Fault Classification Loss and Constructing total loss :

[0014] in, Weighting coefficients to balance the two types of losses; The cross-entropy function is used.

[0015] The present invention also provides a robot joint flexible wheel diagnostic device based on few-shot hypergraph attention, comprising: The dataset construction module is used to collect vibration signals under various working conditions when the robot joint module is in operation, add fault labels to obtain samples, and construct a dataset. The hypergraph construction module is used to obtain the hypergraph structure by connecting each sample and its K nearest neighbors in the feature space through hyperedges, with each sample as a vertex. The hypergraph attention neural network construction module is used to design a hypergraph attention neural network based on the hypergraph structure, adaptively learn the attention weights of different hyperedges, aggregate hyperedge information to update vertex features, and output structure-aware features. The redundancy elimination module is used to perform decorrelation constraints on the structure-aware features through a redundancy elimination mechanism, calculate the decorrelation loss, and obtain discriminative features; The few-shot learning construction module is used to input the discriminative features into the few-shot learning module. It adopts a few-shot learning strategy based on prototype metric learning and context training. It calculates the prototype of each type of fault on the support set, calculates the probability of all fault categories on the query set through Euclidean distance, and calculates the fault classification loss. The total loss construction module is used to combine the fault classification loss and the discorrelation loss to construct the total loss function for fault diagnosis, complete the training, optimization and updating of the overall model, and obtain the diagnostic model; The redundancy elimination mechanism includes: The redundancy of the structure-aware features is quantified using an empirical feature covariance matrix; the solution correlation loss is defined by the sum of squares of all off-diagonal elements in the empirical feature covariance matrix, thereby reducing the correlation between different feature dimensions by constraining their covariance and achieving the purpose of suppressing redundancy.

[0016] The present invention also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the method.

[0017] The present invention also provides a computer device, the computer device including a processor and a memory, the memory storing at least one instruction, the instruction being loaded and executed by the processor to implement the method.

[0018] The technical solution of the present invention can achieve at least some of the following beneficial effects: This invention constructs a hypergraph structure for vibration signals, adaptively learns the importance of different hyperedges through a hypergraph attention mechanism, and performs feature aggregation within the graph. Simultaneously, a redundancy elimination mechanism is introduced to suppress feature redundancy, enabling the model to further learn compact fault features. Combined with a few-sample learning strategy, robust fault classification with a very small number of labeled samples is achieved. This invention effectively captures higher-order structural relationships between samples, reduces feature redundancy, and enhances discriminative feature learning, thereby obtaining more robust fault diagnosis results with a small sample size. Specifically, this invention has the following advantages: This invention introduces an attention mechanism into a hypergraph neural network to adaptively model high-order structural relationships between multi-source vibration samples, effectively solving the shortcomings of traditional graph neural networks in representing complex pairwise fault correlations and achieving in-depth mining of high-order vibration fault features. This invention proposes a redundancy elimination mechanism: by penalizing the correlation between feature dimensions, different feature dimensions are forced to respond to different structural and semantic attributes of fault data, and feature redundancy and irrelevant representations under small sample conditions are suppressed, so as to achieve accurate characterization of fault features under complex industrial conditions. This invention constructs a few-sample fault identification model by integrating prototype metric learning and scenario training, which can effectively solve the problem of insufficient fault identification accuracy under small sample conditions and achieve robust fault diagnosis with limited labeled samples. Attached Figure Description

[0019] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.

[0020] Figure 2 This is a flowchart illustrating the construction process of the hypergraph structure according to an embodiment of the present invention.

[0021] Figure 3 This is a flowchart of the processing of the hypergraph attention neural network model according to an embodiment of the present invention.

[0022] Figure 4 This is a schematic diagram of the diagnostic results obtained in an embodiment of the present invention.

[0023] Figure 5 This is a schematic diagram showing the comparison results of the environmental noise robustness of the embodiments of the present invention with existing model methods. Detailed Implementation

[0024] The specific embodiments of the present invention are described below with reference to the accompanying drawings.

[0025] See Figure 1 This embodiment of a robot joint flexible wheel diagnosis method based on few-sample hypergraph attention includes the following steps: S1. Collect vibration signals generated under various working conditions when the robot joint module is in operation, add fault labels to obtain samples, and build a dataset.

[0026] The robot joint module is an integrated execution unit of a harmonic reducer. The flexspline, as a core transmission component within the reducer, experiences periodic impacts and abnormal meshing vibrations upon failure, which are transmitted to the module surface via bearings and the housing. Therefore, collecting vibration signals from the joint module's outer shell can effectively reveal fault characteristics related to the flexspline failure, enabling indirect diagnosis of the flexspline's condition.

[0027] Specifically, two unidirectional accelerometers were used to collect vibration signal data of the robot joint module under different fault types. The unidirectional accelerometers were fixed to the horizontal and vertical directions of the test bearing via magnetic bases, respectively. The sampling frequency was set to 25.6 kHz to accurately capture the resonance caused by transient impacts on the bearing, ensuring that early, subtle fault characteristics were not lost. Vibration signals with consistent time durations were collected. : The vibration data is divided into Classify the types of fuel and valve train system malfunctions and assign corresponding malfunction tags to them. ,in Indicates the first Vibration signals of various fault types Indicates the first The document describes a label vector for each fault type. In this embodiment, 200 samples are preferably used for each fault type. Each sample is labeled with a fault label, including five types of fault labels: tooth surface wear, missing teeth, tooth root cracks, broken teeth, and normal. =5, forming a dataset; the dataset is then randomly divided into training and test sets in a 3:1 ratio. The dataset classification is shown in Table 1.

[0028] Table 1 Data Category Classification

[0029] S2. Construct a hypergraph with each sample as a vertex, and connect the sample and its K nearest neighbor samples in the feature space through hyperedges to explicitly model the high-order structural relationships between samples and obtain the hypergraph structure.

[0030] Specifically, the training set samples in the dataset are first input into the hypergraph construction module, which treats each sample as a vertex of the hypergraph. The module then calculates the Euclidean distance between each sample in the feature space and selects... Find the nearest neighbor samples and associate each sample vertex with its nearest neighbor sample. The nearest neighbor vertices are connected by a hyperedge:

[0031] In the formula, For vertices Using it as the core, compare it with the most similar feature space. nearest neighbor vertices Together they form a superedge; Indicates the first Each sample in the feature space The set of indices of the nearest neighbor samples. and These represent the corresponding first and second parts in the hypergraph. The first sample and the first The vertices of each sample are used as vertices to generate hyperedges, thus constructing a hypergraph structure:

[0032] In the formula, The set of vertices representing a hypergraph. Represents the set of directed hyperedges, and the weight matrix assigned to the hyperedges. The larger the weight value, the greater the influence of the corresponding edge.

[0033] The construction process of the above hypergraph structure is described in [link to documentation]. Figure 2 . Figure 2 In this context, a hypergraph is represented using a hypergraph incidence matrix, where each row ( ) represents a vertex, and each column ( () represents a hyperedge. If a vertex is part of a particular hyperedge, the corresponding element at the position in the incidence matrix is ​​set to 1; otherwise, it is set to 0.

[0034] S3. Based on the hypergraph structure, design a hypergraph attention neural network, which is used to adaptively learn the attention weights of different hyperedges, aggregate hyperedge information to update vertex features, and output structure-aware features.

[0035] As a preferred method, see Figure 3 The hypergraph attention neural network adaptively learns the attention weights of different hyperedges and aggregates hyperedge information to update vertex features, outputting structure-aware features, including: S31. Through a learnable projection matrix Project the hyperedge features of the hypergraph structure into the attention space: , For super-edge e The hyperedge features, These are the projected features.

[0036] Specifically, for a hypergraph constructed from a given vibration signal Hyperedge features It can be represented by the mean of the features of its internal vertices:

[0037] In the formula, As vertex The eigenvectors; the above are represented in matrix form as follows: ,in The hyperedge eigenma matrix, It is a diagonal hyperedge degree matrix. The incidence matrix of the hypergraph. Let be the characteristic matrix of all vertices.

[0038] S32. Features after projection We then perform a weighted average to obtain the unnormalized attention score for each superedge: , For super-edge e Unnormalized attention score For learnable attention vectors, This is the activation function for ReLU (Recti-fied Linear Units).

[0039] S33. Normalize the unnormalized attention scores to obtain the attention weight coefficients for each hyperedge:

[0040] In the formula, For super-edge The normalized attention weight coefficients reflect the importance of the hyperedge for fault detection; For a set of superedges Any superedge in, This represents an exponential function with the natural constant as its base; the mechanism of this step allows the model to adaptively assign hyperedge weights, thereby providing more information for fault identification.

[0041] S34. Based on the attention weight coefficients, update the vertex features by aggregating hyperedge information:

[0042] In the formula, For the updated vertices eigenvectors, and Both represent vertex indices. Indicates association with vertices The set of superedges It is a learnable weight matrix. As vertex The original input features are then processed. This step aggregates the importance of different hyperedges into the vertex features in a differentiated manner, enhancing the semantic delivery of key hyperedges.

[0043] S35. Activate all vertex features using an activation function to obtain the structure-aware features. The final feature matrix output by the activation function is: .

[0044] In one specific embodiment, the hypergraph attention neural network described herein includes two hypergraph attention layers and one feature aggregation layer.

[0045] S4. The structure-aware features are subjected to decorrelation constraints through a redundancy elimination mechanism, and the decorrelation loss is calculated to suppress redundant and irrelevant features of the output features and obtain discriminative features; The redundancy elimination mechanism includes: The redundancy of the structure-aware features is quantified using an empirical feature covariance matrix; the solution correlation loss is defined by the sum of squares of all off-diagonal elements in the empirical feature covariance matrix, thereby reducing the correlation between different feature dimensions by constraining their covariance and achieving the purpose of suppressing redundancy.

[0046] Specifically, the step of quantifying the redundancy of the structure-aware features using an empirical feature covariance matrix includes:

[0047] In the formula, The empirical feature covariance matrix, For the first A structurally perceptible feature N Let T be the total number of structure-aware features, and T be the matrix transpose. The calculation of the solution correlation loss includes:

[0048] In the formula, To mitigate the related losses, Indicates the first and the Correlation between structurally perceived features; This indicates the extraction of diagonal elements from the matrix; This represents the L2 norm.

[0049] Among them, the related loss is solved Compared to It is differentiable, and its gradient is calculated as follows:

[0050] This gradient is backpropagated through the hypergraph attention network, guiding the network to learn a hypergraph feature representation that is structurally rich but non-redundant, which is especially important under small sample conditions; the final redundancy elimination target is calculated as follows:

[0051] In the formula, To eliminate losses due to redundancy, This represents the weighting coefficient that controls the strength of redundancy suppression.

[0052] From an information theory perspective, minimizing the covariance between feature dimensions can be seen as reducing the upper bound of mutual information under the Gaussian assumption:

[0053] In the formula, express and Information shared between them; express and The Pearson correlation coefficient between them. Therefore, minimizing the solution correlation loss is equivalent to minimizing... This implicitly minimizes the shared information between feature dimensions, thereby promoting decoupled feature representations. Therefore, this redundancy elimination step can be used to encode complementary features across different feature dimensions and reduce cross-information, making features more independent and less cluttered.

[0054] S5. Input the discriminative features into the few-shot learning module, which adopts a few-shot learning strategy based on prototype metric learning and scenario training. It calculates the prototype of each type of fault on the support set, calculates the probability of all fault categories on the query set through Euclidean distance, and calculates the fault classification loss.

[0055] Specifically, the few-shot learning strategy adopts the N-way K-shot scenario training paradigm, including: S51. The support set and query set samples in each training scenario are mapped to the embedding space using a shared hypergraph attention encoder, and the prototype vector for each fault category in the support set is computed in the embedding space:

[0056] In the formula, Indicates the fault category prototype vector, This indicates that support is concentrated in the fault category. The sample set, Indicates the first one One sample.

[0057] S52. Compare each query set sample with the prototype vector of each category to obtain the posterior probability that each query set sample is predicted as the corresponding category.

[0058] Specifically, for the query sample The embedded data is compared with the prototypes of each category, and the calculation method is as follows:

[0059] In the formula, Indicates that in a given query sample In this case, it is predicted as category The posterior probability; To query the feature vector output by the Hypergraph Attention Encoder, Indicates other fault categories The set of prototype vectors, This represents the Euclidean distance.

[0060] In one specific embodiment, the few-shot learning module includes a prototype metric layer and a Softmax classification layer. The discriminative features, after redundancy removal, are input into the few-shot learning module. Finally, the probability of all fault classes is calculated in the Softmax classification layer, and the cross-entropy function is used as the loss function to calculate the fault classification loss. During training, the cross-entropy function is used to calculate the loss between the prediction and the ground truth, and the calculation formula is as follows:

[0061] In the formula, Classify losses for faults, For query set.

[0062] S6. Combine the fault classification loss and the decorrelation loss to construct the total loss function for fault diagnosis, complete the training, optimization and updating of the overall model, and obtain a diagnostic model that can be used for intelligent fault diagnosis of robot joint flexible wheels under small sample conditions.

[0063] Specifically, the total loss function is as follows:

[0064] in, Weighting coefficients to balance the two types of losses.

[0065] The fault diagnosis results obtained by the method in this embodiment can be found in [reference]. Figure 4 , Figure 4 The results were obtained by dimensionality reduction of the original fault features using principal component analysis (PCA). Figure 4 The horizontal axis represents the first principal component, i.e., principal component 1, and the vertical axis represents the second principal component, i.e., principal component 2. Figure 4 As can be seen, the method in this embodiment successfully achieved complete fault classification, proving the effectiveness of the method in fault diagnosis of robot joint flexible wheels.

[0066] Additional experiments were conducted by adding additive white Gaussian noise to the test samples at different signal-to-noise ratio levels. Fault diagnosis was performed using the method proposed in this embodiment and existing model methods under the same parameter conditions. The environmental noise robustness results are shown in [reference needed]. Figure 5 . Figure 5 The horizontal axis represents the signal-to-noise ratio (SNR), and the vertical axis represents the accuracy. The SNR can be varied from 9 dB to -3 dB to simulate harsh industrial environments. Existing models include one-dimensional convolutional neural networks, hypergraph neural networks, and graph convolutional networks. Figure 5 It is evident that the performance of all methods decreases with increasing noise intensity. The accuracy of the method proposed in this embodiment drops to 84.73%, while the accuracies of the three existing models decrease to 79.62%, 77.09%, and 72.18%, respectively. Furthermore, the method proposed in this embodiment maintains superior accuracy across all signal-to-noise ratio levels, outperforming the three existing models, demonstrating its robustness in diagnosing faults in robot joint flexible wheels.

[0067] This embodiment also provides a robot joint flexible wheel diagnostic device based on few-sample hypergraph attention, including: The dataset construction module is used to collect vibration signals under various working conditions when the robot joint module is in operation, add fault labels to obtain samples, and construct a dataset. The hypergraph construction module is used to construct a hypergraph centered on each sample, and obtain the hypergraph structure by connecting the sample and its K nearest neighbors in the feature space through hyperedges; The hypergraph attention neural network construction module is used to design a hypergraph attention neural network based on the hypergraph structure. It is used to adaptively learn the attention weights of different hyperedges, aggregate hyperedge information to update vertex features, and output structure-aware features. The redundancy elimination module is used to perform decorrelation constraints on the structure-aware features through a redundancy elimination mechanism, and to calculate the decorrelation loss to obtain discriminative features; The few-shot learning construction module is used to input the discriminative features into the few-shot learning module. It adopts a few-shot learning strategy based on prototype metric learning and context training. It calculates the prototype of each type of fault on the support set, calculates the probability of all fault categories on the query set through Euclidean distance, and calculates the fault classification loss. The total loss construction module is used to combine the fault classification loss and the discorrelation loss to construct the total loss function for fault diagnosis, complete the training, optimization and updating of the overall model, and obtain the diagnostic model; The redundancy elimination mechanism includes: The redundancy of the structure-aware features is quantified using an empirical feature covariance matrix; the solution correlation loss is defined by the sum of squares of all off-diagonal elements in the empirical feature covariance matrix, thereby reducing the correlation between different feature dimensions by constraining their covariance and achieving the purpose of suppressing redundancy.

[0068] This embodiment also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the method described therein.

[0069] This embodiment also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the method described.

[0070] It will be understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for diagnosing robot joint flexible wheels based on few-sample hypergraph attention, characterized in that, include: Vibration signals of the robot joint module under various operating conditions are collected, fault labels are added to obtain samples, and a dataset is constructed. Using each sample as a vertex, a hypergraph structure is obtained by connecting the sample and its K nearest neighbors in the feature space through hyperedges; Based on the hypergraph structure, a hypergraph attention neural network is designed to adaptively learn the attention weights of different hyperedges, aggregate hyperedge information to update vertex features, and output structure-aware features. The structure-aware features are subjected to decorrelation constraints through a redundancy elimination mechanism, and the decorrelation loss is calculated to obtain discriminative features. The discriminative features are input into the few-shot learning module, which adopts a few-shot learning strategy based on prototype metric learning and context training. It calculates the prototype of each type of fault on the support set, calculates the probability of all fault categories on the query set through Euclidean distance, and calculates the fault classification loss. By combining the fault classification loss and the discorrelation loss, a total loss function for fault diagnosis is constructed, and the training, optimization and updating of the overall model are completed to obtain the diagnostic model; The redundancy elimination mechanism includes: The redundancy of the structure-aware features is quantified using an empirical feature covariance matrix; the solution correlation loss is defined by the sum of squares of all off-diagonal elements in the empirical feature covariance matrix, thereby reducing the correlation between different feature dimensions by constraining their covariance and achieving the purpose of suppressing redundancy.

2. The method according to claim 1, characterized in that, The method of quantifying the redundancy of the structure-aware features using an empirical feature covariance matrix includes: , In the formula, The empirical feature covariance matrix, For the first A structurally perceptible feature N Let T be the total number of structure-aware features, and T be the matrix transpose. The calculation of the solution correlation loss includes: , In the formula, To mitigate the related losses, Indicates the first and the Correlation between structurally perceived features; This indicates the extraction of diagonal elements from the matrix; This represents the L2 norm.

3. The method according to claim 1, characterized in that, The hypergraph attention neural network adaptively learns the attention weights of different hyperedges and aggregates hyperedge information to update vertex features, outputting structure-aware features, including: Through a learnable projection matrix Project the hyperedge features of the hypergraph structure into the attention space: , For super-edge e The hyperedge features, for Features after projection; The projected features are weighted to obtain the unnormalized attention score for each hyperedge: , For super-edge e Unnormalized attention score For learnable attention vectors, It is the ReLU activation function; Normalize the unnormalized attention scores to obtain the attention weight coefficients for each hyperedge: , In the formula, For super-edge Normalized attention weight coefficients For a set of superedges Any superedge in, Represents an exponential function with the natural constant as its base; Based on the attention weight coefficients, vertex features are updated by aggregating hyperedge information: , In the formula, For the updated vertices eigenvectors, and Both represent vertex indices. Indicates association with vertices The set of superedges It is a learnable weight matrix. As vertex The original input features; The structure-aware features are obtained by outputting all vertex features through an activation function.

4. The method according to claim 1, characterized in that, The few-shot learning strategy adopts the N-way K-shot scenario training paradigm, including: The support set and query set samples in each training scenario are mapped to the embedding space through a shared hypergraph attention encoder, and the prototype vector of each fault category of the support set is computed in the embedding space. Each query set sample is compared with the prototype vector of each category to obtain the posterior probability that each query set sample is predicted to be the corresponding category.

5. The method according to claim 1, characterized in that, The construction of the total loss function includes: Using the solution of correlation loss Constructing redundancy to eliminate losses : , Weighting coefficients for controlling the strength of redundancy suppression; Using Fault Classification Loss and Constructing total loss : , in, Weighting coefficients to balance the two types of losses; The cross-entropy function is used.

6. A robot joint flexible wheel diagnostic device based on few-sample hypergraph attention, characterized in that, include: The dataset construction module is used to collect vibration signals under various working conditions when the robot joint module is in operation, add fault labels to obtain samples, and construct a dataset. The hypergraph construction module is used to obtain the hypergraph structure by connecting each sample and its K nearest neighbors in the feature space through hyperedges, with each sample as a vertex. The hypergraph attention neural network construction module is used to design a hypergraph attention neural network based on the hypergraph structure, adaptively learn the attention weights of different hyperedges, aggregate hyperedge information to update vertex features, and output structure-aware features. The redundancy elimination module is used to perform decorrelation constraints on the structure-aware features through a redundancy elimination mechanism, calculate the decorrelation loss, and obtain discriminative features; The few-shot learning construction module is used to input the discriminative features into the few-shot learning module. It adopts a few-shot learning strategy based on prototype metric learning and context training. It calculates the prototype of each type of fault on the support set, calculates the probability of all fault categories on the query set through Euclidean distance, and calculates the fault classification loss. The total loss construction module is used to combine the fault classification loss and the discorrelation loss to construct the total loss function for fault diagnosis, complete the training, optimization and updating of the overall model, and obtain the diagnostic model; The redundancy elimination mechanism includes: The redundancy of the structure-aware features is quantified using an empirical feature covariance matrix; the solution correlation loss is defined by the sum of squares of all off-diagonal elements in the empirical feature covariance matrix, thereby reducing the correlation between different feature dimensions by constraining their covariance and achieving the purpose of suppressing redundancy.

7. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, which is loaded and executed by a processor to implement the method as described in any one of claims 1 to 5.

8. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction that is loaded and executed by the processor to implement the method as described in any one of claims 1 to 5.