Intelligent classification method and system for ship body parts
Patent Information
- Application Number
- CN202610928631.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]现有技术在对船体零件进行聚类时,通常依赖人工经验预设聚类数K值,且未能结合数据分布自适应地确定最优聚类数,严重影响最终聚类中心的精准性,此外,船体零件中存在大量平行但法向量相反的平面,现有技术在特征提取与处理时,缺乏法向量方向一致性对齐机制及目标特征矩阵的构建过程,导致方向相反的同类零件在特征空间中被误判为差异巨大的两类,影响了最终聚类中心的精准性,导致了智能分类结果的精准性的精准性较低
(1)获取船体零件的特征向量,对船体零件的特征向量进行归一化处理,并结合法向量方向一致性原则触发对应的对齐,以输出对齐后的特征向量,并构建对应的目标特征矩阵;对目标特征矩阵进行聚类处理,并在聚类过程中确定对应的最优聚类数,沿着该最优聚类数进行多级迭代,从而在迭代过程中确定每次迭代产生的聚类中心偏移量均值,进而输出最终聚类中心,引入了目标特征矩阵,对最优聚类数进一步把控,提高了最终聚类中心的精准性。
Smart Images

Figure CN122818006A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of intelligent classification, and in particular to an intelligent classification method and system for ship hull parts. Background Technology
[0002] With the continuous development of ship digital design and intelligent manufacturing technologies, the number of parts in a ship 3D model usually reaches hundreds of thousands. In the ship production design stage, it is necessary to quickly and accurately classify the massive number of hull parts and assign them process attributes, which is the basis for subsequent nesting, processing and assembly.
[0003] Existing technologies for clustering ship hull parts typically rely on human experience to pre-determine the number of clusters K, and fail to adaptively determine the optimal number of clusters based on data distribution. This severely affects the accuracy of the final cluster centers. Furthermore, there are many parallel planes with opposite normal vectors in ship hull parts. Existing technologies lack a mechanism for aligning normal vector directions and a process for constructing the target feature matrix during feature extraction and processing. This leads to similar parts with opposite directions being misclassified as two vastly different classes in the feature space, affecting the accuracy of the final cluster centers and resulting in low accuracy of the intelligent classification results. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides an intelligent classification method and system for ship hull parts.
[0005] This invention provides an intelligent classification method for ship hull parts, including: The feature vectors of the hull parts are obtained, the feature vectors of the hull parts are normalized, and the alignment is triggered in combination with the principle of consistency of normal vector direction to output the aligned feature vectors and construct the corresponding target feature matrix. The target feature matrix is clustered, and the optimal number of clusters is determined during the clustering process. Multi-level iterations are performed along the optimal number of clusters to determine the average cluster center offset generated in each iteration, and then the final cluster centers are output. Multi-threaded parallel processing is performed based on the final cluster center, and cluster allocation is further triggered to filter out the corresponding candidate abnormal parts during the allocation process. The secondary verification of the candidate abnormal parts is further triggered in combination with the ship design specifications to determine the corresponding intelligent classification result. The cluster affiliation label of each part in the intelligent classification results is marked, and a structured data file is generated by combining the corresponding abnormal part alarm information. The structured data file is then mapped to generate a 3D shading script, which is executed in the form of a plug-in to complete the entire closed loop with one click, and is also available for integration and calling by the upper-level platform.
[0006] This invention provides an intelligent classification system for ship hull parts, which is applied to the aforementioned intelligent classification method for ship hull parts; the intelligent classification system for ship hull parts includes: The target feature matrix module is used to obtain the feature vectors of the hull parts, normalize the feature vectors of the hull parts, and trigger the corresponding alignment in combination with the principle of consistency of normal vector direction to output the aligned feature vectors and construct the corresponding target feature matrix. The cluster center module is used to perform clustering processing on the target feature matrix, determine the corresponding optimal number of clusters during the clustering process, perform multi-level iterations along the optimal number of clusters, thereby determining the average value of the cluster center offset generated in each iteration, and finally outputting the final cluster centers. The intelligent classification module is used to perform multi-threaded parallel processing based on the final cluster center and further trigger cluster allocation, thereby filtering out the corresponding candidate abnormal parts during the allocation process. It further combines the ship design specifications to trigger a secondary verification of the candidate abnormal parts to determine the corresponding intelligent classification result. The closed-loop module is used to mark the cluster affiliation labels of each part in the intelligent classification results, and generate a structured data file by combining the corresponding abnormal part alarm information. The structured data file is then mapped to generate a 3D coloring script, which can be executed in the form of a plug-in to complete the entire closed-loop process with one click, and can also be integrated and called by the upper-level platform.
[0007] Compared with the prior art, the beneficial effects of the present invention are: (1) Obtain the feature vectors of the hull parts, normalize the feature vectors of the hull parts, and trigger the corresponding alignment in combination with the principle of consistency of normal vector direction to output the aligned feature vectors and construct the corresponding target feature matrix; perform clustering on the target feature matrix, and determine the corresponding optimal number of clusters in the clustering process, and perform multi-level iterations along the optimal number of clusters, so as to determine the average value of the cluster center offset generated in each iteration in the iteration process, and then output the final cluster center. The target feature matrix is introduced to further control the optimal number of clusters and improve the accuracy of the final cluster center.
[0008] (2) Based on the final cluster center, multi-threaded parallel processing is performed, and cluster allocation is further triggered. In the allocation process, the corresponding candidate abnormal parts are selected. The secondary verification of the candidate abnormal parts is further triggered in combination with the ship design specifications to determine the corresponding intelligent classification result. The candidate abnormal parts are further controlled, and the secondary verification of the candidate abnormal parts is fully considered, which improves the accuracy of the intelligent classification result.
[0009] (3) Mark the cluster affiliation label of each part in the intelligent classification result, and generate a structured data file by combining the corresponding abnormal part alarm information. Map the structured data file to generate a three-dimensional coloring script, execute the whole process closed loop with one click in the form of a plug-in, and provide it for integration and call by the upper-level platform. This further controls the structured data file and improves the accuracy of the three-dimensional coloring script. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating the intelligent classification method for ship hull parts in an embodiment of the present invention. Figure 2 This is a flowchart illustrating step S11 in the intelligent classification method for ship hull parts in an embodiment of the present invention. Figure 3 This is a flowchart illustrating step S12 in the intelligent classification method for ship hull parts in an embodiment of the present invention. Figure 4 This is a flowchart illustrating step S13 in the intelligent classification method for ship hull parts in an embodiment of the present invention. Figure 5 This is a flowchart illustrating step S14 in the intelligent classification method for hull parts in an embodiment of the present invention. Figure 6 This is a schematic diagram of the structural composition of the intelligent classification system for ship hull parts in an embodiment of the present invention. Detailed Implementation
[0011] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0012] Please see Figures 1 to 6 A smart classification method for ship hull parts, applied to smart classification scenarios; the smart classification method for ship hull parts includes: Step S11: Obtain the feature vectors of the hull parts, normalize the feature vectors of the hull parts, and trigger the corresponding alignment in combination with the principle of consistency of normal vector direction to output the aligned feature vectors and construct the corresponding target feature matrix. Step S12: Perform clustering on the target feature matrix and determine the optimal number of clusters during the clustering process. Perform multi-level iterations along the optimal number of clusters to determine the average cluster center offset generated in each iteration, and then output the final cluster centers. Step S13: Perform multi-threaded parallel processing based on the final cluster center, and further trigger cluster allocation to filter out the corresponding candidate abnormal parts during the allocation process. Further combine the ship design specifications to trigger the secondary verification of the candidate abnormal parts to determine the corresponding intelligent classification result. Step S14: Mark the cluster affiliation label of each part in the intelligent classification result, and generate a structured data file by combining the corresponding abnormal part alarm information. Map the structured data file to generate a 3D shading script, execute the entire closed loop with one click in the form of a plugin, and provide it for integration and call by the upper-level platform.
[0013] refer to Figure 2 In step S11, the specific steps are as follows: S111: Collect feature vectors of ship hull parts in batches through the communication interface. These feature vectors cover geometric shape and process attributes. Based on the identification of these feature vectors, determine the corresponding continuous variables, normalize these continuous variables, and determine the direction deflection angle in the feature space in combination with the principle of consistency of normal vector direction. S112: If the direction deflection angle exceeds the preset deflection angle threshold, the coordinate system transformation and alignment will be automatically triggered to output the aligned feature vector. The aligned feature vectors will be spliced and fused to output the target feature vector. Multiple principal components will be determined based on the iteration of the target feature vector, and a corresponding target feature matrix will be formed.
[0014] In the embodiments of this application, feature vectors of ship hull parts are collected in batches through a communication interface. These feature vectors cover geometric shape and process attributes. Based on the identification of these feature vectors, corresponding continuous variables are determined. These continuous variables are normalized, and the direction deflection angle in the feature space is determined in combination with the principle of consistency of normal vector direction. Thus, the direction deflection angle is introduced.
[0015] At this point, the geometric shape and process attribute feature vectors of the hull parts are extracted from the 3D model database in a batch traversal manner. These feature vectors are constructed into a multi-dimensional feature space, in which the geometric shape dimension includes area, perimeter, center coordinates and number of holes / edges, etc., and the process attribute dimension includes parameters such as unit normal vector components and plate thickness, thus forming the original high-dimensional vector that represents the panoramic features of the parts.
[0016] Discrete variables are stripped and continuous variables, such as area, perimeter, and plate thickness, are extracted. For the determined continuous variables, Z-score standardization is used to map each continuous feature to the interval [-1,1] to eliminate the differences between different physical dimensions and numerical magnitudes, and to ensure that each continuous variable has an equivalent weight contribution in the subsequent distance metric calculation.
[0017] Spatial orientation analysis is performed based on the principle of normal vector direction consistency. At this time, the normal vector direction consistency alignment mechanism is implemented in the following way: The system automatically extracts the unit normal vector component according to the geometric characteristics of the hull part, and uses the "predefined global reference direction in the ship design coordinate system, such as the positive direction pointing from the outside of the hull to the outside of the hull" as the reference normal vector. The system calculates the spatial angle between the normal vector of the part to be processed and the reference normal vector, and defines the angle as the direction deflection angle. If the direction deflection angle is greater than the preset deflection angle threshold, which is preferably 90 degrees in this embodiment, it is determined that the normal vector of the current part is in the opposite direction or deflected by a large amount.
[0018] At this point, the system automatically triggers a coordinate system transformation and alignment operation. Specifically, it inverts each component of the normal vector of the part, multiplying its value by -1 to forcibly flip its orientation to the half-space where the reference normal vector is located. For other geometric attributes, such as area, perimeter, and plate thickness, this inversion operation does not affect their values, so no additional processing is required. If the orientation deflection angle is less than or equal to 90 degrees, the original feature vector remains unchanged. After completing the above alignment, the system outputs aligned feature vectors with consistent orientations, ensuring that similar parts with opposite normal vectors due to different modeling orientations have a unified expression direction in the feature space, thereby avoiding misclassification as different categories during subsequent clustering.
[0019] Specifically, in the intelligent classification scenario of ship hull parts, assuming that feature processing is needed for outer plating parts and T-shaped frame parts in the ship hull: the system collects the feature vectors of the outer plating and T-shaped frame parts in batches through the communication interface of the CAD software; for the outer plating parts, the system collects their "geometric shape: such as area = 25m²". 2 "Circumference = 20m, Number of curved edges = 2" and "Process attributes: such as unit normal vector = (0,0,1), plate thickness = 12mm"; Similarly, collect the corresponding multi-dimensional features of the T-shaped aggregate to form the original high-dimensional feature vector input of the hull parts.
[0020] The system identifies the area, perimeter, and thickness of the outer panel as continuous variables in the feature vector and performs Z-score normalization on them; for example, the area of the outer panel is 25m². 2 The mean and standard deviation of the whole hull parts dataset, such as plate thickness 12mm, are mapped to transform them into dimensionless standardized values in the interval [-1,1].
[0021] The system performs directional analysis on the process attribute feature of the outer plate—the unit normal vector (0,0,1). Assuming that the reference normal vector of the outer plate is preset to (0,0,1), the system calculates the spatial angle between the current outer plate normal vector and the reference normal vector, i.e., the directional deflection angle, and the calculation result is 0°. For another symmetrical outer plate with a normal vector of (0,0,-1) due to inconsistent modeling coordinate systems, the system calculates its directional deflection angle with the reference normal vector to be 180°. Thus, the system accurately determines the directional deflection angle of the normal vectors of each hull part in the feature space, providing an accurate data basis for subsequent judgment on whether the deflection angle exceeds the "threshold: such as >90°" and triggers the alignment operation.
[0022] Furthermore, if the direction deflection angle exceeds the preset deflection angle threshold, the coordinate system transformation and alignment are automatically triggered to output the aligned feature vector. The aligned feature vectors are then spliced and fused to output the target feature vector. Multiple principal components are determined based on the iteration of the target feature vector, and a corresponding target feature matrix is formed, which fully considers the target feature matrix.
[0023] If the directional deflection angle exceeds the preset threshold, it is determined that the normal vector of the part is deflected in the opposite direction or at a large angle to the reference direction. The system then automatically triggers the coordinate system transformation alignment mechanism. At this time, by performing a reverse inversion operation on the normal vector component of the part or performing a spatial rotation matrix transformation, its normal vector is forcibly flipped and mapped to the half space where the reference direction is located, thereby ensuring the consistency of spatial plane feature expression and avoiding feature vector direction divergence caused by different coordinate system definitions or modeling orientation differences, and thus outputting aligned feature vectors with unified direction.
[0024] The vector dimension of the continuous geometric morphology variables and process attribute variables that have been normalized is spliced and fused together. This splicing and fusion process is based on the preset feature dimension arrangement order, and the discrete heterogeneous feature parameters are reorganized into target feature vectors in a high-dimensional unified vector space. This achieves deep coupling and panoramic representation of the multi-dimensional feature information of the parts, and provides a complete data input foundation for subsequent dimensionality reduction and clustering analysis.
[0025] Principal component analysis is used to reduce the dimensionality and reconstruct the feature space. At this time, the covariance matrix of the target feature vector is calculated, and the eigenvalues and eigenvectors are solved. The system sorts and iteratively accumulates the eigenvalues in descending order until the cumulative variance contribution rate is greater than or equal to the preset variance retention threshold, such as 95%. Based on this, multiple principal components that meet the variance constraint are determined, redundant and noisy dimensions are filtered out, and the original target feature vector is projected into a low-dimensional orthogonal feature space spanned by these multiple principal components. Finally, a target feature matrix with reduced dimensionality and retention of core variation information is constructed.
[0026] Specifically, since 180° exceeds the preset deflection angle threshold of 90°, the system automatically triggers the coordinate system transformation alignment mechanism, inverting each component of the normal vector of the outer plate part to make it (0,0,1), thus aligning it with the reference direction; while for the T-shaped frame part, if its normal vector direction deflection angle is 0°, which does not exceed the threshold, the original feature vector remains unchanged; thus, the system outputs a unified feature vector after alignment of the outer plate and the T-shaped frame.
[0027] The system concatenates and fuses the aligned normal vector features with the normalized continuous variables. For example, for the aforementioned outer panel parts, its normalized continuous variables such as area, perimeter, and thickness are concatenated with the aligned normal vector (0,0,1) in sequence to construct a high-dimensional target feature vector such as [normalized area, normalized perimeter, normalized thickness, 0,0,1]. Similarly, the same concatenation and fusion process is performed on the T-shaped frame parts to form their corresponding target feature vectors.
[0028] The system performs principal component analysis iteratively on the set of all target feature vectors, including the outer plate and T-shaped ribs. Assuming that after solving the covariance matrix, the cumulative variance contribution rate of the first three principal components has reached 96%, which meets the preset threshold of ≥95%, the system determines that the number of principal components is 3, and projects the original high-dimensional target feature vectors into this 3-dimensional orthogonal space, removes redundant dimensions, and finally forms a target feature matrix composed of the core features of the outer plate and T-shaped ribs.
[0029] refer to Figure 3 In step S12, the specific steps are as follows: S121: Initialize the target feature matrix, mark the corresponding initial center point, and trigger the clustering process of the target feature moments in combination with the clustering mechanism to determine the corresponding rate of change; if the rate of change decays below the preset rate of change threshold, adaptively determine the corresponding optimal number of clusters and start multi-level iterations along the optimal number of clusters; S122: In each iteration, the Euclidean distance from all samples to the current cluster center is calculated synchronously, and the cluster affiliation is redistributed according to the principle of minimizing distance, thereby marking the average cluster center offset generated in this iteration; the average cluster center offset is compared with the preset convergence threshold. If the average cluster center offset is less than the convergence threshold, the iteration is terminated early, and the globally optimal final cluster center is output. In the embodiments of this application, the target feature matrix is initialized, the corresponding initialization center point is marked, and the clustering process of the target feature moments is triggered by the clustering mechanism to determine the corresponding rate of change. If the rate of change decays below the preset rate of change threshold, the corresponding optimal number of clusters is adaptively determined, and multi-level iteration is started along the optimal number of clusters, thus introducing the optimal number of clusters.
[0030] At this point, the system uses an improved K-means++ algorithm to initialize the sampling of data points in the target feature matrix. This improved K-means++ algorithm selects data points that are far apart as candidate centroids based on the probability distribution of the distance between data points, thereby marking the initial set of cluster centroids. This mechanism avoids the phenomenon of centroid clustering that may be caused by traditional random initialization from a mathematical perspective, effectively reducing the risk of the clustering algorithm getting stuck in local optima, and laying the foundation for subsequent fast convergence and global optimization.
[0031] The system combines unsupervised clustering mechanism to perform exploratory clustering of the target feature matrix and dynamically monitors the rate of change of clustering error. Within a preset clustering number search interval, the system gradually increases the number of clusters K and calculates the clustering objective function value corresponding to each K value, i.e., the sum of squared distances from the sample to its cluster center. The system calculates the error reduction rate ΔE between adjacent K values. When the error reduction rate ΔE decays to below the preset rate of change threshold ε, it indicates that increasing the number of clusters can no longer significantly improve the cluster cohesion. At this time, the system adaptively determines the current K value as the optimal number of clusters. This strategy essentially combines the mathematical logic of the elbow method and realizes a closed loop from heuristic exploration to adaptive determination of the number of clusters.
[0032] Optionally, the system sets a cluster number search interval. The lower limit of this interval is fixed at 2, and the upper limit is adaptively determined according to the total number of hull parts. Specifically, the value is the square root of the number of parts and rounded down, but the maximum value does not exceed 20 to avoid excessive computational overhead.
[0033] Starting from the lower limit, the system sequentially selects each integer value as a candidate cluster number and performs clustering processing based on improved K-means++ initialization on the target feature matrix. After each clustering, the corresponding sum of squared errors is calculated, which is the cumulative sum of the squared distances from all sample points to their respective cluster centers. Once the sum of squared errors corresponding to two adjacent candidate cluster numbers is determined, the system calculates the error reduction rate. The formula for this reduction rate is: the sum of squared errors corresponding to the previous cluster number minus the sum of squared errors corresponding to the current cluster number, and then dividing the difference by the sum of squared errors corresponding to the previous cluster number.
[0034] The system pre-sets a rate of change threshold; in this embodiment, the threshold is preferably 0.05, or five percent. The system sequentially compares the error reduction rate calculated for each candidate cluster with this threshold. When the error reduction rate is lower than the threshold twice consecutively, the system determines that further increasing the number of clusters will not significantly improve cluster cohesion. At this point, the current number of candidate clusters is determined and output as the optimal number of clusters. If no such situation occurs twice consecutively within the entire search interval, the system defaults to using the upper limit of the number of clusters as the optimal number of clusters.
[0035] To avoid fluctuations in decision-making caused by the randomness of the initial K-means centers, the system performs clustering calculations three times for each candidate cluster number, and takes the median of the sum of squared errors from the three calculations as the representative error value for that cluster number, thereby enhancing the robustness of the adaptive determination. Through this method, the system can automatically adapt to the inherent distribution structure of different ship hull part datasets without requiring manual pre-setting of the number of clusters.
[0036] Furthermore, based on the adaptively determined optimal number of clusters, the system formally initiates a multi-level iterative update mechanism for cluster centers along this optimal number of clusters. In each iteration, the system calculates the minimum distance from each data point in the target feature matrix to the current cluster center, reallocates the data points to the nearest cluster, and updates the position of the cluster center by calculating the mean vector of all data points in the same cluster. This multi-level iterative process is executed repeatedly until the mean offset of the cluster center position is less than the preset convergence threshold or the maximum number of iterations is reached, thereby ensuring that the clustering model reaches a stable convergence state.
[0037] Specifically, since outer panel parts are typically characterized by large area, thin plate thickness, and normal vectors concentrated in a certain axis, while T-shaped ribs are characterized by small area and a combination of web and face plates, the system uses the K-means++ algorithm. Based on the Euclidean distance probability distribution in the feature space, it prioritizes selecting a distant outer panel feature point and a T-shaped rib feature point as initial cluster centers for labeling. This operation avoids the two initial center points falling on "same type of parts: such as both falling on the outer panel", ensuring the rationality of the initial division.
[0038] The system adaptively optimizes the number of clusters K for the target feature matrix containing the outer plate and T-shaped ribs. The system assumes the number of clusters K = 2, 3, 4, ... and calculates the corresponding clustering error. It is assumed that when K increases from 2 to 3, the error reduction rate ΔE1 is significant due to the size difference between the outer plate and the T-shaped ribs. However, when K increases from 3 to 4, the newly added clusters are only over-segmented within the T-shaped ribs. At this time, the calculated error reduction rate ΔE2 decreases sharply and is lower than the preset rate of change threshold ε, for example, ε = 0.05. Based on this, the system determines that the benefit of continuing to increase the number of clusters is minimal, and thus adaptively determines the optimal number of clusters to be 3, for example, dividing them into three categories: "large outer plate", "small outer plate" and "T-shaped ribs".
[0039] The system locks the optimal number of clusters K=3 and initiates multi-level iterations for the target feature matrices of the outer plate and T-shaped ribs. In the first iteration, the system calculates the Euclidean distance from each part feature point to the three initial centers and assigns all outer plates and ribs to the nearest cluster. The mean of the feature vectors of all parts in each cluster is calculated, and the cluster center is moved to the position of the mean. After multiple iterations, the cluster centers continuously approach the real data-dense areas. For example, a certain center point stably converges to the high-density area of the large outer plate features. When the mean of the cluster center offset generated by two adjacent iterations is less than 0.01, the multi-level iteration terminates. At this time, the boundary between the outer plate and the T-shaped ribs is accurately defined, and a stable set of cluster centers is output.
[0040] Furthermore, in each iteration, the Euclidean distance from all samples to the current cluster center is calculated synchronously, and the cluster affiliation is redistributed according to the principle of minimizing distance, thereby marking the mean of the cluster center offset generated in this iteration; the mean of the cluster center offset is compared with the preset convergence threshold. If the mean of the cluster center offset is less than the convergence threshold, the iteration is terminated early, and the globally optimal final cluster center is output. The target feature matrix is introduced to further control the optimal number of clusters and improve the accuracy of the final cluster center.
[0041] At this point, during each iteration, the system synchronously calculates the Euclidean distance from all sample points in the target feature matrix to each current cluster center. Based on the principle of minimizing distance, the system reassigns each sample point to the cluster containing the cluster center with the smallest Euclidean distance, thereby completing the dynamic update of cluster affiliation. This process ensures that in the current iteration cycle, each sample is assigned to the closest clustering domain in the feature space, so that the intra-cluster aggregation degree reaches the current optimal level.
[0042] Based on the newly assigned cluster affiliation, the system calculates the mean coordinates of the feature vectors of all samples within each cluster and uses them as the updated cluster centers. The system calculates the spatial distance between the updated cluster centers and the previous generation cluster centers to obtain the cluster center offset generated in this iteration. Furthermore, it calculates the arithmetic mean of the offsets of all cluster centers and marks it as the mean offset of the cluster centers in this iteration. This mean parameter serves as the core indicator for evaluating the convergence state of the clustering model and reflects the overall displacement trend of the cluster centers in the feature space.
[0043] The system compares the average offset of the labeled cluster centers with a preset convergence threshold. If the average offset is greater than or equal to the convergence threshold, it indicates that the cluster centers are still undergoing significant migration in the feature space, the model has not yet converged, and the next iteration is required. If the average offset is less than the convergence threshold, it indicates that the displacement of the cluster centers has become weak and the objective function has approached the extreme point. Based on this, the system triggers an early stopping mechanism to terminate the iteration loop in advance and outputs the cluster centers in the current state as the global optimal final cluster centers, thereby effectively avoiding meaningless redundant calculations and improving the algorithm's convergence efficiency.
[0044] Optionally, after each iteration, the system obtains the spatial coordinates of each cluster center before the update and the spatial coordinates of each cluster center after the update. For each cluster center, the system uses the Euclidean distance formula to calculate its positional offset before and after the update. This involves summing the squares of the differences in each dimension's coordinates and taking the square root. After obtaining the individual offsets of all cluster centers, the system calculates the arithmetic mean of these individual offsets, which is the sum of all individual offsets divided by the total number of cluster centers. This result is defined as the mean of the cluster center offsets for this iteration.
[0045] The system presets a convergence threshold. In this embodiment, the threshold is preferably 0.01. The dimension of the threshold is consistent with the numerical range of each feature dimension in the target feature matrix. Since the target feature matrix has been normalized and the value range of each dimension is mapped to the interval from negative one to positive one, the convergence threshold of 0.01 corresponds to a relative displacement of about one percent of the feature space.
[0046] At the end of each iteration, the system compares the mean offset of the cluster centers calculated in this iteration with the convergence threshold. If the mean offset is greater than or equal to 0.01, it indicates that the cluster centers are still undergoing significant migration in the feature space, and the model has not yet reached a stable state; the system continues to execute the next iteration. If the mean offset is less than 0.01, the system determines that the displacement of each cluster center has become weak, and the objective function has approached the extreme point. At this time, the system triggers the early termination mechanism, no longer executes subsequent iterations, and outputs the cluster centers at the end of the current iteration as the globally optimal final cluster centers.
[0047] For tiny clusters formed due to an extremely small number of samples—that is, clusters with fewer samples than the number of feature dimensions—the system does not adjust the convergence criterion separately. Instead, it includes them in the calculation of the overall mean offset. This is because the cluster center offset of such tiny clusters is usually large, and excluding them would lead to an overly optimistic convergence criterion. Conversely, if the centers of tiny clusters are already stable, their offsets will naturally be less than the threshold, without affecting the overall criterion logic. Through the above unified and explicit convergence criteria, the system can effectively avoid redundant iterative calculations while ensuring clustering quality.
[0048] Specifically, the system synchronously calculates the Euclidean distance from the feature vectors of all outer plates and T-shaped aggregate samples in the hull to these three centers. For example, for a transitional aggregate whose features are between those of a small outer plate and a T-shaped aggregate, it was assigned to the small outer plate cluster in the previous iteration, but in this round of distance calculation, it is found that its Euclidean distance to the center of the T-shaped aggregate cluster is smaller. Based on the principle of minimizing distance, the system reassigns the aggregate to the T-shaped aggregate cluster, thereby achieving dynamic correction and optimization of the classification boundary.
[0049] The system calculates new cluster centers based on the reassigned cluster set. For example, since the transitional aggregate is assigned to the T-type aggregate cluster, the mean coordinates of this cluster shift. The system calculates the new center coordinates of the T-type aggregate cluster and obtains the spatial distance and offset between the new coordinates and the previous generation center coordinates. Similarly, the system calculates the offsets of the large outer plate cluster and the small outer plate cluster, and takes the arithmetic mean of the offsets of these three clusters, which is marked as the mean offset of the cluster centers in this iteration. For example, the mean value is calculated to be 0.05.
[0050] The system compares the calculated average offset of 0.05 with the preset "convergence threshold, for example, 0.01". Since 0.05 > 0.01, it indicates that the cluster centers are still migrating significantly in the feature space, and the system continues to the next iteration. As the iteration progresses, the cluster affiliation of the outer plate and the skeleton gradually stabilizes, and the offset of the cluster centers becomes smaller and smaller. When the average offset of the cluster centers calculated in a certain iteration drops to 0.008, i.e. < 0.01, the system determines that the model has converged, immediately triggers the early stopping mechanism to terminate the iteration in advance, and outputs the current 3 cluster centers as the final cluster centers, avoiding the waste of computing resources caused by continued iteration, while ensuring the stability and optimality of the classification model of the outer plate and the skeleton.
[0051] refer to Figure 4 In step S13, the specific steps are as follows: S131: Based on the final cluster center, a multi-threaded parallel allocation mechanism is triggered to distribute the distance mapping task between the parts to be classified and the final cluster center to independent computing threads for parallel execution. During the allocation process, the Euclidean distance distribution from each sample to the final cluster center is determined, and parts whose Euclidean distance distribution is outside the preset quantile are selected as candidate abnormal parts. S132: Extract the thickness and area parameters of the plates of the candidate abnormal parts and input them into the preset ship design specifications, thereby triggering the secondary verification of the candidate abnormal parts, thereby identifying the actual abnormal parts that violate the structural integrity or process boundary. The remaining candidate abnormal parts are reassigned to the corresponding clusters according to feature similarity, thereby outputting intelligent classification results that include normal cluster classification and abnormal isolation. In the embodiments of this application, a multi-threaded parallel allocation mechanism is triggered based on the final cluster center. The distance mapping task between the parts to be classified and the final cluster center is distributed to independent computing threads for parallel execution. During the allocation process, the Euclidean distance distribution from each sample to the final cluster center is determined, and parts whose Euclidean distance distribution is outside the preset quantile are selected as candidate abnormal parts.
[0052] At this point, the system uses the globally optimal final cluster center as a benchmark and triggers a multi-threaded parallel allocation mechanism. The system then divides the sample set of hull parts to be classified into multiple data subsets and distributes the Euclidean distance calculation task between each data subset and the final cluster center to independent computing threads for parallel execution. Through this parallel computing architecture, the system achieves synchronous processing of massive distance measurement tasks in high-dimensional feature space, significantly reducing the computation time overhead of the allocation process, thereby meeting the real-time processing requirements of large-scale datasets of hull parts.
[0053] Each independent computing thread calculates the Euclidean distance from the part sample to be classified to all final cluster centers in parallel, and determines the nearest center of each sample based on the principle of minimizing distance, thereby completing the cluster affiliation determination of the sample; at the same time, the system statistically analyzes the Euclidean distance from all samples in each cluster to their respective final cluster centers, constructs the Euclidean distance distribution model within each cluster, thereby quantifying the dispersion of samples within a cluster and cluster centers, providing a data distribution basis for subsequent anomaly boundary delineation.
[0054] The system extracts a preset "statistical quantile: for example, the 99.7% quantile, which corresponds to the confidence boundary of the normal distribution μ+3σ" as the judgment threshold for anomaly detection based on the Euclidean distance distribution within each cluster. The system compares the Euclidean distance of each sample with this threshold. If the Euclidean distance of a sample is outside the preset quantile, that is, the distance is greater than the quantile threshold, it indicates that the sample deviates significantly from the dense distribution area of its cluster in the feature space. Based on this, the system filters and marks the part as a candidate abnormal part. This mechanism is based on statistical distribution laws and achieves accurate capture of local deviation features.
[0055] Optionally, the multi-threaded parallel allocation mechanism is implemented based on a shared-memory multi-core processor architecture, specifically using an open multiprocessing interface for thread orchestration and task distribution. The system acquires a sample set of all hull parts to be classified and divides it evenly into several data subsets according to the number of samples. The number of subsets is equal to the number of physical cores of the computer's central processing unit to achieve load balancing.
[0056] The system creates an equal number of independent worker threads as the main thread, each bound to a different processor core to avoid cache invalidation overhead caused by thread migration. Each worker thread is responsible for receiving a subset of data and independently calculating the Euclidean distance between the feature vector of each part sample in that subset and the final cluster center.
[0057] During thread execution, there is no cross-access to data between threads. Each thread only reads its assigned subset of data and the globally read-only final cluster center matrix, without sharing writable data with other threads. This naturally avoids lock contention and data synchronization issues. After all threads have completed parallel execution, the main thread waits for all worker threads to finish through an implicit roadblock synchronization mechanism in the open multiprocessing interface. It then collects the minimum distance of each sample output by each thread and its corresponding cluster affiliation determination result, and merges them to generate a complete allocation result.
[0058] Actual testing showed that in a typical scenario containing 100,000 ship hull part samples and fewer than ten cluster centers, this parallel allocation mechanism can reduce the computation time to one-fifth of the original core time compared to single-threaded serial allocation. For example, on an eight-core processor, it can be reduced to about one-eighth, thus meeting the real-time processing requirements of large-scale ship hull part datasets. For ultra-large-scale data scenarios that exceed the single-machine memory capacity limit, the system also supports encapsulating the above parallel allocation mechanism into a distributed computing task and extending it to a multi-node cluster for execution through a message passing interface. However, the default implementation is mainly based on a single machine with multiple cores to ensure the simplicity and versatility of engineering deployment.
[0059] Specifically, it is currently necessary to allocate tens of thousands of outer plates and skeletons in the hull to be classified. The system triggers the OpenMP multi-threaded parallel allocation mechanism to divide this batch of parts samples into 4 data subsets and distribute them to 4 independent computing threads. Each thread only needs to calculate the Euclidean distance from its allocated quarter of the parts to C1, C2, and C3. Through multi-core synchronous operation, the huge amount of computation that originally needed to be processed serially is reduced to a quarter of the time.
[0060] After each thread calculates the distance in parallel, for example, if the Euclidean distances from a certain outer panel part to C1, C2, and C3 are 0.5, 2.1, and 4.3 respectively, the system determines that the outer panel is assigned to "C1: Large Outer Panel Cluster" based on the principle of minimizing distance. Similarly, the T-shaped material is assigned to "C3: T-shaped Material Cluster". The system statistically analyzes the distances of all parts in the three clusters C1, C2, and C3 to construct an Euclidean distance distribution. For example, the statistics show that the Euclidean distances from all parts in the "C1 Cluster: Large Outer Panel" to the center C1 approximately follow a distribution with a mean of 0.8 and a standard deviation of 0.2; the "C3 Cluster: T-shaped Material" follows a distribution with a mean of 0.6 and a standard deviation of 0.15.
[0061] The system sets a preset quantile of 99.7%, corresponding to a confidence upper limit of μ+3σ. For "C1 cluster: large outer plate", its quantile threshold is calculated as 0.8+3×0.2=1.4; for "C3 cluster: T-shaped reinforcement", its threshold is 0.6+3×0.15=1.05. During the allocation process, if an outer plate part is found to have an Euclidean distance of 1.6 from C1, since 1.6 is outside the preset quantile of 1.4, the system determines that the outer plate is seriously deviating from the dense area of large outer plates in the feature space and filters it as a candidate abnormal part. Similarly, if the distance of a T-shaped reinforcement to C3 is 0.9, which is less than 1.05, it is considered a normal reinforcement. Thus, the system accurately filters out outer plates and reinforcements with abnormal feature deviations, providing targets for subsequent secondary verification.
[0062] Furthermore, the thickness and area parameters of the plates of candidate abnormal parts are extracted and input into the preset ship design specifications, thereby triggering a secondary verification of the candidate abnormal parts. This identifies actual abnormal parts that violate structural integrity or process boundaries. The remaining candidate abnormal parts are then reassigned to corresponding clusters based on feature similarity, thus outputting an intelligent classification result that includes normal cluster classification and abnormal isolation. This further controls the candidate abnormal parts, fully considers the secondary verification of candidate abnormal parts, and improves the accuracy of the intelligent classification result.
[0063] At this point, the system accurately extracts the plate thickness and area parameters from the original feature records of the candidate abnormal parts selected by the system. The system uses these two types of core process parameters as input variables and transmits them to the preset ship design specification verification engine. This ship design specification engine has embedded threshold judgment logic based on classification society standards and hull structure design manuals. Plate thickness and area are key indicators for measuring the structural strength and manufacturing feasibility of hull parts. The comparison of their specification thresholds constitutes the physical constraint basis for identifying real anomalies.
[0064] The pre-defined ship design specification engine performs secondary verification on the input plate thickness and area parameters. The system compares the parameter values of candidate abnormal parts with the structural integrity "lower threshold: such as minimum allowable plate thickness" and the process boundary "upper threshold: such as maximum allowable rolling area" defined in the specification. If the plate thickness of a candidate part is less than the minimum allowable threshold or the area exceeds the maximum allowable threshold, the part is determined to violate physical constraints and manufacturing boundaries. The system marks it as an actual abnormal part, thereby achieving accurate identification from mathematical distribution anomalies to engineering physical anomalies and effectively eliminating false alarms caused by normal structural variations.
[0065] For candidate anomalous parts that do not violate ship design specifications during secondary verification, the system identifies them as normal outliers in the feature space, such as irregularly shaped plates with special openings but compliant dimensions, rather than actual modeling errors or process defects. The system then calculates the feature similarity between such parts and existing cluster centers, such as the inverse metric of Euclidean distance, and reassigns them to the corresponding clusters according to the principle of maximizing similarity, restoring their normal classification affiliation. The system integrates the classification results of all normal clusters with the isolation records of actual anomalous parts, and outputs intelligent classification results containing both normal cluster classification and anomalous isolation information, thereby achieving a unified classification loop and accurate anomaly removal.
[0066] Optionally, for the screening and secondary verification of candidate abnormal parts, after completing the clustering assignment, the system collects the Euclidean distances from all samples within each cluster to their final cluster center, constructing a distance distribution set for that cluster. The system pre-sets a quantile threshold; in this embodiment, the 99.7 percentile is used by default. This value corresponds to the confidence boundary covered by the mean plus or minus three standard deviations in a normal distribution, and is suitable for the characteristic distribution patterns of most ship hull parts. The system calculates the specific value corresponding to this quantile in the distance distribution within each cluster, which serves as the anomaly determination boundary for that cluster.
[0067] The system iterates through each sample, comparing its Euclidean distance to the cluster center with the cluster's anomaly detection boundary. If the distance is greater than the boundary value, the sample is filtered and marked as a candidate anomalous part; if it is less than or equal to the boundary value, it is considered a normal sample. After completing the candidate anomalous part filtering, the system triggers a secondary verification process.
[0068] The secondary verification relies on a pre-defined knowledge base of ship design specifications. This knowledge base contains at least two types of threshold parameters: The first type is the lower limit threshold for structural integrity, mainly including the minimum allowable plate thickness for different part types. For example, for hull plating parts, the minimum allowable plate thickness is five millimeters; for T-shaped steel frame parts, the minimum allowable plate thickness is six millimeters. The second type is the upper limit threshold for process boundaries, mainly including the maximum allowable geometric dimensions for different part types. For example, for hull plating parts, the maximum allowable rolled area is thirty square meters; for steel frame parts, the maximum allowable length is twelve meters. The values of these threshold parameters are determined according to the China Classification Society's "Rules for Classification of Steel Seagoing Ships" and the shipbuilding company's enterprise process standards.
[0069] The system extracts the plate thickness and area or length parameters of each candidate abnormal part and compares them with the corresponding thresholds in the knowledge base according to the part type. If the plate thickness of the candidate abnormal part is less than the minimum allowable plate thickness, or its area or length exceeds the maximum allowable threshold, the part is determined to be an actual abnormal part. The system marks it as abnormal and outputs corresponding alarm information, which specifically indicates the violated specification and the deviation value.
[0070] Conversely, if all parameters of a candidate anomalous part are within the corresponding threshold range, the part is determined to be merely a statistical outlier in the feature space rather than a defective part in an engineering sense. The system cancels its candidate anomalous status and instead reassigns it to the normal cluster with the highest similarity based on the feature similarity between the part and each final cluster center, i.e., the reciprocal of the Euclidean distance. Through this explicit two-level judgment mechanism of statistical quantiles and shipbuilding engineering specification thresholds, the system can accurately identify truly anomalous parts from both mathematical deviation and engineering compliance dimensions, while avoiding false alarms for normal structural variations.
[0071] Specifically, two candidate abnormal outer plates, outer plate X and outer plate Y, are selected from the large outer plate cluster. From the T-shaped rib cluster, one candidate abnormal rib, rib Z, is selected. The system extracts the thickness and area parameters of these three parts. For example, outer plate X has a thickness of 8mm and an area of 35m². 2 The outer panel Y has a thickness of 4mm and an area of 12m². 2 The thickness of the slab Z is 6mm, and its area is 0.8m². 2 The system inputs these three sets of parameters into the preset hull and ship design specification verification engine.
[0072] The ship design specifications require a second verification of the engine; assuming the specifications stipulate that the maximum permissible rolled area of the hull hull is 30m². 2 The minimum allowable plate thickness for structural integrity is 5mm; the minimum allowable plate thickness for T-shaped ribs is 5mm; Comparison: Outer panel area 35m² 2 The outer panel Y, with a thickness of 4mm, is below the lower limit of structural integrity, while the core material Z, with a thickness of 6mm, meets the specifications. Based on this, the system identifies outer panels X and Y as actual abnormal parts that violate structural integrity or process boundaries, marks them as abnormal, and isolates them. Although core material Z is off-center in terms of distance distribution, its physical parameters are compliant and it does not belong to actual abnormality.
[0073] For candidate abnormal aggregate Z that does not violate design specifications, the system recalculates the feature similarity between its feature vector and the feature similarity of the center of the T-shaped aggregate cluster. Since the "other geometric features of aggregate Z, such as cross-sectional shape factor and number of curved edges" are highly similar to those of the T-shaped aggregate cluster, the system reassigns aggregate Z back to the T-shaped aggregate cluster based on the principle of maximizing similarity, correcting the over-screening caused by relying solely on distance quantiles in the previous step. The system outputs intelligent classification results that include the normally classified outer plate cluster and T-shaped aggregate cluster, as well as the actual abnormal alarm information of the isolated outer plate X and outer plate Y, completing the accurate classification closed loop from suspected feature abnormality to physical abnormality confirmation.
[0074] refer to Figure 5 In step S14, the specific steps are as follows: S141: Based on the intelligent classification results, determine the cluster affiliation label of each part, bind the cluster affiliation label with the part identification code, and generate a structured data file with hierarchical topology by combining the corresponding abnormal part alarm information. Extract the classification and abnormal fields in the structured data file, and then map them into RGB color space encoding. Use the parametric drawing interface to automatically generate a three-dimensional coloring script, thereby realizing the visualization rendering of the classification results, and then encapsulate it into a standardized plugin. S142: Implement a one-click execution of the entire closed loop along the standardized plugin, and configure the corresponding interface in the underlying layer of the standardized plugin to support the integration and call of the upper-level platform; when new part feature data is received, based on the existing final cluster center as the initialization anchor point, only perform local iteration on the new part feature data to avoid full recalculation and ensure continuous online evolution; In the embodiments of this application, the cluster affiliation label of each part is determined based on the identification of the intelligent classification result, the cluster affiliation label is bound to the part identification code, and a structured data file with hierarchical topological relationship is generated by combining the corresponding abnormal part alarm information. The classification and abnormal fields in the structured data file are extracted and then mapped to RGB color space encoding. A three-dimensional coloring script is automatically generated using a parametric drawing interface, thereby realizing the visualization rendering of the classification result. It is then encapsulated as a standardized plugin, introducing visualization rendering.
[0075] At this point, the system analyzes the intelligent classification results output by S132, determines the cluster affiliation label corresponding to each part, and performs deep binding between the cluster affiliation label and the part's unique "identifier code: such as GUID or component ID" in the 3D model. The system then merges the bound label data with the corresponding "abnormal part alarm information: including abnormal type, deviation index, etc." Based on the "tree-like hierarchical structure: such as the topological hierarchy of "project-region-cluster category-part individual", a "structured data file: such as XML or JSON file containing nested dictionaries" with hierarchical topological relationships is generated. This structured file not only records the planar classification mapping, but also preserves the spatial and logical subordinate relationships between ship parts, providing a complete data foundation for subsequent data traceability and visualization rendering.
[0076] The system accurately extracts classification and anomaly fields from the structured data files and converts them into RGB color space encoding according to preset color mapping rules. At this time, the system assigns differentiated hue codes to different normal cluster categories. For example, the outer panel cluster is mapped to blue RGB (0,0,255), and the bone material cluster is mapped to green RGB (0,255,0) to achieve high visual differentiation between categories. Meanwhile, for the anomaly fields, the system overwrites the regular colors and uniformly maps the actual abnormal parts to a high-saturation warning red RGB (255,0,0). Through this mapping mechanism, discrete classification and anomaly text data are converted into visual feature vectors that can be directly parsed by the 3D graphics engine.
[0077] The system calls the underlying parametric drawing interface of marine CAD / CAE software, or the secondary development API, and takes the part identification code and the corresponding RGB color space code as input variables to automatically generate a 3D shading script that can be directly executed by 3D design software. This script traverses the part identifications in the structured file and assigns material color attributes to the corresponding geometries in the model tree one by one, thereby realizing the visualization rendering of classification and anomaly isolation results in 3D digital space. The system encapsulates the entire process code logic, including data extraction, cluster analysis, anomaly verification and script generation, into a standardized plugin that conforms to standard interface specifications, so that it can be seamlessly embedded into the designer's native workflow with one-click triggering.
[0078] Optionally, the system organizes the intelligent classification results into a structured data file with hierarchical topological relationships. In this embodiment, JavaScript object notation (JSON) format is preferably used as the data carrier. The file structure is organized according to a four-level nested structure: hull project name, region division, cluster category, and individual part. Each part entry contains at least three fields: a unique part identifier, its cluster category label, and an abnormal status flag. The abnormal status flag is a Boolean type, with a value of false for normal parts and a value of true for actual abnormal parts.
[0079] After constructing the structured data file, the system extracts the cluster category label and abnormal status flag for each part and converts them into red-green-blue color space encoding according to a preset color mapping rule. Specifically, the system assigns a fixed hue value to each different normal cluster category. The hue value is evenly distributed between 0 and 360 degrees according to the number of categories. For example, when there are three normal cluster categories, 0, 120, and 240 degrees are assigned as base hues respectively. Each base hue is then combined with a fixed saturation of 75% and a brightness of 90% to convert it into the corresponding red-green-blue encoded value.
[0080] For parts with an abnormal status flag that is true, the system ignores the base hue corresponding to its cluster category label and uniformly assigns a red-green-blue code with a red tone. Specifically, the values are 255 for the red channel, 0 for the green channel, and 0 for the blue channel. After completing the red-green-blue code mapping for all parts, the system calls the parametric drawing interface to generate a 3D shading script.
[0081] In this embodiment, the system is designed for a general-purpose 3D computer-aided design software platform, specifically using the Python programming language as the script carrier, and calling the color setting function in the platform's secondary development interface. The script generation logic is as follows: the system reads the part entries in the structured data file one by one. For each part, a selection statement is written in the script based on its unique identifier to select the corresponding geometric object, and a color setting statement is written, passing the red, green, and blue encoded values obtained from the previous mapping as parameters.
[0082] For platforms that do not support directly writing red, green, and blue values, the system pre-builds a lookup table containing sixteen commonly used colors. This table maps the red, green, and blue encoded values to the nearest standard color name before writing them into the script. After the script is generated, the system packages all the code logic and the above configuration rules into a separate plugin installation package. This package does not contain any platform-specific binary executables to ensure cross-platform compatibility.
[0083] After the user installs and runs the plugin in the target computer-aided design software, the plugin automatically reads the part identifiers in the current model, matches them with the identifiers in the script, and performs a coloring operation, thereby realizing the 3D visualization rendering of the classification results and anomaly alarms.
[0084] Specifically, based on the intelligent classification results, the system determines that a certain outer plate belongs to the "large outer plate cluster" and its part identification code is "Hull_Part_001"; at the same time, it determines that a certain T-shaped rib is "T-shaped rib cluster" and its identification code is "Stiffener_002"; another outer plate "Hull_Part_050" is identified as an actual abnormal part. The system binds the tags and identification codes and combines them with abnormal alarm information, such as "plate thickness out of tolerance", to generate an XML structured data file with hierarchical topology. This file takes the hull as the root node and has "large outer plate cluster" and "T-shaped rib cluster" as child nodes. The child nodes contain specific part IDs and abnormal status attributes, forming a clear topological hierarchy.
[0085] The system extracts the classification and anomaly fields from the XML file and performs RGB mapping. For the "large outer panel cluster" classification field, the system maps it to deep sea blue RGB (0,102,204); for the "T-shaped aggregate cluster" field, it maps it to cyan RGB (0,204,153); and for the "Hull_Part_050" anomaly field, the system overrides its default cluster color and maps it to warning red RGB (255,0,0). Thus, the text-based classification and alarm information is converted into color encoding instructions that the 3D rendering engine can recognize.
[0086] The system calls the parametric drawing interface of the CAD software to automatically generate a 3D coloring script. The internal logic of the script is as follows: read the XML file, traverse to the "Hull_Part_001" node, call the material modification command to render it as deep sea blue; traverse to the "Stiffener_002" node and render it as cyan; traverse to the abnormal node "Hull_Part_050" and render it as warning red. Designers can execute the script with one click in the CAD interface to intuitively examine the classification panorama of the hull plate and skeleton and the precise location of abnormal parts. The entire "feature acquisition-clustering-verification-coloring" link is encapsulated into a standardized tool called "Hydraulic Classification Plugin", which is integrated into the design software in the form of a toolbar button, realizing one-click deployment of the entire closed loop.
[0087] Furthermore, a one-click execution of the entire closed-loop process is achieved along the standardized plugin, and corresponding interfaces are configured in the underlying layer of the standardized plugin to support integration and calls from the upper-level platform. When new part feature data is received, based on the existing final cluster center as the initialization anchor point, only the new part feature data is iterated locally to avoid full recalculation and ensure continuous online evolution. This further controls the structured data file and improves the accuracy of the 3D shading script.
[0088] At this point, the system solidifies and encapsulates the entire process logic of data extraction, preprocessing, clustering iteration, anomaly verification, and visualization coloring into a standardized plugin embedded in the ship CAD / CAE software. Users can trigger this plugin with a single interaction in the software interface to achieve closed-loop execution of the entire process without human intervention. At the same time, the underlying architecture of the standardized plugin is configured with standard communication interfaces such as RESTful APIs. These interfaces expose the core algorithm logic and data flow mechanism as services, thereby supporting upper-level business systems such as shipyard PLM systems and digital twin platforms to integrate classification functions through remote calls, achieving cross-platform data interoperability and capability reuse.
[0089] When the system receives feature data of newly added hull parts through the interface, it abandons the traditional full data recalculation mode and adopts an incremental learning mechanism instead. The system uses the final cluster center obtained from the historical iterations as the initial anchor point, fixes the spatial position of the anchor point or only allows its fine adjustment, and only maps the feature data of the newly added parts to the current feature space. The system calculates the distance of the newly added data to each initial anchor point and directly assigns it to the nearest cluster according to the principle of minimizing the distance, or only performs local mean iteration based on the newly added data and the neighboring clusters. This mechanism mathematically guarantees the spatial continuity of the model, while avoiding the repeated calculation of massive historical data.
[0090] The system achieves continuous online evolution of the classification model through an incremental mapping mechanism. When the number of newly added parts accumulates to exceed the preset incremental threshold, the system triggers a local iterative update mechanism to adaptively fine-tune the current cluster center based on the distribution characteristics of the newly added data. This enables the classification model to dynamically respond to changes in ship design or the addition of new process features. This process does not require interruption of the online calling service of the upper-level platform. Under the premise of ensuring the stability of the historical classification structure, the system realizes the real-time absorption and evolution of incremental data by the model, thereby ensuring the continuous availability and accuracy maintenance of the intelligent classification system throughout the entire life cycle of the ship.
[0091] Optionally, for the incremental learning mechanism, the incremental learning mechanism is executed according to the following local iterative update rules to achieve online continuous evolution when new part feature data is accessed. When the system receives a batch of feature data of new hull parts through the application programming interface configured at the bottom layer of the standardized plug-in, it determines whether the number of new parts has reached the preset incremental threshold. In this embodiment, the incremental threshold is set to 10% of the total number of original parts by default, but the lower limit is not less than fifty pieces and the upper limit is not more than five hundred pieces. If the number of new parts has not reached the threshold, the system does not trigger any cluster center update operation, but directly uses the final cluster centers that have been converged and stored in the historical iteration process as fixed initial anchor points, calculates the Euclidean distance from each new part sample to each anchor point one by one, and assigns the new part to the nearest cluster according to the distance minimization principle. After the assignment is completed, the incremental processing is completed without changing the spatial position of any cluster centers.
[0092] If the number of newly added parts has reached or exceeded the preset incremental threshold, the system will initiate a local iterative update mechanism. The specific rules for this local iteration are as follows: the system uses the historical final cluster center as the initial center for this local iteration. The system selects only two types of samples for iterative calculation: the first type is all newly added part samples, and the second type is several historical samples from each existing cluster that are closest to its cluster center. In this embodiment, the number of historical samples selected for each cluster is the smaller of one-half and one hundred of the number of newly added parts.
[0093] The system merges the two types of samples to form a local training subset, without recalculating all historical samples. On this local training subset, the system uses the final historical cluster centers as initial values and executes the same multi-level iterative update process as global clustering. This involves repeatedly calculating the Euclidean distance from samples to the centers, redistributing cluster affiliations, and updating cluster center positions until the average cluster center offset is less than a preset convergence threshold or the maximum number of iterations is reached. After completing the local iteration, the system only updates the cluster centers corresponding to the clusters included in the local training subset; the cluster centers of other untouched clusters remain unchanged. To prevent uncontrollable drift of cluster centers due to long-term incremental updates, the system forcibly triggers a full-scale lightweight check after every ten local iterations. Specifically, 5% of the samples are randomly selected from all historical samples, their average distance to the current cluster centers is calculated, and compared with the average distance before the local iteration. If the average distance increases by more than 10%, the system automatically rolls back the update results of the last five local iterations and reduces the incremental threshold to half of the original threshold to trigger more frequent but gentler local updates.
[0094] Specifically, after loading the hull model into the CAD software, designers can click the "Intelligent Classification Plugin" button. The system will then automatically execute the entire closed-loop process from feature acquisition to anomaly alarm output and 3D coloring. The outer plates and skeletons will be instantly colored in clusters, and abnormal parts will be highlighted in red as an alarm. At the same time, the plugin is configured with a RESTful API interface at its underlying level. The shipyard's digital twin platform can call this interface via HTTP requests and obtain the classification tags and anomaly alarm lists of hull parts on the web without opening the CAD software, thus achieving seamless integration between the design end and the manufacturing management platform.
[0095] Suppose the hull design is changed, adding 20 new irregularly shaped outer plating parts. After receiving the feature data of these 20 new outer plating parts, the system does not re-perform full clustering calculations on the existing tens of thousands of outer plating parts and skeletons. Instead, it uses the previously converged "3 final cluster centers: large outer plating, small outer plating, and T-shaped skeletons" as initial anchor points. The system only calculates the Euclidean distance from these 20 new outer plating parts to the 3 anchor points and directly maps and assigns them to the corresponding "large outer plating clusters" according to the distance minimization principle, thus completing the classification and assignment of the new data with minimal computational overhead.
[0096] As the hull design continues to iterate, the number of newly added outer plates and structural components gradually accumulates. When the system detects that the number of newly added components exceeds a "preset threshold: for example, 100 pieces", it triggers a local iterative evolution mechanism. The system uses the data of these 100 newly added components and some samples within the original cluster to calculate the local mean, and fine-tunes and updates the cluster centers such as "large outer plate clusters", so that the model can adapt to the characteristics of the newly added thin and irregular outer plates. This online evolution process is completed automatically in the background, ensuring the continuous accuracy and real-time response of the classification system throughout the entire hull design process.
[0097] Please see Figure 6 The intelligent classification system for hull parts is applied to the aforementioned intelligent classification method for hull parts; the intelligent classification system for hull parts includes: The target feature matrix module 21 is used to obtain the feature vectors of the hull parts, normalize the feature vectors of the hull parts, and trigger the corresponding alignment in combination with the principle of consistency of normal vector direction, so as to output the aligned feature vectors and construct the corresponding target feature matrix. Cluster center module 22 is used to perform clustering processing on the target feature matrix, determine the corresponding optimal number of clusters during the clustering process, perform multi-level iterations along the optimal number of clusters, thereby determining the average value of the cluster center offset generated in each iteration during the iteration process, and then outputting the final cluster center; The intelligent classification module 23 is used to perform multi-threaded parallel processing based on the final cluster center and further trigger cluster allocation, thereby filtering out the corresponding candidate abnormal parts during the allocation process, and further triggering secondary verification of the candidate abnormal parts in combination with ship design specifications to determine the corresponding intelligent classification result. The closed-loop module 24 is used to mark the cluster affiliation labels of each part in the intelligent classification results, and generate a structured data file by combining the corresponding abnormal part alarm information. The structured data file is then mapped to generate a 3D shading script, which is executed as a plug-in to complete the entire closed-loop process with one click, and is also available for integration and calling by the upper-level platform.
[0098] It should be noted that although multiple modules are mentioned in the detailed description above, this division is not mandatory; in fact, according to the embodiments of this disclosure, the features and functions of two or more modules or described above can be embodied in one module; conversely, the features and functions of one module described above can be further divided into multiple modules to be embodied.
[0099] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein; this application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein; the specification and embodiments are to be considered exemplary only.
[0100] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for intelligent classification of ship hull parts, characterized in that, include: The feature vectors of the hull parts are obtained, the feature vectors of the hull parts are normalized, and the alignment is triggered in combination with the principle of consistency of normal vector direction to output the aligned feature vectors and construct the corresponding target feature matrix. The target feature matrix is clustered, and the optimal number of clusters is determined during the clustering process. Multi-level iterations are performed along the optimal number of clusters to determine the average cluster center offset generated in each iteration, and then the final cluster centers are output. Multi-threaded parallel processing is performed based on the final cluster center, and cluster allocation is further triggered to filter out the corresponding candidate abnormal parts during the allocation process. The secondary verification of the candidate abnormal parts is further triggered in combination with the ship design specifications to determine the corresponding intelligent classification result. The cluster affiliation label of each part in the intelligent classification results is marked, and a structured data file is generated by combining the corresponding abnormal part alarm information. The structured data file is then mapped to generate a 3D shading script, which is executed in the form of a plug-in to complete the entire closed loop with one click, and is also available for integration and calling by the upper-level platform.
2. The intelligent classification method for ship hull parts according to claim 1, characterized in that, The process of obtaining feature vectors of hull parts, normalizing these feature vectors, triggering alignment based on the principle of consistent normal vector direction, outputting aligned feature vectors, and constructing the corresponding target feature matrix includes: Feature vectors of ship hull parts are collected in batches through the communication interface. These feature vectors cover geometric shape and process attributes. Based on the identification of these feature vectors, corresponding continuous variables are determined. These continuous variables are normalized, and the directional deflection angle in the feature space is determined in combination with the principle of consistency of normal vector direction.
3. The intelligent classification method for ship hull parts according to claim 2, characterized in that, The process of obtaining feature vectors of hull parts, normalizing the feature vectors of hull parts, triggering corresponding alignment based on the principle of normal vector direction consistency, outputting aligned feature vectors, and constructing the corresponding target feature matrix also includes: If the direction deflection angle exceeds the preset deflection angle threshold, the coordinate system transformation and alignment are automatically triggered to output the aligned feature vector. The aligned feature vectors are then spliced and fused to output the target feature vector. Multiple principal components are determined based on the iteration of the target feature vector, and a corresponding target feature matrix is formed.
4. The intelligent classification method for ship hull parts according to claim 1, characterized in that, The process of clustering the target feature matrix, determining the optimal number of clusters during the clustering process, performing multi-level iterations along this optimal number of clusters, and determining the average cluster center offset generated in each iteration, thereby outputting the final cluster centers, includes: The target feature matrix is initialized, the corresponding initialization center point is marked, and the clustering process of the target feature moments is triggered by the clustering mechanism to determine the corresponding rate of change. If the rate of change decays below the preset rate of change threshold, the corresponding optimal number of clusters is adaptively determined, and multi-level iteration is started along the optimal number of clusters.
5. The intelligent classification method for hull parts according to claim 4, characterized in that, The process of clustering the target feature matrix, determining the optimal number of clusters during the clustering process, performing multi-level iterations along this optimal number of clusters, determining the average cluster center offset generated in each iteration, and then outputting the final cluster centers, further includes: In each iteration, the Euclidean distance from all samples to the current cluster center is calculated synchronously, and the cluster affiliation is redistributed according to the principle of minimizing distance. The mean offset of the cluster center generated in this iteration is then marked. The mean offset of the cluster center is compared with the preset convergence threshold. If the mean offset of the cluster center is less than the convergence threshold, the iteration is terminated early, and the globally optimal final cluster center is output.
6. The intelligent classification method for ship hull parts according to claim 1, characterized in that, The process involves multi-threaded parallel processing based on the final cluster center, further triggering cluster allocation to filter out corresponding candidate abnormal parts during the allocation process. This is further combined with ship design specifications to trigger a secondary verification of the candidate abnormal parts, thereby determining the corresponding intelligent classification result, including: Based on the final cluster center, a multi-threaded parallel allocation mechanism is triggered, and the distance mapping task between the parts to be classified and the final cluster center is distributed to independent computing threads for parallel execution. During the allocation process, the Euclidean distance distribution from each sample to the final cluster center is determined, and parts whose Euclidean distance distribution is outside the preset quantile are selected as candidate abnormal parts.
7. The intelligent classification method for ship hull parts according to claim 6, characterized in that, The process of multi-threaded parallel processing based on the final cluster center, further triggering cluster allocation to filter out corresponding candidate abnormal parts during the allocation process, and further triggering secondary verification of the candidate abnormal parts in conjunction with ship design specifications to determine the corresponding intelligent classification result, also includes: The thickness and area parameters of the plates of candidate abnormal parts are extracted and input into the preset ship design specifications, thereby triggering a secondary verification of the candidate abnormal parts. This identifies the actual abnormal parts that violate structural integrity or process boundaries. The remaining candidate abnormal parts are reassigned to the corresponding clusters based on feature similarity, thus outputting an intelligent classification result that includes normal cluster classification and abnormal isolation.
8. The intelligent classification method for ship hull parts according to claim 1, characterized in that, The cluster affiliation tags of each part in the intelligent classification results are used to generate a structured data file, which is then combined with the corresponding abnormal part alarm information. This structured data file is mapped to generate a 3D shading script, which is executed as a plugin with a single click, creating a closed-loop process. It is also available for integration and use by upper-level platforms, including: Based on the intelligent classification results, the cluster affiliation label of each part is determined. The cluster affiliation label is bound to the part identification code. Combined with the corresponding abnormal part alarm information, a structured data file with hierarchical topological relationship is generated. The classification and abnormal fields in the structured data file are extracted and then mapped to RGB color space encoding. A three-dimensional coloring script is automatically generated using a parametric drawing interface to realize the visualization rendering of the classification results, and then packaged into a standardized plugin.
9. The intelligent classification method for ship hull parts according to claim 8, characterized in that, The cluster affiliation tags of each part in the intelligent classification results are used to generate a structured data file, which is then combined with the corresponding abnormal part alarm information. This structured data file is mapped to generate a 3D shading script, which is executed as a plugin for one-click closed-loop processing. It is also available for integration and use by upper-level platforms. The system also includes: The standardized plugin enables one-click execution of the entire closed-loop process, and the corresponding interface is configured in the underlying layer of the standardized plugin to support the integration and call of the upper-level platform. When new part feature data is received, the existing final cluster center is used as the initialization anchor point, and only the new part feature data is iterated locally to avoid full recalculation and ensure continuous online evolution.
10. An intelligent classification system for ship hull parts, characterized in that, The intelligent classification system for hull parts is applied to the intelligent classification method for hull parts as described in any one of claims 1-9; The intelligent classification system for the hull parts includes: The target feature matrix module is used to obtain the feature vectors of the hull parts, normalize the feature vectors of the hull parts, and trigger the corresponding alignment in combination with the principle of consistency of normal vector direction to output the aligned feature vectors and construct the corresponding target feature matrix. The cluster center module is used to perform clustering processing on the target feature matrix, determine the corresponding optimal number of clusters during the clustering process, perform multi-level iterations along the optimal number of clusters, thereby determining the average value of the cluster center offset generated in each iteration, and finally outputting the final cluster centers. The intelligent classification module is used to perform multi-threaded parallel processing based on the final cluster center and further trigger cluster allocation, thereby filtering out the corresponding candidate abnormal parts during the allocation process. It further combines the ship design specifications to trigger a secondary verification of the candidate abnormal parts to determine the corresponding intelligent classification result. The closed-loop module is used to mark the cluster affiliation labels of each part in the intelligent classification results, and generate a structured data file by combining the corresponding abnormal part alarm information. The structured data file is then mapped to generate a 3D coloring script, which can be executed in the form of a plug-in to complete the entire closed-loop process with one click, and can also be integrated and called by the upper-level platform.