A ship body part intelligent classification method and system based on inner and outer contour features

By using multidimensional feature vectors based on inner and outer contour features and the weighted Euclidean distance K-means algorithm, the problems of low efficiency and poor accuracy in part classification in ship manufacturing are solved, achieving intelligent classification with high precision and high consistency, which is suitable for automated classification of hull parts.

CN121904466BActive Publication Date: 2026-07-07GUANGDONG UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG UNIV OF TECH
Filing Date
2026-01-12
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In shipbuilding, existing technologies for classifying hull parts are inefficient, manual classification has poor consistency, and traditional clustering algorithms cannot effectively distinguish key features, resulting in inaccurate classification results that cannot meet the needs of refined classification.

Method used

An intelligent classification method based on inner and outer contour features is adopted to construct a multi-dimensional feature vector. The K-means clustering algorithm with weighted Euclidean distance is used, and the classification effect is evaluated by contour coefficient and CH index. A feature weight configuration mechanism is introduced to improve classification accuracy and consistency.

Benefits of technology

It achieves high-precision and high-process fit classification of ship hull parts, reduces manual intervention, improves classification efficiency and consistency, and provides a reliable data foundation for subsequent process design and production scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121904466B_ABST
    Figure CN121904466B_ABST
Patent Text Reader

Abstract

The present application relates to the emerging software technology field about processing classification, and especially relates to a hull part intelligent classification method and system based on internal and external contour features. Based on the hull part drawing, a structured part object list is generated, the internal structure features and the external contour features of the part are extracted, and a multi-dimensional feature vector set is constructed; based on the preset weight configuration of each dimension, the multi-dimensional feature vector is processed by the K-means clustering algorithm based on weighted Euclidean distance, and the clustering allocation result is output; the contour coefficient of the part is calculated, the CH index is calculated, and the classification effect is output according to the contour coefficient and the CH index. By extracting the internal and external contour features of the part, constructing the multi-dimensional feature vector, and classifying based on the K-means clustering algorithm based on weighted Euclidean distance and evaluating the classification by the contour coefficient and the CH index, high-precision and high-process-fitting-degree classification is realized, and the classification efficiency and consistency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the emerging software technology field of machining classification, and in particular to an intelligent classification method and system for ship hull parts based on internal and external contour features. Background Technology

[0002] The Part Classification Problem is a fundamental and critical preprocessing optimization problem in manufacturing systems and production management, significantly impacting subsequent production scheduling, resource allocation, and cost control. This problem is particularly prominent in the shipbuilding industry. Ships have complex structures, often consisting of tens of thousands of parts. These parts are not only numerous but also have diverse geometric profiles, such as… Figure 1 As shown, hull parts include various types such as flat plates, curved plates, irregularly shaped plates, and structural frames. Their edges often feature bevels, mitered cuts, and other processing characteristics, while their interiors may contain various holes, grooves, and other structures. However, the grinding process for hull parts directly depends on their contour features, especially during the surface treatment stage. Different contours require significantly different process parameters, processing paths, and processing times. For example, the grinding processes for curved plates and flat plates are drastically different; parts with beveled edges require specialized beveling and subsequent processing. Therefore, without accurate part classification, it is impossible to allocate appropriate process routes and resources to different categories of parts, leading to insufficient production preparation, mismatched process parameters, low processing efficiency, and even affecting the quality of the final product.

[0003] Existing technologies mainly include classification methods relying on human experience and automated methods based on traditional clustering algorithms. Manual classification is inefficient, costly, and inconsistent. Essentially, it's a "manual" process. Relying on human experience and classifying parts based on visual judgment or simple geometric parameters, it suffers from low efficiency, strong subjectivity, and susceptibility to errors. Especially when dealing with a large number of parts and subtle differences in their internal and external contours, manual classification struggles to guarantee consistency and accuracy. To address the shortcomings of manual classification, some companies and research institutions have attempted rule-based automated classification or traditional machine learning clustering algorithms, such as the classic K-means. However, these methods typically rely on only a few simple geometric parameters, such as the length, width, and area of ​​the part's bounding rectangle. They generally ignore the crucial feature of the "combined shape of internal and external contours," which determines the part's function and manufacturing process. For example, a flat plate with multiple small round holes and a flat plate of the same size with a large square hole may be identical in simple geometric parameters, but their manufacturing processes and functional uses are vastly different. Traditional methods cannot effectively distinguish between such parts, resulting in coarse classification results and low accuracy, failing to meet the demands for refined classification in actual production. Existing clustering algorithms neglect feature weights, making them difficult to apply in engineering practice: Even with the introduction of more features, classic clustering algorithms typically treat all feature dimensions as equally important. However, in the engineering context of ship hull parts, the importance of different features varies significantly. For example, the number of arcs and their size ratio are often more indicative of a part's category than its area ratio. Unweighted clustering leads to algorithms that are overly sensitive to secondary features while underreacting to key features, resulting in classification boundaries that do not align with engineering intuition and practical application requirements, leading to inaccurate classification results. Summary of the Invention

