A method and system for simulating surface defects of magnetic material products

Through physical field coupled modeling, defect morphological system database construction and environmental simulation, the efficiency and accuracy problems of surface defect detection and simulation of magnetic material products are solved, efficient and accurate defect detection and simulation are achieved, and adaptability to new products is achieved.

CN119274701BActive Publication Date: 2025-04-08JIANGXI SHANGPENG ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411142755.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2025-04-08
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

The prior art has problems such as inefficiency, strong subjectivity, difficulty in discovering small defects, and neglecting the impact of environmental factors on defect formation in the detection and simulation of surface defects of magnetic material products.

Method used

Through physical field coupled modeling, defect morphological lineage database construction, environmental interference and spatiotemporal response simulation, multi-physical defect response simulation, model optimization and adaptive simulation methods, efficient detection and accurate simulation of surface defects of magnetic material products can be achieved.

Benefits of technology

It significantly improves detection efficiency and accuracy, can identify small defects that are difficult to detect by traditional methods, deeply understand the diversity of defect forms, provide scientific defect prevention and control prediction, improve the accuracy and practicality of simulation, and has the ability to adapt to simulation of new products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274701B_ABST
    Figure CN119274701B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a method and system for simulating surface defects of magnetic material products. The method comprises the following steps: performing physical field coupling modeling on magnetic material products to obtain a physical field coupling model of the product; collecting product defect images of magnetic material products to obtain a set of product surface defect images; constructing a defect morphology spectrum database for magnetic material products based on the set of product surface defect images to obtain a product defect morphology spectrum database; simulating product defect morphology environmental interference on magnetic material products to obtain defect detection environmental interference simulation data; simulating the spatiotemporal defect response of magnetic material products based on the defect detection environmental interference simulation data to obtain a product defect detection environmental dynamic model. The simulation results of the present invention are more in line with actual production conditions and enhance the real adaptability.
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 processing, and in particular to a method and system for simulating surface defects of magnetic material products. Background Art

[0002] In the development and production of magnetic material products, the detection and simulation of surface defects is a crucial task. These defects not only affect the appearance quality of the product, but more importantly, they will have a serious impact on the performance and reliability of the product. However, traditional detection methods often rely on manual visual inspection or simple automated testing equipment, which have many limitations, such as low efficiency, strong subjectivity, and difficulty in detecting tiny defects.

[0003] With the development of technology, although some automated defect detection technologies have emerged, most of them can only detect specific types of defects. For complex and changeable defect forms, these technologies are often unable to cope with them. In addition, the existing technology also has shortcomings in simulating the defect formation process, lacking in-depth consideration of the diversity of defect forms and the influence of environmental factors, resulting in a large deviation between the simulation results and the actual situation.

[0004] In actual production, environmental factors have an important influence on the formation of surface defects of magnetic material products. However, existing technologies often ignore the complex interaction between environmental factors and defect morphology, and lack effective means to simulate and predict the specific manifestations of defects under different environments. This limitation restricts the in-depth understanding of the defect formation mechanism and also affects the formulation of defect prevention and control strategies.

[0005] In addition, most existing defect simulation systems use static models that cannot respond to environmental changes and dynamic conditions in the production process in real time. In a rapidly changing production environment, static models cannot accurately predict the dynamic behavior of defects, which limits the application value of simulation results. Summary of the invention

[0006] Based on this, it is necessary for the present invention to provide a method and system for simulating surface defects of magnetic material products to solve at least one of the above technical problems.

[0007] To achieve the above object, a method for simulating surface defects of a magnetic material product comprises the following steps:

[0008] Step S1: Perform physical field coupling modeling on the magnetic material product to obtain a physical field coupling model of the product;

[0009] Step S2: collecting product defect images of magnetic material products to obtain a product surface defect image set; constructing a defect morphology pedigree database for magnetic material products based on the product surface defect image set to obtain a product defect morphology pedigree database;

[0010] Step S3: Perform product defect morphology environmental interference simulation on the magnetic material product to obtain defect detection environmental interference simulation data; perform spatiotemporal defect response simulation on the magnetic material product based on the defect detection environmental interference simulation data to obtain a product defect detection environment dynamic model;

[0011] Step S4: performing defect-environment interaction interference analysis on the defect detection environment interference simulation data to obtain product defect-environment interaction data; performing multi-physical field defect response simulation on the magnetic material product based on the defect detection environment interference simulation data and the product defect-environment interaction data based on the product-detection environment dynamic model to obtain product surface defect response data;

[0012] Step S5: Perform nondestructive testing on the magnetic material product to obtain actual product surface defect detection data; simulate the surface defects of the magnetic material product based on the product-detection environment dynamic model and the product defect morphology spectrum database to obtain product surface defect simulation data;

[0013] Step S6: Perform error quantification analysis on actual product surface defect detection data and product surface defect simulation data based on product surface defect response data to obtain defect simulation error data; iteratively optimize the product-detection environment dynamic model based on the defect simulation error data to obtain an optimized product-detection environment dynamic model; use the optimized product-detection environment dynamic model to perform adaptive defect simulation on new magnetic material products to obtain new product surface defect simulation data.

[0014] The present invention significantly improves the detection efficiency and accuracy through automated physical field coupling modeling, effectively avoids the inefficiency and subjectivity of manual detection, and can identify tiny defects that are difficult to detect with traditional methods. In addition, the constructed defect morphology spectrum database not only broadens the scope of defect identification, but also deepens the understanding of the diversity of defect morphology. This scheme takes into account the impact of environmental factors on defect formation, and provides a scientific predictive basis for defect prevention and control through environmental interference and spatiotemporal response simulation. Through the use of dynamic models, compared with traditional static models, real-time response to environmental changes in the production process is achieved, greatly improving the accuracy and practicality of the simulation. Through error quantification analysis and model iterative optimization, the simulation accuracy of this scheme is continuously improved, and at the same time it has the ability to adaptively simulate new products, ensuring the versatility and adaptability of the method.

[0015] Preferably, the present invention further provides a magnetic material product surface defect simulation system, which is used to execute the magnetic material product surface defect simulation method as described above, and the magnetic material product surface defect simulation system comprises:

[0016] Product modeling module, used to perform physical field coupling modeling on magnetic material products to obtain a product physical field coupling model;

[0017] The defect morphology spectrum construction module is used to collect product defect images of magnetic material products to obtain a product surface defect image set; based on the product surface defect image set, a defect morphology spectrum database of magnetic material products is constructed to obtain a product defect morphology spectrum database;

[0018] The environmental interference and spatiotemporal response simulation module is used to simulate the environmental interference of product defects on magnetic material products to obtain defect detection environmental interference simulation data; based on the defect detection environmental interference simulation data, the spatiotemporal defect response of magnetic material products is simulated to obtain a dynamic model of the product defect detection environment;

[0019] The defect-environment interaction simulation module is used to perform defect-environment interaction interference analysis on the defect detection environment interference simulation data to obtain product defect-environment interaction data; based on the product-detection environment dynamic model, multi-physical field defect response simulation is performed on the magnetic material product according to the defect detection environment interference simulation data and the product defect-environment interaction data to obtain product surface defect response data;

[0020] The defect simulation module is used to perform non-destructive testing on magnetic material products to obtain actual product surface defect detection data; based on the product-testing environment dynamic model and the product defect morphology spectrum database, the product surface defect simulation data of the magnetic material product is performed to obtain product surface defect simulation data;

[0021] The model optimization module is used to perform error quantification analysis on actual product surface defect detection data and product surface defect simulation data according to product surface defect response data to obtain defect simulation error data; iteratively optimize the product-detection environment dynamic model according to the defect simulation error data to obtain an optimized product-detection environment dynamic model; and use the optimized product-detection environment dynamic model to perform adaptive defect simulation on new magnetic material products to obtain new product surface defect simulation data.

[0022] The present invention establishes a solid simulation foundation through meticulous physical field coupling modeling. Through the highly automated and intelligent defect morphology spectrum construction module, the efficiency and quality of data processing are significantly improved, and a large amount of complex defect data is intelligently processed. By adding environmental interference and spatiotemporal response simulation modules, the simulation results are more in line with actual production conditions and enhance reality adaptability. The defect-environment interaction simulation module deeply analyzes the defect formation mechanism, providing a new perspective for formulating effective defect management strategies. The defect simulation module combined with non-destructive testing technology ensures the accuracy and reliability of the simulation results. The model optimization module ensures the long-term effectiveness and applicability of the system through continuous performance improvement and adaptive capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings:

[0024] Figure 1 A schematic flow chart of the steps of a method for simulating surface defects of a magnetic material product according to an embodiment is shown.

[0025] Figure 2 A detailed flow chart of step S5 of an embodiment is shown.

[0026] Figure 3 A detailed flow chart of step S6 of an embodiment is shown. DETAILED DESCRIPTION

[0027] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0028] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0029] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0030] To achieve this, please refer to Figures 1 to 3 The present invention provides a method for simulating surface defects of magnetic material products, comprising the following steps:

[0031] Step S1: Perform physical field coupling modeling on the magnetic material product to obtain a physical field coupling model of the product;

