Mechanical arm grabbing stability classification method and system based on hierarchical clustering
Patent Information
- Application Number
- CN202311741303.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2043-12-18
Smart Images

Figure CN119589655A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot arm control, and in particular to a robot arm grasping stability classification method and system based on hierarchical clustering. Background Art
[0002] As the demand for various dexterous grasping and manipulation by industrial and service robots increases, the grasping tasks of robots are attracting more and more attention. As for whether the robot arm can easily adjust the grasping force in time according to the weight of the object, reliable prediction of the grasping state can help the robot arm avoid the possibility of grasping failure. Applying the deep graph clustering algorithm to the robot arm can help the robot arm find the category to which the object belongs more accurately, thereby effectively improving the speed of judging the force when grasping the object; helping the robot avoid possible grasping failure and have the opportunity to re-grasp the object stably.
[0003] Most graph clustering algorithms are not hierarchical and rely on some resolution parameters that allow people to adjust the clustering according to the dataset and the intended purpose. However, most of the data in real life are complex, multi-scale community structures. These parameters are also difficult to adjust in practice, and it is difficult for flat message passing graph neural networks (GNNs) to capture the dependencies between distant node pairs. Inspired by the remarkable effectiveness of deep neural network models in computer vision and natural language processing, people later stacked a large number of GNN layers together to directly increase the receptive field of each node. Therefore, deeper models were proposed by simplifying the aggregation design of GNNs, accompanied by carefully designed normalization units or specific gradient descent methods, but there is still a serious over-squeezing problem caused by flat GNNs when aggregating information across long paths. In addition, another key flaw of flat message passing GNNs is that they only rely on aggregating messages in the observed topology, while the information hidden at the meso- and macro-levels is ignored. Therefore, they studied the idea of a hierarchical message passing mechanism to enhance the information aggregation pipeline of GNNs. The ultimate goal is to enable the node representation learning process to perceive the long-range interaction information and implicit multi-resolution semantics in the graph. Therefore, the hierarchical clustering algorithm is fast, memory efficient and parameter-free. With the introduction and continuous rise of the attention mechanism, GNN combined with attention embedding has also developed rapidly because it allows GNN to focus only on the most important or relevant parts of the input data to improve the effect and efficiency of the model. For example, Graph Attention Networks (GATs) use the attention mechanism to allow nodes to automatically learn the similarity and importance between nodes, which quickly improves the update speed of the weights between nodes.
[0004] Many deep learning automatic classification methods are currently designed and applied to reliably predict grasping states. Among them, a typical method is to send tactile representation to a support vector machine (SVM) classifier. However, the difficulty of grasping stability of the robot arm lies in the complexity of the data structure and the hidden information between multi-layer nodes. The current technology still has the problem that the clustering results are not accurate enough and the efficiency is not high enough. Summary of the invention
[0005] One of the purposes of the present invention is to provide a method and system for classifying the gripping stability of a robotic arm based on hierarchical clustering, so as to improve the ability of nodes to obtain deeper feature information while making the clustering results more accurate and the boundaries clearer. At the same time, GAT is used for node embedding to speed up the speed of automatic learning of feature information by nodes. The more accurate and efficient graph structure clustering performance is used in the classification of the gripping stability of the robotic arm to improve the mechanical stability working rate.
[0006] An embodiment of the present invention provides a method for classifying mechanical arm grasping stability based on hierarchical clustering, comprising:
[0007] Step S1: convert the data acquired by the sensor of the robot arm into graph data and perform node embedding;
[0008] Step S2: perform inter-cluster clustering on the graph data;
[0009] Step S3: Perform hierarchical clustering on the inside of each cluster after the inter-cluster clustering stratification;
[0010] Step S4: perform inter-cluster merging;
[0011] Step S5: Use a fully connected layer with sigmoid for binary classification.
[0012] Preferably, step S1: converting the data acquired by the sensor of the robot arm into graph data and performing node embedding, comprises:
[0013] Step S11: converting the data acquired by the sensor of the robot arm into graph data, wherein the graph data is represented by G = (V, E); where V = {V1, V2, ..., V N} is a node set, indicating that a set of graph data has N nodes, and E represents a set of undirected edges;
[0014] Step S12: Apply a shared linear change parameterized by the weight matrix W to each node, and perform a self-attention-sharing mechanism on the node. The attention coefficient is as follows:
[0015]
[0016] In the formula, e ijis the attention coefficient between the i-th and j-th nodes, are the feature vectors of the i-th and j-th nodes respectively;
[0017] Step S13: Use the softmax function to normalize all the choices of the jth node.
[0018] Preferably, step S2: performing inter-cluster clustering on the graph data comprises:
[0019] Given a weighted undirected graph G = (V, E) with n nodes, let A be the corresponding weighted adjacency matrix; the weight of a node to the i-th and j-th nodes is the sum of the weights of its associated edges, and the formula is as follows:
[0020] ω i =∑ j∈V A ij ;
[0021] The total weight of the node is:
[0022] ω=∑ i∈V ω i =∑ i,j∈V A ij ;
[0023] The weight of a sampling node on the i-th and j-th nodes can produce a probability distribution:
[0024]
[0025] When considering graph clustering, analogous to the probability distribution of node pairs, the weights induce the probability distribution of cluster pairs:
[0026]
[0027] The distance between two different clusters is expressed as the sampling ratio of probability; the probability distribution on the cluster is expressed as follows:
[0028]
[0029]
[0030] Among them, p(a|b) is the conditional probability representation of a and b.
[0031] Preferably, step S3: performing hierarchical clustering on the inside of each cluster after the inter-cluster clustering stratification, comprises:
[0032] Consider each cluster as a super node and design a super graph at layer t. The hyperparameter γ is as follows:
[0033]
[0034] Intra-cluster hierarchical clustering consists of three steps in the t-layer: bottom-up propagation, middle-layer propagation, and top-down propagation. The updated representation of the t-layer super nodes in the bottom-up propagation is as follows:
[0035]
[0036] in, is the t-layer supergraph G t The super nodes in s t-1 is the one in layer t-1 Nodes, It is Figure G t Zhongyou Layer generated The feature representation of the node, Indicates that it belongs to a super node The number of nodes in the t-1 layer;
[0037] The expression of the information aggregation of the tth layer propagated by the middle layer is as follows:
[0038]
[0039] In the formula, is the node u in The feature representation after the layer is propagated from bottom to top, N t (v) is the set of nodes adjacent to node v at layer t, It is the aggregate node representation of v based on local neighborhood information;
[0040] For the continuously updated node representation, an attention mechanism is used to adaptively learn the contribution weights of different levels in the top-down propagation process;
[0041]
[0042] Where α uv is the trainable normalized attention coefficient between node v and supernode u or between itself, MEAN is the element-by-element mean calculation, C(v) represents the set of supernodes of different layers of node v from {2,…,k};
[0043] The output node generation of the last layer is represented as follows:
[0044]
[0045] For each node in each layer, bottom-up propagation, middle-layer propagation, and top-down propagation are performed in sequence to obtain the representation vector of each node. The model is trained using a loss function based on the cross entropy method; the loss function is as follows:
[0046]
[0047] Preferably, the robotic arm grasping stability classification method based on hierarchical clustering further includes:
[0048] Before performing inter-cluster merging, obtain the parameter data and usage environment data of the robot arm as analysis data;
[0049] Determine a benchmark for cluster merging based on the analysis data and a preset analysis database;
[0050] Wherein, based on the analysis data and the preset analysis database, a benchmark for cluster merging is determined, including:
[0051] Extract features from the analysis data and build a benchmark analysis set based on the extracted feature values;
[0052] matching the benchmark analysis set with the standard set associated with each benchmark in the analysis database;
[0053] Based on the matching results, the corresponding benchmark is retrieved.
[0054] The present invention also provides a mechanical arm grasping stability classification system based on hierarchical clustering, comprising:
[0055] The data conversion and embedding module is used to convert the data acquired by the robot arm's sensors into graph data and embed nodes;
[0056] Inter-cluster clustering module, used to perform inter-cluster clustering on graph data;
[0057] Hierarchical clustering module, used to perform hierarchical clustering within each cluster after the inter-cluster clustering stratification;
[0058] Merge module, used for inter-cluster merging;
[0059] Classification module for binary classification using a fully connected layer with sigmoid.
[0060] Preferably, the data conversion and embedding module converts the data acquired by the sensor of the robot arm into graph data and performs node embedding, and performs the following operations:
[0061] The data obtained by the sensor of the robot arm is converted into graph data, where the graph data is represented by G = (V, E); where V = {V1, V2, …, V N} is a node set, indicating that a set of graph data has N nodes, and E represents a set of undirected edges;
[0062] A shared linear transformation parameterized by the weight matrix W is applied to each node, and a self-attention-sharing mechanism is performed on the node, with the following attention coefficients:
[0063]
[0064] In the formula, e ij is the attention coefficient between the i-th and j-th nodes, are the feature vectors of the i-th and j-th nodes respectively;
[0065] Use the softmax function to normalize across all choices of the j-th node.
[0066] Preferably, the inter-cluster clustering module performs inter-cluster clustering on the graph data and performs the following operations:
[0067] Given a weighted undirected graph G = (V, E) with n nodes, let A be the corresponding weighted adjacency matrix; the weight of a node to the i-th and j-th nodes is the sum of the weights of its associated edges, and the formula is as follows:
[0068] ω i =∑ j∈V A ij ;
[0069] The total weight of the node is:
[0070] ω=∑ i∈V ω i =∑ i,j∈V A ij ;
[0071] The weight of a sampling node on the i-th and j-th nodes can produce a probability distribution:
[0072]
[0073] When considering graph clustering, analogous to the probability distribution of node pairs, the weights induce the probability distribution of cluster pairs:
[0074]
[0075] The distance between two different clusters is expressed as the sampling ratio of probability; the probability distribution on the cluster is expressed as follows:
[0076]
[0077] Among them, p(a|b) is the conditional probability representation of a and b.
[0078] Preferably, the hierarchical clustering module performs hierarchical clustering on the inside of each cluster after the inter-cluster clustering stratification, and performs the following operations:
[0079] Consider each cluster as a super node and design a super graph at layer t. The hyperparameter γ is as follows:
[0080]
[0081] Intra-cluster hierarchical clustering consists of three steps in the t-layer: bottom-up propagation, middle-layer propagation, and top-down propagation. The updated representation of the t-layer super nodes in the bottom-up propagation is as follows:
[0082]
[0083] in, is the t-layer supergraph G t The super nodes in s t-1 is the one in layer t-1 Nodes, It is Figure G t Zhongyou Layer generated The feature representation of the node, Indicates that it belongs to a super node The number of nodes in the t-1 layer;
[0084] The expression of the information aggregation of the tth layer propagated by the middle layer is as follows:
[0085]
[0086] In the formula, is the node u in The feature representation after the layer is propagated from bottom to top, N t (v) is the set of nodes adjacent to node v at layer t, It is the aggregate node representation of v based on local neighborhood information;
[0087] For the continuously updated node representation, an attention mechanism is used to adaptively learn the contribution weights of different levels in the top-down propagation process;
[0088]
[0089] Where α uv is the trainable normalized attention coefficient between node v and supernode u or between itself, MEAN is the element-by-element mean calculation, C(v) represents the set of supernodes of different layers of node v from {2,…,k};
[0090] The output node generation of the last layer is represented as follows:
[0091]
[0092] For each node in each layer, bottom-up propagation, middle-layer propagation, and top-down propagation are performed in sequence to obtain the representation vector of each node. The model is trained using a loss function based on the cross entropy method; the loss function is as follows:
[0093]
[0094] Preferably, the robotic arm grasping stability classification system based on hierarchical clustering further includes: a benchmark determination module;
[0095] The benchmark determination module performs the following operations:
[0096] Before performing inter-cluster merging, obtain the parameter data and usage environment data of the robot arm as analysis data;
[0097] Determine a benchmark for cluster merging based on the analysis data and a preset analysis database;
[0098] Wherein, based on the analysis data and the preset analysis database, a benchmark for cluster merging is determined, including:
[0099] Extract features from the analysis data and build a benchmark analysis set based on the extracted feature values;
[0100] matching the benchmark analysis set with the standard set associated with each benchmark in the analysis database;
[0101] Based on the matching results, the corresponding benchmark is retrieved.
[0102] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0103] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0105] Figure 1 Schematic diagram of a method for classifying mechanical arm grasping stability based on hierarchical clustering in an embodiment of the present invention;
[0106] Figure 2 A schematic diagram of the object-picking steps of the robot arm used in the present invention;
[0107] Figure 3 A simplified schematic diagram of the classification steps of the present invention;
[0108] Figure 4 Schematic diagram of a robotic arm grasping stability classification system based on hierarchical clustering in an embodiment of the present invention. DETAILED DESCRIPTION
[0109] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0110] The embodiment of the present invention provides a classification method of mechanical arm grasping stability based on hierarchical clustering, such as Figure 1 As shown, including:
[0111] Step S1: convert the data acquired by the sensor of the robot arm into graph data and perform node embedding;
[0112] Step S2: perform inter-cluster clustering on the graph data;
[0113] Step S3: Perform hierarchical clustering on the inside of each cluster after the inter-cluster clustering stratification;
[0114] Step S4: perform inter-cluster merging;
[0115] Step S5: Use a fully connected layer with sigmoid for binary classification.
[0116] The working principle and beneficial effects of the above technical solution are:
[0117] Figure 2 This is a flowchart of the object picking process of the robot arm used in the classification method of the present invention. Figure 3 The hierarchical clustering algorithm flow chart of the present invention is as follows: the data acquired by the robot arm sensor is converted into graph data, and the graph is represented as a tuple G = (V, E), where V = {V1, V2, ..., V N} is a node set, represents a group of N nodes, and E represents a group of undirected edges. First, GAT is used for node embedding to dynamically capture the correlation between node features. The following is the formula it relies on:
[0118]
[0119] The initial step is to apply a shared linear transformation parameterized by the weight matrix W to each node, and then perform a self-attention-sharing mechanism α,e on the nodes. ij is the attention coefficient between nodes i and j, where is the feature vector of node i, j.
[0120]
[0121] To make these attention coefficients easily comparable across different nodes, they are normalized across all choices of node j using a softmax function.
[0122]
[0123] Since the attention mechanism α is a single-layer feedforward neural network, α ij is the real number of coefficients calculated by the final fully expanded attention mechanism. By stacking multiple graph attention layers, a complete GAT network can be obtained for node embedding.
[0124] After the node data is embedded by GAT, the complexity and redundancy are reduced. The next step is to perform a hierarchical clustering algorithm on the embedded data with probability distribution. The algorithm first constructs a hierarchical structure for the embedded data in combination with the idea of probability distribution. Then, each cluster after stratification is hierarchically clustered. The super graph of the t layer is propagated in three steps: bottom-up propagation, middle-layer propagation, and top-down propagation. Finally, cluster merging is performed to achieve more accurate and efficient clustering of graph data. The specific steps are as follows:
[0125] First, we use the idea of probability distribution to cluster a set of graph data. Given a weighted undirected graph G = (V, E) with n nodes, let A be the corresponding weighted adjacency matrix, which is a symmetric non-negative matrix. For a node pair i, j, the weight of node i is the sum of the weights of its associated edges, and the formula is as follows:
[0126]
[0127] The total weight of the node is:
[0128]
[0129] Combining the idea of probability theory, the weight of a sampling node for i, j can produce a probability distribution:
[0130]
[0131] Similarly, when considering the clustering C of the graph (i.e., the partitioning of V), the weights induce the probability distribution of cluster pairs, analogous to the probability distribution of node pairs:
[0132]
[0133] The distance between two different clusters is expressed as a sampling ratio of probability, and the distance between clusters is calculated with more accurate values, thereby improving the clustering effect. The probability distribution representation on the cluster and the probability of sampling a under the condition of b are:
[0134]
[0135]
[0136] Among them, p(a|b) is the conditional probability representation of a and b. The distance calculated by the above formula will be used in the algorithm to merge the closest clusters.
[0137] Modularity-based clustering is a clustering method based on graph theory. Its purpose is to divide a graph into multiple subgraphs so that the connection density within the subgraph is high and the connection density between subgraphs is low. This method can be used to discover the community structure in the graph, that is, a collection of nodes with similarities or interdependence. Modularity is a standard measure for evaluating the quality of clusters C (any partition of V). Modularity-based clustering techniques generally rely on modularity definitions, but the main drawback of this formula is that it has a certain resolution limit. In order to exceed this resolution limit, a multiplication factor γ is introduced, called resolution. Then the modularity is:
[0138]
[0139] Introducing the probability distribution representation, the modularity of the cluster C with the multiplication factor γ is:
[0140]
[0141] When modularity Qγ(C) increases, C is updated by moving a node from one cluster to another. The target cluster of each node is to maximize modularity. The algorithm can be regarded as a modularity maximization scheme with sliding resolution. At this time, the required maximization modularity scheme can be quantified: starting from the maximum resolution of each node's own cluster, find the first value of the resolution parameter γ, such as γ1, the resolution at time t (the time when the tth merge is triggered) is 1 / dt, corresponding to cluster C t , the sequence of resolutions is non-increasing, and thus the algorithm provides a complete hierarchy.
[0142]
[0143] In order to obtain a better clustering effect, after inter-cluster clustering, hierarchical clustering is performed inside each stratified cluster. The main method is to regard each cluster as a super node and design a super graph at the t layer. The hyperparameter γ at this time is the calculation method of formula (12). Intra-cluster hierarchical clustering consists of three steps at the t layer: bottom-up propagation, middle layer propagation, and top-down propagation. The expression of each propagation method is as follows:
[0144]
[0145] Formula (13) is the updated representation result of the t-layer super node in the bottom-up propagation, where is the t-layer supergraph G t The super nodes in s t-1
[0146] is the one in layer t-1 Nodes, It is Figure G t Zhongyou Layer generated The feature representation of the node, Indicates that it belongs to a super node The number of nodes in the t-1 layer.
[0147]
[0148] Formula (14) is the expression of the information aggregation of the tth layer propagated by the middle layer. is the node u in The feature representation after the layer is propagated from bottom to top, N t (v) is the set of nodes adjacent to node v at layer t, is the aggregate node representation of v based on local neighborhood information.
[0149] For the continuously updated node representation, the attention mechanism is used to adaptively learn the contribution weights of different levels in the top-down propagation process.
[0150]
[0151] In formula (15), α uv is the trainable normalized attention coefficient between node v and supernode u or between itself, MEAN is the element-by-element mean calculation, and C(v) represents the set of supernodes of different layers of node v from {2,…,k}. The output node generation of the last layer (L) is expressed as shown in formula (16):
[0152]
[0153] Loss function judgment: For each node in each layer, after bottom-up propagation, middle-layer propagation and top-down propagation are performed in sequence, the representation vector of each node is obtained, and the model is trained using the loss function based on the cross entropy method. The loss function is as follows:
[0154]
[0155] The hierarchical clustering algorithm based on probability distribution is applied to the data set obtained from the robot arm sensor. At the end of the model, a fully connected layer (FC) with sigmoid is used for binary classification. The grasping force of the robot arm is controlled by various sensors to achieve the grasping task of the robot arm. The robot arm can effectively avoid possible grasping failures through reliable prediction of the grasping state, and have the opportunity to re-grasp the object stably. Applying the deep graph clustering algorithm to the robot arm can help the robot arm find the category of the object more accurately, thereby effectively improving the speed of judging the strength of the robot arm when grasping the object.
[0156] In one embodiment, before performing inter-cluster merging, parameter data and usage environment data of the robot arm are obtained as analysis data;
[0157] Determine a benchmark for cluster merging based on the analysis data and a preset analysis database;
[0158] Wherein, based on the analysis data and the preset analysis database, a benchmark for cluster merging is determined, including:
[0159] Extract features from the analysis data and build a benchmark analysis set based on the extracted feature values;
[0160] matching the benchmark analysis set with the standard set associated with each benchmark in the analysis database;
[0161] Based on the matching results, the corresponding benchmark is retrieved.
[0162] The working principle and beneficial effects of the above technical solution are:
[0163] The determination of the benchmark is the basis of the merger and is related to the accuracy of the merger. The parameter data of the robot arm include: model, moving radius, maximum grasping force, number of grasping hands, relative position relationship, etc.; environmental data include: temperature, humidity, electromagnetic interference data, sound intensity data, etc.; the feature extraction step is to extract each data and then quantize it to form a corresponding quantized value as a feature value, and arrange the feature values in a predetermined order to form a benchmark analysis set; the analysis database is analyzed and configured by professionals in advance, and the standard set and the benchmark are associated one by one in the analysis database; by matching the benchmark analysis set with the standard set, the benchmark is retrieved to adapt to different environments and the determination of the merged benchmark of the robot arm; for example, the benchmark includes a threshold and a judgment condition, such as: less than or equal to the threshold for merging. Among them, the matching of the standard set and the benchmark analysis set can be achieved by calculating the similarity between the two. The specific calculation method can use the cosine similarity calculation method.
[0164] In order to further improve the accuracy of judging the force when the robot arm grasps an object, the gravity distribution of two adjacent sides of the object can be detected by the pressure detection array;
[0165] Based on the gravity distribution, a gravity distribution matrix is constructed;
[0166] Based on the gravity distribution matrix and classification results, determine the grasping force from the preset grasping library;
[0167] Among them, based on the gravity distribution, a gravity distribution matrix is constructed, including:
[0168] Based on the edge where the two sides of the object are connected as the positioning line, the sensor data of the gravity distribution detected on the two sides are spliced, and then any direction of the positioning line is taken as the X-axis direction, and the Y-axis is determined perpendicular to the X-axis direction, and the origin is the midpoint of the positioning line;
[0169] Determine the coordinate position corresponding to each detection data;
[0170] Based on the coordinate position of the detection data corresponding to each side surface and the preset characteristic point determination rule, the characteristic point is determined;
[0171] The pressure data of the characteristic points are extracted and filled into the preset gravity distribution matrix template to form the gravity distribution matrix.
[0172] The rules for determining feature points are configured in advance by professionals; for example: the point corresponding to the coordinate position with the shortest distance to the sum of the coordinate positions corresponding to other detection data is taken as the midpoint; starting from the four perpendicular directions of the midpoint, the one with the farthest distance is taken as the reference point; the point with the shortest distance from the reference point and the midpoint is taken as the middle point; the midpoint, middle point and reference point are taken as feature points.
[0173] Among them, based on the gravity distribution matrix and classification results, the grasping force is determined from the preset grasping library, including:
[0174] Based on the classification result, a corresponding grasping force determination sub-library is determined from a preset grasping library;
[0175] The gravity distribution matrix is matched with each standard matrix in the grasping force sub-library to obtain the corresponding grasping force determination result.
[0176] Each grasping force determination sub-library is constructed corresponding to one type or one category of objects. The classification result indicates that the object has been determined. The corresponding grasping force determination sub-library can be directly called. The grasping force determination results in the grasping force determination sub-library are correspondingly associated with the standard matrix. The standard matrix is directly matched with the gravity distribution matrix to call out the grasping force determination results. The matching can be achieved by calculating the similarity of the two matrices.
[0177] This embodiment detects the gravity distribution of two adjacent sides of an object through a pressure detection array and then analyzes and determines the gravity distribution of the object, thereby improving the accuracy of judging the force when the robot arm grasps the object.
[0178] The present invention also provides a classification system for mechanical arm grasping stability based on hierarchical clustering, such as Figure 4 As shown, including:
[0179] Data conversion and embedding module 1, used to convert the data acquired by the sensor of the robot arm into graph data and perform node embedding;
[0180] Inter-cluster clustering module 2, used for performing inter-cluster clustering on graph data;
[0181] Hierarchical clustering module 3, used for performing hierarchical clustering inside each cluster after the inter-cluster clustering stratification;
[0182] Merging module 4, used for performing inter-cluster merging;
[0183] The classification module 5 is used for binary classification using a fully connected layer with sigmoid.
[0184] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A classification method for robot grip stability based on hierarchical clustering, characterized in that: include: Step S1: convert the data acquired by the sensor of the robot arm into graph data and perform node embedding; Step S2: perform inter-cluster clustering on the graph data; Step S3: Perform hierarchical clustering on the inside of each cluster after the inter-cluster clustering stratification; Step S4: perform inter-cluster merging; Step S5: Use a fully connected layer with sigmoid for binary classification.
2. The method for classifying mechanical arm grasping stability based on hierarchical clustering as claimed in claim 1, characterized in that: Step S1: converting the data acquired by the sensor of the robot arm into graph data and embedding nodes, including: Step S11: converting the data acquired by the sensor of the robot arm into graph data, wherein the graph data is represented by G = (V, E); where V = {V1, V2, ..., V N } is a node set, indicating that a set of graph data has N nodes, and E represents a set of undirected edges; Step S12: Apply a shared linear change parameterized by the weight matrix W to each node, and perform a self-attention-sharing mechanism on the node. The attention coefficient is as follows: In the formula, e ij is the attention coefficient between the i-th and j-th nodes, are the feature vectors of the i-th and j-th nodes respectively; Step S13: Use the softmax function to normalize all the choices of the jth node.
3. The method for classifying mechanical arm grasping stability based on hierarchical clustering as claimed in claim 2, characterized in that: Step S2: Perform inter-cluster clustering on the graph data, including: Given a weighted undirected graph G = (V, E) with n nodes, let A be the corresponding weighted adjacency matrix; the weight of a node to the i-th and j-th nodes is recorded as the sum of the weights of its associated edges, and the formula is as follows: oh i =∑ j∈V A ij ; The total weight of the node is: ω=∑ i∈V oh i =∑ i,j∈V A ij ; The weight of a sampling node on the i-th and j-th nodes can produce a probability distribution: When considering graph clustering, analogous to the probability distribution of node pairs, the weights induce the probability distribution of cluster pairs: The distance between two different clusters is expressed as the sampling ratio of probability; the probability distribution on the cluster is expressed as follows: Among them, p(a|b) is the conditional probability representation of a and b.
4. The method for classifying mechanical arm grasping stability based on hierarchical clustering as claimed in claim 3, characterized in that: Step S3: Perform hierarchical clustering on the inside of each cluster after the inter-cluster clustering stratification, including: Consider each cluster as a super node and design a super graph at layer t. The hyperparameter γ is as follows: Intra-cluster hierarchical clustering consists of three steps in the t-layer: bottom-up propagation, middle-layer propagation, and top-down propagation. The updated representation of the t-layer super nodes in the bottom-up propagation is as follows: in, is the t-layer supergraph G t The super nodes in s t-1 is the one in layer t-1 Nodes, It is Figure G t The l-1 layer generates The feature representation of the node, Indicates that it belongs to a super node The number of nodes in the t-1 layer; The expression of the information aggregation of the tth layer propagated by the middle layer is as follows: In the formula, is the feature representation of node u after bottom-up propagation in layer l-1, N t (v) is the set of nodes adjacent to node v at layer t, It is the aggregate node representation of v based on local neighborhood information; For the continuously updated node representation, an attention mechanism is used to adaptively learn the contribution weights of different levels in the top-down propagation process; Where α uv is the trainable normalized attention coefficient between node v and supernode u or between itself, MEAN is the element-by-element mean calculation, C(v) represents the set of supernodes of different layers of node v from {2,…,k}; The output node generation of the last layer is represented as follows: For each node in each layer, bottom-up propagation, middle-layer propagation, and top-down propagation are performed in sequence to obtain the representation vector of each node. The model is trained using a loss function based on the cross entropy method; the loss function is as follows:
5. The method for classifying mechanical arm grasping stability based on hierarchical clustering as claimed in claim 4, characterized in that: Also includes: Before performing inter-cluster merging, obtain the parameter data and usage environment data of the robot arm as analysis data; Determining a benchmark for cluster merging based on the analysis data and a preset analysis database; Wherein, determining a benchmark for cluster merging based on the analysis data and a preset analysis database includes: Extracting features from the analysis data and constructing a benchmark analysis set based on the extracted feature values; matching the benchmark analysis set with a standard set associated with each benchmark in the analysis database; Based on the matching results, the corresponding benchmark is retrieved.
6. A robotic arm grasping stability classification system based on hierarchical clustering, characterized in that: include: The data conversion and embedding module is used to convert the data acquired by the robot arm's sensors into graph data and embed nodes; Inter-cluster clustering module, used to perform inter-cluster clustering on graph data; Hierarchical clustering module, used to perform hierarchical clustering within each cluster after the inter-cluster clustering stratification; Merge module, used for inter-cluster merging; Classification module for binary classification using a fully connected layer with sigmoid.
7. The robotic arm grasping stability classification system based on hierarchical clustering as claimed in claim 6, characterized in that: The data conversion and embedding module converts the data acquired by the robot's sensors into graph data and embeds nodes, performing the following operations: The data obtained by the sensor of the robot arm is converted into graph data, where the graph data is represented by G = (V, E); where V = {V1, V2, …, V N } is a node set, indicating that a set of graph data has N nodes, and E represents a set of undirected edges; A shared linear transformation parameterized by the weight matrix W is applied to each node, and a self-attention-sharing mechanism is performed on the node, with the following attention coefficients: In the formula, e ij is the attention coefficient between the i-th and j-th nodes, are the feature vectors of the i-th and j-th nodes respectively; Use the softmax function to normalize across all choices of the j-th node.
8. The robotic arm grasping stability classification system based on hierarchical clustering as claimed in claim 7, characterized in that: The inter-cluster clustering module performs inter-cluster clustering on graph data and performs the following operations: Given a weighted undirected graph G = (V, E) with n nodes, let A be the corresponding weighted adjacency matrix; the weight of a node to the i-th and j-th nodes is recorded as the sum of the weights of its associated edges, and the formula is as follows: oh i =∑ j∈V A ij ; The total weight of the node is: ω=∑ i∈V oh i =∑ i,j∈V A ij ; The weight of a sampling node on the i-th and j-th nodes can produce a probability distribution: When considering graph clustering, analogous to the probability distribution of node pairs, the weights induce the probability distribution of cluster pairs: The distance between two different clusters is expressed as the sampling ratio of probability; the probability distribution on the cluster is expressed as follows: Among them, p(a|b) is the conditional probability representation of a and b.
9. The robotic arm grasping stability classification system based on hierarchical clustering as claimed in claim 8, characterized in that: The hierarchical clustering module performs hierarchical clustering on the inside of each cluster after the inter-cluster clustering stratification, and performs the following operations: Consider each cluster as a super node and design a super graph at layer t. The hyperparameter γ is as follows: Intra-cluster hierarchical clustering consists of three steps in the t-layer: bottom-up propagation, middle-layer propagation, and top-down propagation. The updated representation of the t-layer super nodes in the bottom-up propagation is as follows: in, is the t-layer supergraph G t The super nodes in s t-1 is the one in layer t-1 Nodes, It is Figure G t The l-1 layer generates The feature representation of the node, Indicates that it belongs to a super node The number of nodes in the t-1 layer; The expression of the information aggregation of the tth layer propagated by the middle layer is as follows: In the formula, is the feature representation of node u after bottom-up propagation in layer l-1, N t (v) is the set of nodes adjacent to node v at layer t, It is the aggregate node representation of v based on local neighborhood information; For the continuously updated node representation, an attention mechanism is used to adaptively learn the contribution weights of different levels in the top-down propagation process; Where α uv is the trainable normalized attention coefficient between node v and supernode u or between itself, MEAN is the element-by-element mean calculation, C(v) represents the set of supernodes of different layers of node v from {2,…,k}; The output node generation of the last layer is represented as follows: For each node in each layer, bottom-up propagation, middle-layer propagation, and top-down propagation are performed in sequence to obtain the representation vector of each node. The model is trained using a loss function based on the cross entropy method; the loss function is as follows:
10. The robotic arm grasping stability classification system based on hierarchical clustering as claimed in claim 9, characterized in that: Also includes: Benchmark determination module; The benchmark determination module performs the following operations: Before performing inter-cluster merging, obtain the parameter data and usage environment data of the robot arm as analysis data; Determining a benchmark for cluster merging based on the analysis data and a preset analysis database; Wherein, determining a benchmark for cluster merging based on the analysis data and a preset analysis database includes: Extracting features from the analysis data and constructing a benchmark analysis set based on the extracted feature values; matching the benchmark analysis set with a standard set associated with each benchmark in the analysis database; Based on the matching results, the corresponding benchmark is retrieved.
Citation Information
Patent Citations
Material handling method, apparatus, and system for identification of region-of-interest
CN111461107A
Traffic speed prediction method based on hierarchical clustering and hierarchical attention mechanism
CN111598325A
Multi-view clustering model implementation method based on graph contrast learning
CN117036760A
Cited By
Mechanical arm control method, device and equipment in C2F mode and medium
CN119871470A
Pipeline and instrument diagram connection relation identification method and system based on graph neural network
CN122135392A