Machine tool precision casting surface defect automatic detection system

By simultaneously acquiring optical images and process parameter data, and combining them with a dual-stream convolutional neural network and a defect mechanism knowledge base, the system achieves efficient and accurate detection of surface defects in precision castings for machine tools. This solves the problems of insufficient detection accuracy and real-time performance in existing technologies, thereby improving production efficiency and product quality.

CN120805069BActive Publication Date: 2025-11-25HUNAN GIANT MASCH TOOL GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511261196.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-11-25
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

Existing surface defect detection technologies for precision castings in machine tools rely on single optical image data, ignoring the correlation between process parameters and defect formation. This results in insufficient detection accuracy and real-time performance, making it difficult to meet the demands of high-precision production.

Method used

A surface information acquisition module is used to simultaneously acquire optical image data and process parameter data, construct a defect diagnosis feature map and auxiliary text, and combine it with a pre-trained dual-stream convolutional neural network and a defect mechanism knowledge base to achieve defect identification through multi-source information fusion.

Benefits of technology

It improves the accuracy and real-time performance of defect detection, enabling timely detection of defects in the production process, reducing non-conforming products, optimizing production processes, and improving production quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805069B_ABST
    Figure CN120805069B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine tool casting detection, and discloses a machine tool precision casting surface defect automatic detection system.The system comprises four core modules of surface information acquisition, first defect identification, second defect identification and defect type fusion.The surface information acquisition module synchronously acquires real-time optical images and process parameter data in production for the casting surface, and constructs a defect diagnosis feature atlas and auxiliary text according to the data;the first defect identification module inputs the atlas and auxiliary text into a pre-trained double-flow convolutional neural network to generate a first classification result of defect type;the second defect identification module extracts defect mechanism characteristic values from the atlas, matches the values with a pre-stored defect mechanism knowledge base, and obtains a second classification result;and the defect type fusion module fuses the two types of results to determine the target defect type.The system solves the problems of single detection information and recognition deviation, improves detection accuracy and real-time performance, and adapts to different production scene requirements.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine tool casting detection, in particular to a machine tool precision casting part surface defect automatic detection system. BACKGROUND

[0002] In the field of machine tool manufacturing, as core components, the surface quality of precision casting parts is directly related to the overall operation precision, stability and service life of the machine tool. With the continuous improvement of the machining precision requirement of manufacturing industry on machine tools, the detection standard of surface defects of precision casting parts is also increasingly strict. Common surface defects such as cracks, sand holes, pores and inclusions, even if the size is small, may also cause serious failure in the long-term operation of the machine tool. Therefore, efficient and accurate surface defect detection has become an important link in the machine tool manufacturing process.

[0003] Currently, the detection of surface defects of machine tool precision casting parts mainly relies on manual detection and traditional machine vision detection. Manual detection requires the detection personnel to observe the surface of the casting part one by one according to experience, which not only has high labor intensity and low detection efficiency, but also is easily affected by the subjective state (such as fatigue and inattention) and experience difference of the detection personnel, resulting in missed detection or misjudgment of defects. Especially for defects such as fine cracks and small sand holes that are difficult to clearly identify with the naked eye, the detection accuracy is difficult to guarantee. At the same time, manual detection cannot realize real-time synchronization with the production process, and often needs to be detected offline after the production of the casting part is completed. Once defects are found, the produced batch needs to be traced and investigated, which increases the production cost and production cycle.

[0004] Traditional machine vision detection improves the detection efficiency to a certain extent, but it mostly relies on optical image data for defect recognition, extracts features such as gray scale, texture and shape in the image, and matches them with preset defect templates to judge the defect type. However, the formation of surface defects of machine tool precision casting parts is closely related to the process parameters in the casting process, such as pouring temperature, pouring speed, mold temperature and holding time. Abnormal fluctuations of these process parameters may lead to different types of surface defects. Traditional machine vision detection ignores the correlation between process parameters and defect types, and only relies on image features for judgment, which is prone to classification errors when facing defects with similar surface features but different causes. In addition, the algorithm model used in traditional machine vision detection is mostly a single convolutional neural network, which has limited ability to extract defect features in complex backgrounds. When there are interference factors such as oxide skin and stains on the surface of the casting part, the recognition accuracy of the model will decrease significantly, which is difficult to meet the detection needs of high-precision machine tool casting parts.

[0005] In addition, the existing detection technology lacks comprehensive utilization of defect diagnosis information. Although some detection systems attempt to combine process parameters, they only use them as auxiliary references, without building a systematic correlation model between image features and process parameters, and without establishing a complete defect mechanism knowledge base, so as to further verify the defect type through defect mechanism analysis, resulting in insufficient reliability of the detection result. The existence of these problems makes it difficult for the existing detection technology to adapt to the detection needs of modern machine tool precision casting parts in large-scale and high-precision production, and an automatic detection system that can integrate multi-source information and combine defect mechanism analysis is needed to improve the accuracy and real-time performance of defect detection. SUMMARY

[0006] The purpose of the present application is to provide an automatic detection system for surface defects of machine tool precision castings to solve the problems raised in the above background.

[0007] To achieve the above purpose, the present application provides an automatic detection system for surface defects of machine tool precision castings, which comprises:

[0008] A surface information acquisition module is used to synchronously acquire real-time optical image data and real-time process parameter data of the surface of the machine tool precision casting, and to construct a defect diagnosis feature map and a defect diagnosis auxiliary text according to the real-time optical image data and the real-time process parameter data;

[0009] A first defect recognition module is used to input the defect diagnosis feature map and the defect diagnosis auxiliary text into a pre-trained double-flow convolutional neural network for processing, to generate a first classification result of the surface defect type of the machine tool precision casting;

[0010] A second defect recognition module is used to extract a plurality of defect mechanism feature values of the machine tool precision casting according to the defect diagnosis feature map, and to perform similarity matching with a pre-stored defect mechanism knowledge base, to generate a second classification result of the surface defect type of the machine tool precision casting based on the matching result;

[0011] A defect type fusion module is used to fuse the first classification result and the second classification result to determine the target defect type of the machine tool precision casting.

[0012] Preferably, the surface information acquisition module comprises:

[0013] A feature map construction unit is used to generate the defect diagnosis feature map according to the real-time optical image data, and to perform multi-scale feature extraction on the real-time optical image data to obtain defect mechanism feature components including texture dispersion, contour irregularity, brightness abnormal area distribution, and geometric deformation gradient;

[0014] a process impact factor generation unit configured to quantify mutual information entropy between the real-time optical image data and the real-time process parameter data, and generate a surface defect process impact factor based on a result of the mutual information entropy quantification;

[0015] an auxiliary text generation unit configured to perform numerical discretization and semantic coding on each of the defect mechanism feature components and the surface defect process impact factor, and output the defect diagnosis auxiliary text in a structured key-value pair format.

[0016] Preferably, the real-time process parameter data comprises casting temperature data and cooling rate data.

[0017] The process impact factor generation unit is specifically configured to:

[0018] perform mutual information entropy calculation on the synchronously collected real-time optical image data and the casting temperature data to obtain a surface defect temperature correlation degree;

[0019] perform mutual information entropy calculation on the synchronously collected real-time optical image data and the cooling rate data to obtain a surface defect cooling correlation degree;

[0020] weight and fuse the surface defect temperature correlation degree and the surface defect cooling correlation degree in a dynamic proportion to output the surface defect process impact factor.

[0021] Preferably, the dual-flow convolutional neural network comprises an image feature encoding branch, a text feature encoding branch, a cross-modal feature fusion layer, and a defect classification output layer.

[0022] The first defect recognition module is specifically configured to:

[0023] extract deep features of the defect diagnosis feature map through the image feature encoding branch to obtain an image feature vector;

[0024] extract semantic features of the defect diagnosis auxiliary text through the text feature encoding branch to obtain a text feature vector;

[0025] input the image feature vector and the text feature vector into the cross-modal feature fusion layer based on cross-modal feature alignment constraints and a feature fusion loss function to perform feature interaction and generate a fusion feature representation;

[0026] input the fusion feature representation into the defect classification output layer to output the first classification result.

[0027] Preferably, the second defect recognition module comprises:

[0028] a defect feature quantification unit configured to extract defect mechanism feature values including pore distribution density, crack extension direction, slag inclusion area proportion, and shrinkage aggregation degree from the defect diagnosis feature map;

[0029] a knowledge base matching unit configured to calculate similarity scores of the defect mechanism feature values and pre-stored standard defect models in the defect mechanism knowledge base;

[0030] a classification result generation unit configured to select a defect category corresponding to a standard defect model with the highest similarity score as the second classification result.

[0031] Preferably, the defect type fusion module comprises:

[0032] a weight allocation unit configured to determine a first weight coefficient according to the probability confidence in the first classification result and a second weight coefficient according to the similarity score in the second classification result;

[0033] a normalization processing unit configured to perform normalization processing on the first weight coefficient and the second weight coefficient to obtain a standard weight coefficient;

[0034] a defect decision unit configured to perform weighted voting on the first classification result and the second classification result based on the standard weight coefficient to determine the target defect type.

[0035] Preferably, the system further comprises:

[0036] a historical feature space construction module configured to collect surface feature data of historical qualified castings to construct a qualified feature space containing texture uniformity index, geometric precision distribution matrix, and brightness standard deviation vector;

[0037] a real-time feature mapping module configured to map the defect diagnosis feature map of the current detection to the qualified feature space to calculate a real-time feature offset vector;

[0038] a defect risk assessment module configured to generate a casting defect risk level according to the real-time feature offset vector.

[0039] Preferably, the real-time feature mapping module comprises:

[0040] a multi-dimensional difference analysis unit configured to perform three-dimensional difference calculation on the defect diagnosis feature map, the three-dimensional difference calculation including geometric size deviation amount, texture distribution difference degree, and brightness abnormal deviation value;

[0041] a feature vector generation unit configured to perform tensor splicing on the geometric size deviation amount, the texture distribution difference degree, and the brightness abnormal deviation value to generate the real-time feature offset vector.

[0042] Preferably, the system further comprises:

[0043] A production topology modeling module is configured to establish a node topology network according to the layout of the casting production line equipment, and mark process correlation parameters between nodes.

[0044] A defect propagation deduction module is configured to input the target defect type into the node topology network, and simulate a defect cause diffusion path based on a graph structure propagation algorithm.