[0032] Step S2: collecting product defect images of magnetic material products to obtain a product surface defect image set; constructing a defect morphology pedigree database for magnetic material products based on the product surface defect image set to obtain a product defect morphology pedigree database;

[0033] Step S3: Perform product defect morphology environmental interference simulation on the magnetic material product to obtain defect detection environmental interference simulation data; perform spatiotemporal defect response simulation on the magnetic material product based on the defect detection environmental interference simulation data to obtain a product defect detection environment dynamic model;

[0034] Step S4: performing defect-environment interaction interference analysis on the defect detection environment interference simulation data to obtain product defect-environment interaction data; performing multi-physical field defect response simulation on the magnetic material product based on the defect detection environment interference simulation data and the product defect-environment interaction data based on the product-detection environment dynamic model to obtain product surface defect response data;

[0035] Step S5: Perform nondestructive testing on the magnetic material product to obtain actual product surface defect detection data; simulate the surface defects of the magnetic material product based on the product-detection environment dynamic model and the product defect morphology spectrum database to obtain product surface defect simulation data;

[0036] Step S6: Perform error quantification analysis on actual product surface defect detection data and product surface defect simulation data based on product surface defect response data to obtain defect simulation error data; iteratively optimize the product-detection environment dynamic model based on the defect simulation error data to obtain an optimized product-detection environment dynamic model; use the optimized product-detection environment dynamic model to perform adaptive defect simulation on new magnetic material products to obtain new product surface defect simulation data.

[0037] The present invention significantly improves the detection efficiency and accuracy through automated physical field coupling modeling, effectively avoids the inefficiency and subjectivity of manual detection, and can identify tiny defects that are difficult to detect with traditional methods. In addition, the constructed defect morphology spectrum database not only broadens the scope of defect identification, but also deepens the understanding of the diversity of defect morphology. This scheme takes into account the impact of environmental factors on defect formation, and provides a scientific predictive basis for defect prevention and control through environmental interference and spatiotemporal response simulation. Through the use of dynamic models, compared with traditional static models, real-time response to environmental changes in the production process is achieved, greatly improving the accuracy and practicality of the simulation. Through error quantification analysis and model iterative optimization, the simulation accuracy of this scheme is continuously improved, and at the same time it has the ability to adaptively simulate new products, ensuring the versatility and adaptability of the method.

[0038] In this embodiment, the physical field coupling modeling of the magnetic material product is first carried out, and a multi-physics field model including electromagnetic field, thermal field and mechanical field is established according to the physical properties and environmental conditions of the material using simulation software such as COMSOL Multiphysics. Subsequently, defect images of the product are collected by high-precision scanning technology such as confocal microscopy to obtain a set of product surface defect images. Image processing software such as MATLAB is used for image analysis to construct a product defect morphology spectrum database, including the classification and feature description of defect morphology. Next, simulation software is used to simulate the influence of environmental factors such as temperature, humidity, and magnetic field on product defects to obtain defect detection environment interference simulation data. Combined with the data and the physical field coupling model, spatiotemporal defect response simulation is performed to generate a product defect detection environment dynamic model. Through sensitivity analysis and interaction effect evaluation, product defect-environment interaction data is obtained. Using the interactive data and the product-detection environment dynamic model, multi-physics field defect response simulation is performed to obtain product surface defect response data. At the same time, non-destructive testing technologies such as eddy current testing or X-ray testing are used to obtain actual product surface defect detection data. These data are combined with the product defect morphology spectrum database to simulate product surface defects and generate product surface defect simulation data. Subsequently, error quantification analysis is performed to compare the differences between the product surface defect response data and the actual detection data and simulation data to obtain defect simulation error data. Based on these error data, optimization algorithms such as genetic algorithms or gradient descent methods are used to iteratively optimize the product-detection environment dynamic model to form an optimized product-detection environment dynamic model. Finally, the optimization model is applied to perform adaptive defect simulation on new magnetic material products to obtain new product surface defect simulation data.

[0039] Preferably, step S1 comprises the following steps:

[0040] Step S11: Scan the magnetic material product with an electron microscope to obtain product lattice structure data;

[0041] Specifically, magnetic material products can be scanned using a transmission electron microscope (HRTEM). During the operation, the magnetic material sample is prepared into a thin slice suitable for electron microscope observation. Then, the sample is placed on the sample stage of the HRTEM, and the microscope is adjusted to an appropriate working distance and focal length. After the scan is completed, the obtained lattice structure image is analyzed using professional image processing software to extract the lattice parameters, thereby obtaining the product lattice structure data.

[0042] Step S12: performing atomic scale lattice dynamics analysis on the product lattice structure data to obtain product lattice vibration mode data;

[0043] Specifically, the product lattice structure data can be imported into the molecular dynamics (MD) software to build an atomic-scale model. Then, according to the specific type and characteristics of the magnetic material, set appropriate initial conditions and boundary conditions, such as temperature and pressure. Next, run the simulation program, and the software will calculate the interaction between atoms according to the laws of classical mechanics and simulate the dynamic behavior of the lattice under given conditions. Through simulation, the product lattice vibration mode data can be obtained, including but not limited to vibration frequency and amplitude data.

[0044] Step S13: measuring the hysteresis loop of the magnetic material product to obtain the magnetic performance parameters of the product;

[0045] Specifically, a magnetic property tester can be used to measure the hysteresis loop of magnetic material products. Before the experiment, the magnetic material samples are processed according to standard size and shape. During the measurement process, the magnetic field strength is gradually increased to the saturation magnetization state, and then the magnetic field strength is gradually reduced to zero, and the changing relationship between the magnetic induction intensity B and the magnetic field intensity H is recorded to form a hysteresis loop. Through the analysis of the hysteresis loop, the magnetic performance parameters of the material, such as saturation magnetization intensity, residual magnetization intensity, and coercive force, can be determined, and finally the magnetic performance parameters of the product can be obtained.

[0046] Step S14: performing micromagnetic simulation analysis on the magnetic performance parameters of the product to obtain magnetic domain dynamics data of the product;

[0047] Specifically, micromagnetic simulation software can be used to analyze the magnetic performance parameters of the product. First, according to the microstructure and magnetic property parameters of the magnetic material product, the corresponding magnetic domain model is established in the software. Then, the physical conditions of the simulation are set, such as temperature and external magnetic field. Next, run the simulation program, and the software will calculate the magnetic domain dynamics process, such as movement and rotation. Through simulation, the product magnetic domain dynamics data can be obtained, including but not limited to the magnetic domain size, magnetic domain wall movement speed, and magnetic domain interaction.

[0048] Step S15: Conducting a thermal stability test on the magnetic material product to obtain product thermal performance parameters;

[0049] Specifically, a differential scanning calorimeter (DSC) can be used to determine the heat capacity and phase transition temperature of magnetic material products. The sample is placed in the test chamber of the DSC and the sample is heated and cooled in a controlled atmosphere. By accurately measuring the power difference between the sample and the reference, the relationship between the heat flow and temperature of the material can be obtained, thereby obtaining the thermal performance parameters of the product, such as specific heat capacity, glass transition temperature, and melting point.

[0050] Step S16: Analyze the thermal magnetic coupling effect of the product thermal performance parameters to obtain the product magnetic heat transfer characteristic data;

[0051] Specifically, a thermal analysis system for magnetic materials can be used, which is capable of applying temperature and magnetic field at the same time to simulate the thermal magnetic environment in actual use. First, place the magnetic material sample in the test chamber, and set the required temperature and magnetic field conditions according to the product thermal performance parameters. Then, start the test, and the system will record the changes in the magnetization intensity of the sample at different temperatures and magnetic fields. Through these data, analyze the magnetocaloric effects of the material, such as magnetostriction and magnetocaloric effect coefficient. In addition, using finite element analysis (FEA) software, input experimental data for simulation to obtain product magnetocaloric transmission characteristic data, including but not limited to thermomagnetic coupling coefficient and magnetocaloric conductivity.

[0052] Step S17: Perform multi-physics field collaborative simulation modeling on the product lattice vibration mode data, the product magnetic domain dynamics data and the product magnetothermal transfer characteristic data to obtain a product physical field coupling model.

[0053] Specifically, you can use multi-physics simulation software, such as COMSOL Multiphysics, to import product lattice vibration mode data, product magnetic domain dynamics data, and product magnetothermal transfer characteristics data, and set up the corresponding physical model. In the software, define material properties, boundary conditions, and initial conditions. Then, run the simulation, and the software will simultaneously solve the coupling problem of electromagnetic fields, thermal fields, and mechanical fields. Through simulation, you can get the comprehensive response of the product under the action of different physical fields, such as magnetization intensity, temperature distribution, and stress and strain. Finally, you get a physical field coupling model of the product.

[0054] The present invention uses electron microscope scanning to accurately obtain the microscopic lattice structure of the material, providing a solid data foundation for in-depth analysis. Atomic-scale lattice dynamics analysis further reveals the microscopic vibration mode of the material and enhances the understanding of its mechanical behavior. Through hysteresis loop measurement and micromagnetic simulation, the understanding of the magnetic properties of the material is deepened, while thermal stability testing and thermal magnetic coupling effect analysis comprehensively evaluate the thermal properties of the material, providing key information for understanding magnetic changes under thermal influence. By integrating these data, multi-physics field coupling modeling technology can fully reflect the comprehensive behavior of the material under the action of different physical fields, thereby improving the authenticity and reliability of the simulation.

