Neural network-based casting and rolling machine defect positioning method and system

Through neural network and big data analysis technology, the problem of low defect detection efficiency and poor accuracy of traditional casting and rolling mills is solved, and accurate identification of casting and rolling mill defect types and improvement of production efficiency is achieved.

CN120356001AInactive Publication Date: 2025-07-22XIJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510489588.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-07-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional casting and rolling mill defect detection methods rely on manual experience, have low efficiency and poor accuracy, and are difficult to meet the requirements of modern casting and rolling production for product quality and production efficiency. Traditional data analysis methods are difficult to reveal the complex relationship between defects and causes.

Method used

Using a neural network-based method, defect data is obtained through high-precision optical and ultrasonic sensors, classified neural networks are used to identify defect types and severity, and the causes of defects are mined in combination with big data analysis technology, clustering and association mining algorithms are used to establish association rules, and final causes are determined in combination with defect databases.

Benefits of technology

Accurate identification of defect types and quantitative evaluation of severity are achieved, improving the accuracy and production efficiency of defect positioning of casting and rolling mills.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120356001A_ABST
    Figure CN120356001A_ABST
Patent Text Reader

Abstract

The invention discloses a casting and rolling machine defect positioning method and system based on a neural network, and the method comprises the steps: obtaining die-casting product defect data and a defect database, inputting the defect data into a pre-trained classification neural network, and obtaining a defect type and defect severity, and processing the defect type and the defect severity to obtain candidate defect causes, and obtaining the defect causes according to the candidate defect causes and the defect database. According to the method, the defect data is analyzed through the classification neural network, so that accurate identification of defect types and quantitative evaluation of severity are realized; defect causes are mined and analyzed through a big data analysis technology, the accuracy of defect positioning of the casting and rolling machine is finally improved, and the production efficiency of the casting and rolling machine is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image algorithms, and particularly to a method and system for defect location of a casting-rolling mill based on a neural network. Background Art

[0002] With the advancement of Industry 4.0 and intelligent manufacturing, the degree of intelligence and automation in the casting-rolling production process has been continuously improved, posing higher requirements for the control of casting-rolling product quality and defect detection. Traditional defect detection methods for casting-rolling mills mainly rely on manual experience and regular sampling inspection, suffering from problems such as low efficiency, poor accuracy, and incomplete detection, and it is difficult to meet the requirements of modern casting-rolling production for product quality and production efficiency.

[0003] During the casting-rolling production process, the formation of defects is affected by various process parameters and material properties. These factors are interrelated and interact with each other. Traditional data analysis methods are difficult to comprehensively reveal the complex relationship between defects and their causes, and cannot further improve the production efficiency. Summary of the Invention

[0004] In order to solve the above problems existing in the prior art, the present invention provides a method and system for defect location of a casting-rolling mill based on a neural network. The technical problems to be solved by the present invention are achieved through the following technical solutions:

[0005] A method for defect location of a casting-rolling mill based on a neural network, comprising:

[0006] Obtaining defect data of die-casting products and a defect database;

[0007] Inputting the defect data into a pre-trained classification neural network to obtain a defect type and a defect severity;

[0008] Processing the defect type and the defect severity to obtain candidate defect causes;

[0009] Obtaining defect causes according to the candidate defect causes and the defect database.

[0010] In a specific embodiment, the obtaining of defect data of die-casting products and a defect database includes:

[0011] Scanning the surface of a die-casting product by a high-precision optical sensor to obtain original surface defect image data;

[0012] Scanning the interior of a die-casting product by an ultrasonic sensor to obtain original internal defect image data;

[0013] Normalizing the original surface defect image data and the original internal defect image data to obtain original defect image data;

[0014] Process the original defective image data to obtain labeled defective image data;

[0015] Perform data conversion on the labeled defective image data to obtain defective data.

[0016] In a specific embodiment, the method for training a classification neural network includes:

[0017] Obtain training data to be trained, where the training data to be trained includes defective data to be trained, defect types to be trained, and defect severity to be trained;

[0018] Preprocess and label the training data to be trained to obtain preprocessed data;