[0004] The purpose of this invention is to propose an intelligent classification method and system for ship hull parts based on internal and external contour features. By extracting the internal and external contour features of the parts, a multi-dimensional feature vector is constructed. Classification is performed based on the weighted Euclidean distance K-means clustering algorithm, and the classification is evaluated by contour coefficient and CH index. This achieves high-precision classification with high process fit, and improves classification efficiency and consistency.

[0005] To achieve this objective, the present invention adopts the following technical solution:

[0006] A method for intelligent classification of ship hull parts based on internal and external contour features includes the following steps:

[0007] S1: Based on the ship hull part drawings, generate a structured list of part objects, extract the internal structural features and external contour features of the parts, and construct a multi-dimensional feature vector set;

[0008] S2: Based on the preset weight configuration of each dimension, the multidimensional feature vector is processed by the K-means clustering algorithm based on weighted Euclidean distance, and the clustering assignment result is output.

[0009] S3: Calculate the profile coefficient of a single part. , It is cohesion. It is the separation degree; calculate the average of the profile coefficients of all parts;

[0010] Calculate the CH index k is the number of clusters, and N is the total number of parts;

[0011] S4: Output the classification results based on the silhouette coefficient and CH index.

[0012] Furthermore, step S1 includes:

[0013] S11: Read the ship hull part drawing data package to obtain a structured list of part objects. The information of each part object includes the part ID, the number of straight lines and arcs that make up the outer contour, and the coordinates, boundaries and positioning points of the internal holes.

[0014] S12: Extract the feature vector of the part from the structured part object list, including the outer contour feature, internal structure feature and complexity feature. The outer contour feature includes the size ratio of the outer rectangle of the part and the number of straight line segments and arc segments that make up the outer contour. The internal structure feature includes the total number of holes inside the part and the number of straight lines and arcs of the two largest holes. The complexity feature includes the area ratio and the number of bus segments on the outer contour.

[0015] S13: Normalize the extracted part feature vectors, and linearly map the values ​​of each feature dimension to the interval [0, 1] to obtain a set of multidimensional feature vectors.

[0016] Furthermore, in step S13, all part feature vectors obtained in step S12 are traversed, the maximum and minimum values ​​of each feature dimension are recorded, and a normalization formula is applied to each feature vector:

[0017] .

[0018] Furthermore, step S2 includes:

[0019] S21: Based on a fixed seed value, randomly select k distinct feature vectors from the multidimensional feature vector set as initial cluster centers, where k is a preset number of clusters;

[0020] S22: Traverse all multidimensional feature vectors and calculate the weighted Euclidean distance:

[0021] ;

[0022] in, It is the weight value of the j-th feature obtained from the weight configuration. It is the j-th feature of the current part. This represents the j-th feature of the k-th class, and n represents the total number of feature dimensions minus one.

[0023] The cluster center ID corresponding to the minimum distance in the obtained weighted Euclidean distance is used to add the part index to the corresponding cluster list;

[0024] S23: Traverse all clusters and obtain the part index within each cluster; if there are no parts in a cluster, retain the original cluster centers; if there are part samples, recalculate the cluster centers.

[0025] ;

[0026] S24: Check if the change in cluster centers is less than the tolerance. If yes, proceed to step S25. If no and the maximum number of iterations has not been reached, proceed to step S22. If no, but the maximum number of iterations has been reached, proceed to step S25.

[0027] S25: Output clustering results, which include the category labels corresponding to each multidimensional feature vector and the cluster centers of each cluster.

[0028] Furthermore, the weight values ​​in step S22 are preset values: weights are configured for each feature dimension in the multidimensional special vector according to process requirements, and the weight configuration range is [0, 3].

[0029] Furthermore, the method for calculating the profile coefficient of a single part in step S3 includes:

[0030] Calculate cohesion : Calculate the average weighted Euclidean distance between part i and all other parts in its cluster;

[0031] Calculate the separation degree : Calculate the minimum average weighted Euclidean distance from part i to all other parts in the cluster;

[0032] Calculate the profile coefficient of a single part. ;

[0033] Calculate the average of the profile coefficients for all parts.

[0034] Furthermore, the method for calculating the CH index in step S3 includes:

[0035] Construct a mapping relationship between cluster identifiers and feature vector lists;

[0036] Calculate inter-cluster variance: Calculate the weighted sum of squared distances from the "central representative" of each cluster to the global "overall center";

[0037] Calculate intra-cluster variance: Calculate the sum of the weighted squared distances of all parts in each cluster to its cluster center, and then sum them over all clusters;

[0038] Calculate the CH index.

[0039] Furthermore, in step S4:

[0040] When the profile coefficient is greater than 0.6 and the CH index is greater than 200, the clustering effect is good and it is suitable for process grouping.

[0041] When the silhouette coefficient is greater than 0.4 or the CH index is greater than 100, the clustering effect is generally poor, and the weights are adjusted and the classification is performed again.

[0042] When the silhouette coefficient ≤ 0.4 and the CH index ≤ 100, the clustering effect is poor, so the K-means clustering algorithm based on weighted Euclidean distance is retrained.

[0043] Accordingly, the present invention also provides an intelligent classification system for hull parts based on internal and external contour features, for implementing the above-mentioned intelligent classification method for hull parts based on internal and external contour features.

[0044] The system includes:

[0045] The preprocessing module generates a structured list of part objects based on the hull part drawings.

[0046] The feature extractor, based on a structured list of part objects, extracts the internal structural features and external contour features of the parts, and constructs a multi-dimensional feature vector set;

[0047] The weight configuration module is used to configure and store the weights for each feature dimension of the input multidimensional feature vector.

[0048] The classification module is equipped with a K-means clustering algorithm based on weighted Euclidean distance. Based on the preset weight configuration of each dimension, the K-means clustering algorithm based on weighted Euclidean distance processes the multidimensional feature vectors and outputs the clustering assignment results.

[0049] The evaluation module calculates the profile coefficient and CH index of individual parts and outputs the classification results.

[0050] Furthermore, the K-means clustering algorithm model based on weighted Euclidean distance is iteratively updated through an optimization algorithm.

[0051] The technical solution provided by this invention may include the following beneficial effects:

[0052] This solution extracts the internal and external contour features of parts to construct multi-dimensional feature vectors. The dimensions of these feature vectors can be expanded to include highly discriminative geometric features, providing a comprehensive description of the part's morphology. A feature weight configuration mechanism is introduced to differentiate the contribution of different features in classification, enhancing the discriminative power of the clustering algorithm. The entire process, from data reading, feature engineering, clustering execution to result processing, is automated. This method offers high accuracy and high process compatibility for classifying ship hull parts, reducing manual intervention and improving classification efficiency and consistency. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the shape of a ship hull part;

[0054] Figure 2 This is a flowchart illustrating the intelligent classification method for ship hull parts based on internal and external contour features of the present invention.

[0055] Figure 3 This is a flowchart of the K-means algorithm;

[0056] Figure 4 This is the interface for displaying the classification results of the traditional clustering algorithm in Experiment 1;

[0057] Figure 5 This is the interface for displaying the classification results of the algorithm of this invention in Experiment 1;

[0058] Figure 6 This is the interface for displaying the classification results of Experiment 2, Case 1;

[0059] Figure 7 This is the interface for displaying the classification results of Experiment 2, Case 3. Detailed Implementation

[0060] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0061] The classification of hull parts falls under the categories of pattern recognition and combinatorial optimization. It requires extracting key features from a large number of parts, such as size, shape, curvature, and the number of holes, and then classifying the parts into different categories or families based on these features. In the field of ship design and manufacturing, after material preparation and before welding assembly, a massive number of hull parts must be accurately classified according to "contour features + grinding process adaptability" to form part families with unified grinding process attributes. This is essential to support the standardized and efficient operation of subsequent grinding processes. This is a crucial preliminary task connecting material preparation and welding in the process of shipbuilding's transformation towards lean production and digitalization. This invention provides an automated, high-precision, and highly process-compatible method for classifying hull parts, reducing manual intervention and improving classification efficiency and consistency.

