A method, system and medium for identifying features of safety holes of connectors based on Reeb graph
Through a Reeb graph-based method, the depth-first search algorithm is used to obtain the number of ring structures in the connector model. Combined with the threshold of the part category, fast and accurate safety hole feature recognition is achieved, solving the problem of pre-construction of learning datasets in the existing technology.
Patent Information
- Application Number
- CN202510673293.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-05-23
AI Technical Summary
Existing technologies require the pre-construction of large learning datasets when identifying safety hole features, making it difficult to quickly implement applications.
A Reeb graph-based method is adopted. The Reeb graph is extracted from the connector model. The number of ring structures in the Reeb graph is obtained using a depth-first search algorithm. The presence of a safety hole is determined based on the threshold value corresponding to the number of ring structures and the part category.
It achieves the rapid identification of safety hole features in connectors without building a training dataset, improving recognition efficiency and accuracy.
Smart Images

Figure CN120180954B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided design, in particular to a method, system and medium for identifying features of a safety hole of a connector based on a Reeb graph. Background Art
[0002] As a crucial safety feature in engineering design, safety holes are widely found in various mechanical, electronic, and aerospace components. They are used to secure fuses and lock bolts, preventing loosening or removal of components and ensuring product safety and stability during use. As the design and manufacturing of complex products in modern manufacturing evolve towards a highly specialized, integrated, and multifunctional approach, the efficient and accurate identification of safety holes is crucial for the structural design and assembly process planning of complex products.
[0003] Currently, the main methods for identifying safety holes are manual inspection and feature recognition. Manual inspection is prone to missed detections or misjudgments and is inefficient, while feature recognition usually uses supervised learning methods, such as supervised convolutional neural network models. This requires the pre-construction of a large learning data set to train the safety hole features, making the technology difficult to quickly implement in enterprises.
[0004] Therefore, a method for automatically identifying safety hole features is needed to solve the technical problem that the existing technology requires pre-construction of a large amount of learning data sets when identifying safety hole features, and cannot be quickly implemented and applied. Summary of the Invention
[0005] The object of the present invention is to provide a method, system and medium for identifying the features of safety holes in connectors based on Reeb graphs. The method extracts a Reeb graph from a connector model, describes the topological features of the connector model with the Reeb graph, adopts a depth-first search traversal method to obtain the number of ring structures in the Reeb graph, and finally determines whether there are safety holes in the connector model based on the number of ring structures and the ring structure threshold corresponding to the part category of the connector model. This method realizes direct identification of safety hole features in the connector model without constructing a training data set, and solves the technical problem that the existing technology requires pre-construction of a large number of learning data sets when identifying safety hole features, and cannot be quickly implemented and applied.
[0006] The present invention is achieved through the following technical solutions:
[0007] In a first aspect, the present application discloses a method for identifying features of a connector safety hole based on a Reeb graph, comprising:
[0008] First, the topological features of the target part model surface are described, and the adjacency matrix G is extracted as the Reeb graph of the target part model;
[0009] Then, the depth-first search algorithm is used to obtain the target number of ring structures in the Reeb graph. At the same time, the part category of the target part model is obtained, and the ring structure number threshold is obtained according to the part category.
[0010] Finally, based on the relationship between the number of target ring structures and the threshold of the number of ring structures, it is determined whether there is a safety hole in the target part model.
[0011] In order to better implement the present invention, further, the expression of the adjacency matrix G is ,in, =1 means the first i Hedi j There are connecting edges between the points. =0 means the first i Hedi j There is no connecting edge between the points. n is the number of vertices in the Reeb graph.
[0012] In order to better implement the present invention, further, a method for obtaining the number of target ring structures of a Reeb graph using a depth-first search algorithm includes the following steps:
[0013] Step S301: Initialize the vertex set M and a n Weibull array, where n is the number of vertices in the Reeb graph;
[0014] Step S302: Select an unvisited vertex as the starting point and add it to the vertex set. M , mark the corresponding position in the n-dimensional Boolean array as visited;
[0015] Step S303: Starting from the starting point, for each vertex in the vertex set M, check all its unvisited adjacent points, add the checked adjacent points to the vertex set M, and mark the corresponding positions in the Weibull array as visited. If the checked adjacent point is found to be already in the vertex set M, it is considered that a ring structure has been found, and the number of target ring structures is increased by one. Otherwise, it is considered that no ring structure has been found, and the number of target ring structures remains unchanged.
[0016] Step S304: When a vertex in the vertex set M has no unvisited adjacent points, remove the vertex from the vertex set M and return to execute step S302 to continue visiting other unchecked vertices in the vertex set M until all vertices have been visited to obtain the final target number of ring structures.
[0017] In order to better implement the present invention, further, before performing a depth-first search and traversal on the Reeb graph, the isolated nodes and the end nodes in the Reeb graph are first removed to determine whether there is a ring structure in the target part model. If there is a ring structure, the Reeb graph is performed with a depth-first search and traversal. If not, the part category of the target part model is determined.
[0018] In order to better implement the present invention, further, the step of removing isolated nodes and end nodes in the Reeb graph includes:
[0019] Step S201: Sum each column of the adjacency matrix G to obtain a vector L, where L=[L1, L2, . . . , L n ];
[0020] Step S202, traverse vector L, if L i =0 or L i =1, then delete the i-th vertex and all edges of the vertex in the Reeb graph, and update the adjacency matrix G, where i is greater than or equal to 1 and i is less than or equal to n;
[0021] Step S203, return to step S201 and execute until n=0 or the adjacency matrix G is no longer updated. When n=0, determine that the number of target ring structures of the target part model is 0. When the adjacency matrix G is no longer updated, perform a depth-first search traversal on the Reeb graph.
[0022] In order to better implement the present invention, further, a height function method, a feature point method or a triangle simplification method is used to extract the Reeb diagram of the target part model.
[0023] In order to better implement the present invention, it is further determined whether the format of the target part model is a triangular face format. If so, the triangle simplification method based on the Morse function is used to extract the Reeb diagram of the target part model; if not, the target part model is first preprocessed, the target part model is converted into a triangular face format, and then the triangle simplification method based on the Morse function is used to extract the Reeb diagram of the target part model.
[0024] In order to better implement the present invention, further, a vertex coordinate set P and a face set S of the target part model are obtained as input, and an adjacency matrix G is obtained as a Reeb graph of the target part model.
[0025] In order to better implement the present invention, further, according to the number of functional ring structures corresponding to the part category, a ring structure number threshold value that is greater than the number of functional ring structures is set.
[0026] In a second aspect, the present application discloses a feature recognition system for connector safety holes based on a Reeb graph, comprising:
[0027] A Reeb graph extraction module is used to describe the topological features of the surface of the target part model and extract the adjacency matrix G as the Reeb graph of the target part model;
[0028] A traversal search module is used to obtain the target number of ring structures of the Reeb graph using a depth-first search algorithm; at the same time, obtain the part category of the target part model and obtain a ring structure number threshold based on the part category;
[0029] The identification module is used to determine whether there is a safety hole in the target part model based on the relationship between the number of target ring structures and the ring structure number threshold.
[0030] In a third aspect, the present application discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for identifying features of safety holes of connectors based on Reeb graphs as described in any one of the first aspects.
[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0032] 1. This application combines the topological features of the surface of the connector part model and the part type, using the number of ring structures and part type in the Reeb diagram as the judgment basis, to achieve rapid implementation without the need for pre-constructed learning samples, and accurately identify the safety hole features of the connector;
[0033] 2. The part type structure can be set according to actual conditions, with high scalability and applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The present invention is further described in conjunction with the following drawings and embodiments, and all concepts and innovations of the present invention should be regarded as disclosed contents and the protection scope of the present invention.
[0035] Figure 1 This is a flow chart of Example 1 of the method for identifying features of safety holes of connectors based on Reeb graphs in this application.
[0036] Figure 2 This is a schematic diagram of the target part in Example 1 of the method for identifying the features of the safety hole of a connector based on the Reeb graph in this application.
[0037] Figure 3 This is a first flow chart of Example 2 of a method for identifying features of safety holes of connectors based on Reeb graphs in this application.
[0038] Figure 4 This is a second flow chart of Example 2 of the method for identifying features of safety holes of connectors based on Reeb graphs in this application.
[0039] Figure 5 This is a schematic diagram of the target part in Example 2 of the method for identifying the features of the safety hole of a connector based on the Reeb graph in this application.
[0040] Figure 6 This is a schematic diagram of an embodiment of a connector safety hole feature recognition system based on Reeb graph in this application. DETAILED DESCRIPTION
[0041] Example 1
[0042] See also Figure 1 This embodiment discloses a method for identifying features of safety holes of connectors based on Reeb graphs. First, the topological features of the surface of a target part model are described, and the adjacency matrix G is extracted as the Reeb graph of the target part model.
[0043] Then, the depth-first search algorithm is used to obtain the target number of ring structures in the Reeb graph. At the same time, the part category of the target part model is obtained, and the ring structure number threshold is obtained according to the part category.
[0044] Finally, based on the relationship between the number of target ring structures and the threshold of the number of ring structures, it is determined whether there is a safety hole in the target part model.
[0045] By adopting this embodiment, the advantage of the Reeb graph of the three-dimensional model is fully utilized in that it can not only maintain the surface topology of the three-dimensional model itself but also reduce the amount of triangular mesh data, and accurately describe the three-dimensional model of the connector to be identified, that is, the topological characteristics of the surface of the target part model; by identifying the number of ring structures in the Reeb graph, that is, the target number of ring structures, it is judged whether the connector has a hole structure. A ring structure in the Reeb graph represents a hole structure in the connector. When the number of hole structures in the connector is known through the ring structure, the connector itself is further combined with the part category of the connector itself to obtain the number of hole structures of the connector under the part category, which will result in a safety hole, that is, the ring structure number threshold. After comparison, it is possible to identify whether the connector has a safety hole.
[0046] For details, see Figure 2 The part category of the left part is a spring part. Its target ring structure number is identified as 0, and there is no hole structure. The part category of the right part is a machined part. Its target ring structure number is identified as 2, and there are two hole structures. Subsequently, the ring structure number threshold corresponding to the machined part will be further obtained. If its ring structure number threshold is 2, then at least one of the two hole structures is a safety hole.
[0047] In summary, the part categories and the corresponding ring structure quantity thresholds can be defined according to actual conditions, making this implementation method more scalable and applicable.
[0048] By adopting this embodiment, there is no need to construct learning samples in advance, and the application can be quickly implemented to accurately identify the safety hole features of the connecting parts.
[0049] Example 2
[0050] This embodiment is further optimized based on the above embodiment 1.
[0051] In this embodiment, the expression of the adjacency matrix G is ,in, =1 means there is a connecting edge between the i-th and j-th points in the Reeb graph, =0 means that there is no connecting edge between the i-th and j-th points in the Reeb graph, and n is the number of vertices in the Reeb graph.
[0052] In this embodiment, a height function method, a feature point method, or a triangle simplification method is used to extract the Reeb graph of the target part model.
[0053] In an optional embodiment, for a target part model in a triangular face format, a triangle simplification method based on a Morse function is used to extract a Reeb graph of the target part model;
[0054] In this embodiment, the height function method uses the vertex heights of the triangular mesh representation of the 3D model as a scalar function used in Reeb graph extraction. The advantages of this method are its intuitiveness and relative simplicity. It can directly use the height information of the model to construct the Reeb graph without the need for complex preprocessing steps. At the same time, the height function method can better preserve the topological structural characteristics of the model when processing 3D models with significant height differences.
[0055] The feature point method extracts the Reeb graph by first calculating the feature points of the triangular mesh representation of the 3D model. These feature points exist as key nodes in the Reeb graph. Since feature points can better reflect the shape and structural characteristics of the model, the feature point method can better obtain the feature points of all vertices represented by the triangular mesh of the 3D model, thereby ensuring that the key nodes in the Reeb graph are easier to obtain. When processing 3D models with complex shapes and structures, the topological structural features of the model can be better extracted.
[0056] The triangle simplification method can reduce the computational complexity by reducing the number of triangle meshes in the process of extracting the Reeb graph, while retaining the topological structure characteristics of the model. The advantage is that it can effectively reduce the amount of data while maintaining the topological structure of the model, thereby improving computational efficiency and reducing storage costs.
[0057] The three methods can be selected and matched according to the characteristics of the connector model to obtain better recognition accuracy.
[0058] Furthermore, it is determined whether the format of the target part model is a triangular face format. If so, the triangle simplification method based on the Morse function is used to extract the Reeb diagram of the target part model. If not, the target part model is preprocessed first, the target part model is converted into a triangular face format, and then the triangle simplification method based on the Morse function is used to extract the Reeb diagram of the target part model.
[0059] Furthermore, the vertex coordinate set P and the face set S of the target part model are obtained as input, and the adjacency matrix G is obtained as the Reeb graph of the target part model;
[0060] In this embodiment, a suitable triangle simplification method based on the Morse function is matched to a relatively common triangular face format model, which can efficiently and accurately extract the Reeb graph of the target part model.
[0061] In this embodiment, before performing a depth-first search traversal on the Reeb graph, isolated nodes and end nodes in the Reeb graph are first removed to determine whether a ring structure exists in the target part model. If a ring structure exists, a depth-first search traversal is performed on the Reeb graph. If not, the part category of the target part model is determined.
[0062] By adopting this implementation, the Reeb graph will be simplified first. In addition to being able to determine whether there is a ring structure in the target part model, it can also reduce the difficulty of subsequent traversal of the depth-first search algorithm. If there is no ring structure in the target part model itself, there is no need for further traversal search. If there is, then the simplified Reeb graph does not need to traverse the two types of non-ring nodes, namely isolated nodes and end nodes, which reduces the complexity of subsequent calculations, avoids the interference of these nodes in the ring detection process, and greatly improves the recognition efficiency. Models without ring structures will directly determine the part category in the future, and will correspond to the preset type, for example Figure 1 For the spring part on the left, there is no threshold for the number of ring structures when setting it up. After the part category is determined, it is considered to not contain a safety hole structure.
[0063] In this embodiment, according to the number of functional ring structures corresponding to the part category, a ring structure number threshold value that is greater than the number of functional ring structures is set;
[0064] Specifically, the functional ring structure is used to characterize the hole structure of the part other than the safety hole. For example, the threaded through hole on the nut part will be identified as a ring structure. In an optional embodiment, the number of functional ring structures is 1 less than the ring structure number threshold. For example, the nut part has only one functional ring structure, and the nut part ring structure number threshold is set to 2, that is, it characterizes that the nut part has a hole structure that realizes its main function and a safety hole.
[0065] Further, see Figure 3 and Figure 4 In an optional embodiment, the method for identifying features of a connector safety hole based on a Reeb graph includes the following steps:
[0066] Step S1, extracting the Reeb graph of the target part model;
[0067] Step S2: remove isolated nodes and end nodes in the Reeb graph;
[0068] Step S3: Using a depth-first search algorithm, obtain the target number of ring structures in the Reeb graph;
[0069] Step S4: determining the part category of the target part model and obtaining a ring structure quantity threshold;
[0070] Step S5: Compare the target ring structure quantity with the ring structure quantity threshold to obtain the connector safety hole feature result.
[0071] Specifically, step S1 includes:
[0072] Step S101, preprocessing the target part model, specifically determining whether the format of the target part model is a triangular face format, if so, executing step S102, if not, preprocessing the target part model first, converting the target part model into a triangular face format, and then executing step S102;
[0073] Step S102: extracting a vertex coordinate set P and a face set S;
[0074] Step S103 : Calculate the adjacency matrix G according to the vertex coordinate set P and the face set S. Specifically, take the vertex coordinate set P and the face set S as input and use the triangle simplification method based on Morse function to extract the Reeb graph of the target part model.
[0075] Specifically, step S2 includes:
[0076] Step S201: construct a feature vector representing a non-ring node, specifically by summing each column of the adjacency matrix G to obtain a vector L, where L=[L1, L2, ···, L n ];
[0077] Step S202: remove non-ring nodes according to the eigenvector, specifically traversing the vector L. If L i =0 or L i =1, then delete the i-th vertex and all edges of the vertex in the Reeb graph, and update the adjacency matrix G, where i is greater than or equal to 1 and i is less than or equal to n;
[0078] Step S203, determine whether there is a ring structure in the Reeb graph, specifically return to execute step S201 until n=0 or the adjacency matrix G is no longer updated. When n=0, determine that the number of target ring structures of the target part model is 0, execute step S4, and when the adjacency matrix G is no longer updated, execute step S3.
[0079] Specifically, step S3 includes:
[0080] Step S301, initialize a vertex set M and an n-dimensional Boolean array, where n is the number of vertices in the Reeb graph;
[0081] Step S302: Select an unvisited vertex as a starting point and add the vertex to the vertex set M, and mark the corresponding position in the n-dimensional Boolean array as visited;
[0082] Step S303: Starting from the starting point, for each vertex in the vertex set M, check all its unvisited adjacent points, add the checked adjacent points to the vertex set M, and mark the corresponding positions in the Weibull array as visited. If the checked adjacent point is found to be already in the vertex set M, it is considered that a ring structure has been found, and the number of target ring structures is increased by one. Otherwise, it is considered that no ring structure has been found, and the number of target ring structures remains unchanged.
[0083] Step S304: When a vertex in the vertex set M has no unvisited adjacent points, remove the vertex from the vertex set M and return to step S302 to continue visiting other unchecked vertices in the vertex set M until all vertices have been visited, thereby obtaining the final target number of ring structures.
[0084] By adopting this embodiment, the target part model with a ring structure is searched using a depth-first search algorithm to accurately obtain the number of target ring structures. Since the adjacency matrix G here is simplified and updated, it has a higher recognition efficiency during recognition.
[0085] Specifically, in this example, in step S4, the part categories of the target part model include spring parts, machined parts, bolt parts, nut parts, and straight pipe joint parts. The ring structure quantity threshold for nut parts and straight pipe joint parts is 2, and the ring structure quantity threshold for machined parts and bolt parts is 1. Spring parts are directly identified as having no safety holes.
[0086] See also Figure 5 The target ring structure number of the left nut part is 3, which is greater than the ring structure number threshold of 2. Therefore, the recognition result is that there is a safety hole. The target ring structure number of the left nut part is 1, which is less than the ring structure number threshold of 2. Therefore, the recognition result is that there is no safety hole.
[0087] Example 3:
[0088] See also Figure 6 This embodiment discloses a feature recognition system for connector safety holes based on Reeb graphs, including:
[0089] A Reeb graph extraction module is used to describe the topological features of the surface of the target part model and extract the adjacency matrix G as the Reeb graph of the target part model;
[0090] A traversal search module is used to obtain the target number of ring structures of the Reeb graph using a depth-first search algorithm; at the same time, obtain the part category of the target part model and obtain a ring structure number threshold based on the part category;
[0091] The identification module is used to determine whether there is a safety hole in the target part model based on the relationship between the number of target ring structures and the ring structure number threshold.
[0092] Example 4:
[0093] This embodiment discloses a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for identifying features of a safety hole of a connector based on a Reeb graph is implemented.
[0094] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention falls within the scope of protection of the present invention.
Claims
1. A method for identifying features of safety holes of connectors based on Reeb graphs, characterized by: First, the topological features of the target part model surface are described, and the adjacency matrix G is extracted as the Reeb graph of the target part model; Then, the depth-first search algorithm is used to obtain the target number of ring structures in the Reeb graph. At the same time, the part category of the target part model is obtained, and the ring structure number threshold is obtained according to the part category. Finally, based on the relationship between the number of target ring structures and the threshold of the number of ring structures, it is determined whether there is a safety hole in the target part model; Before performing a depth-first search traversal on the Reeb graph, isolated nodes and end nodes in the Reeb graph are first removed to determine whether there is a ring structure in the target part model. If there is a ring structure, a depth-first search traversal is performed on the Reeb graph. If not, the part category of the target part model is determined. The steps to remove isolated nodes and end nodes in the Reeb graph include: Step S201: Sum each column of the adjacency matrix G to obtain a vector L, where L=[L1, L2, . . . , L n ]; Step S202, traverse vector L, if L i =0 or L i =1, then delete the i-th vertex and all edges of the vertex in the Reeb graph, and update the adjacency matrix G, where i is greater than or equal to 1 and i is less than or equal to n; Step S203, return to step S201 and execute until n=0 or the adjacency matrix G is no longer updated. When n=0, determine that the number of target ring structures of the target part model is 0. When the adjacency matrix G is no longer updated, perform a depth-first search traversal on the Reeb graph.
2. The method for identifying features of connector safety holes based on Reeb graphs according to claim 1, characterized in that: The expression of the adjacency matrix G is ,in, =1 means the first i Hedi j There are connecting edges between the points. =0 means the first i Hedi j There is no connecting edge between the points. n is the number of vertices in the Reeb graph.
3. The method for identifying features of connector safety holes based on Reeb graph according to claim 1, characterized in that: The method for obtaining the target number of ring structures of a Reeb graph using a depth-first search algorithm includes the following steps: Step S301: Initialize a vertex set M and a n Weibull array, where n is the number of vertices in the Reeb graph; Step S302: Select an unvisited vertex as the starting point and add it to the vertex set. M , mark the corresponding position in the n-dimensional Boolean array as visited; Step S303: Starting from the starting point, for each vertex in the vertex set M, check all its unvisited adjacent points, add the checked adjacent points to the vertex set M, and mark the corresponding positions in the Weibull array as visited. If the checked adjacent point is found to be already in the vertex set M, it is considered that a ring structure has been found, and the number of target ring structures is increased by one. Otherwise, it is considered that no ring structure has been found, and the number of target ring structures remains unchanged. Step S304: When a vertex in the vertex set M has no unvisited adjacent points, remove the vertex from the vertex set M and return to execute step S302 to continue visiting other unchecked vertices in the vertex set M until all vertices have been visited to obtain the final target number of ring structures.
4. The method for identifying features of connector safety holes based on Reeb graphs according to claim 1, wherein: The Reeb diagram of the target part model is extracted using the height function method, feature point method or triangle simplification method.
5. The method for identifying features of connector safety holes based on Reeb graphs according to claim 4, characterized in that: Determine whether the format of the target part model is a triangular face format. If so, use the triangle simplification method based on the Morse function to extract the Reeb diagram of the target part model; otherwise, preprocess the target part model first, convert the target part model into a triangular face format, and then use the triangle simplification method based on the Morse function to extract the Reeb diagram of the target part model.
6. The method for identifying features of connector safety holes based on Reeb graphs according to claim 5, characterized in that: The vertex coordinate set P and the face set S of the target part model are obtained as input, and the adjacency matrix G is obtained as the Reeb graph of the target part model.
7. The method for identifying features of connector safety holes based on Reeb graphs according to claim 1, characterized in that: According to the number of functional ring structures corresponding to the part category, a ring structure number threshold value that is greater than the number of functional ring structures is set.
8. A system for identifying features of safety holes of connectors based on Reeb graphs, for implementing the method for identifying features of safety holes of connectors based on Reeb graphs according to any one of claims 1 to 7, characterized in that: include: A Reeb graph extraction module is used to describe the topological features of the surface of the target part model and extract the adjacency matrix G as the Reeb graph of the target part model; A traversal search module is used to obtain the target number of ring structures of the Reeb graph using a depth-first search algorithm; at the same time, obtain the part category of the target part model and obtain a ring structure number threshold based on the part category; The identification module is used to determine whether there is a safety hole in the target part model based on the relationship between the number of target ring structures and the ring structure number threshold.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for identifying features of safety holes of connectors based on Reeb graphs as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Three-dimensional topological information extraction method based on Reeb graph description
CN103400372A
Multi-scale segmentation and partial matching 3D models
US20080215510A1