[0055] Preferably, step S2 comprises the following steps:

[0056] Step S21: Scan the macroscopic surface morphology of the magnetic material product to obtain a macroscopic surface morphology data set of the product;

[0057] Specifically, the magnetic material product can be fixed on the workbench of the scanner to ensure that the sample is stable and the position is accurate. Then, turn on the 3D laser scanner and set the scanning parameters, such as scanning range, resolution, and scanning speed. Next, start the scanning process, and the laser scanner will move along the surface of the product, emitting lasers and receiving reflected laser signals. Through the principle of triangulation, the scanner is able to calculate the three-dimensional coordinate data of the product surface. After the scan is completed, the software will automatically generate a macroscopic surface morphology data set of the product, including but not limited to height maps, contour maps, and three-dimensional views.

[0058] Step S22: performing nano-scale surface topological structure analysis on the magnetic material product to obtain a nano-scale surface topological structure image set of the product;

[0059] Specifically, a sample of a magnetic material product can be placed on the sample stage of an atomic force microscope (AFM). Then, select an appropriate scanning mode, such as contact mode or tapping mode, and set the scanning parameters, including scanning range, resolution, and scanning speed. Next, start the scanning process, and the AFM probe will move on the sample surface to obtain surface height information by measuring the interaction force between the probe and the sample. After the scan is completed, the software will process the obtained data and generate a set of images of the product's nanoscale surface topology, which can clearly show the nanoscale features and defects on the sample surface.

[0060] Step S23: performing microscopic topography imaging on the magnetic material product to obtain a microscopic topography image set of the product surface;

[0061] Specifically, a magnetic material product sample can be coated with a conductive film. Then, the sample is placed in the sample chamber of a scanning electron microscope (SEM), and the working distance between the sample and the electron gun is adjusted. Next, the appropriate acceleration voltage and working distance are set to obtain the best imaging conditions. The imaging process is started, and the electron beam scans the sample surface, exciting secondary electrons and backscattered electrons, which are collected by the detector and converted into image signals. By adjusting the sensitivity and contrast of the detector, a set of microscopic morphological images of the product surface can be obtained.

[0062] Step S24: performing multi-scale image registration and fusion on the product macroscopic surface morphology data set, the product nanoscale surface topology structure image set and the product surface microscopic morphology image set to obtain a product surface defect image set;

[0063] Specifically, image processing and analysis software, such as ImageJ or MATLAB's image processing toolbox, can be used for subsequent operations. First, load the product macroscopic surface morphology dataset, the product nanoscale surface topology image set, and the product surface microscopic morphology image set in the software. Then, perform image preprocessing, including denoising, grayscale, and contrast enhancement. Next, determine the control points for registration, which should be recognizable feature points in images of different scales. Use feature matching algorithms, such as SIFT or SURF algorithms, to identify and match feature points between cross-scale images. Based on the matched feature points, calculate the spatial transformation parameters, and use algorithms such as ICP (iterative closest point) for precise registration. Finally, fuse these registered images to create a product surface defect image set, which will contain all surface features from macro to micro.

[0064] Step S25: Acquire a defect-free reference image of the product surface;

[0065] Specifically, the same equipment and method as steps S21 to S23 may be used to acquire a defect-free reference image of the product surface.

[0066] Step S26: performing defect recognition and segmentation processing on the product surface defect image set according to the product surface defect-free reference image to obtain a product surface defect area segmentation image set;

[0067] Specifically, a defect-free reference image of the product surface can be loaded into the image processing software and used as a template to compare with each image in the product surface defect image set to be analyzed. Use image segmentation algorithms, such as threshold segmentation, edge detection, or region-based segmentation methods to identify defect areas in the image. For example, you can distinguish between defective and non-defective areas by setting appropriate thresholds, or use the Canny operator edge detection algorithm to highlight defect boundaries. Then, use marking and classification algorithms to distinguish defects of different types and sizes. Finally, a segmented image set of product surface defect areas is generated, and each image in these image sets clearly indicates the location and range of the defect.

[0068] Step S27: constructing a defect morphology spectrum database for magnetic material products based on the product surface defect area segmentation image set to obtain a product defect morphology spectrum database.

[0069] Specifically, please refer to the sub-steps of step S27 for the detailed implementation process of this embodiment.

[0070] The present invention achieves comprehensive acquisition of multi-scale surface features through macro- and nano-scale scanning technology, providing detailed data for an in-depth understanding of the surface characteristics of materials. The surface detail information is further supplemented by microscopic morphology imaging technology to ensure the integrity of the data. By utilizing multi-scale image fusion technology, this solution integrates surface morphology data at different levels to form a unified defect image set, providing comprehensive visual data for defect analysis. By comparing with defect-free reference images, the identification and segmentation of defective areas are more accurate, improving the accuracy and reliability of detection. Based on this, the constructed defect morphology spectrum database provides a systematic tool for defect classification and analysis. Automated defect recognition and segmentation processing reduces manual intervention and improves the efficiency and consistency of the detection process.

[0071] Preferably, step S27 includes the following steps:

[0072] Step S271: performing multimodal data enhancement on the product surface defect area segmentation image set to obtain an enhanced product surface defect image set;

[0073] Specifically, image processing software, such as the OpenCV library in MATLAB or Python, can be used to read the segmented image set of the product surface defect area. Then, a variety of data enhancement techniques are applied, including rotation, scaling, translation, flipping, noise injection, and contrast adjustment. For example, the observation effect under different viewing angles is simulated by randomly rotating the image, and the environmental noise in the actual imaging process is simulated by adding Gaussian noise. In addition, the generative adversarial network (GAN) in deep learning can be used to generate new defect images to increase the diversity of the image set. All these operations are designed to simulate different imaging conditions and defect manifestations to enhance the generalization ability of the model. After completing the data enhancement, an enhanced product surface defect image set is obtained.

[0074] Step S272: extracting local defect features from the enhanced product surface defect image set to obtain a product surface local defect feature set, and extracting global defect features from the enhanced product surface defect image set to obtain a product surface global defect feature set;

[0075] Specifically, image processing software can be used to load and enhance the product surface defect image set, and edge detection algorithms, such as the Canny operator, can be applied to highlight the boundaries of the defects. Then, the region growing or connected domain analysis algorithm is used to identify and mark the defect area. For local feature extraction, SIFT, SURF or ORB algorithms can be used to identify key points and calculate the descriptors of the key points. These descriptors can capture the local changes and texture information of the defect area. For global feature extraction, histogram statistics, shape descriptors (such as rectangularity, circularity) or Fourier transform features of the image can be used to obtain the overall properties of the image. After completing the feature extraction, the local defect feature set and the global defect feature set of the product surface are obtained.

[0076] Step S273: weighted fusion is performed on the local defect feature set of the product surface and the global defect feature set of the product surface to obtain a fused defect feature set of the product surface, and main features of the fused defect feature set of the product surface are screened and retained to obtain a reduced-dimensional defect feature set of the product surface;

[0077] Specifically, the product surface fusion defect feature set and the product surface global defect feature set can be loaded through Python's scikit-learn machine learning library. Then, the feature set is trained using the support vector machine (SVM) or random forest algorithm, and the importance of the features and the generalization ability of the model are evaluated through k-fold cross validation. Subsequently, a weight is assigned to each feature based on the feature importance evaluated by the algorithm, and a weighted sum operation is performed to fuse local and global features to form a product surface fusion defect feature set. Principal component analysis (PCA) is used to perform a linear transformation on the product surface fusion defect feature set, and the principal component with a large variance contribution rate is selected as the new feature set, and finally the product surface dimensionality reduction defect feature set is obtained.

[0078] Step S274: extracting multi-dimensional morphological descriptors from the product surface dimensionality reduction defect feature set to obtain a product surface defect morphological descriptor set;

[0079] Specifically, image analysis software can be used to calculate various morphological descriptors, such as defect area, perimeter, shape factor, and directional characteristics, based on the feature set of defect reduction on the product surface. These descriptors can comprehensively quantify the geometric characteristics of the defect. For example, the perimeter of the defect can be measured using the image boundary tracking algorithm, and the area of ​​the defect can be calculated using the area filling algorithm. In addition, shape-based descriptors, such as ellipticity and rectangularity, can be used to describe the shape characteristics of the defect. After the morphological descriptor extraction is completed, the product surface defect morphological descriptor set is obtained.

[0080] Step S275: performing defect morphology similarity calculation on the product surface defect morphology descriptor set to obtain a product surface defect similarity matrix, and performing defect morphology tree structure construction on the product surface defect morphology descriptor set to obtain a product surface defect morphology tree;