[0062] Reference Figure 2 and Figure 3The present invention provides an intelligent classification method for ship hull parts based on internal and external contour features, comprising the following steps:

[0063] S1: Based on the ship hull part drawings, generate a structured list of part objects, extract the internal structural features and external contour features of the parts, and construct a multi-dimensional feature vector set;

[0064] S2: Based on the preset weight configuration of each dimension, the multidimensional feature vector is processed by the K-means clustering algorithm based on weighted Euclidean distance, and the clustering assignment result is output.

[0065] S3: Calculate the profile coefficient of a single part. , It is cohesion. It is the separation degree; calculate the average of the profile coefficients of all parts;

[0066] Calculate the CH index k is the number of clusters, and N is the total number of parts;

[0067] S4: Output the classification results based on the silhouette coefficient and CH index.

[0068] This invention extracts the internal and external contour features of parts to construct multi-dimensional feature vectors. The dimensions of these feature vectors can be expanded to include highly discriminative geometric features, comprehensively describing the part's morphology. A feature weighting mechanism is introduced to differentiate the contribution of different features in classification, enhancing the discriminative power of the clustering algorithm. By introducing a weighted Euclidean distance metric to improve the K-means algorithm, differentiating weight coefficients for features of different dimensions, this effectively solves the problem of insufficient clustering accuracy in traditional algorithms when handling features of varying importance, significantly improving the accuracy and robustness of multi-dimensional data clustering. This enables efficient, high-precision, and engineering-logical automated classification of large-scale ship hull parts datasets. This method significantly reduces reliance on human experience, improves classification consistency and efficiency, and provides an accurate and reliable data foundation for subsequent process design, production scheduling, and supply chain management.

[0069] Specifically, step S1 includes:

[0070] S11: Read the ship hull part drawing data package to obtain a structured list of part objects. The information of each part object includes the part ID, the number of straight lines and arcs that make up the outer contour, and the coordinates, boundaries and positioning points of the internal holes.

[0071] S12: Extract the feature vector of the part from the structured part object list, including the outer contour feature, internal structure feature and complexity feature. The outer contour feature includes the size ratio of the outer rectangle of the part and the number of straight line segments and arc segments that make up the outer contour. The internal structure feature includes the total number of holes inside the part and the number of straight lines and arcs of the two largest holes. The complexity feature includes the area ratio and the number of bus segments on the outer contour.

[0072] S13: Normalize the extracted part feature vectors, and linearly map the values ​​of each feature dimension to the [0,1] interval to obtain a set of multi-dimensional feature vectors.

[0073] Through the above feature extraction, the geometry of the part is converted into a numerical vector based on its contour features and oriented towards its process.

[0074] As an example, when the method of this invention is applied, it is started through the main program, which calls a dedicated module to read the hull part data package (zip format) imported from the front end. This data package contains complete geometric information for each part, which the system parses into a structured list of part objects. Each part object encapsulates its core geometric attributes. Key input fields include part ID, the number of straight lines and arcs forming the outer contour, coordinates of internal holes, boundaries, and positioning points, etc., which are directly related to subsequent grinding and assembly processes.

[0075] In step S12, the list of part objects is traversed, and the abstract geometry of each part is converted into a set of numerical feature vectors with fixed dimensions. For example, the outer contour features include the aspect ratio of the part's circumscribed rectangle (dimension 0) to reflect the overall plate shape, the number of straight line segments constituting the outer contour (dimension 1), and the number of arc segments (dimension 2). These features directly determine whether the part's edges are straight and require straight-line grinding, or curved and require curved-surface grinding, serving as the core basis for process grouping. Internal structural features include the total number of holes inside the part (dimension 3), and the number of straight lines (dimensions 5 and 7) and arcs (dimensions 6 and 8) of the two largest holes (critical holes). The number and contour of holes are effective features for distinguishing complex parts and directly affect welding paths, assembly sequences, and material nesting schemes. The two largest holes already account for the majority of the internal machining workload, while avoiding the "curse of dimensionality." The overall complexity of the contour is indicated by the area ratio (the ratio of actual area to the area of ​​the circumscribed rectangle, dimension 4) and the number of bus segments on the outer contour (dimension 9).