[0045] A defect source positioning module is configured to generate a defect source probability distribution map according to the defect cause diffusion path, and identify a high-probability defect source equipment node.

[0046] Preferably, the defect source positioning module comprises:

[0047] A heat map generation unit is configured to count defect correlation frequencies of each equipment node in the defect cause diffusion path, and calculate defect source probability values in combination with process correlation parameters.

[0048] A region clustering unit is configured to perform spatial density clustering on the defect source probability distribution map, and determine a defect source aggregation region.

[0049] An equipment identification unit is configured to mark a high-probability defect source equipment identification set according to a mapping relationship of the node topology network.

[0050] Compared with the prior art, the present application has the following beneficial effects:

[0051] The system innovatively sets a surface information acquisition module, which can synchronously acquire real-time optical image data and real-time process parameter data of the surface of a precision casting part of a machine tool, and construct a defect diagnosis feature map and a defect diagnosis auxiliary text based on the two types of data. This multi-source information synchronous acquisition method breaks the limitation of traditional detection technology which only relies on single optical image data, and fully considers the internal correlation between casting process parameters and surface defect formation. By combining the surface morphology features reflected by the optical image and the production process state reflected by the process parameters, more comprehensive and richer diagnosis basis can be provided for subsequent defect identification, avoiding defect misjudgment or missed detection caused by single information, especially for defects caused by abnormal process parameters and with inconspicuous surface features, which can be identified with the aid of abnormal changes in process parameters, further improving the comprehensiveness of defect detection.

[0052] The system adopts a dual recognition mechanism combining a first defect recognition module and a second defect recognition module to realize collaborative diagnosis of data-driven and mechanism-driven. The first defect recognition module processes the defect diagnosis feature map and the defect diagnosis auxiliary text by using a pre-trained double-flow convolutional neural network. The double-flow structure can extract and fuse image features and text-based process parameter information respectively. Compared with a traditional single convolutional neural network, the double-flow structure has stronger processing capability for multi-source data and can effectively capture the correlation features between images and process parameters, thereby generating a more accurate first classification result of the defect type. The second defect recognition module extracts defect mechanism feature values and performs similarity matching with a pre-stored defect mechanism knowledge base to judge the defect type from the mechanism level and generate a second classification result. This dual recognition mechanism allows the defect classification results to confirm each other, reduces the deviation of a single recognition method, and enables more in-depth analysis of complex defect types, such as distinguishing defect types when image features are similar but process parameters and defect mechanisms are different, thereby significantly improving the reliability of defect recognition.

[0053] The defect type fusion module can integrate the advantages of the two recognition methods by fusing the first classification result and the second classification result, and further optimize the judgment of the target defect type. In actual detection, if the first classification result and the second classification result are consistent, the defect type can be directly confirmed to ensure the accuracy of the detection result. If there is a difference between the two results, the system can determine the target defect type that best fits the actual situation by assigning weights to the two results and performing logic analysis, combining the feature correlation of multi-source data, and avoiding misjudgment caused by the deviation of a single recognition result. This fusion mechanism makes the system more adaptable and fault-tolerant when facing complex detection scenarios, and can stably output reliable detection results.

[0054] The system can realize real-time synchronous detection with the production process of machine tool precision castings. The surface information acquisition module acquires image and process parameter data in real time during the production process, and the subsequent defect recognition and fusion judgment process can be completed quickly without offline detection after the production process ends. This real-time detection capability enables defects that occur during production to be discovered in a timely manner, allowing production personnel to quickly adjust process parameters to prevent the continuous production of defects, reduce the number of defective products, reduce production costs, and shorten the production cycle. At the same time, the defect diagnosis feature map and defect mechanism knowledge base constructed by the system can also provide a reference for optimizing the casting process. By analyzing historical detection data, the system can summarize the rules of defect generation and provide direction for improving the production process, further improving the production quality of machine tool precision castings. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1A timing diagram of the machine tool precision casting surface defect automatic detection system of the present application;

[0056] Figure 2 A flowchart for the process influencing factor generation unit;

[0057] Figure 3 A flowchart for the first defect identification module;

[0058] Figure 4 A flowchart for the defect type fusion module;

[0059] Figure 5 A flowchart for the historical feature space construction and defect risk assessment. DETAILED DESCRIPTION

[0060] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.

[0061] Please refer to Figure 1 The present application provides a machine tool precision casting surface defect automatic detection system, which comprises:

[0062] The surface information acquisition module synchronously acquires real-time optical image data and real-time process parameter data of the surface of the machine tool precision casting. The real-time optical image data is collected by a high-resolution industrial camera, covering the entire casting surface, ensuring image clarity and detail integrity. The real-time process parameter data is obtained from the casting process monitoring sensor, including temperature, pressure, cooling rate and other parameters. The surface information acquisition module constructs a defect diagnosis feature map and a defect diagnosis auxiliary text according to these data. The defect diagnosis feature map is a multi-dimensional data representation that integrates image texture, contour and brightness information; the defect diagnosis auxiliary text stores feature components and influencing factors in a structured format. The first defect identification module inputs the defect diagnosis feature map and the defect diagnosis auxiliary text into a pre-trained dual-stream convolutional neural network for processing. The network processes image and text data in parallel and outputs a first classification result of the defect type, which is represented as a probability distribution of possible defect categories. The second defect identification module extracts multiple defect mechanism feature values, such as pore distribution density or crack extension direction, from the defect diagnosis feature map and performs similarity matching with a pre-stored defect mechanism knowledge base. The defect mechanism knowledge base contains standard defect models and their feature vectors, and the matching process is based on cosine similarity or Euclidean distance calculation to generate a second classification result indicating the most similar defect category. The defect type fusion module receives the first and second classification results and determines the target defect type of the machine tool precision casting through a weighted fusion strategy, such as weight allocation based on confidence and similarity scores. The system realizes automatic detection, reduces manual intervention, and improves detection accuracy and efficiency.