[0019] Input the preprocessed data into the classification neural network to be trained for training to obtain a classification neural network, where the loss function of the classification neural network is a cross-entropy loss and an exponential loss function of structural similarity.

[0020] In a specific embodiment, the step of inputting the defective data into a pre-trained classification neural network to obtain a defect type and a defect severity includes:

[0021] Input the defective data into a feature extraction layer to obtain a feature image;

[0022] Input the feature image into a feature processing layer to obtain a feature pyramid;

[0023] Input the feature pyramid into an attention mechanism layer to obtain weighted features;

[0024] Input the weighted features into a detection and classification layer to obtain the defect type and the defect severity.

[0025] In a specific embodiment, the step of inputting the feature image into a feature processing layer to obtain a feature pyramid includes:

[0026] Input the feature image into an image segmentation layer to obtain feature blocks;

[0027] Input the feature blocks into an embedding layer to obtain low-dimensional vectors;

[0028] Input the low-dimensional vectors into a positional embedding layer to obtain information low-dimensional vectors;

[0029] Use the transformation encoder layer to obtain the dependency relationship between the information low-dimensional vectors to obtain high-level features;

[0030] Input the high-level features into a classification head layer to obtain class probabilities;

[0031] Input the class probabilities into a bottom-up path layer and a top-down path layer to obtain the dimensional features of the class probabilities;

[0032] Input the dimensional feature into the horizontal connection layer to obtain a feature pyramid.

[0033] In a specific embodiment, the step of inputting the feature pyramid into the attention mechanism layer to obtain a weighted feature includes:

[0034] Input the feature pyramid into the global average pooling layer and the fully connected layer to obtain a fused feature;

[0035] Input the fused feature into the activation function layer to obtain a non-linear fused feature;

[0036] Input the non-linear fused feature into the per-channel multiplication layer to obtain a weighted feature.

[0037] In a specific embodiment, the step of inputting the weighted feature into the detection and classification layer to obtain the defect type and the defect severity includes:

[0038] Input the weighted feature into the classification head network layer to obtain the defect type.

[0039] Input the defect type and the weighted feature into the detection head network layer to obtain the defect severity.

[0040] In a specific embodiment, the step of processing the defect type and the defect severity to obtain candidate defect causes includes:

[0041] Obtain the process parameter data of the casting-rolling mill and the input material data;

[0042] Use the clustering analysis algorithm to group the process parameter data and the input material data to obtain potential defect causes;

[0043] Use the big data association mining algorithm to obtain the association rules between the defect type, the defect severity and the potential defect causes;

[0044] Obtain the candidate defect causes according to the accuracy weight and the reliability weight of the association rules.

[0045] In a specific embodiment, the step of obtaining the defect cause according to the candidate defect cause and the defect database includes:

[0046] Obtain the factor data related to the defect type and the defect severity from the defect database;

[0047] Use weight matching according to the factor data and the candidate defect cause to obtain the defect cause.

[0048] In a specific embodiment, a casting-rolling mill defect location system based on a neural network includes:

[0049] A collection unit, configured to obtain die-casting product defect data and a defect database;

[0050] A processing unit, configured to input the defect data into a pre-trained classification neural network to obtain a defect type and a defect severity;

[0051] An analysis unit, configured to process the defect type and the defect severity to obtain candidate defect causes;

[0052] A positioning unit, configured to obtain defect causes according to the candidate defect causes and the defect database.

[0053] Advantages of the present invention:

[0054] A method and system for defect positioning of a casting and rolling mill based on a neural network according to the present invention analyzes defect data through a classification neural network to achieve accurate identification of defect types and quantitative evaluation of severity; through big data analysis technology, defect causes are mined and analyzed, ultimately improving the accuracy of defect positioning of the casting and rolling mill and further improving the production efficiency of the casting and rolling mill.

[0055] The following will further describe the present invention in detail with reference to the accompanying drawings and embodiments. Description of the Drawings

[0056] Figure 1 is a flowchart of a method for defect positioning of a casting and rolling mill based on a neural network provided by an embodiment of the present invention;