[0076] Because each feature dimension has different dimensions and value ranges—for example, the size ratio ranges from 0 to 1, while the number of straight lines on the outer contour may be tens or hundreds—features with large magnitudes dominate distance calculations. Direct clustering can lead to features with large numerical ranges dominating the clustering results, masking some key process features. Therefore, all feature vectors need to be normalized (step S13), linearly mapping the value of each feature dimension to the [0, 1] interval. Standardized data allows the algorithm to fairly evaluate the contribution of various information such as contour shape and hole structure to classification, improving the stability and accuracy of clustering results.

[0077] As an example, to balance the contributions of each dimension, the min-max normalization method of the feature standardization class is invoked, traversing all feature vectors and recording the maximum and minimum values ​​of each feature dimension. In step S13, all part feature vectors obtained in step S12 are traversed, the maximum and minimum values ​​of each feature dimension are recorded, and the normalization formula for each feature vector is as follows:

[0078] .

[0079] If the maximum value of a certain dimension equals the minimum value, a small perturbation (1e-6) is added to the maximum value of this feature dimension to avoid division by zero errors. To ensure that the calculation result is within the interval [0, 1], the smaller value between 1 and the normalized value is taken first, and then compared with 0 to take the larger value. After standardization, all features are transformed to the same numerical scale. This allows subsequent clustering algorithms based on weighted Euclidean distance to equally consider various process features such as contour complexity, plate ratio, and number of holes.

[0080] In shipbuilding engineering, the clustering and classification of hull parts needs to adapt to the varying sensitivities of different contour features to the grinding process. The total number of outer contours has a far greater impact on grinding path planning than the area ratio, and whether the outer contour includes arcs directly determines whether curved surface grinding equipment is needed. Traditional K-means clustering uses equal weights to calculate distances, which fails to highlight the role of process-sensitive features and lacks engineering-based parameter verification. It is difficult to directly apply to the production environment of batch classification of hull parts and cannot distinguish the differences in the importance of different geometric features to subsequent processes. To address these issues, a k-means algorithm based on weighted Euclidean distance is proposed, building upon the traditional K-means clustering algorithm. This involves manually configuring the weights of the feature dimensions of different contour features to strengthen the impact of process-sensitive features on the clustering results. In one embodiment of this invention, step S2 includes:

[0081] S21: Based on a fixed seed value, randomly select k distinct feature vectors from the multidimensional feature vector set as initial cluster centers (centroids), where k is the preset number of clusters;

[0082] S22: Traverse all multidimensional feature vectors and calculate the weighted Euclidean distance:

[0083] ;

[0084] in, It is the weight value of the j-th feature obtained from the weight configuration. It is the j-th feature of the current part. This represents the j-th feature of the k-th class, and n represents the total number of feature dimensions minus one.

[0085] The cluster center ID corresponding to the minimum distance in the obtained weighted Euclidean distance is used to add the part index to the corresponding cluster list. This weighted Euclidean distance can reflect the differences in importance of different feature dimensions in the shipbuilding process, thereby ensuring that each part family generated by the classification results has a high degree of process consistency.

[0086] S23: Traverse all clusters and obtain the part index within each cluster; if there are no parts in a cluster, retain the original cluster centers; if there are part samples, recalculate the cluster centers.

[0087] In this step, for each feature dimension i, the average value of all parts within the cluster along that dimension is calculated as the new cluster center. This center point represents the "average manufacturing characteristics" of that type of part.

[0088] S24: Check if the change in cluster centers is less than the tolerance. If yes, proceed to step S25. If no and the maximum number of iterations has not been reached, proceed to step S22. If no, but the maximum number of iterations has been reached, proceed to step S25.

[0089] S25: Output clustering results, which include the category labels corresponding to each multidimensional feature vector and the cluster centers of each cluster.

[0090] In one embodiment of the present invention, the weight value in step S22 is a preset value: weights are configured for each feature dimension in the multidimensional special vector according to process requirements, and the weight configuration range is [0, 3].

[0091] The customizable feature weights allow this invention to align with practical shipbuilding engineering problems. In shipbuilding, different geometric features have varying degrees of impact on subsequent processes. For example, in the grinding process, whether a part's outer contour includes arcs is far more critical than its area ratio. Therefore, this invention provides a flexibly configurable weight management mechanism. Process engineers can manually adjust the weights of different feature dimensions in clustering calculations based on the actual needs of the current production stage, whether it emphasizes grinding or assembly. For example, a higher weight can be assigned to "number of arcs in the outer contour," while a lower weight can be assigned to "area ratio." This mechanism shifts the classification algorithm from purely mathematical similarity to process similarity-driven approaches. Specifically, the weight configuration in this method is based on actual needs. If the classification results are unsatisfactory, it's possible to identify which feature dimension is causing the poor classification performance and then dynamically adjust the feature weight configuration. For example, if the area ratio weight is configured as 1.2, but the part occupies a large area, resulting in it being grouped into a family whose weighted Euclidean distance is inconsistent with a certain process, reducing the area ratio weight in this case can yield better classification results.