[0063] Embodiment 1: Refer to Figure 2 , involving the specific operation of the surface information acquisition module, which is responsible for synchronously acquiring real-time optical image data and real-time process parameter data of the surface of the precision casting of the machine tool, and constructing a defect diagnosis feature map and a defect diagnosis auxiliary text accordingly. The implementation process begins with the data acquisition phase, where a high-resolution industrial camera array is used to conduct a full-range scan of the casting surface. The cameras are equipped with an adaptive lighting system to eliminate environmental light interference and ensure the uniformity and consistency of image acquisition. The image acquisition frequency is synchronized with the production line beat, and when each casting passes through the detection station, the camera captures multi-angle high-resolution images, forming a complete surface coverage. These image data undergo preliminary preprocessing, including noise filtering, contrast adjustment, and geometric correction, to eliminate distortions or artifacts that may be introduced during the acquisition process, laying the foundation for subsequent feature extraction.

[0064] Real-time process parameter data is acquired through a sensor network integrated into the casting production line. These sensors monitor key process variables in real time, such as casting temperature data and cooling rate data. Temperature data is collected by thermocouple sensors installed at key locations such as furnaces, molds, and cooling channels, recording temperature changes at millisecond-level frequency. Cooling rate data is calculated by combining infrared thermometers and flow sensors, reflecting the heat dissipation of the casting at different stages. All sensor data and image acquisition systems are synchronized through a unified timestamp, ensuring consistency in the time dimension and avoiding analysis errors caused by timing deviations.

[0065] The feature map construction unit receives the preprocessed real-time optical image data, first converting it into a multi-channel digital matrix, where each pixel point contains brightness, color, and position information. Subsequently, the unit performs multi-scale feature extraction operations, using a pyramid decomposition algorithm to analyze image content from global to local layer by layer. Texture dispersion is calculated based on a gray level co-occurrence matrix, quantifying the uniformity or disorder of surface texture by statistically analyzing the spatial dependence of pixel gray values. The evaluation of contour irregularity uses edge detection algorithms to identify the boundaries of the casting, and combines Fourier descriptors to analyze the smoothness and continuity of the contour line, outputting numerical values representing shape deviations. Brightness abnormal area distribution is achieved through threshold segmentation and region growing algorithms, identifying areas with brightness values deviating from the normal range and calculating their area proportion and distribution pattern. The geometric deformation gradient is calculated by comparing the actual image with the standard CAD model, using affine transformation to calculate local deformation variables, and outputting a gradient map representing the deformation degree. All these feature components are integrated into a multi-dimensional data cube, i.e., the defect diagnosis feature map, which is stored in tensor form to facilitate efficient access and processing by subsequent modules.

[0066] The process influence factor generation unit processes the synchronously collected real-time optical image data and real-time process parameter data, focusing on analyzing the statistical correlation between image features and process parameters. For casting temperature data, the unit calculates the mutual information entropy between it and the image data. First, it estimates the probability distribution of the temperature data and the probability distribution of the image feature values. Then, it calculates the mutual information between the two through a joint histogram, obtaining the surface defect temperature correlation degree. The higher the correlation degree value, the greater the potential impact of temperature fluctuations on defect formation. Similarly, for cooling rate data, the unit performs the same mutual information entropy calculation process, based on the change sequence of cooling rate values and the response sequence of image features, to derive the surface defect cooling correlation degree. Thereafter, the unit dynamically weights and fuses the two correlation degree values in proportion, with the dynamic weight adjusted according to the relative importance of temperature and cooling rate in influencing defects in historical production data. For example, in high-temperature casting scenarios, the weight of the temperature correlation degree may be higher. The weighted result is output as a scalar value, i.e., the surface defect process influence factor, which comprehensively reflects the degree of contribution of process conditions to defect formation.

[0067] The auxiliary text generation unit receives the defect mechanism feature components from the feature atlas construction unit and the surface defect process influence factor from the process influence factor generation unit. The unit first discretizes these continuous numerical values, mapping each value to a discrete level through predefined interval division rules, such as dividing the texture dispersion value into "low", "medium", and "high" levels. Subsequently, the unit converts the discrete values into natural language descriptions using a semantic coding dictionary, which contains a standard terminology library, such as "texture dispersion: 0.85" being coded as "high texture dispersion". The surface defect process influence factor is also discretized and coded, such as being converted to "process influence factor: medium". Finally, all coded feature components and influence factors are assembled in a structured key-value pair format to form the defect diagnosis auxiliary text. The text adopts a JSON-like format to ensure machine readability and parsability, such as outputting { "texture_dispersion": "high", "contour_irregularity": "medium", "process_influence_factor": "medium"}. The entire implementation process focuses on data reliability and consistency, with all calculations based on real-time data streams, supporting online processing without human intervention, thereby achieving efficient and automated feature extraction and description of casting surface defects.