[0057] Figure 2 is a defect schematic diagram of a method for defect positioning of a casting and rolling mill based on a neural network provided by an embodiment of the present invention;

[0058] Figure 3 is a neural network schematic diagram of a method for defect positioning of a casting and rolling mill based on a neural network provided by an embodiment of the present invention;

[0059] Figure 4 is a module block diagram of a system for defect positioning of a casting and rolling mill based on a neural network provided by an embodiment of the present invention. Detailed Embodiments

[0060] The following further describes the present invention in detail with specific embodiments, but the embodiments of the present invention are not limited thereto.

[0061] Embodiment 1

[0062] In a specific embodiment, please refer to Figure 1 , Figure 1 which is a flowchart of a method for defect positioning of a casting and rolling mill based on a neural network, and the specific steps are as follows:

[0063] S1. Obtain the defect data of die-casting products and the defect database. It should be noted that the defect data is the basis for analysis and directly reflects the problems in the operation of the casting-rolling mill. Therefore, it is necessary to give priority to obtaining the defect data of die-casting products. In addition, since the defect database provides historical experience and knowledge, helps establish the mapping relationship between defect characteristics, process parameters, and materials, and provides data support for subsequent analysis, it is necessary to obtain the defect database at the same time. Among them, the defect database includes process parameter data, input material data, defect type, defect severity, defect cause, and the adjustment strategy of the casting-rolling mill.

[0064] For a better display of the defect data of die-casting products, please refer to Figure 2 , Figure 2 is a schematic diagram of defects of a defect location method for a casting-rolling mill based on a neural network. For the common defects that may occur during the production process of the casting-rolling mill, including surface defects: cracks, inclusions, surface scratches, and scale; dimensional and shape defects: uneven thickness, uneven width, and poor coil shape; internal defects: pores and segregation; other defects: poor flatness and peeling.

[0065] When collecting the above-mentioned defect data, it specifically includes:

[0066] S11. Obtain the original surface defect image data by scanning the surface of the die-casting product with a high-precision optical sensor.

[0067] S12. Obtain the original internal defect image data by scanning the inside of the die-casting product with an ultrasonic sensor;

[0068] Preferably, for the high-precision optical sensor and the ultrasonic sensor, a high-resolution line array camera or area array camera is used, combined with a uniform diffuse reflection light source or a structured light source. The line array camera is suitable for scanning continuously moving products, while the area array camera is suitable for static or short-distance scanning. The light source needs to ensure a high contrast between the surface defects (such as cracks, scratches, pores) and the background; the camera resolution can be set according to the minimum defect size requirement, such as 100 pixels per millimeter, to ensure that tiny defects can be captured; in addition, for complex curved surface products, multi-view scanning and image stitching can be used to avoid missing defects caused by occlusion.

[0069] S13. Normalize the original surface defect image data and the original internal defect image data to obtain the original defect image data.

[0070] S14. Process the original defect image data to obtain the marked defect image data.

[0071] The specific steps for processing the original defect image data include:

[0072] S141. Preprocessing step: Median filtering or Gaussian filtering is used to remove sensor noise from the original defect image data while retaining edge information. Histogram equalization or adaptive contrast stretching is used to highlight the defect area, obtaining preprocessed defect image data;

[0073] S142. Defect segmentation step: The preprocessed defect image data is segmented using edge detection, threshold segmentation, and morphological operations to obtain the defect area. In a specific embodiment, the Canny operator is used to detect the defect boundary, combined with a global threshold such as the Otsu algorithm to separate the defect from the background, and small noise points are removed through erosion and dilation, and the broken defect areas are connected;

[0074] S143. Defect marking step: The contour of the segmented defect area is extracted to generate a closed polygon mark, a unique identifier (such as defect ID) is assigned to each defect, and the position attribute, area attribute, and direction attribute are recorded, obtaining marked defect image data.

[0075] S15. The marked defect image data is subjected to data conversion to obtain defect data. This step specifically includes:

[0076] S151. Feature extraction is performed on the marked defect image data to obtain image features. Among them, the image features include geometric features, texture features, and position features;