[0092] Step S3 in this invention is to perform a quality assessment on the classification results. The purpose is to use objective quantitative indicators to verify whether the part families generated by automatic classification truly meet the engineering goal of "similar processes within the family and clear process distinctions between families", so as to ensure that the classification results can be directly used to guide production.

[0093] The silhouette score measures the compactness of a sample with its own cluster and its separation from other clusters. Specifically, the method for calculating the silhouette score of a single part in step S3 includes:

[0094] Calculate cohesion Calculate the average weighted Euclidean distance between part i and all other parts in its cluster. The smaller the distance, the more similar it is to its own family members, and the higher the process consistency of the family.

[0095] Calculate the separation degree : Calculate the minimum average weighted Euclidean distance from part i to all other parts in the cluster; the larger the distance, the less it is different from other clusters, and the clearer the process distinction between different clusters;

[0096] Calculate the profile coefficient of a single part. .

[0097] The aggregation result is the average of the profile coefficients of all parts. The distance is calculated using weighted Euclidean distance, with feature weights applied to adjust the contribution of each dimension.

[0098] The Calinski-Harabasz Index (CH Index) assesses clustering quality by the ratio of inter-cluster dispersion to intra-cluster dispersion; a higher value indicates a clearer cluster structure. Specifically, the method for calculating the CH Index in step S3 includes:

[0099] Construct a mapping relationship between cluster identifiers and a list of feature vectors, and convert the index mapping into a part object mapping (Map). <String, List <part>>), where the key is a cluster identifier in the form of "class 1-85" (1 is the cluster ID, 85 is the number of parts in the cluster), and the value is a list of specific part indexes contained in the cluster;

[0100] Calculate inter-cluster variance: Calculate the weighted sum of squared distances from the "central representative" of each cluster to the global "overall center". The larger this value is, the more obvious the differences in process characteristics between different parts families.

[0101] Calculate intra-cluster variance: Calculate the weighted sum of squared distances from all parts in each cluster to its cluster center, and then sum over all clusters. The smaller this value, the more concentrated the process characteristics of the parts within each cluster are.

[0102] Calculate the CH index.

[0103] This scheme calculates the CH index by introducing a weighted distance metric identical to that used in the clustering process. The evaluation index measures feature similarity weighted by process importance. The evaluation results are highly aligned with the classification objectives, eliminating the logical misalignment of "the algorithm classifies by process, but the evaluation is based on mathematical scoring." For example, assigning a high weight to "the number of outer contour arcs" ensures that the CH index also considers the contribution of this feature in distinguishing differences between clusters, thus ensuring that high scores necessarily correspond to clear separation of key process features.

[0104] As an example, in step S4:

[0105] When the profile coefficient is greater than 0.6 and the CH index is greater than 200, the clustering effect is good and it is suitable for process grouping.

[0106] When the silhouette coefficient is greater than 0.4 or the CH index is greater than 100, the clustering effect is generally poor, and the weights are adjusted and the classification is performed again.

[0107] When the silhouette coefficient ≤ 0.4 and the CH index ≤ 100, the clustering effect is poor, so the K-means clustering algorithm based on weighted Euclidean distance is retrained.

[0108] Accordingly, the present invention also provides an intelligent classification system for hull parts based on internal and external contour features, characterized in that it is used to implement the above-mentioned intelligent classification method for hull parts based on internal and external contour features.

[0109] The system includes:

[0110] The preprocessing module generates a structured list of part objects based on the hull part drawings.

[0111] The feature extractor, based on a structured list of part objects, extracts the internal structural features and external contour features of the parts, and constructs a multi-dimensional feature vector set;

[0112] The weight configuration module is used to configure and store the weights for each feature dimension of the input multidimensional feature vector.

[0113] The classification module is equipped with a K-means clustering algorithm based on weighted Euclidean distance. Based on the preset weight configuration of each dimension, the K-means clustering algorithm based on weighted Euclidean distance processes the multidimensional feature vectors and outputs the clustering assignment results.