[0068] Example 2: see Figure 3, involving the specific operation of the first defect identification module, which uses a pre-trained double-flow convolutional neural network to process defect diagnosis feature maps and defect diagnosis auxiliary text, generating a first classification result of the defect type. The entire processing flow is based on a deep learning architecture, achieving high-precision defect classification through parallel processing of multi-modal data.

[0069] The defect diagnosis feature map is input into the image feature encoding branch in the form of a multi-dimensional tensor, which contains texture, contour, and brightness information of the casting surface. The image feature encoding branch is composed of multiple convolutional layers, with the initial layer using a small size convolutional kernel to capture local features such as edges and fine texture patterns. Each convolutional layer is followed by a nonlinear activation function to enhance the model's expression ability. After the convolution operation, a pooling layer is used for feature dimension reduction, preserving significant features while reducing computational complexity. The network depth design allows for layer-by-layer abstraction, with bottom-level features gradually combining to form high-level semantic representations. Batch normalization layers are inserted to speed up the training process and improve stability. Finally, the feature mapping is converted into a fixed-length image feature vector through a global average pooling layer, which compactly encodes the visual semantic information of the image.

[0070] The text feature encoding branch simultaneously processes the defect diagnosis auxiliary text, which is input in a structured key-value pair format. The branch first performs text preprocessing, including word segmentation, stopword filtering, and standardization processing. The word sequence after segmentation is converted into a dense vector representation through an embedding layer, with each word mapped to a point in a high-dimensional space, and semantically similar words located close together in space. Subsequently, a convolutional neural network is used to process the text sequence, with one-dimensional convolution kernels sliding along the sequence direction to extract local phrase-level features. Multiple convolution kernels of different sizes are used in parallel to capture text patterns of different lengths. The convolution output is subjected to a pooling operation to extract the most distinctive features, and finally a text feature vector is generated, which effectively encodes the defect feature descriptions and process influence information in the text.

[0071] The cross-modal feature fusion layer receives the image feature vector and the text feature vector, and implements cross-modal feature interaction. This layer first aligns the dimensions of the two feature vectors by adjusting the vector dimensions through a fully connected layer to have the same length. During feature alignment, an attention mechanism is introduced to calculate the correlation weight between the image features and the text features, allowing the model to focus on the most relevant cross-modal information. The aligned features are combined into a joint representation through feature concatenation, and then subjected to nonlinear transformation through multiple fully connected layers to learn the complex associations between cross-modalities. During the fusion process, a feature fusion loss function is used for constraint, which measures the consistency between the fused features and the original features of each modality, promoting the generation of fused feature representations with rich cross-modal information.

[0072] The defect classification output layer receives the fused feature representation and maps high-dimensional features to the defect class space through a fully connected layer. This layer uses a softmax activation function to calculate the probability distribution of each defect class, outputting the first classification result. The entire network is optimized end-to-end during the training phase using a large-scale labeled dataset, with a cross-entropy loss function and an optimization algorithm that adjusts network parameters through backpropagation. The training data contains images of various defect types and corresponding text descriptions, ensuring that the model learns accurate visual-text correspondence. The network architecture uses techniques such as residual connections and dropout layers to prevent overfitting and improve generalization.

[0073] In the inference phase, the trained network directly processes the input defect diagnosis feature map and defect diagnosis auxiliary text, and calculates the first classification result through forward propagation. This result is represented as a probability vector, with each element corresponding to the confidence of a specific defect class, such as porosity, cracks, and slag inclusion. The entire processing process is automated and does not require human intervention, enabling rapid and accurate classification of casting surface defects. The system design takes into account real-time requirements, and the network structure is optimized to ensure processing speed that meets the production line beat requirements in industrial environments. At the same time, the module supports online updates, which can fine-tune model parameters through new data to continuously improve classification accuracy.

[0074] Embodiment 3: refer to Figure 4 , involving the specific operation of the second defect recognition module and the defect type fusion module. The second defect recognition module extracts quantitative feature values from the defect diagnosis feature map and generates a second classification result by similarity matching with the pre-stored defect mechanism knowledge base. The defect type fusion module integrates the first classification result and the second classification result through a weighted fusion strategy to ultimately determine the target defect type.

[0075] The defect feature quantization unit of the second defect recognition module receives the defect diagnosis feature map from the surface information acquisition module. This unit uses various image processing algorithms to extract specific defect mechanism feature values. The calculation of the porosity distribution density uses an adaptive threshold segmentation algorithm to identify potential porosity regions, combined with morphological operations to remove noise interference, and finally calculates the number of pores per unit area. The extraction of the crack extension direction uses a direction-adjustable filter bank to analyze the main direction distribution of crack pixels, and calculates the average orientation angle through Hough transform to detect linear features. The slag inclusion area ratio uses a segmentation method based on texture classification, first training a texture classifier to distinguish between normal surface and slag inclusion area, then calculating the ratio of slag inclusion area pixels to total pixels. The shrinkage aggregation degree is evaluated by combining local binary pattern features with spatial clustering analysis to assess the aggregation characteristics of the defect region. All feature values are standardized to eliminate dimensional effects and form a unified feature vector representation.