[0081] Specifically, statistical software or programming languages ​​(such as the SciPy library in Python or the R language) can be used to process the product surface defect morphology descriptor set. By calculating the Euclidean distance or cosine similarity between the descriptor sets, the product surface defect similarity matrix is ​​obtained. This matrix can quantify the similarity between any two defect morphologies. Subsequently, the similarity matrix is ​​analyzed using a hierarchical clustering algorithm to construct a tree structure, namely the product surface defect morphology tree. This tree structure can show the hierarchical relationship and similarity groups between different defect morphologies. In the tree structure, similar defect morphologies are clustered on similar branches, and the root of the tree represents the common characteristics of all defect morphologies.

[0082] Step S276: constructing a knowledge graph based on the product surface defect similarity matrix and the product surface defect morphology tree to obtain a product surface defect knowledge graph;

[0083] Specifically, a knowledge graph of product surface defects can be created based on the product surface defect similarity matrix and the product surface defect morphology tree using a knowledge graph construction tool (such as Neo4j graph database or Apache Jena). First, a graph database is constructed using the descriptors of defect morphology as nodes and the relationships between them (such as similarity) as edges. Then, the query language of the graph database (such as Cypher or SPARQL) is used to define and extract patterns and relationships in the knowledge graph. For example, all defect morphology groups with high similarity can be queried, or the relationship path between a specific defect morphology and other morphologies can be found.

[0084] Step S277: constructing a graph data index for the product surface defect knowledge graph and the enhanced product surface defect image set to obtain surface defect graph data index data;

[0085] Specifically, a graph database indexing tool (such as Elasticsearch) can be used to create an index to obtain surface defect graph data index data. First, the nodes and edges in the product surface defect knowledge graph are converted into index documents, including the descriptors of the defect morphology and the relationships between them. Then, the enhanced product surface defect image set is associated with the corresponding node in the knowledge graph to ensure that each image can be quickly found through the index.

[0086] Step S278: Distribute and store the product surface defect knowledge graph and the enhanced product surface defect image set according to the surface defect map data index data to obtain a product defect morphology spectrum database.

[0087] Specifically, the data can be indexed according to the surface defect graph data and a distributed storage solution can be implemented. A distributed file system (such as Hadoop HDFS or Amazon S3) and a database system are used to store the knowledge graph and the enhanced defect image set. First, the graph data and image set of the knowledge graph are divided into multiple data blocks or objects. Then, according to the data index information, these data blocks are distributed and stored on different storage nodes. Finally, a product defect morphology pedigree database is obtained.

[0088] The present invention significantly improves the information richness and quality of defect image sets through multimodal data enhancement technology. In-depth analysis of local and global features reveals the subtle differences and overall patterns of defects, providing a dual perspective for understanding defect diversity. Weighted fusion technology optimizes the integration of feature sets and extracts key information through feature screening, while the efficiency of dimensionality reduction processing retains core identification elements while simplifying data processing. The quantitative analysis and morphological classification of defects are enhanced by the extraction of multidimensional morphological descriptors, and the similarity calculation and morphological tree construction provide a new way for the systematic classification and rapid retrieval of defects. The construction of knowledge graphs provides a structured framework for the organization and utilization of defect information, while efficient data indexing and storage solutions optimize data access efficiency and support large-scale data processing and rapid retrieval.

[0089] Preferably, step S3 comprises the following steps:

[0090] Step S31: Analyze the environmental impact factors of magnetic material products to obtain a set of product environmental impact factors;

[0091] Specifically, we can determine which environmental factors have a significant impact on the formation of surface defects in magnetic materials through literature research and experimental data. Then, we create a product environmental influencing factor set that includes all identified key environmental parameters, including but not limited to temperature, humidity, magnetic field strength, and mechanical stress factors.

[0092] Step S32: collecting environmental factor parameters of magnetic material products according to the product environmental impact factor set to obtain a product surface defect environmental factor parameter set;