[0114] The evaluation module calculates the profile coefficient and CH index of individual parts and outputs the classification results.

[0115] This system automates the entire process from data reading, feature engineering, clustering execution to result processing, and provides visualization tools, offering enterprises a classification tool that can be integrated into their production management systems.

[0116] Furthermore, the K-means clustering algorithm model based on weighted Euclidean distance is iteratively updated through an optimization algorithm.

[0117] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0118] To verify the feasibility and effectiveness of the contour feature-based strategy and the weighted k-means algorithm for classification, this invention obtained actual ship hull part data from shipbuilding companies for iterative optimization and testing. The iterative optimization algorithm was implemented in Java and compiled using Eclipse 3.7. All experiments were performed on a Windows 11 operating system with a 3.6 GHz (eight-core) Intel i7 CPU and 32GB of RAM.

[0119] The tests for this invention are Experiment 1 and Experiment 2.

[0120] Experiment 1

[0121] The test involved 1281 hull parts supplied to shipbuilding company A, designated by code 665. These parts primarily feature straight lines in their outer contours and are generally rectangular in shape. This experiment primarily investigates the individual impact of each of the 10 feature dimensions and the combined optimization effect of these dimensions. The experiment aims to identify key features and find the optimal weight configuration.

[0122] A fixed expected cluster size k=260 was set. Compared with traditional clustering algorithms, as shown in Table 1, the experimental results of this algorithm are significantly better than those of traditional clustering algorithms. Dimension 2—the number of outer contour arcs—achieved the highest contour coefficient of 0.7562 when highlighted alone, while dimension 4—the area ratio—performed the worst, indicating that the complexity of the contour shape of the hull parts is more discriminative than a simple area ratio. In some single-feature highlighting configurations, the CH index may be artificially inflated in certain cases due to abnormally increased inter-cluster distance. After comprehensive weight optimization, the average contour coefficient reached 0.8035, and the CH index increased to 489. Compared with traditional clustering algorithms, these represent improvements of 8.74% and 8.75%, respectively. Figure 4 The traditional clustering algorithm classification result display interface, Figure 5 This is the interface displaying the classification results of the algorithm of this invention. It can be seen that the classification effect of this invention is better.

[0123] Table 1

[0124]

[0125] Experiment 2

[0126] Experiment 2 validated the robustness and feasibility of the method with a larger data scale and number of clusters. The total number of parts was 2067, covering various hull components, as shown in Table 2. Compared to Case 3 and Case 2, Case 1, by combining appropriate weights, can leverage the synergistic effect between different feature dimensions, achieving a clustering effect of "1+1>2". The optimization rate was improved by up to 14%. Compared to Case 4 and Case 3, Case 5, by appropriately increasing the number of clusters and further refining the process groupings, the classification effect can also be optimized. The optimal weight configuration is highly correlated with the engineering characteristics of the hull parts; for example, high weights are assigned to contour arcs and size ratios, while low weights are assigned to area ratios, making the algorithm's decision-making process transparent and reliable. Figure 6 This is the interface displaying the Case 1 classification results. Figure 7 This is the interface displaying the Case 3 classification results, which shows that the classification effect of the present invention is better.

[0127] Table 2

[0128]

[0129] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0130] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a multimedia terminal device (which may be a mobile phone, computer, television receiver, or network device, etc.) to execute the methods described in the various embodiments of this application.< / part>

Claims

1. A method for intelligent classification of ship hull parts based on internal and external contour features, characterized in that, Includes the following steps: S1: Based on the ship hull part drawings, generate a structured list of part objects, extract the internal structural features and external contour features of the parts, and construct a multi-dimensional feature vector set; S2: Based on the preset weight configuration of each dimension, the multidimensional feature vector is processed by the K-means clustering algorithm based on weighted Euclidean distance, and the clustering assignment result is output. S3: Calculate the profile coefficient of a single part. , It is cohesion. It is the separation degree; calculate the average of the profile coefficients of all parts; Calculate the CH index k is the number of clusters, and N is the total number of parts; S4: Output the classification results based on the silhouette coefficient and CH index; Step S1 includes: S11: Read the ship hull part drawing data package to obtain a structured list of part objects. The information of each part object includes the part ID, the number of straight lines and arcs that make up the outer contour, and the coordinates, boundaries and positioning points of the internal holes. S12: Extract the feature vector of the part from the structured part object list, including the outer contour feature, internal structure feature and complexity feature. The outer contour feature includes the size ratio of the outer rectangle of the part and the number of straight line segments and arc segments that make up the outer contour. The internal structure feature includes the total number of holes inside the part and the number of straight lines and arcs of the two largest holes. The complexity feature includes the area ratio and the number of bus segments on the outer contour. S13: Normalize the extracted part feature vectors, and linearly map the values ​​of each feature dimension to the interval [0, 1] to obtain a set of multidimensional feature vectors.