[0077] S152. The image features are subjected to data normalization processing to convert the image features into structured data. The structured data can, for example, contain the following fields: product ID, defect ID, defect image, position coordinates, area, aspect ratio, and texture features.

[0078] S2. Please refer to Figure 3 , Figure 3 is a schematic diagram of a neural network of a method for defect localization of a casting and rolling mill based on a neural network. The defect data is input into a pre-trained classification neural network to obtain the defect type and defect severity; Since the classification neural network is good at dealing with very complex non-linear relationships and can efficiently identify the defect type and severity, the classification neural network is used as the core network.

[0079] In this embodiment, the method for training the classification neural network includes:

[0080] Obtain the data to be trained. Among them, the data to be trained includes the defect data to be trained, the defect type to be trained, and the defect severity to be trained. The specific steps are as follows:

[0081] Data collection step: Collect a large amount of defect data of die-cast products, including defect samples of different types and degrees, as well as corresponding defect-free samples, to ensure data diversity and representativeness;

[0082] Data cleaning steps: Clean the collected data, remove invalid data, duplicate data, and abnormal data to ensure the quality and usability of the data.

[0083] Preprocess and annotate the data to be trained to obtain preprocessed data. The specific steps are as follows: Image normalization preprocessing: Normalize the image data to the same size and pixel range. In a specific implementation, all images are adjusted to 224×224 pixels, and the pixel values are normalized to the range [0,1] or [-1,1] to unify the format and scale of the input data.

[0084] Data augmentation preprocessing: Use data augmentation techniques such as rotation, flipping, scaling, brightness adjustment, and contrast adjustment to expand the training dataset, improve the generalization ability and robustness of the model, and prevent overfitting.

[0085] Data annotation: Make detailed annotations for the preprocessed defect data, including defect types (such as cracks, pores, inclusions, etc.), defect severity (such as minor, medium, severe, etc.), defect locations (such as coordinate information), etc., to provide accurate label information for subsequent neural network training.

[0086] Input the preprocessed data into the classification neural network to be trained to obtain the classification neural network. Among them, the loss function of the classification neural network is the cross-entropy loss and the exponential loss function of structural similarity. Due to memory limitations and computational efficiency considerations, the training set is divided into multiple small batches (batch), and only one batch of data is loaded for forward propagation and backward propagation calculations each time training. This can reduce memory occupancy and improve the generalization ability of the model through stochastic gradient descent. Therefore, the training set is trained using the method of feeding data in batches to obtain the neural network. The specific training process is as follows:

[0087] Initialize network parameters: Randomly initialize the weight parameters of the neural network, and the bias parameters are usually initialized to 0 to ensure that the network has different initial states and avoid falling into local optima.

[0088] Forward propagation: Input a batch of training data into the neural network, and through calculations of each layer, obtain the output results of the model, including the predicted probability distributions of defect types and severity.

[0089] Loss calculation: According to the output results of the model and the corresponding true labels, use the cross-entropy loss and the exponential loss function of structural similarity to calculate the loss value of the current batch and evaluate the prediction performance of the model. Among them, the cross-entropy loss and the exponential loss function of structural similarity are

[0090] fun_lossy = (CEL + k) SSIM + SSIM,

[0091] Among them, CEL is the cross-entropy loss, SSIM is the structural similarity, and k is the compensation value, usually in the range of [0, 10] and can be set manually.

[0092] Backpropagation and parameter update: Calculate the gradients of the loss value with respect to the parameters of each layer through the backpropagation algorithm, and then use the Adam optimization algorithm to update the network parameters according to the gradient information, adjusting the weights and biases of the model to minimize the loss function.

[0093] Iterative training: Repeat the above processes of forward propagation, loss calculation, backpropagation, and parameter update until the preset number of training epochs or the convergence condition of the model (such as the proportion of the loss value decrease is less than the preset threshold) is reached, and finally obtain the trained classification neural network.

[0094] Based on the above-trained classification neural network, input the defect data into the pre-trained classification neural network to obtain the defect type and defect severity, which specifically includes:

[0095] S21. Input the defect data into the feature extraction layer to obtain a feature image. In the production scenario of a die-casting machine, the defect data may come from multiple sensors, such as image data obtained by a vision sensor, pressure data obtained by a pressure sensor, temperature data obtained by a temperature sensor, etc. The main purpose of the feature extraction layer is to extract key features related to the defect from these complex original defect data and convert them into a feature image.

[0096] S22. Input the feature image into the feature processing layer to obtain a feature pyramid. The sizes, shapes, and positions of the defects in a die-casting machine are different. Some defects may be relatively large and obvious, while some may be very small and hidden in a complex background. The purpose of the feature processing layer to construct the feature pyramid is to analyze the feature image at different scales.

[0097] The specific processing method for this step includes:

[0098] S221. Input the feature image into the image segmentation layer to obtain feature blocks. In a specific implementation, the image segmentation layer includes:

[0099] 1. Segmentation method: Divide the input image into multiple image blocks (patches) of a fixed size. In a specific implementation, 16×16 pixel blocks, and each block is regarded as an independent feature unit, which helps to capture the local features and spatial structure of the image.

[0100] 2. Flattening operation: Flatten each image block into a one-dimensional vector for subsequent embedding operations. The dimension of the flattened vector is 16×16×3 = 768.

[0101] S222. Input the feature block into the embedding layer to obtain a low-dimensional vector.

[0102] S223. Input the low-dimensional vector into the positional embedding layer to obtain an information low-dimensional vector. In a specific embodiment, the positional embedding layer uses learnable positional embedding vectors, initialized as random values, and added to the embedding vectors of the image blocks through training to obtain the final embedding vector containing positional information.

[0103] S224. Use the transformation encoder layer to obtain the dependencies between the information low-dimensional vectors to obtain high-level features. In a specific embodiment, the transformation encoder layer contains multiple identical sub-layers. Each sub-layer first encodes the embedding vectors through the multi-head self-attention mechanism to capture the global dependencies between the image blocks.

[0104] S225. Input the high-level features into the classification head layer to obtain class probabilities.

[0105] S226. Input the class probabilities into the bottom-up path layer and the top-down path layer to obtain the dimensional features of the class probabilities. In a specific embodiment,

[0106] The bottom-up path layer includes:

[0107] 1. Feature extraction network: Adopt the VGG network structure to perform multi-layer convolution and pooling operations on the input image to generate feature maps of different scales.

[0108] 2. Feature map output: Output multiple feature maps with different resolutions, such as feature maps that are 1 / 4, 1 / 8, 1 / 16, and 1 / 32 times the size of the input image, forming a bottom-up feature pyramid to provide a basis for subsequent multi-scale feature fusion.

[0109] The top-down path layer includes:

[0110] 1. Upsampling operation: Starting from the highest-level (lowest resolution and richest semantic information) feature map, gradually restore the resolution of the feature map through the upsampling operation.

[0111] 2. Feature fusion: Perform fusion between the upsampled feature map and the corresponding low-level feature map to enhance the expression ability and robustness of the feature map.

[0112] S227. Input the dimensional features into the lateral connection layer to obtain a feature pyramid. In a specific embodiment, the lateral connection layer includes:

[0113] 1. Feature adjustment: Establish lateral connections between the same-scale feature maps of the top-down path and the bottom-up path, and adjust the number of channels of the high-level feature maps through 1×1 convolution operations to make it consistent with the number of channels of the low-level feature maps, ensuring the feasibility of feature fusion;

[0114] 2. Smoothing operation: Perform 5×5 convolution operations on the fused feature maps to smooth the feature maps and further enhance the feature representation, remove possible artifacts and noises, and improve the quality and consistency of the features.

[0115] S23. Input the feature pyramid into the attention mechanism layer to obtain weighted features. In the defect detection of die-casting machines, the feature pyramid contains a large amount of feature information, but not all features play an equally important role in judging the defect type and severity. The role of the attention mechanism layer is to weight the features according to their importance.

[0116] S231. Input the feature pyramid into the global average pooling layer and the fully connected layer to obtain fused features.