[0093] Specifically, sensors and data acquisition systems can be used to collect environmental factor parameters. For example, temperature sensors are used to monitor temperature changes, humidity sensors are used to record humidity levels, and magnetic flux density meters are used to measure magnetic field strength. All sensors are connected to a data acquisition card (such as National Instruments' DAQ card) and record data in real time through dedicated software. The collected data is stored in a database to form a set of environmental factor parameters for product surface defects.

[0094] Step S33: using the product surface defect environmental factor parameter set to inject environmental interference into the product physical field coupling model to obtain a defect detection environmental interference physical field model;

[0095] Specifically, the product physical field coupling model can be loaded in numerical simulation software (such as COMSOL Multiphysics), and material properties and boundary conditions can be defined. Then, the parameter set of product surface defect environmental factors is used as the input of the model to simulate the response of the material under different environmental conditions. For example, the temperature parameter can be changed to study the thermal effect, or the magnetic field strength can be adjusted to analyze the magnetic effect. In this way, a defect detection environmental interference physical field model that can reflect the influence of environmental factors is generated.

[0096] Step S34: simulating the environmental interference of product defect morphology on the magnetic material product based on the defect detection environmental interference physical field model to obtain defect detection environmental interference simulation data;

[0097] Specifically, the environmental interference simulation of product defect morphology can be performed based on the physical field model of defect detection environmental interference. In the simulation software, the model is run to observe the formation and development process of surface defects of magnetic materials under the action of different environmental factors. For example, the corrosion process of materials in a high temperature and high humidity environment, or the movement of magnetic domain walls under a changing magnetic field can be simulated. Through simulation, data on the response of products under the influence of various environmental factors are collected, including but not limited to stress distribution, temperature field, and magnetic field distribution. Finally, defect detection environmental interference simulation data is obtained.

[0098] Step S35: performing Morris sensitivity screening on the defect detection environment interference simulation data to obtain a set of key environmental factors for product surface defects, and performing Sobol sensitivity quantification on the set of key environmental factors for product surface defects based on the defect detection environment interference simulation data to obtain a set of environmental factor sensitivity indexes, and performing global sensitivity mapping based on the set of key environmental factors for product surface defects and the set of environmental factor sensitivity indexes to obtain a defect response sensitivity map;

[0099] Specifically, the Morris sensitivity analysis method can be used to screen the defect detection environmental interference simulation data to identify the key environmental factors that have the greatest impact on product surface defects, thereby obtaining a set of key environmental factors for product surface defects. This can be achieved through specialized sensitivity analysis software or custom scripts, where the script can be written in Python and its NumPy and SciPy libraries are used for numerical calculations and data processing. The Morris method evaluates the sensitivity of factors by calculating the "meta-property" (mu*) and "sigma" of each factor. Then, based on the screening results, the Sobol sensitivity analysis method is used to further quantify the sensitivity of key environmental factors. The Sobol method evaluates the contribution of each factor by calculating the first-order and total effect indexes. Finally, combined with the results of Morris and Sobol analysis, a data visualization tool (such as Python's Matplotlib library) is used to construct a global sensitivity map, i.e., a defect response sensitivity map.

[0100] Step S36: Based on the defect detection environment interference physical field model and the defect response sensitivity map, the spatiotemporal defect response model of the magnetic material product is modeled to obtain the spatiotemporal response model of the product surface defect;

[0101] Specifically, in physical field simulation software, such as COMSOL Multiphysics, the physical field model of defect detection environmental interference can be loaded into the simulation software, and the model parameters can be set according to the most critical environmental factors identified by the defect response sensitivity map. Then, define the geometric model and physical field boundary conditions of the magnetic material product, including the interaction of thermal field, magnetic field and mechanical field. Next, use the software's space-time solver to simulate the response of the product over a long time scale and spatial range. By adjusting the time step and spatial grid, the software can capture the dynamic behavior of defects as time and environmental conditions change. Finally, a spatiotemporal response model of product surface defects is obtained.

[0102] Step S37: construct a dynamic Bayesian network for the defect detection environment interference physical field model, the defect detection environment interference simulation data and the product surface defect spatiotemporal response model to obtain a product defect detection environment dynamic model.

[0103] Specifically, you can choose a suitable dynamic Bayesian network (DBN) modeling tool, such as Python's pgmpy library, to define the network structure and parameters. Then, based on the physical field model of the defect detection environment interference, the defect detection environment interference simulation data, and the spatiotemporal response model of product surface defects, define the nodes and edges in the network, where nodes represent random variables and edges represent the probabilistic dependencies between variables. Next, use the existing simulation data to train DBN and estimate the conditional probability distribution between nodes. Finally, use DBN for reasoning and prediction, simulate the evolution of product defects under different environmental conditions, and obtain a dynamic model of the product defect detection environment.

[0104] The present invention ensures a deep understanding of all potential environmental factors that affect product performance by comprehensively analyzing the environmental influencing factors of magnetic material products. Accurately collected environmental parameters provide a solid data basis for simulation, enhancing the authenticity and effectiveness of environmental interference simulation. By injecting the environmental factor parameter set into the physical field coupling model, this solution can simulate the defect morphology changes under actual use conditions, providing a scientific basis for predicting the performance of products in different environments. Through the application of Morris sensitivity screening and Sobol sensitivity quantification, the key environmental factors that have the greatest impact on product defects are effectively identified. The defect response sensitivity map constructed by global sensitivity mapping provides an intuitive view to help understand the overall impact of various environmental factors on defects. Based on this, spatiotemporal defect response modeling provides a model basis for predicting the behavior of defects over time and environment. Further, the construction of a dynamic Bayesian network integrates the environmental interference physical field model, simulation data and spatiotemporal response model to form a comprehensive and dynamically updated defect detection environment model. These measures significantly improve the simulation accuracy of the defect behavior of products in actual use environments.

[0105] Preferably, step S4 comprises the following steps:

[0106] Step S41: performing time-lag correlation analysis on the defect detection environment interference simulation data to obtain defect-environment time-lag correlation data;

[0107] Specifically, the purpose of time-lag correlation analysis is to determine the time delay relationship between changes in environmental factors and the development of surface defects of products. Statistical analysis software, such as the statsmodels library in R language or Python, can be used to perform cross-correlation analysis. First, the sequence of environmental factors and defect indicators in the time series data is defined based on the defect detection environmental interference simulation data. Then, the cross-correlation function between the two sequences is calculated to find the lag time that maximizes the correlation coefficient. This lag time indicates the time difference in the impact of changes in environmental factors on the development of defects. Through this analysis, defect-environment time-lag correlation data can be obtained.

[0108] Step S42: evaluating the spatiotemporal coupling strength of the defect detection environment interference simulation data to obtain defect-environment space correlation data;

[0109] Specifically, the spatiotemporal coupling intensity assessment aims to quantify the degree of interaction between environmental factors and product surface defects in time and space. Numerical analysis software, such as MATLAB or Python's SciPy library, can be used to process and analyze defect detection environmental interference simulation data. Time series analysis is performed on the defect detection environmental interference simulation data, such as decomposing signal components at different time scales through wavelet transform. Then, spatial analysis methods, such as spatial cross-correlation or covariance analysis, are used to evaluate the coupling relationship between the spatial distribution of environmental factors and the spatial distribution of defects. Through these analyses, defect-environment spatial correlation data can be obtained.

[0110] Step S43: performing spatial heterogeneity analysis on the defect detection environment interference simulation data to obtain defect-environment spatial heterogeneity data;

[0111] Specifically, the purpose of spatial heterogeneity analysis is to identify the inconsistencies of product surface defects at different spatial locations and the relationship between these inconsistencies and environmental factors. Professional geographic information system (GIS) software, such as ArcGIS or QGIS, combined with spatial statistical analysis tools, can be used to analyze defect detection environmental interference simulation data. First, the defect detection environmental interference simulation data is converted into a spatial data format and spatially interpolated in the GIS software to obtain a continuous spatial surface. Then, spatial statistical methods, such as spatial autocorrelation analysis (Moran's I) or local spatial heterogeneity analysis (Geary's C), are applied to quantify the differences between defect characteristics and environmental factors at different locations. Through these analyses, defect-environment spatial heterogeneity data can be obtained.

[0112] Step S44: performing synergistic effect analysis on the defect-environment time lag related data, the defect-environment space related data and the defect-environment space heterogeneity data to obtain a defect-environment synergistic effect matrix, and quantifying the defect-environment interaction complexity of the defect-environment synergistic effect matrix to obtain a defect-environment complexity index;

[0113] Specifically, a comprehensive data framework can be constructed to merge and align defect-environment time-lag correlation data, defect-environment spatial correlation data, and defect-environment spatial heterogeneity data. Then, multivariate statistical analysis methods, such as principal component analysis (PCA) or factor analysis, are applied to identify potential patterns in the data and interactions between variables. Next, the covariance or correlation coefficient matrix is ​​used to construct a defect-environment synergy effect matrix to quantify the synergistic relationship between different environmental factors and defects. Finally, the complexity of the interaction is quantified by calculating specific statistics of the matrix (for example, the determinant or eigenvalue of the matrix) to obtain a defect-environment complexity index.

[0114] Step S45: performing threshold division and cluster analysis on the defect-environment complexity index to obtain product defect-environment interaction data;

[0115] Specifically, appropriate thresholds can be determined based on the distribution of the defect-environment complexity index to distinguish high, medium, and low interaction complexity levels. Then, cluster analysis is performed on the defect-environment complexity index to group data points with similar interaction characteristics into different clusters. By setting the appropriate number of clusters and distance metrics, the clustering algorithm can reveal natural groupings in the data. Finally, each cluster is characterized and labeled to obtain product defect-environment interaction data, which can represent typical patterns of defect behavior under different environmental conditions.

[0116] Step S46: fusing and calibrating the product physical field coupling model and the product defect detection environment dynamic model to obtain a product-detection environment dynamic model;

[0117] Specifically, numerical simulation software, such as COMSOL Multiphysics, and database management tools, such as SQL or MongoDB, can be used to integrate and calibrate the product physical field coupling model and the product defect detection environment dynamic model. The fused and calibrated model can comprehensively consider the interaction between the physical field and environmental factors, and finally obtain the product-detection environment dynamic model.

[0118] Step S47: Based on the product-testing environment dynamic model, multi-physical field defect response simulation is performed on the magnetic material product according to the product defect-environment interaction data to obtain product surface defect response data.

[0119] Specifically, please refer to the sub-steps of step S47 for the detailed implementation process of this embodiment.

[0120] The present invention accurately reveals the time dependence between defect development and environmental factors through in-depth time-lag correlation analysis. The influence of environmental factors on defect distribution is further refined through spatiotemporal coupling evaluation and spatial heterogeneity analysis, enhancing the understanding of the defect formation mechanism. A scientific method for evaluating the comprehensive impact of environmental factors is provided through quantitative analysis of synergistic effects and interaction complexity. Key defect-environment interaction patterns are identified through threshold division and cluster analysis, providing an effective means for the classification and understanding of complex interaction effects. Through the fusion and calibration of the physical field coupling model and the environmental dynamic model, an accurate and reliable product-detection environment dynamic model is formed, which improves the simulation accuracy.

[0121] Preferably, step S47 includes the following steps:

[0122] Step S471: performing defect geometry modeling on the product-detection environment dynamic model according to the defect detection environment interference simulation data to obtain a product surface defect geometry model;

[0123] Specifically, 3D modeling software, such as SolidWorks or Autodesk Inventor, can be used to input the preliminary shape of the defect based on the defect detection environment interference simulation data. Then, the size and distribution information in the simulation data is used to adjust the product model in the product-detection environment dynamic model to ensure that it matches the geometric characteristics of the actual defect. Next, the parametric modeling function in the computer-aided design (CAD) tool is applied to define the parameters of the model, such as length, width, and depth. Finally, a geometric model of the product surface defect is generated.

[0124] Step S472: performing defect boundary singularity processing on the product surface defect geometric model to obtain a smooth product surface defect geometric model;

[0125] Specifically, the built-in tools of CAD software, such as geometry repair or smoothing functions, can be used to identify and repair sharp edges, overhanging surfaces or other irregularities in the geometric model of product surface defects. In addition, mathematical morphology algorithms or curvature flow technology are applied to smooth the defect boundaries through an iterative process while maintaining its basic shape and size. After processing, a smooth product surface defect geometric model is finally obtained.

[0126] Step S473: meshing and parameterizing the smooth product surface defect geometric model to obtain a discretized product surface defect physical model;

[0127] Specifically, the smooth product surface defect geometry model can be imported into the finite element analysis (FEA) software, and the appropriate mesh type, such as tetrahedron, hexahedron, or triangular elements, can be selected to adapt to the complexity of the model. Then, the meshing algorithm is applied to automatically or manually generate the mesh. Next, the mesh is refined, especially in the defect area and other critical areas of the model. Finally, the mesh model is parameterized to define material properties, boundary conditions, and loading conditions. Through these steps, the discretized product surface defect physical model is finally obtained.

[0128] Step S474: configuring a nonlinear solver for the discretized product surface defect physical model to obtain a physical field solution for the product surface defect;

[0129] Specifically, you can use finite element analysis software (such as ANSYS) to open the discretized product surface defect physical model and define material properties, including elastic modulus, Poisson's ratio, and nonlinear behavior parameters such as plastic deformation or creep characteristics. Next, set the boundary conditions and loading steps to ensure that they can simulate the actual physical environment and expected loading conditions. Then, select a solver suitable for nonlinear problems and configure solver parameters such as the number of iterations, convergence criteria, and incremental step size. Use the built-in functions of the software to automatically adjust the solution strategy to adapt to the characteristics of nonlinear problems. Finally, run the solver and monitor the solution process to obtain a physical field solution for product surface defects.

[0130] Step S475: performing a mesoscopic scale defect group analysis on the discretized product surface defect physical model according to the product surface defect physical field solution to obtain defect group interaction data;

[0131] Specifically, the results of the product surface defect physical field solution can be applied in the finite element analysis software to identify defect groups in the discretized product surface defect physical model. Then, the software's post-processing tools are used to analyze the distribution of stress, strain and other related physical fields for each defect. Next, mesoscopic scale analysis techniques, such as grain scale simulation or phase field simulation, are used to study the microscopic mechanisms and interactions within the defect group. These techniques can help observe and quantify load transfer, stress concentration and potential crack propagation paths between defects. Finally, these analysis results are collected and organized to obtain defect group interaction data.

[0132] Step S476: extract defect response features from the defect group interaction data to obtain product surface defect response data.

[0133] Specifically, signal processing techniques, such as Fourier transform or wavelet transform, can be applied to identify periodic patterns or mutation points in the defect group interaction data, which indicate the response behavior of the defect. Then, statistical analysis methods, such as regression analysis or variance analysis, are used to quantify the impact of different factors on the defect response. In addition, machine learning algorithms, such as decision trees or support vector machines, are applied to identify key defect response features and establish prediction models. Finally, these features are sorted and verified to ensure that they can accurately reflect the physical response of product surface defects, thereby obtaining product surface defect response data.

[0134] The present invention uses accurate defect geometry modeling and environmental interference simulation data to create a detailed product surface defect geometry model, laying the foundation for in-depth analysis. By processing the boundary singularity of the model, the physical rationality and numerical stability of the model are effectively improved. The geometric model is converted into a discretized physical model through efficient meshing and parameterization technology, providing the necessary conditions for numerical solution. The configuration of the nonlinear solver enhances the model's ability to handle complex physical phenomena and improves the accuracy of the solution. The analysis of defect groups at the mesoscopic scale deepens the understanding of defect interactions and reveals the collective effects of defect behavior. The extraction of defect response characteristics provides key indicators for evaluating the product's response to environmental interference. These measures significantly enhance the simulation accuracy.

[0135] Preferably, step S5 comprises the following steps:

[0136] Step S51: Perform nondestructive testing on the magnetic material product to obtain original detection data of product surface defects;

[0137] Specifically, nondestructive testing techniques, such as eddy current testing, X-ray testing, or laser scanning, can be used to detect defects on the surface and near-surface areas of products. Taking X-ray testing as an example, the product is placed between the X-ray source and the detector, and the X-ray source is started to emit penetrating rays, which pass through the material and form an image on the detector. Use image processing software, such as ImageJ or MATLAB, to capture and store these image data. Then, optimize the image quality by adjusting scanning parameters such as ray intensity, exposure time, and scanning speed. Ultimately, the collected image data constitutes the original detection data of product surface defects.

[0138] Step S52: extracting and segmenting defect features of the original product surface defect detection data to obtain an actual product surface defect feature map, and performing defect recognition and classification on the actual product surface defect feature map to obtain actual product surface defect detection data;

[0139] Specifically, image processing software can be used to pre-process the raw detection data of product surface defects, including denoising, contrast enhancement, and edge detection. Then, an image segmentation algorithm, such as threshold segmentation or region growing algorithm, is applied to identify defective areas in the image. The segmented image will highlight the shape and location of the defect. Next, feature extraction techniques, such as shape-based descriptors (area, perimeter, diameter) or texture-based descriptors (energy, uniformity, entropy), are used to describe the characteristics of the defects, and finally the actual product surface defect feature map is obtained. Finally, based on the extracted features, pattern recognition algorithms, such as K-nearest neighbor (KNN) or support vector machine (SVM), are used to classify the defects and obtain the actual product surface defect detection data.

[0140] Step S53: performing defect morphology parameterization processing on actual product surface defect detection data to obtain actual product surface defect morphology parameters, and performing similarity matching query on the product defect morphology pedigree database based on the actual product surface defect morphology parameters to obtain a simulated candidate defect morphology set;

[0141] Specifically, data analysis software, such as Python's Pandas library, can be used to organize and analyze actual product surface defect detection data. Then, a set of parameterized features, such as defect size, shape factor, or directional features, is defined to quantify the defect morphology. Next, existing similarity matching algorithms, such as Euclidean distance or cosine similarity, are used to compare the actual defect features with the entries in the product defect morphology pedigree database. By setting a similarity threshold, simulated candidate defect morphologies that are similar to the actual defect features are identified. Finally, a set of simulated candidate defect morphologies is constructed based on the similarity matching results.

[0142] Step S54: randomly sampling and combining the simulated candidate defect morphology set to obtain a first product surface defect distribution model;

[0143] Specifically, statistical analysis software (such as R language or Python's SciPy library) can be used to define sampling strategies to ensure that sampling can cover the diversity of defect morphology sets. Then, according to the defined strategy, morphological samples are randomly selected from the simulated candidate defect morphology set and various combinations are made to simulate the distribution of different defects on the product surface. Next, a large number of defect distribution scenarios are generated using Monte Carlo simulation or other random sampling methods. Finally, these scenarios are integrated into a distribution model to finally obtain the first product surface defect distribution model.

[0144] Step S55: performing coupled simulation on the first product surface defect distribution model based on the product-testing environment dynamic model to obtain product surface defect response simulation data;

[0145] Specifically, the product-detection environment dynamic model can be loaded in the simulation software (such as COMSOL Multiphysics or ANSYS), and the corresponding environmental conditions and physical parameters can be set. Then, the first product surface defect distribution model is imported into the simulation software to define the impact of defects on product performance, such as stress concentration or changes in electromagnetic properties. Next, run the coupled simulation, and the software will calculate the response of defects under different environmental conditions, such as defect development, expansion or interaction. Finally, collect key data in the simulation process, such as stress distribution, strain energy or magnetic field distribution, and obtain product surface defect response simulation data.

[0146] Step S56: reversely reconstruct and generate images of the product surface defect response simulation data to obtain product surface defect simulation data.

[0147] Specifically, data visualization tools such as ParaView or MATLAB can be used to process and visualize the product surface defect response simulation data. Then, based on the simulation results, the three-dimensional morphology of the defect is reverse engineered to ensure that the reconstructed defect morphology is consistent with the simulation data. Next, image processing techniques such as three-dimensional rendering or volume rendering are applied to generate intuitive images of the defect morphology. In addition, animations or interactive views can be used to show how the defect changes over time or environmental conditions. Finally, the generated product surface defect simulation data includes not only static images but also dynamic simulation results.

[0148] The present invention uses non-destructive testing scanning technology to efficiently obtain the original data of product surface defects, maintains the integrity of the product, and significantly improves the accuracy of defect detection through precise feature extraction and segmentation. Complex defect morphology is converted into quantifiable parameters through parametric processing. Through intelligent similarity matching query, potential defect morphology is further identified, and a reliable candidate morphology set is constructed. Through random sampling and combination methods, the diversity and coverage of simulation are increased, and the coupled simulation based on the product-testing environment dynamic model predicts the behavior of defects in the actual use environment, which improves the advancement and practicality of the simulation. The visualization and comprehensibility of the data are enhanced through inverse reconstruction and image generation technology, making the defect simulation image more intuitive. Combining these steps, this solution significantly improves the detection and evaluation capabilities of product surface defects.

[0149] Preferably, step S6 comprises the following steps:

[0150] Step S61: performing feature mapping and parameter alignment on actual product surface defect detection data and product surface defect simulation data to obtain actual-simulated defect feature alignment data;

[0151] Specifically, data alignment software or custom scripts (for example, using Python's Pandas library) can be used to collate actual product surface defect detection data and product surface defect simulation data. Then, the key features common to the two sets of data, such as the size, shape, and location of the defects, are determined, and a mapping relationship is established. Finally, parameter alignment techniques, such as least squares or mutual information maximization, are applied to adjust the parameters of the simulated data to match the features of the actual detection data, thereby obtaining actual-simulated defect feature alignment data.

[0152] Step S62: performing multivariate error calculation on the actual-simulated defect feature alignment data according to the product surface defect response data to obtain initial defect simulation error distribution data, and performing non-parametric kernel density estimation on the initial defect simulation error distribution data to obtain defect simulation error data;

[0153] Specifically, statistical analysis tools such as R language or Python's SciPy library can be used to load product surface defect response data and actual-simulated defect feature alignment data. Subsequently, in the feature alignment stage, feature mapping and parameter alignment techniques are used to ensure that the actual and simulated data are comparable. Next, multivariate error analysis is performed, and the differences between the actual and simulated defect features are quantified using Euclidean distance or Manhattan distance, and the initial defect simulation error distribution data is integrated. This data set reveals the error distribution of the simulated surface defects throughout the product. Furthermore, the error distribution data is smoothed using a non-parametric kernel density estimation method, and a Gaussian kernel or a triangular kernel is used to estimate the probability density function of the error, without presetting a specific form for the error distribution morphology. The results of the kernel density estimation provide a smooth curve of the error distribution, which helps to identify the characteristics and trends of the error distribution. Finally, defect simulation error data are obtained based on the kernel density estimation results, which not only show the size of the simulation error, but also reflect the distribution of the error in the data set.

[0154] Step S63: adjusting parameters of the product-testing environment dynamic model according to the defect simulation error data to obtain an optimized product-testing environment dynamic model;

[0155] Specifically, model optimization software (such as MATLAB's optimization toolbox or Python's Scipy.optimize module) can be used to analyze the defect simulation error data. Then, the relationship between the product-detection environment dynamic model parameters and the error is determined, and the optimization goal is set, such as minimizing the sum of squares of the error. Next, an optimization algorithm, such as gradient descent, particle swarm optimization, or genetic algorithm, is applied to adjust the model parameters. Finally, based on the output of the optimization algorithm, a set of new parameter values ​​is obtained that enable the model to better fit the actual data, thereby obtaining an optimized product-detection environment dynamic model.

[0156] Step S64: Analyze the surface defects of the new magnetic material product to obtain actual surface defect data of the new product;

[0157] Specifically, nondestructive testing techniques such as eddy current testing, X-ray imaging, or optical microscopy can be used to scan or observe new products to identify surface defects. Then, image acquisition equipment and corresponding image processing software (for example, using MATLAB or LabVIEW) are used to capture and record the detected defect images. Next, feature information of the defects is extracted from the image through image analysis techniques such as edge detection, threshold segmentation, or pattern recognition. Finally, the extracted feature information is organized into a data set to obtain the actual surface defect data of the new product.

[0158] Step S65: performing similarity matching based on the actual surface defect data of the new product based on the product defect morphology spectrum database, and constructing a defect distribution model to obtain a second product surface defect distribution model;

[0159] Specifically, database management tools (such as SQL Server or MongoDB) can be used to access and query the product defect morphology pedigree database. Then, data mining techniques such as K-nearest neighbor (KNN) or K-means clustering algorithm are used to compare the actual defect data of the new product with the defect morphology in the database. Next, based on the similarity matching results, the appropriate defect morphology is selected as the basis for building a defect distribution model. Statistical analysis software (such as R language or Python's SciPy library) is used to analyze the distribution characteristics of defects, and a probability model or machine learning model is established to describe the spatial distribution of defects. Finally, a second product surface defect distribution model is obtained, which can simulate the defect distribution on the surface of the new product.

[0160] Step S66: Use the optimized product-testing environment dynamic model to perform random field simulation on the second product surface defect distribution model, and perform image reconstruction to obtain new product surface defect simulation data.

[0161] Specifically, the optimized product-testing environment dynamic model can be loaded in simulation software (such as COMSOL Multiphysics), and appropriate environmental parameters and material properties can be set. Then, the surface defect distribution model of the second product is input into the simulation software, and the statistical characteristics of the random field, such as mean, variance, and correlation functions, are defined. Next, the random field simulation is run to generate a simulated defect distribution and analyze its potential impact on product performance. Finally, the simulation results are image reconstructed using visualization tools (such as ParaView or MATLAB) to generate a three-dimensional view of the surface defects of the new product, and finally the surface defect simulation data of the new product is obtained. These images intuitively show the spatial distribution and morphological characteristics of the defects.

[0162] The present invention improves data consistency through feature mapping and parameter alignment, ensuring the reliability of the comparison basis between actual and simulated data. By applying multivariate error calculation and non-parametric kernel density estimation technology, accurate evaluation of defect simulation errors is achieved. By adjusting the parameters of the dynamic model according to the error data, not only the prediction accuracy of the model is improved, but also its adaptability to new situations is enhanced. By similarity matching and constructing a defect distribution model, a scientific method is provided for new product defect simulation. By using the optimized model for random field simulation and image reconstruction, the accuracy and visualization of defect simulation are further enhanced.

[0163] Preferably, the present invention further provides a magnetic material product surface defect simulation system, which is used to execute the magnetic material product surface defect simulation method as described above, and the magnetic material product surface defect simulation system comprises:

[0164] Product modeling module, used to perform physical field coupling modeling on magnetic material products to obtain a product physical field coupling model;

[0165] The defect morphology spectrum construction module is used to collect product defect images of magnetic material products to obtain a product surface defect image set; based on the product surface defect image set, a defect morphology spectrum database of magnetic material products is constructed to obtain a product defect morphology spectrum database;

[0166] The environmental interference and spatiotemporal response simulation module is used to simulate the environmental interference of product defects on magnetic material products to obtain defect detection environmental interference simulation data; based on the defect detection environmental interference simulation data, the spatiotemporal defect response of magnetic material products is simulated to obtain a dynamic model of the product defect detection environment;

[0167] The defect-environment interaction simulation module is used to perform defect-environment interaction interference analysis on the defect detection environment interference simulation data to obtain product defect-environment interaction data; based on the product-detection environment dynamic model, multi-physical field defect response simulation is performed on the magnetic material product according to the defect detection environment interference simulation data and the product defect-environment interaction data to obtain product surface defect response data;

[0168] The defect simulation module is used to perform non-destructive testing on magnetic material products to obtain actual product surface defect detection data; based on the product-testing environment dynamic model and the product defect morphology spectrum database, the product surface defect simulation data of the magnetic material product is performed to obtain product surface defect simulation data;

[0169] The model optimization module is used to perform error quantification analysis on actual product surface defect detection data and product surface defect simulation data according to product surface defect response data to obtain defect simulation error data; iteratively optimize the product-detection environment dynamic model according to the defect simulation error data to obtain an optimized product-detection environment dynamic model; and use the optimized product-detection environment dynamic model to perform adaptive defect simulation on new magnetic material products to obtain new product surface defect simulation data.

[0170] The present invention establishes a solid simulation foundation through meticulous physical field coupling modeling. Through the highly automated and intelligent defect morphology spectrum construction module, the efficiency and quality of data processing are significantly improved, and a large amount of complex defect data is intelligently processed. By adding environmental interference and spatiotemporal response simulation modules, the simulation results are more in line with actual production conditions and enhance reality adaptability. The defect-environment interaction simulation module deeply analyzes the defect formation mechanism, providing a new perspective for formulating effective defect management strategies. The defect simulation module combined with non-destructive testing technology ensures the accuracy and reliability of the simulation results. The model optimization module ensures the long-term effectiveness and applicability of the system through continuous performance improvement and adaptive capabilities.

[0171] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0172] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for simulating surface defects of magnetic material products, characterized in that: The following steps are involved: Step S1: Perform physical field coupling modeling on the magnetic material product to obtain a physical field coupling model of the product; wherein step S1 includes the following steps: Conduct multi-physics field collaborative simulation modeling on the product lattice vibration mode data, product magnetic domain dynamics data and product magnetothermal transfer characteristic data to obtain the product physical field coupling model; Step S2: collecting product defect images of magnetic material products to obtain a product surface defect image set; constructing a defect morphology pedigree database for magnetic material products based on the product surface defect image set to obtain a product defect morphology pedigree database; Step S3: simulate the environmental interference of product defect morphology on the magnetic material product to obtain defect detection environmental interference simulation data; simulate the spatiotemporal defect response of the magnetic material product based on the defect detection environmental interference simulation data to obtain a dynamic model of the product defect detection environment; wherein step S3 includes the following steps: Step S31: Analyze the environmental impact factors of magnetic material products to obtain a set of product environmental impact factors; Step S32: collecting environmental factor parameters of magnetic material products according to the product environmental impact factor set to obtain a product surface defect environmental factor parameter set; Step S33: using the product surface defect environmental factor parameter set to inject environmental interference into the product physical field coupling model to obtain a defect detection environmental interference physical field model; Step S34: simulating the environmental interference of product defect morphology on the magnetic material product based on the defect detection environmental interference physical field model to obtain defect detection environmental interference simulation data; Step S4: performing defect-environment interaction interference analysis on the defect detection environment interference simulation data to obtain product defect-environment interaction data; performing multi-physical field defect response simulation on the magnetic material product based on the defect detection environment interference simulation data and the product defect-environment interaction data based on the product-detection environment dynamic model to obtain product surface defect response data; Step S5: Perform nondestructive testing on the magnetic material product to obtain actual product surface defect detection data; simulate the surface defects of the magnetic material product based on the product-detection environment dynamic model and the product defect morphology spectrum database to obtain product surface defect simulation data; Step S6: Perform error quantification analysis on actual product surface defect detection data and product surface defect simulation data based on product surface defect response data to obtain defect simulation error data; iteratively optimize the product-detection environment dynamic model based on the defect simulation error data to obtain an optimized product-detection environment dynamic model; use the optimized product-detection environment dynamic model to perform adaptive defect simulation on new magnetic material products to obtain new product surface defect simulation data.

2. The method for simulating surface defects of magnetic material products according to claim 1, characterized in that: Step S1 also includes the following steps: Step S11: Scan the magnetic material product with an electron microscope to obtain product lattice structure data; Step S12: performing atomic scale lattice dynamics analysis on the product lattice structure data to obtain product lattice vibration mode data; Step S13: measuring the hysteresis loop of the magnetic material product to obtain the magnetic performance parameters of the product; Step S14: performing micromagnetic simulation analysis on the magnetic performance parameters of the product to obtain magnetic domain dynamics data of the product; Step S15: Conducting a thermal stability test on the magnetic material product to obtain product thermal performance parameters; Step S16: Analyze the thermal magnetic coupling effect of the product thermal performance parameters to obtain the product magnetic heat transfer characteristic data.

3. The method for simulating surface defects of magnetic material products according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: Scan the macroscopic surface morphology of the magnetic material product to obtain a macroscopic surface morphology data set of the product; Step S22: performing nano-scale surface topological structure analysis on the magnetic material product to obtain a nano-scale surface topological structure image set of the product; Step S23: performing microscopic topography imaging on the magnetic material product to obtain a microscopic topography image set of the product surface; Step S24: performing multi-scale image registration and fusion on the product macroscopic surface morphology data set, the product nanoscale surface topology structure image set and the product surface microscopic morphology image set to obtain a product surface defect image set; Step S25: Acquire a defect-free reference image of the product surface; Step S26: performing defect recognition and segmentation processing on the product surface defect image set according to the product surface defect-free reference image to obtain a product surface defect area segmentation image set; Step S27: constructing a defect morphology spectrum database for magnetic material products based on the product surface defect area segmentation image set to obtain a product defect morphology spectrum database.

4. The method for simulating surface defects of magnetic material products according to claim 3, characterized in that: Step S27 includes the following steps: Step S271: performing multimodal data enhancement on the product surface defect area segmentation image set to obtain an enhanced product surface defect image set; Step S272: extracting local defect features from the enhanced product surface defect image set to obtain a product surface local defect feature set, and extracting global defect features from the enhanced product surface defect image set to obtain a product surface global defect feature set; Step S273: weighted fusion is performed on the local defect feature set of the product surface and the global defect feature set of the product surface to obtain a fused defect feature set of the product surface, and main features of the fused defect feature set of the product surface are screened and retained to obtain a reduced-dimensional defect feature set of the product surface; Step S274: extracting multi-dimensional morphological descriptors from the product surface dimensionality reduction defect feature set to obtain a product surface defect morphological descriptor set; Step S275: performing defect morphology similarity calculation on the product surface defect morphology descriptor set to obtain a product surface defect similarity matrix, and performing defect morphology tree structure construction on the product surface defect morphology descriptor set to obtain a product surface defect morphology tree; Step S276: constructing a knowledge graph based on the product surface defect similarity matrix and the product surface defect morphology tree to obtain a product surface defect knowledge graph; Step S277: constructing a graph data index for the product surface defect knowledge graph and the enhanced product surface defect image set to obtain surface defect graph data index data; Step S278: Distribute and store the product surface defect knowledge graph and the enhanced product surface defect image set according to the surface defect map data index data to obtain a product defect morphology spectrum database.

5. The method for simulating surface defects of magnetic material products according to claim 1, characterized in that: Step S3 also includes the following steps: Step S35: performing Morris sensitivity screening on the defect detection environment interference simulation data to obtain a set of key environmental factors for product surface defects, and performing Sobol sensitivity quantification on the set of key environmental factors for product surface defects based on the defect detection environment interference simulation data to obtain a set of environmental factor sensitivity indexes, and performing global sensitivity mapping based on the set of key environmental factors for product surface defects and the set of environmental factor sensitivity indexes to obtain a defect response sensitivity map; Step S36: Based on the defect detection environment interference physical field model and the defect response sensitivity map, the spatiotemporal defect response model of the magnetic material product is modeled to obtain the spatiotemporal response model of the product surface defect; Step S37: construct a dynamic Bayesian network for the defect detection environment interference physical field model, the defect detection environment interference simulation data and the product surface defect spatiotemporal response model to obtain a product defect detection environment dynamic model.

6. The method for simulating surface defects of magnetic material products according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: performing time-lag correlation analysis on the defect detection environment interference simulation data to obtain defect-environment time-lag correlation data; Step S42: evaluating the spatiotemporal coupling strength of the defect detection environment interference simulation data to obtain defect-environment space correlation data; Step S43: performing spatial heterogeneity analysis on the defect detection environment interference simulation data to obtain defect-environment spatial heterogeneity data; Step S44: performing synergistic effect analysis on the defect-environment time lag related data, the defect-environment space related data and the defect-environment space heterogeneity data to obtain a defect-environment synergistic effect matrix, and quantifying the defect-environment interaction complexity of the defect-environment synergistic effect matrix to obtain a defect-environment complexity index; Step S45: performing threshold division and cluster analysis on the defect-environment complexity index to obtain product defect-environment interaction data; Step S46: fusing and calibrating the product physical field coupling model and the product defect detection environment dynamic model to obtain a product-detection environment dynamic model; Step S47: Based on the product-testing environment dynamic model, multi-physical field defect response simulation is performed on the magnetic material product according to the product defect-environment interaction data to obtain product surface defect response data.

7. The method for simulating surface defects of magnetic material products according to claim 6, characterized in that: Step S47 includes the following steps: Step S471: performing defect geometry modeling on the product-detection environment dynamic model according to the defect detection environment interference simulation data to obtain a product surface defect geometry model; Step S472: performing defect boundary singularity processing on the product surface defect geometric model to obtain a smooth product surface defect geometric model; Step S473: meshing and parameterizing the smooth product surface defect geometric model to obtain a discretized product surface defect physical model; Step S474: configuring a nonlinear solver for the discretized product surface defect physical model to obtain a physical field solution for the product surface defect; Step S475: performing a mesoscopic scale defect group analysis on the discretized product surface defect physical model according to the product surface defect physical field solution to obtain defect group interaction data; Step S476: extract defect response features from the defect group interaction data to obtain product surface defect response data.

8. The method for simulating surface defects of magnetic material products according to claim 1, characterized in that: Step S5 includes the following steps: Step S51: Perform nondestructive testing on the magnetic material product to obtain original detection data of product surface defects; Step S52: extracting and segmenting defect features of the original product surface defect detection data to obtain an actual product surface defect feature map, and performing defect recognition and classification on the actual product surface defect feature map to obtain actual product surface defect detection data; Step S53: performing defect morphology parameterization processing on actual product surface defect detection data to obtain actual product surface defect morphology parameters, and performing similarity matching query on the product defect morphology pedigree database based on the actual product surface defect morphology parameters to obtain a simulated candidate defect morphology set; Step S54: randomly sampling and combining the simulated candidate defect morphology set to obtain a first product surface defect distribution model; Step S55: performing coupled simulation on the first product surface defect distribution model based on the product-testing environment dynamic model to obtain product surface defect response simulation data; Step S56: reversely reconstruct and generate images of the product surface defect response simulation data to obtain product surface defect simulation data.

9. The method for simulating surface defects of magnetic material products according to claim 1, characterized in that: Step S6 includes the following steps: Step S61: performing feature mapping and parameter alignment on actual product surface defect detection data and product surface defect simulation data to obtain actual-simulated defect feature alignment data; Step S62: performing multivariate error calculation on the actual-simulated defect feature alignment data according to the product surface defect response data to obtain initial defect simulation error distribution data, and performing non-parametric kernel density estimation on the initial defect simulation error distribution data to obtain defect simulation error data; Step S63: adjusting parameters of the product-testing environment dynamic model according to the defect simulation error data to obtain an optimized product-testing environment dynamic model; Step S64: Analyze the surface defects of the new magnetic material product to obtain actual surface defect data of the new product; Step S65: performing similarity matching based on the actual surface defect data of the new product based on the product defect morphology spectrum database, and constructing a defect distribution model to obtain a second product surface defect distribution model; Step S66: Use the optimized product-testing environment dynamic model to perform random field simulation on the second product surface defect distribution model, and perform image reconstruction to obtain new product surface defect simulation data.

10. A magnetic material product surface defect simulation system, characterized in that: For executing the method for simulating surface defects of magnetic material products as claimed in claim 1, the system for simulating surface defects of magnetic material products comprises: Product modeling module, used to perform physical field coupling modeling on magnetic material products to obtain a product physical field coupling model; The defect morphology spectrum construction module is used to collect product defect images of magnetic material products to obtain a product surface defect image set; based on the product surface defect image set, a defect morphology spectrum database of magnetic material products is constructed to obtain a product defect morphology spectrum database; The environmental interference and spatiotemporal response simulation module is used to simulate the environmental interference of product defects on magnetic material products to obtain defect detection environmental interference simulation data; based on the defect detection environmental interference simulation data, the spatiotemporal defect response of magnetic material products is simulated to obtain a dynamic model of the product defect detection environment; The defect-environment interaction simulation module is used to perform defect-environment interaction interference analysis on the defect detection environment interference simulation data to obtain product defect-environment interaction data; based on the product-detection environment dynamic model, multi-physical field defect response simulation is performed on the magnetic material product according to the defect detection environment interference simulation data and the product defect-environment interaction data to obtain product surface defect response data; The defect simulation module is used to perform non-destructive testing on magnetic material products to obtain actual product surface defect detection data; based on the product-testing environment dynamic model and the product defect morphology spectrum database, the product surface defect simulation data of the magnetic material product is performed to obtain product surface defect simulation data; The model optimization module is used to perform error quantification analysis on actual product surface defect detection data and product surface defect simulation data according to product surface defect response data to obtain defect simulation error data; iteratively optimize the product-detection environment dynamic model according to the defect simulation error data to obtain an optimized product-detection environment dynamic model; and use the optimized product-detection environment dynamic model to perform adaptive defect simulation on new magnetic material products to obtain new product surface defect simulation data.

Citation Information

Patent Citations

  • Method for simulating laser damage dynamic behavior induced by surface defect in KDP crystal processing

    CN116629064A

  • Magnetic shoe surface defect detection method based on global feature enhancement and multi-scale fusion

    CN117764977A