[0076] The knowledge base matching unit accesses a pre-stored defect mechanism knowledge base, which contains a set of feature vectors of various standard defect models. Each standard defect model corresponds to a defect category, such as pores, cracks, slag inclusions, and shrinkage, and stores a range of verified typical feature values in this category. The matching process calculates the similarity scores of the current extracted defect mechanism feature values and each standard defect model in the knowledge base. The similarity calculation uses an improved distance measurement method, and the calculation formula of the method is:

[0077]

[0078] wherein: represents the similarity score of the current feature vector and the kth standard defect model, is the number of feature dimensions, is the weight coefficient of the ith feature, is the ith feature value extracted at present, is the mean value of the ith feature value in the kth standard defect model, is the standard deviation of the ith feature value in the kth standard defect model. The weight coefficient is dynamically adjusted according to the discrimination of each feature to the defect recognition, and the feature with high discrimination is given higher weight. The exponential function is used to convert the distance measurement into a similarity score, ensuring that the score value range is between 0 and 1.

[0079] The classification result generation unit selects the defect category corresponding to the standard defect model with the highest similarity score with the current feature vector as the second classification result output according to the similarity score result. The result is expressed in the form of a clear defect category label, while retaining the similarity score information of each candidate category to provide data support for subsequent fusion processing.

[0080] The weight distribution unit of the defect type fusion module receives the first classification result and the second classification result. For the first classification result, the probability confidence, i.e. the maximum value in the softmax output vector, is extracted as the basis for the distribution of the first weight coefficient. The probability confidence reflects the determination degree of the double-flow convolutional neural network on its own classification result. For the second classification result, the similarity score with the best matching standard defect model is extracted as the basis for the distribution of the second weight coefficient. The similarity score reflects the matching degree of the current sample with the standard defect model. The normalization processing unit normalizes the first weight coefficient and the second weight coefficient. The softmax function is used to normalize the two weight coefficients, and their sum is 1. The processed standard weight coefficients respectively represent the relative importance of the two classification methods in the final decision. The defect decision unit makes a weighted voting decision on the first classification result and the second classification result based on the standard weight coefficients. The first classification result provides the probability distribution of each defect type, and the second classification result provides the explicit class label. In the weighted voting process, the probability distribution of the first classification result is scaled according to its standard weight coefficient, and the second classification result assigns all its weight to the determined class. Finally, the scores of all candidate classes are sorted by the weighted scores, and the class with the highest score is selected as the target defect type. The entire decision-making process retains the score of each candidate class, providing reference information for quality analysis.

[0081] In the implementation process, the defect mechanism knowledge base needs to be maintained and updated regularly, including new defect cases and feature data, to maintain the completeness and timeliness of the knowledge base. The determination of the feature weight coefficient is based on statistical analysis of historical data to ensure the rationality of weight distribution. The entire module design takes into account the real-time requirements of the industrial detection environment, and all calculation processes are optimized by algorithms to meet the time constraints of online detection.

[0082] Example 4: see Figure 5, involving the collaborative operation of historical feature space construction module, real-time feature mapping module, and defect risk assessment module. The system assesses the defect risk level of a cast piece by comparing its features with the reference features of qualified cast pieces. The historical feature space construction module extracts surface feature data of historical qualified cast pieces from the quality management database. These data come from a large number of cast samples that have been judged as qualified by the quality inspection department in the long-term production process. The module collects multi-dimensional feature indicators of each qualified cast piece, including texture uniformity indicator, geometric precision distribution matrix, and brightness standard deviation vector. The texture uniformity indicator is obtained by analyzing the gray level distribution characteristics of the surface image, and calculating the statistical quantity of local gray level variation. The geometric precision distribution matrix is generated by comparing the three-dimensional scanning data with the standard CAD model, and records the dimensional deviation of each part. The brightness standard deviation vector is obtained by calculating the dispersion degree of surface brightness value in different regions. After cleaning and standardization, all these feature data are integrated to construct a multi-dimensional qualified feature space. This space is essentially a feature database, where each dimension represents a surface feature indicator, and the feature data of a large number of qualified cast pieces form a cluster distribution in this space, showing the normal range of qualified product feature values.

[0083] The real-time feature mapping module receives the defect diagnosis feature spectrum of the current detection and maps it into the established qualified feature space. The module first analyzes the input defect diagnosis feature spectrum and extracts the feature dimensions corresponding to the qualified feature space. Then, the module performs three-dimensional difference calculation: the geometric dimensional deviation is obtained by comparing the key dimensions of the current cast piece with the standard dimensional range stored in the qualified feature space; the texture distribution difference is obtained by calculating the matching degree of the current texture feature value with the texture distribution pattern in the qualified feature space; the brightness abnormal deviation value is quantified by analyzing the difference between the current brightness distribution and the qualified brightness feature. These difference values are combined into a real-time feature offset vector through tensor concatenation technology, and each component of the vector represents the deviation of the current cast piece from the qualified standard in a certain feature dimension.

[0084] The defect risk assessment module generates the cast defect risk level according to the real-time feature offset vector. The module uses a machine learning-based grading algorithm to map the multi-dimensional offset vector to the predefined risk level. The risk assessment process considers the weight distribution of different feature dimensions, and the key feature dimensions (such as geometric dimensional deviation that directly affects the structural integrity) are given higher weights. The risk level output is usually divided into several levels, indicating the size of the possibility of defects in the cast piece.