[0117] S232. Input the fused features into the activation function layer to obtain non-linear fused features. In a specific embodiment, the global average pooling layer performs global average pooling operations on the input feature maps through channel feature compression, compressing the spatial dimensions (height and width) of each channel into a real number; then two fully connected layers are used to model the channel descriptors. The first fully connected layer reduces the dimension of the channel descriptors to 1 / 4 of the original dimension and applies the ReLU activation function to introduce non-linearity and enhance the expression ability of the model. The second fully connected layer restores the dimension to the original number of channels and applies the ReLU activation function to normalize the output value between 0-1.

[0118] S233. Input the non-linear fused features into the per-channel multiplication layer to obtain weighted features.

[0119] S24. Input the feature pyramid into the detection and classification layer to obtain the defect type and the defect severity. The detection and classification layer is the core part of the entire classification neural network, and its main purpose is to accurately judge the defect type and severity of the die-casting machine based on the features extracted and processed previously.

[0120] S241. Input the weighted features into the classification head network layer to obtain the defect type. In a specific embodiment, the classification head network layer adopts a convolutional neural network (CNN) structure, which internally includes multiple convolutional layers, pooling layers, and fully connected layers. The convolutional layers extract local features in the data, such as texture features and edge contour features on the surface of the cast-rolled plate. The pooling layers reduce the data dimension through downsampling operations, reducing the subsequent computational amount without losing key information. The fully connected layers integrate the previously extracted features and map the data to different feature spaces through a series of linear transformations of neurons and non-linear activation functions, such as ReLU, and finally output a probability vector representing the possibility of various types of defects. By analyzing this probability vector, the defect type currently occurring in the rolling mill is determined.

[0121] S242. Input the defect type and the weighted features into the detection head network layer to obtain the defect severity. The detection head network layer analyzes the weighted values corresponding to features such as the size and influence range of the defect, as well as the information carried by the defect type, and finally outputs a numerical value representing the severity of the defect. This numerical value can be divided into different severity levels, such as mild, moderate, and severe, according to pre-set standards, providing a strong basis for the maintenance and production adjustment of the rolling mill.

[0122] S3. Process the defect type and the defect severity to candidate defect causes. This is because big data analysis can process a large amount of historical data and discover potential associations between defects, processes, and materials. In a specific embodiment, if a certain type of defect frequently appears in a specific temperature range, it may indicate a temperature control problem.

[0123] S31. Obtain the process parameter data and input material data of the rolling mill. Specifically:

[0124] 1. Data screening and matching: According to the defect type and severity to be analyzed currently, screen out the process parameter data and input material data that match them;

[0125] 2. Data integration and preprocessing: Integrate and clean the screened process parameter data and input material data.

[0126] S32. Use a clustering analysis algorithm to group the process parameter data and the input material data to obtain potential defect causes. Among them, the potential defect causes include process parameter patterns and material characteristic qualities. The clustering algorithm is selected according to the characteristics of the data and clustering requirements. For data with an obvious grouping structure, the K-Means algorithm is more applicable; while for data with complex shapes and density distributions, the DBSCAN algorithm may be more suitable.

[0127] S321: Obtain data clusters with similar features using a clustering algorithm according to the characteristics of the data and the clustering requirements. Specifically, after determining a suitable clustering algorithm, apply it to the process parameter data and input material data to obtain multiple data clusters. The samples within each data cluster are similar in terms of process parameters and material characteristics.

[0128] S322: Use feature extraction analysis and defect mapping relationships for the process parameters and material data in the data clusters to obtain process parameter patterns and material characteristic qualities related to the defect causes. Specifically:

[0129] 1. Feature extraction and analysis: Identify the key process parameters and material characteristics that can represent the characteristics of the cluster. In a specific embodiment, by calculating the mean, standard deviation, and range statistical features of each process parameter within the cluster, determine the process parameter patterns with significant differences and likely related to defects; for material data, analyze features such as its component ratio, purity, and mechanical properties, and extract the material characteristic qualities related to the defect causes.

[0130] 2. Establishment of defect mapping relationships: Calculate the frequencies and probabilities of different types and severities of defects occurring under specific process parameter patterns and material characteristic qualities, thereby determining the degree of association between these factors and the defects.