2. The method according to claim 1, characterized in that, In step S13, all part feature vectors obtained in step S12 are traversed, the maximum and minimum values ​​of each feature dimension are recorded, and the normalization formula for each feature vector is as follows: 。 3. The method according to claim 1, characterized in that, Step S2 includes: S21: Based on a fixed seed value, randomly select k distinct feature vectors from the multidimensional feature vector set as initial cluster centers, where k is a preset number of clusters; S22: Traverse all multidimensional feature vectors and calculate the weighted Euclidean distance: ; in, It is the weight value of the j-th feature obtained from the weight configuration. It is the j-th feature of the current part. This represents the j-th feature of the k-th class, and n represents the total number of feature dimensions minus one. The cluster center ID corresponding to the minimum distance in the obtained weighted Euclidean distance is used to add the part index to the corresponding cluster list; S23: Traverse all clusters and obtain the part index within each cluster; if there are no parts in a cluster, retain the original cluster centers; if there are part samples, recalculate the cluster centers. ; S24: Check if the change in cluster centers is less than the tolerance. If yes, proceed to step S25. If no and the maximum number of iterations has not been reached, proceed to step S22. If no, but the maximum number of iterations has been reached, proceed to step S25. S25: Output clustering results, which include the category labels corresponding to each multidimensional feature vector and the cluster centers of each cluster.

4. The method according to claim 3, characterized in that, The weight values ​​in step S22 are preset values: weights are configured for each feature dimension in the multidimensional special vector according to process requirements, and the weight configuration range is [0, 3].

5. The method according to claim 1, characterized in that, The method for calculating the profile coefficient of a single part in step S3 includes: Calculate cohesion : Calculate the average weighted Euclidean distance between part i and all other parts in its cluster; Calculate the separation degree : Calculate the minimum average weighted Euclidean distance from part i to all other parts in the cluster; Calculate the profile factor of a single part ; Calculate the average of the profile coefficients for all parts.

6. The method according to claim 1, characterized in that, The method for calculating the CH index in step S3 includes: Construct a mapping relationship between cluster identifiers and feature vector lists; Calculate inter-cluster variance: Calculate the weighted sum of squared distances from the "central representative" of each cluster to the global "overall center"; Calculate intra-cluster variance: Calculate the sum of the weighted squared distances of all parts in each cluster to its cluster center, and then sum them over all clusters; Calculate the CH index.

7. The method according to claim 1, characterized in that, In step S4: When the profile coefficient is greater than 0.6 and the CH index is greater than 200, the clustering effect is good and it is suitable for process grouping. When the silhouette coefficient is greater than 0.4 or the CH index is greater than 100, the clustering effect is generally poor, and the weights are adjusted and the classification is performed again. When the silhouette coefficient ≤ 0.4 and the CH index ≤ 100, the clustering effect is poor, so the K-means clustering algorithm based on weighted Euclidean distance is retrained.

8. An intelligent classification system for ship hull parts based on internal and external contour features, characterized in that, Used to implement the intelligent classification method for hull parts based on internal and external contour features as described in any one of claims 1-7; The system includes: The preprocessing module generates a structured list of part objects based on the hull part drawings. The feature extractor, based on a structured list of part objects, extracts the internal structural features and external contour features of the parts, and constructs a multi-dimensional feature vector set; The weight configuration module is used to configure and store the weights for each feature dimension of the input multidimensional feature vector. The classification module is equipped with a K-means clustering algorithm based on weighted Euclidean distance. Based on the preset weight configuration of each dimension, the K-means clustering algorithm based on weighted Euclidean distance processes the multidimensional feature vectors and outputs the clustering assignment results. The evaluation module calculates the profile coefficient and CH index of individual parts and outputs the classification results.

9. The system according to claim 8, characterized in that, The K-means clustering algorithm model based on weighted Euclidean distance is iteratively updated using an optimization algorithm.