[0085] The following table shows the statistical range of some feature indicators in the qualified feature space:

[0086] Table 1: Reference range of surface feature indicators of qualified cast pieces

[0087]

[0088] Throughout the implementation process, the historical feature space needs to be updated regularly to include new qualified sample data to maintain the timeliness of the benchmark. The real-time feature mapping algorithm adopts an incremental learning strategy, which can adapt to slow changes in production conditions. The output of the defect risk assessment module provides a reference for quality decision-making, helping to distinguish potential defective products that need to be focused on. During system operation, all feature data processing and analysis are automatically completed without human intervention, ensuring the consistency and objectivity of the evaluation results. At the same time, the system records the feature deviation vector and risk assessment results of each casting, providing data support for quality traceability and process improvement.

[0089] Example 5: involves the collaborative operation of the production topology modeling module, the defect propagation deduction module, and the defect source localization module. This implementation establishes a device network model of the casting production line, analyzes the propagation path of defects in the production process, and finally locates the source device of the defect. The production topology modeling module first collects the device layout information of the casting production line. This module abstracts each device on the production line as a network node, including melting equipment, pouring systems, forming molds, cooling devices, cleaning equipment, etc. Each device node records its basic attributes, such as device type, process parameter range, device identification code. The connection relationship between nodes is established based on the actual production process, including material flow path, energy transmission path, and information transmission path. Process-related parameters are marked on the connection edges between nodes, including temperature transmission coefficient, pressure conductivity, flow transmission rate, and other physical quantities. The entire node topology network is stored in a graph structure data format, facilitating subsequent graph algorithm processing. The spatio-temporal relationship between devices is considered during network construction to ensure that the topology structure can truly reflect the dynamic running characteristics of the production line.

[0090] The defect propagation deduction module receives the target defect type information from the defect type fusion module, which maps the defect type to the node topology network and simulates the diffusion process of the defect in the production line based on the graph structure propagation algorithm. The propagation algorithm considers the association characteristics of defect types and device process parameters, with different propagation rules for different defect types. For example, temperature-related defects mainly propagate between devices with thermal association, while pressure-related defects propagate between fluid path devices. The deduction process uses an iterative calculation method, starting from the possible defect source node and calculating the probability of defect propagation to adjacent nodes based on the process-related parameters of the connection edges. Each iteration updates the defect state probability of each node until the propagation probability falls below a certain threshold or covers the entire network. The deduction result generates a defect cause diffusion path, which shows the possible propagation route and probability distribution of the defect from the source node to the detection node.

[0091] The defect source positioning module generates a defect source probability distribution map according to the defect cause diffusion path. The module counts the frequency of each device node appearing in the diffusion path, and calculates the probability value of each node as a defect source in combination with the process correlation parameters. The probability calculation considers multiple factors: the position weight of the node in the propagation path, the association strength of the node and the defect type, the historical abnormal record of the node process parameters, etc. The heat map generation unit maps the probability value to the device layout map to form an intuitive probability distribution visualization display. The region clustering unit performs spatial density clustering analysis on the probability distribution to identify high-probability device aggregation areas. These areas indicate the concentrated zones of defect generation. The device identification unit labels the high-probability defect source device identification set according to the clustering results and the mapping relationship of the node topology network. The output results include the device list and its defect source probability value, sorted from high to low according to the probability value.

[0092] During the entire implementation process, the node topology network needs to be updated in a timely manner with the production line equipment modification to maintain the accuracy of the model. The defect propagation deduction algorithm uses an adaptive parameter adjustment mechanism, which can optimize the propagation rule parameters according to real-time production data. The defect source positioning result is integrated with the equipment maintenance system to provide decision-making basis for preventive maintenance. The system records the results of each defect deduction and positioning during operation, and continuously optimizes the topology model and deduction algorithm through long-term data accumulation. All processing processes are automatically executed, and the output results are displayed in a visual form to assist production management personnel in quickly locating the root cause of quality problems.

Claims

1. A machine tool precision casting surface defect automatic detection system, characterized in that, The method comprises the steps of: a surface information acquisition module is used for synchronously acquiring real-time optical image data and real-time process parameter data of a surface of a precision casting of a machine tool, and constructing a defect diagnosis feature map and a defect diagnosis auxiliary text according to the real-time optical image data and the real-time process parameter data; a first defect recognition module is used for inputting the defect diagnosis feature map and the defect diagnosis auxiliary text into a pre-trained double-flow convolutional neural network for processing, so as to generate a first classification result of a surface defect type of the precision casting of the machine tool; a second defect recognition module is used for extracting a plurality of defect mechanism characteristic values of the precision casting of the machine tool according to the defect diagnosis feature map, and performing similarity matching with a pre-stored defect mechanism knowledge base, so as to generate a second classification result of the surface defect type of the precision casting of the machine tool based on a matching result; a defect type fusion module is used for fusing the first classification result and the second classification result to determine a target defect type of the precision casting of the machine tool; the surface information acquisition module comprises: a feature map construction unit is used for generating the defect diagnosis feature map according to the real-time optical image data, and performing multi-scale feature extraction on the real-time optical image data, so as to obtain defect mechanism characteristic components including texture dispersion, contour irregularity, abnormal area distribution of brightness, and geometric deformation gradient; a process influence factor generation unit is used for quantifying mutual information entropy between the real-time optical image data and the real-time process parameter data, and generating a surface defect process influence factor according to a mutual information entropy quantification result; an auxiliary text generation unit is used for performing numerical discretization and semantic coding processing on each defect mechanism characteristic component and the surface defect process influence factor, and outputting the defect diagnosis auxiliary text in a structured key-value pair format.