[0131] S323: Use the process parameter patterns and the material characteristic qualities as potential defect causes.

[0132] S33. Obtain the association rules between the defect types, the defect severities, and the potential defect causes using a big data association mining algorithm. Specifically: Select a suitable association mining algorithm, such as the Apriori algorithm, FP-Growth algorithm, etc., to screen out the association rules with statistical significance and practical application value. In a specific embodiment, a possible association rule can be expressed as: "When the process parameter pattern is A and the material characteristic quality is B, the possibility of the defect type being C and the severity being D is X%".

[0133] S34. Obtain candidate defect causes based on the accuracy weight and reliability weight of the association rules, where the accuracy weight and reliability weight are empirical data set manually.

[0134] S4. Obtain the defect causes based on the candidate defect causes and the defect database, taking into account that the historical cases in the defect database provide prior knowledge for cause inference, improving the accuracy and efficiency of the analysis.

[0135] S41. Obtain factor data related to the defect type and defect severity from the defect database, which is an information database accumulated and sorted over a long period, covering various defect cases that have occurred in the casting-rolling mill in the past and corresponding multi-dimensional data.

[0136] The database is classified and stored according to defect types. For example, defect subsets are formed independently for surface scratch defects, hole defects, internal crack defects, etc. In each subset, further subdivision is carried out according to the defect severity. For example, there are data groups for mild surface scratches, moderate surface scratches, etc. For each group of data, many factors related to the defect are recorded in detail, including but not limited to casting-rolling process parameters (such as rolling speed, casting-rolling temperature, cooling water volume, etc.), equipment operation state parameters (such as roll wear degree, motor current fluctuation conditions, etc.), and raw material characteristic data (such as aluminum liquid composition, impurity content, etc.).

[0137] S42. Obtain the defect cause through weight matching based on the factor data and the candidate defect causes. For each candidate defect cause, the system assigns different weights to the previously extracted factor data. The weights are obtained through training with complex algorithms and machine learning models. For example, through the analysis of a large amount of historical data and model training for surface scratch defects, it is found that the surface roughness of the roll has a greater impact on surface scratch defects. Then, in the weight assignment, the weight of the factor data of the roll surface roughness will be relatively high; for hole defects, the gas content in the aluminum liquid may be the key influencing factor, and the corresponding data weight will also be increased accordingly.

[0138] A method for defect location of a casting-rolling mill based on a neural network in this embodiment analyzes defect data through a classification neural network to achieve accurate identification of defect types and quantitative evaluation of severity; it mines and analyzes defect causes through big data analysis technology, ultimately improving the accuracy of defect location of the casting-rolling mill and further enhancing the production efficiency of the casting-rolling mill.

[0139] This embodiment also provides a defect location system for a casting-rolling mill based on a neural network. Please refer to Figure 4 , including:

[0140] An acquisition unit for obtaining die-casting product defect data and a defect database;

[0141] A processing unit for inputting the defect data into a pre-trained classification neural network to obtain the defect type and defect severity;

[0142] An analysis unit for processing the defect type and the defect severity to candidate defect causes;

[0143] A location unit for obtaining the defect cause based on the candidate defect cause and the defect database.

[0144] Although the present application has been described in connection with various embodiments, those skilled in the art will recognize other variations of the disclosed embodiments while practicing the claimed application by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the singular "a" or "an" does not exclude a plurality.

[0145] The above is a further detailed description of the present invention in connection with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited only to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can be made, and all should be regarded as falling within the protection scope of the present invention.

Claims

1. A method for defect location of a casting-rolling mill based on a neural network, characterized in that, Including: Obtaining die-casting product defect data and a defect database; Inputting the defect data into a pre-trained classification neural network to obtain a defect type and a defect severity; Processing the defect type and the defect severity to a candidate defect cause; Obtaining a defect cause based on the candidate defect cause and the defect database.