2. The machine tool precision casting surface defect automatic detection system according to claim 1, characterized in that, The real-time process parameter data comprises casting temperature data and cooling rate data; The process influence factor generation unit is specifically used for: performing mutual information entropy calculation on the synchronously acquired real-time optical image data and the casting temperature data, so as to obtain a surface defect temperature correlation degree; performing mutual information entropy calculation on the synchronously acquired real-time optical image data and the cooling rate data, so as to obtain a surface defect cooling correlation degree; weighting and fusing the surface defect temperature correlation degree and the surface defect cooling correlation degree according to a dynamic proportion, so as to output the surface defect process influence factor.

3. The machine tool precision casting surface defect automatic detection system according to claim 1, characterized in that, The double-flow convolutional neural network comprises an image feature coding branch, a text feature coding branch, a cross-modal feature fusion layer, and a defect classification output layer; The first defect recognition module is specifically used for: performing deep feature extraction on the defect diagnosis feature map through the image feature coding branch, so as to obtain an image feature vector; performing semantic feature extraction on the defect diagnosis auxiliary text through the text feature coding branch, so as to obtain a text feature vector; based on cross-modal feature alignment constraints and a feature fusion loss function, inputting the image feature vector and the text feature vector into the cross-modal feature fusion layer for feature interaction, so as to generate a fusion feature representation; inputting the fusion feature representation into the defect classification output layer, so as to output the first classification result.

4. The machine tool precision casting surface defect automatic detection system according to claim 1, characterized in that, The second defect identification module comprises: a defect feature quantification unit configured to extract defect mechanism characteristic values including pore distribution density, crack extension direction, slag inclusion area proportion, and shrinkage aggregation degree from the defect diagnosis feature map; a knowledge base matching unit configured to calculate similarity scores of the defect mechanism characteristic values and pre-stored standard defect models in the defect mechanism knowledge base; a classification result generation unit configured to select a defect category corresponding to a standard defect model with the highest similarity score as the second classification result.

5. The machine tool precision casting surface defect automatic detection system according to claim 4, characterized in that, The defect type fusion module comprises: a weight allocation unit configured to determine a first weight coefficient according to the probability confidence in the first classification result and a second weight coefficient according to the similarity score in the second classification result; a normalization processing unit configured to perform normalization processing on the first weight coefficient and the second weight coefficient to obtain a standard weight coefficient; a defect decision unit configured to perform weighted voting on the first classification result and the second classification result based on the standard weight coefficient to determine the target defect type.

6. The machine tool precision casting surface defect automatic detection system according to claim 1, characterized in that, Further comprising: a historical feature space construction module configured to collect surface feature data of historical qualified castings to construct a qualified feature space containing texture uniformity indicators, geometric precision distribution matrices, and brightness standard deviation vectors; a real-time feature mapping module configured to map the defect diagnosis feature map of the current detection to the qualified feature space to calculate a real-time feature offset vector; a defect risk assessment module configured to generate a casting defect risk level according to the real-time feature offset vector.

7. The machine tool precision casting surface defect automatic detection system according to claim 6, characterized in that, The real-time feature mapping module comprises: a multi-dimensional difference analysis unit configured to perform three-dimensional difference calculation on the defect diagnosis feature map, the three-dimensional difference calculation including geometric size deviation amount, texture distribution difference degree, and brightness abnormal deviation value; a feature vector generation unit configured to perform tensor splicing on the geometric size deviation amount, the texture distribution difference degree, and the brightness abnormal deviation value to generate the real-time feature offset vector.

8. The machine tool precision casting surface defect automatic detection system according to claim 1, characterized in that, Further comprising: a production topology modeling module configured to establish a node topology network according to the layout of the casting production line equipment and label process correlation parameters between nodes; a defect propagation deduction module configured to input the target defect type into the node topology network and simulate a defect cause diffusion path based on a graph structure propagation algorithm; a defect source positioning module configured to generate a defect source probability distribution map according to the defect cause diffusion path and identify high-probability defect source equipment nodes.

9. The machine tool precision casting surface defect automatic detection system according to claim 8, characterized in that, The defect source positioning module comprises: a heat map generation unit configured to count defect correlation frequencies of equipment nodes in the defect cause diffusion path and calculate defect source probability values in combination with process correlation parameters; a region clustering unit configured to perform spatial density clustering on the defect source probability distribution map to determine a defect source aggregation region; an equipment identification unit configured to label a high-probability defect source equipment identification set according to the mapping relationship of the node topology network.

Citation Information

Patent Citations

  • Method and system for analyzing defects in wafer manufacturing based on big data

    CN119580022A

  • Liquor bottle surface defect inspection method, electronic device, and storage medium

    WO2021232613A1