2. The method for defect location of a casting-rolling mill based on a neural network according to claim 1, wherein The obtaining of die-casting product defect data and the defect database includes: Scanning the surface of a die-casting product according to a high-precision optical sensor to obtain original surface defect image data; Scanning the interior of a die-casting product according to an ultrasonic sensor to obtain original internal defect image data; Normalizing the original surface defect image data and the original internal defect image data to obtain original defect image data; Processing the original defect image data to obtain marked defect image data; Performing data conversion on the marked defect image data to obtain defect data.

3. The method for defect location of a casting and rolling mill based on a neural network according to claim 1, characterized in that, The method for training a classification neural network includes: Obtaining data to be trained, where the data to be trained includes defect data to be trained, a defect type to be trained, and a defect severity to be trained; Performing preprocessing and annotation on the data to be trained to obtain preprocessed data; Inputting the preprocessed data into a classification neural network to be trained for training to obtain a classification neural network, where the loss function of the classification neural network is a cross-entropy loss and an exponential loss function of structural similarity.

4. A method for defect location of a casting and rolling mill based on a neural network according to claim 1, characterized in that, The inputting of the defect data into a pre-trained classification neural network to obtain a defect type and a defect severity includes: Inputting the defect data into a feature extraction layer to obtain a feature image; Inputting the feature image into a feature processing layer to obtain a feature pyramid; Inputting the feature pyramid into an attention mechanism layer to obtain weighted features; Inputting the weighted features into a detection and classification layer to obtain the defect type and the defect severity.

5. A method for defect location of a casting-rolling mill based on a neural network according to claim 4, characterized in that, The inputting of the feature image into a feature processing layer to obtain a feature pyramid includes: Inputting the feature image into an image segmentation layer to obtain feature blocks; Inputting the feature blocks into an embedding layer to obtain low-dimensional vectors; Inputting the low-dimensional vectors into a position embedding layer to obtain information low-dimensional vectors; Using a transformation encoder layer to obtain the dependency relationship between the information low-dimensional vectors to obtain high-level features; Inputting the high-level features into a classification head layer to obtain class probabilities; Inputting the class probabilities into a bottom-up path layer and a top-down path layer to obtain dimensional features of the class probabilities; Inputting the dimensional features into a lateral connection layer to obtain a feature pyramid.

6. A method for defect location of a casting-rolling mill based on a neural network according to claim 4, characterized in that, The inputting of the feature pyramid into an attention mechanism layer to obtain weighted features includes: Inputting the feature pyramid into a global average pooling layer and a fully connected layer to obtain fused features; Inputting the fused features into an activation function layer to obtain non-linearly fused features; Inputting the non-linearly fused features into a per-channel multiplication layer to obtain weighted features.

7. A method for defect location of a casting and rolling mill based on a neural network according to claim 4, characterized in that, The inputting of the weighted features into a detection and classification layer to obtain the defect type and the defect severity includes: Inputting the weighted features into a classification head network layer to obtain a defect type; Inputting the defect type and the weighted features into a detection head network layer to obtain a defect severity.

8. A method for defect location of a casting-rolling mill based on a neural network according to claim 1, characterized in that, Processing the defect type and the defect severity to candidate defect causes includes: Obtaining the process parameter data and input material data of the casting-rolling mill; Using a clustering analysis algorithm to group the process parameter data and the input material data to obtain potential defect causes; Using a big data association mining algorithm to obtain the association rules between the defect type, the defect severity and the potential defect causes; Obtaining candidate defect causes according to the accuracy weight and reliability weight of the association rules.

9. A method for defect location of a casting and rolling mill based on a neural network according to claim 1, characterized in that, The obtaining of the defect cause according to the candidate defect cause and the defect database includes: Obtaining the factor data related to the defect type and the defect severity from the defect database; Obtaining the defect cause by weight matching according to the factor data and the candidate defect cause.

10. A defect location system for a casting and rolling mill based on a neural network, characterized in that, Including: A collection unit for obtaining die-casting product defect data and a defect database; A processing unit for inputting the defect data into a pre-trained classification neural network to obtain the defect type and the defect severity; An analysis unit for processing the defect type and the defect severity to candidate defect causes; A positioning unit for obtaining the defect cause according to the candidate defect cause and the defect database.