Method for detecting metallic elements of a metallic material

By combining dynamic detection paths and signal enhancement mechanisms with element feature decoupling networks, the problem of unstable signal quality in metal material detection is solved, achieving efficient and accurate metal element detection and reducing the risk of misjudgment.

CN121521785BActive Publication Date: 2026-05-08SICHUAN JINGXUN PROD QUALITY DETECTION
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN JINGXUN PROD QUALITY DETECTION
Filing Date
2026-01-15
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing methods for detecting metallic elements cannot adapt to surface morphology variations and uneven oxide layer thickness, resulting in unstable signal quality, a high risk of misjudgment or missed judgment, and re-inspection methods cannot effectively eliminate systematic errors.

Method used

The detection point distribution is adjusted by using a dynamic detection path, the signal quality is evaluated in real time and the signal enhancement mechanism is activated. Combined with the element feature decoupling network and deep verification process, the detection is carried out again by different excitation parameters, the final element content distribution map is generated and the database is updated.

Benefits of technology

It improves signal quality and the reliability of detection results, reduces the possibility of misjudgment, ensures the accuracy and efficiency of detection, and optimizes the allocation of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121521785B_ABST
    Figure CN121521785B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of metal material component detection, and discloses a metal element detection method for metal materials. The method comprises the following steps: a dynamic detection path is established according to material morphology to adjust a detection point space distribution in real time, a probe is driven to scan and original spectrum signal streams are collected. Real-time quality evaluation is performed on the signal streams, and a signal enhancement mechanism is selectively activated according to the evaluation results to generate a high-quality signal sequence. An element characteristic decoupling network is used to decouple characteristic components of each element from the sequence, and after a quantitative index is calculated, the quantitative index is matched with a standard benchmark to identify abnormal elements. For the abnormal elements, a deep verification process using differentiated excitation parameters is started to perform re-detection. Finally, the initial and verification results are fused to generate an element content distribution map and update a material database. The method realizes adaptive optimization of the detection process and accurate review of abnormal results, and improves the accuracy and reliability of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metal material composition detection technology, specifically to a method for detecting metal elements in metal materials. Background Technology

[0002] In the elemental detection and analysis of metallic materials, spectroscopic analysis technology is widely used due to its speed and non-destructive nature. However, existing detection methods typically rely on preset fixed paths or simple gridded scanning strategies for data acquisition. This static sampling method is difficult to adapt to the complex conditions that may exist on the surface of actual metallic materials, such as morphological fluctuations and uneven oxide layer thickness. This results in areas with insufficient sampling or poor signal quality being treated equally, leading to overall unstable and inconsistent quality of the acquired raw spectral signals.

[0003] Current technologies generally employ a uniform and fixed preprocessing procedure for acquired spectral signals, such as using the same filtering parameters and enhancement algorithms to process all signals. This processing method cannot distinguish between good and bad signal quality. For signals with good inherent quality, it may introduce unnecessary calculations or even distortion, while for signals with low signal-to-noise ratios or severe interference, it may be insufficiently processed, failing to effectively extract useful feature information and affecting the accuracy of subsequent quantitative analysis. When preliminary detection reveals that the element content deviates from the standard range, the conventional retesting procedure is to repeat the measurement several times at the original detection point or a nearby location using the exact same instrument parameters and take the average value. This simple retesting cannot eliminate systematic errors caused by matrix effects, inter-element spectral interference, or instantaneous instrument fluctuations in the initial detection, resulting in the risk of misjudgment or omission in the identification of abnormal elements. Summary of the Invention

[0004] The purpose of this invention is to provide a method for detecting metallic elements in metallic materials, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides a method for detecting metallic elements in metallic materials, the method comprising:

[0006] A dynamic detection path is established for metallic materials, wherein the spatial distribution of detection points is adjusted in real time according to the material morphology.

[0007] The detection probe is driven to scan according to the dynamic detection path, and the original spectral signal stream returned by the detection probe is acquired simultaneously.

[0008] The original spectral signal stream is evaluated for signal quality, and the signal enhancement mechanism is activated based on the evaluation results to generate an enhanced signal sequence.

[0009] The enhanced signal sequence is input into the element feature decoupling network to decouple the feature components corresponding to different metal elements.

[0010] The quantitative index of each metal element is calculated based on the decoupled characteristic components.

[0011] The quantitative indicators are matched with the benchmark range in the material standard database to identify abnormal elements with deviations.

[0012] A deep verification process is initiated for abnormal elements, and the deep verification process uses differentiated excitation parameters for re-detection;

[0013] By integrating the initial detection results with the output of the deep verification process, a final elemental content distribution map is generated.

[0014] The historical records in the material standards database are updated based on the final elemental content distribution map.

[0015] Preferably, the establishment of a dynamic detection path for metallic materials includes:

[0016] Obtain three-dimensional surface topology data of metallic materials and extract curvature features from the three-dimensional surface topology data;

[0017] High-probability defect areas are identified based on curvature characteristics, and dense detection arrays are arranged in these areas.

[0018] An adaptive mesh generation algorithm is used to generate sparse detection points in non-high probability defect areas;

[0019] The dense detection array and the sparse detection array are combined through path optimization to form a complete dynamic detection path.

[0020] Preferably, the signal quality assessment of the original spectral signal stream includes:

[0021] The original spectral signal stream is segmented, and the signal-to-noise ratio of each segment is calculated.

[0022] When the signal-to-noise ratio falls below a preset threshold, the signal enhancement mechanism is triggered.

[0023] The signal enhancement mechanism uses a multi-scale filtering algorithm to reduce noise in the signal;

[0024] Baseline correction is performed on the denoised signal to eliminate background interference components;

[0025] The processed signal segments are spliced ​​together into an enhanced signal sequence using a signal reconstruction algorithm.

[0026] Preferably, the operation of inputting the enhanced signal sequence into the element feature decoupling network includes:

[0027] Construct a feature template library containing standard spectra of multiple metal elements;

[0028] The enhanced signal sequence is decomposed into a linear combination of feature templates using a sparse coding algorithm;

[0029] The weight coefficients corresponding to each feature template are extracted using the orthogonal matching pursuit algorithm;

[0030] Feature templates with weight coefficients greater than the activation threshold are identified as valid element features;

[0031] Generate a set of feature components based on the characteristics of valid elements.

[0032] Preferably, the calculation of the quantitative index for each metallic element includes:

[0033] Integral intensity calculation is performed on each feature component to obtain the original intensity value;

[0034] The original strength value was corrected using the internal standard method to eliminate the influence of instrument fluctuations;

[0035] The corrected intensity values ​​are converted into elemental concentration values ​​using a standard curve.

[0036] Perform a statistical consistency test on the concentration values ​​of the same element from multiple detections;

[0037] The arithmetic mean of the concentration values ​​that pass the consistency test is taken as the final quantitative indicator.

[0038] Preferably, the deep verification process includes:

[0039] Adjust the energy parameters of the excitation source and use a stepped energy scanning mode for excitation;

[0040] By changing the acquisition angle of the detection probe, multi-angle spectral signals can be obtained;

[0041] Independent analysis of multi-angle spectral signals yields a set of verification concentration values;

[0042] Calculate the deviation coefficient between the set of verified concentration values ​​and the initial quantification index. When the deviation coefficient is within the allowable range, the validity of the abnormal element detection results is confirmed.

[0043] Preferably, generating the final elemental content distribution map includes:

[0044] Map the confirmed valid abnormal element concentration values ​​back to the corresponding dynamic detection path coordinates;

[0045] The element concentration distribution surface of the entire material surface is constructed using the Kriging interpolation algorithm;

[0046] Contour lines are extracted from the element concentration distribution surface to identify regions of concentration gradient change.

[0047] The distribution surfaces of various metal elements are integrated into a multi-level element content distribution map.

[0048] Preferably, updating the material standard database based on the final elemental content distribution map includes:

[0049] Statistical characteristic parameters were extracted from the final elemental content distribution map, and the statistical characteristic parameters were matched with historical data in the material standard database.

[0050] When the similarity is lower than the update threshold, the database adaptive update mechanism is activated, and the sliding window algorithm is used to retain the latest batch of detection data.

[0051] Recalculate the upper and lower limits of the reference range in the material standard database.

[0052] Preferably, the signal enhancement mechanism employs a multi-scale filtering algorithm to perform noise reduction processing on the signal, including:

[0053] Wavelet transform is applied to the original spectral signal stream to decompose the signal into a sequence of wavelet coefficients at multiple scales;

[0054] For each scale of the wavelet coefficient sequence, a scale-dependent noise threshold is calculated, and the wavelet coefficients are subjected to soft thresholding to eliminate noise components.

[0055] The wavelet coefficient sequence after thresholding is reconstructed into a denoised signal segment through inverse wavelet transform.

[0056] Preferably, the step of extracting the weight coefficients corresponding to each feature template using the orthogonal matching pursuit algorithm includes:

[0057] Initialize the residual to the enhanced signal sequence, initialize the set of activation atoms to an empty set, and initialize the weight coefficient vector to a zero vector;

[0058] The following steps are performed iteratively until the norm of the residual is below a preset threshold or the maximum number of iterations is reached:

[0059] Calculate the inner product between the current residual and each feature template in the feature template library, and select the feature template with the largest absolute value of the inner product as the activation atom of the current iteration;

[0060] Add the currently active atom to the set of active atoms;

[0061] The least squares method is used to solve the linear approximation of the enhanced signal sequence by the activation atom set, and the weight coefficients corresponding to the current activation atom set are calculated.

[0062] The updated residual is the difference between the enhanced signal sequence and the weighted sum of the activated atom set;

[0063] The final weight coefficient vector is output as the weight coefficients corresponding to the feature template.

[0064] Compared with the prior art, the beneficial effects of the present invention are:

[0065] By performing real-time online quality assessment on the raw spectral signal stream and dynamically determining whether and how to activate the signal enhancement mechanism based on the assessment results, this mechanism transforms the data processing strategy from passive and fixed to proactive and adaptive. The signal quality assessment module continuously monitors key indicators of the signal stream, such as signal-to-noise ratio and intensity stability. Only when these indicators fall below preset thresholds are targeted enhancement algorithms, such as adaptive filtering or cumulative averaging, triggered. This selective activation mode based on real-time feedback avoids the waste of computational resources and potential interference to high-quality signals caused by indiscriminate processing of all data. For signals with acceptable quality, the system directly allows them to pass, ensuring data processing efficiency. It optimizes the allocation of computational resources, concentrating processing power on signal segments with poor quality, thereby improving the effectiveness and reliability of the signal sequence and laying a high-quality data foundation for subsequent precise decoupling.

[0066] For anomalous elements identified in the initial detection, a differentiated excitation parameter process is initiated, rather than simply repeating the process under identical conditions. The core of this process lies in customizing the excitation conditions based on the physicochemical properties of the anomalous element. This parameter differentiation based on the target analyte characteristics alters the interaction pattern between the excitation source and the sample, aiming to overcome matrix effects or spectral overlap interference that may exist in the initial detection. It can acquire the response signal of the anomalous element under optimized conditions, complementing or contrasting it with the initial detection results. This improves the confidence level in determining the anomalous element content, reduces the possibility of misjudgment due to the limitations of a single detection condition, and makes the re-detection results more convincing and accurate. Attached Figure Description

[0067] Figure 1 This is a schematic diagram illustrating the working principle of the metal element detection method for metallic materials described in this invention.

[0068] Figure 2 A flowchart for constructing a dynamic detection path;

[0069] Figure 3 Comparison of spectral signal enhancement effects on metallic materials;

[0070] Figure 4 A flowchart for decoupling network processing for element features;

[0071] Figure 5 A statistical chart of the deviation coefficient for the depth verification of metal element detection. Detailed Implementation

[0072] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0073] Please see Figure 1 This invention provides a method for detecting metallic elements in metallic materials. The method includes: establishing a dynamic detection path based on the actual physical morphology of the metallic material being tested. This path is not fixed but can be adjusted in real time according to the three-dimensional morphological characteristics of the material surface, changing the spatial distribution density and position of the detection points on the material surface. After establishing the dynamic detection path, the detection probe is controlled to perform automatic scanning movement according to the path. During the probe movement, the original spectral signal stream returned by the detection probe is collected synchronously and continuously. This signal stream contains spectral information of various points on the material surface. The collected original spectral signal stream is evaluated in real time or near real time, with the signal-to-noise ratio as the main evaluation indicator. If the evaluation result indicates that the signal quality does not meet the preset requirements, the built-in signal enhancement mechanism is immediately activated to process the signal, ultimately outputting an enhanced signal sequence with improved quality.

[0074] The enhanced signal sequence is input into a pre-trained elemental feature decoupling network, which can separate and identify characteristic spectral components corresponding to different metal elements from complex spectral signals. Based on the decoupled characteristic components of each element, a quantitative analysis algorithm is used to calculate the content quantification index of each metal element, such as concentration value. These quantification indexes are compared with the benchmark content range of the corresponding elements pre-stored in the material standard database to identify abnormal elements whose content exceeds the allowable deviation range. For these abnormal elements, a deep verification process is initiated to ensure the reliability of the detection results. This process involves re-detection by adjusting the detection excitation parameters to eliminate random errors. The initial detection results and the deep verification results are fused to generate a final elemental content distribution map that can intuitively reflect the distribution of elements on the material surface. The results of this detection are used to update the historical records in the material standard database, realizing the database's self-learning and optimization.

[0075] Example 1: See Figure 2In practical implementation, establishing a dynamic detection path for metallic materials begins with acquiring precise three-dimensional morphological information of the metal surface. High-precision non-contact 3D scanning equipment, such as laser line scanners or structured light 3D scanners, is used to perform a comprehensive scan of the metallic sample placed on the detection platform. A laser line scanner projects a laser line onto the metallic surface. Due to the undulations on the surface, the laser line deforms. An industrial camera captures this deformed laser line, and by combining the relative position parameters of the camera and the laser, the three-dimensional coordinates of each point on the laser line can be calculated. A structured light 3D scanner projects a series of coded light spots or grating patterns onto the metallic surface. The three-dimensional point cloud data is calculated by analyzing the distortion of the patterns. The scanning process must cover the entire area of ​​the metallic material to be tested, and the final output is a three-dimensional surface topology data point cloud composed of a massive number of three-dimensional spatial points.

[0076] In practical implementation, curvature feature extraction from the obtained 3D surface topology data point cloud is a crucial step in determining the distribution of detection points. The curvature feature extraction algorithm is based on the principle of local surface fitting. For each data point in the 3D surface topology data point cloud, several points in its neighborhood are selected, and a local quadratic surface, such as a biquadratic surface, is fitted using the least squares method. By calculating the first and second fundamental forms of this fitted surface, the principal curvature, Gaussian curvature, and mean curvature of the data point can be derived. High curvature regions typically correspond to areas with significant surface curvature, such as edges, corners, depressions, or protrusions. These areas are often stress concentration zones or areas prone to defects during processing. The extracted curvature values ​​need to be normalized to facilitate setting thresholds to distinguish between high and low curvature regions. It can be understood that the accuracy of curvature feature extraction directly depends on the quality of the 3D surface topology data point cloud and the robustness of the local surface fitting algorithm.

[0077] In practice, high-probability defect regions and non-high-probability defect regions are divided based on the calculated curvature feature map. A curvature threshold is set, and regions with an absolute curvature value greater than this threshold are marked as high-probability defect regions. These high-probability defect regions require denser detection points to capture potential minute defects or component segregation. Within high-probability defect regions, a dense detection point array is arranged using a regular grid subdivision method. The spacing of the dense detection point array can be dynamically adjusted according to the curvature magnitude; the larger the curvature of the sub-region, the smaller the spacing of the dense detection point array. For non-high-probability defect regions with an absolute curvature value lower than the threshold, they are considered relatively flat or uniform regions. In these regions, an adaptive grid partitioning algorithm is used to generate a sparse detection point array. The adaptive grid partitioning algorithm uses the curvature gradient as the basis for grid subdivision. Larger grid cells are generated in regions with gentle curvature changes, and the vertices of these grid cells become the detection points of the sparse detection point array. In transitional regions with slightly larger curvature changes, the grid is appropriately subdivided to increase the density of the sparse detection point array. It is understandable that dividing the region and allocating detection points of different densities by using curvature-driven methods can significantly improve the overall scanning efficiency while ensuring detection accuracy.

[0078] In practical implementation, the generated dense and sparse detection point lattices are stitched together in three-dimensional space through path optimization to form a continuous and efficient dynamic detection path. Path optimization and stitching needs to solve the problem of the optimal order in which the detection probe visits all detection points. Its goal is to minimize the total movement distance and time of the detection probe while avoiding collisions between the detection probe and the metal sample or fixture. The path optimization algorithm first treats all detection points in the dense and sparse detection point lattices as a whole set of points. Then, a variant of the Traveling Salesman Problem model is applied for global path planning. For example, the nearest neighbor algorithm is used to quickly generate an initial path, which always selects the unvisited detection point closest to the current detection point as the next moving target. Furthermore, local search algorithms such as 2-opt or 3-opt can be used to optimize the initial path, gradually shortening the total path length by swapping edges in the path. Optionally, for large-scale detection point sets, more advanced metaheuristic algorithms, such as genetic algorithms or ant colony algorithms, can be used to search for an approximately optimal detection path. The collision detection module runs continuously throughout the path planning process to ensure the safety of the generated dynamic detection path in physical space. The final output dynamic detection path contains a series of ordered three-dimensional spatial coordinate points and the movement trajectory of the detection probe between each point.

[0079] In practical implementation, the generation process of the dynamic detection path needs to be deeply integrated with the detection control software. The 3D surface topology data point cloud acquired by the 3D scanning equipment is directly imported into the path planning module. A series of steps, such as curvature feature extraction, region division, point matrix generation, and path optimization and stitching, are all automatically completed by the software algorithm without manual intervention. Users can preset key parameters in the software interface, such as curvature threshold, minimum point spacing of dense detection points, initial grid size of sparse detection points, and objective function for path optimization. Optionally, the software can provide a path simulation preview function, allowing users to check the rationality and safety of the dynamic detection path in a virtual environment. The final generated dynamic detection path file is transmitted to the motion control system, which will precisely drive the detection probe to perform the scanning task based on the dynamic detection path file.

[0080] Example 2: In specific implementation, signal quality assessment of the raw spectral signal stream begins with signal segmentation. The raw spectral signal stream is a time-intensity sequence continuously acquired by the detection probe scanning along a dynamic detection path. Segmentation divides the continuous raw spectral signal stream into multiple signal segments based on timestamps or detection point trigger signals. Each signal segment corresponds to a detection point or a very short scanning interval. For each segment, the signal-to-noise ratio (SNR) is calculated as the core parameter for assessing signal quality. The SNR is calculated by extracting the average intensity of a preset characteristic peak region within the signal segment and simultaneously calculating the standard deviation of the intensity of a featureless background region near the characteristic peak. The ratio of the average intensity of the characteristic peak to the standard deviation of the background intensity is taken as the SNR value for that signal segment. The calculated SNR value is compared with a preset SNR threshold, which is the minimum requirement value based on a large amount of experimental data and ensures the accuracy of subsequent quantitative analysis. When the SNR of a signal segment is lower than the preset SNR threshold, the signal segment is deemed unqualified, and a signal enhancement mechanism is immediately triggered to process that signal segment separately.

[0081] In its implementation, the signal enhancement mechanism first employs a multi-scale filtering algorithm to denoise signal segments with substandard signal-to-noise ratios. Based on wavelet transform theory, the multi-scale filtering algorithm selects appropriate wavelet basis functions to decompose the input signal segment into multi-level decompositions, dividing it into wavelet coefficient sequences at different frequency scales, including high-frequency detail coefficients and low-frequency approximation coefficients. For each scale of the decomposed wavelet coefficient sequence, a noise threshold related to that scale needs to be calculated. The noise threshold calculation typically considers the median value and scale factor of the wavelet coefficients at that scale. Based on the calculated scale-dependent noise threshold, soft thresholding is applied to the wavelet coefficient sequences at each scale. The soft thresholding function sets wavelet coefficients with absolute values ​​less than the noise threshold to zero and shrinks those with absolute values ​​greater than the noise threshold. The wavelet coefficient sequences at all scales after soft thresholding are then reconstructed using an inverse wavelet transform algorithm to obtain the denoised signal segment. Although the noise is suppressed in the denoised signal segment, baseline drift may still exist.

[0082] In practical implementation, baseline correction of the denoised signal segment is a crucial step in eliminating background interference. The baseline correction algorithm aims to estimate and subtract slowly varying background components superimposed on the useful signal. An iterative polynomial fitting algorithm can be used. This algorithm first performs a global polynomial fitting on the denoised signal segment to obtain an initial baseline estimate; then, it subtracts this initial baseline from the original denoised signal and identifies peak regions in the remaining signal whose intensity is significantly higher than the noise level; after excluding the data points in these peak regions, polynomial fitting is performed again on the remaining data points to obtain a more accurate baseline estimate; this process is iteratively executed until the baseline estimate converges. It can be understood that baseline correction effectively separates the characteristic peak signal of the target element from the background interference components caused by continuous radiation, scattered light, etc., significantly improving the signal-to-background ratio of the characteristic peaks.

[0083] In practice, the processed signal segments are concatenated into a continuous enhanced signal sequence using a signal reconstruction algorithm. Since each signal segment undergoes independent noise reduction and baseline correction, direct concatenation could lead to amplitude or phase discontinuities at the connection points. The signal reconstruction algorithm employs an overlap-addition method to ensure smooth concatenation. An overlap region is set for adjacent signal segments, and within this region, the signal values ​​belonging to the two segments are weighted and averaged. A window function, such as the Hanning window, is typically used for the weighting, ensuring that the current signal segment has the highest weight at the center of the overlap region, decreasing towards the edge while increasing the weights of adjacent segments. Finally, all signal segments and their processed overlap regions are smoothly connected to form a complete, consistent enhanced signal sequence, providing high-quality input for the subsequent element-feature decoupling network. The enhanced signal sequence exhibits significantly improved signal-to-noise ratio and baseline stability compared to the original spectral signal stream.

[0084] See Figure 3 This figure illustrates the difference between the original and enhanced spectral signals in metal element detection: the horizontal axis represents wavelength, and the vertical axis represents signal intensity. The light gray curve represents the original spectral signal, exhibiting obvious random fluctuations and noise interference; this is the initial data acquired by the detection probe. The black curve represents the enhanced signal; after processing such as multi-scale filtering and baseline correction, noise is significantly suppressed, the signal profile is smoother, and characteristic peaks are clearer. This figure addresses the technical steps of assessing the signal quality of the original spectral signal stream and activating the enhancement mechanism: the comparison intuitively demonstrates the effects of multi-scale filtering and baseline correction, illustrating that the enhancement mechanism can improve signal quality while preserving effective spectral features, providing a more reliable data foundation for subsequent element feature decoupling. This processing avoids redundant calculations on high-quality signals and solves the distortion problem of low signal-to-noise ratio signals, making it a key preprocessing step to ensure the accuracy of element detection.

[0085] Example 3: See Figure 4 In practical implementation, constructing a feature template library containing standard spectra of multiple metal elements is the foundation for the operation of the element feature decoupling network. The establishment of this feature template library requires measuring a series of high-purity metal or alloy standard samples under standardized excitation and acquisition conditions. For each metal element to be tested, such as iron, nickel, chromium, and molybdenum, a calibrated spectrometer is used to acquire its characteristic spectrum within a specific wavelength range. The acquired characteristic spectra need to be preprocessed, including wavelength calibration to eliminate instrument drift, intensity normalization to eliminate the influence of absolute intensity fluctuations, and smoothing and denoising to improve signal quality. The preprocessed single-element characteristic spectrum is stored as an atomic vector in the feature template library. Mathematically, the feature template library can be represented as a matrix, with each column corresponding to a feature template vector of a specific element. The completeness of the feature template library directly affects the accuracy of subsequent decoupling; therefore, the feature template library should cover as many elements as possible that may exist in the metal material being tested. After the feature template library is constructed, it is usually stored in the form of a database file for the element feature decoupling network to access.

[0086] In practical implementation, the Orthogonal Matching Pursuit (ORP) algorithm is used to numerically solve the sparse coding problem mentioned above to extract the weight coefficients corresponding to each feature template. ORP is a greedy iterative algorithm. During initialization, the current residual vector is set to the enhanced signal sequence vector, the set of activation atoms is set to an empty set, and the weight coefficient vector is initialized to zero. The iteration process begins by calculating the dot product between the current residual vector and each atomic vector (i.e., each column) in the feature template library matrix. The absolute value of the dot product reflects the similarity between the current residual and that atomic vector. The atomic vector with the largest absolute dot product value is selected as the activated atom for this iteration, and its index is added to the activated atom set. Then, based on all the atomic vectors in the current activated atom set, a linear least squares problem is solved using the least squares method: finding a set of weight coefficients that minimizes the L2 norm error between the linear combination of the activated atom set and the original enhanced signal sequence vector. The weight coefficient vector is updated by assigning the newly calculated weight coefficients to the corresponding activated atom positions, while the weight coefficients for non-activated atoms remain zero. Subsequently, based on the current set of activated atoms and the updated weight coefficient vector, a new residual vector is calculated. This new residual vector equals the original enhanced signal sequence vector minus the vector resulting from a linear combination of the current set of activated atoms according to their weight coefficients. The L2 norm of the new residual vector is checked to see if it is below a preset tolerance threshold, or if the number of iterations has reached a preset maximum. If either condition is met, the iteration terminates; otherwise, the next iteration continues. After iteration terminates, the final weight coefficient vector is output.

[0087] In practice, the final weight coefficient vector output by the orthogonal matching pursuit algorithm is used to determine effective elemental features and generate a set of feature components. An activation threshold, a positive number, is set to distinguish between small weight coefficients caused by noise and significant weight coefficients corresponding to true elemental features. Each component in the weight coefficient vector is traversed, and the feature templates corresponding to components with weight coefficients whose absolute values ​​are greater than the activation threshold are determined as effective elemental features. Each effective elemental feature corresponds to a metal element identified in the enhanced signal sequence. The magnitude of the weight coefficient value corresponding to an effective elemental feature reflects, to some extent, the contribution intensity of that element's spectral characteristics to the mixed signal. Finally, all determined effective elemental features and their corresponding weight coefficients and feature template information are combined to form the set of feature components corresponding to the enhanced signal sequence. This set of feature components, as the output of the elemental feature decoupling network, provides decoupled spectral feature data directly associated with specific elements for subsequent quantitative calculations.

[0088] It is understandable that the orthogonal matching pursuit algorithm, by iteratively selecting the atom most relevant to the current residual, can effectively approximate the original signal from an overcomplete feature template library. The advantage of combining a sparse coding framework with the orthogonal matching pursuit algorithm lies in its ability to handle cases where there is overlap or interference between feature spectra. By using sparsity constraints, it forces the decoupling results to concentrate on a few significant elements, which aligns with the physical fact that actual spectra typically contain only a limited number of principal and trace elements. The performance of the element feature decoupling network depends on the quality of the feature template library, the choice of regularization parameters, and the setting of the activation threshold.

[0089] Example 4: In specific implementation, the calculation of the quantitative index of each metal element begins with processing the set of feature components output by the element feature decoupling network. This set of feature components contains the characteristic spectral components corresponding to each identified metal element. For each feature component, an integral intensity calculation is performed. This calculation involves numerically integrating the spectral intensity value within a specific wavelength range of the element's characteristic spectrum, for example, using the trapezoidal rule or Simpson's rule to calculate the integration area, thus obtaining the original intensity value representing the strength of the element's signal. To eliminate systematic errors caused by instrument power fluctuations, ambient temperature changes, or differences in sample surface conditions, an internal standard method is used to correct the original intensity value. This method requires selecting a metal element with stable and known content in the material as the internal standard element. The ratio of the original intensity value of the analyte to that of the internal standard element, i.e., the intensity ratio, is calculated and used as the corrected intensity index. Subsequently, the corrected intensity index is converted into an elemental concentration value using a standard curve. The standard curve is obtained by measuring a series of standard samples with known concentrations, plotting the relationship between the intensity ratio and concentration, and performing regression fitting. The fitting function can be a linear function or a quadratic function. Since multiple measurements may be taken at the same or adjacent detection points, a set of multiple concentration values ​​for the same element will be obtained. It is necessary to perform statistical consistency tests on these concentration values, such as using the Grubbs test to identify and remove outliers.

[0090] In practice, the calculated quantitative index of each metal element is matched with the pre-stored benchmark range in the material standard database. This database stores the upper and lower limits of the allowable content of each element in various standard metal materials. The matching process compares the quantitative index concentration value of each element with the corresponding upper and lower limits of the benchmark range. Metal elements whose quantitative index concentration values ​​fall outside the benchmark range are identified as anomalous elements. Identified anomalous elements require a deep verification process to confirm the reliability of their detection results. This process first adjusts the energy parameters of the excitation source, which can be a laser or an X-ray tube. Adjusted parameters include laser energy, pulse width, repetition frequency, or tube voltage and current. A stepped energy scanning mode is used, exciting multiple energy levels from low to high energy or vice versa, with spectral signals re-acquiring at each energy level. In practice, the deep verification process also involves changing the acquisition angle of the detection probe. The incident and receiving angles of the detection probe relative to the sample surface are precisely controlled by a mechanism, thereby acquiring spectral signals from the same detection point from different geometric angles, obtaining a multi-angle spectral signal set.

[0091] In practice, the multi-angle spectral signals acquired during the depth verification process are analyzed independently. For each angle, signal quality assessment, signal enhancement, elemental feature decoupling, and quantitative calculation are performed independently, resulting in a set of verification concentration values ​​for the same anomalous element. This set of verification concentration values ​​may contain multiple data points, each corresponding to a combination of excitation parameters and acquisition angles. To evaluate the consistency between the depth verification results and the initial detection results, a deviation coefficient needs to be calculated. The formula for calculating the deviation coefficient is as follows:

[0092]

[0093] Where: symbol Represents the deviation coefficient, symbol Represents the number of data points in the set of validation concentration values, with the sign... The first value in the set of verified concentration values Concentration values ​​for each data point, symbol This represents the concentration value of the anomalous element obtained from the initial detection. The calculated deviation coefficient. Compared with a preset allowable deviation range (e.g., 10%), if the deviation coefficient... If the deviation coefficient is less than or equal to the upper limit of the allowable range, then the initial identification of the anomalous element is confirmed to be valid; if the deviation coefficient is... If the result exceeds the allowable range, it indicates that there may be random errors in the initial detection, requiring further verification or the result should be discarded as appropriate. The deep verification process significantly improves the reliability of abnormal element detection results through multi-parameter and multi-angle cross-validation.

[0094] Understandably, the calculation process of the quantitative indicators effectively eliminates systematic errors through the internal standard method and standard curve, while the statistical consistency test ensures the reliability of the data. The in-depth validation process effectively identifies measurement deviations caused by accidental factors by retesting under different detection conditions. Table 1 shows a set of validation concentration values ​​for a hypothetical multi-angle spectral signal, illustrating the calculation process of the deviation coefficient.

[0095] Table 1: Concentration Values ​​for Verification of Multi-Angle Spectral Signals

[0096]

[0097] Assuming the initial detection yields the quantitative index concentration value of this anomalous element The deviation coefficient is calculated based on the set of verification concentration values ​​in the table above. First, calculate the standard deviation of the validation concentration value relative to the initial concentration. Then, divide by the initial concentration and multiply by 100% to obtain the deviation coefficient in percentage form. This calculation allows for an objective assessment of the consistency between the validation results and the initial results.

[0098] Optionally, the statistical consistency test can use the Dixon test instead of the Grubbs test. The Dixon test determines outliers by calculating the range ratio and is suitable for scenarios with small sample sizes. Optionally, in the deep validation process, the stepped energy scanning mode can adopt a high-to-low order or a random order to eliminate the temporal influence of possible energy dependence effects. In some embodiments, the standard curve fitting can use the weighted least squares method to account for the heteroscedasticity of measurement errors at different concentration points. In some embodiments, the acquisition angle of the multi-angle spectral signal can be selected from more than two angles, for example, adding a 60-degree angle acquisition to obtain richer angle-dependent information. It is understood that the selection of internal standard elements is crucial. Ideally, internal standard elements should be uniformly distributed in the material, have stable content, and be unaffected by heat treatment or processing technology.

[0099] See Figure 5 This chart presents the deviation coefficients for five sets of depth verifications using a bar chart: the horizontal axis represents the verification sequence number, the vertical axis represents the deviation coefficient, and the black dashed line represents the allowable deviation coefficient. This chart corresponds to a technical step in the depth verification process: after re-detecting by adjusting differential parameters such as excitation energy and acquisition angle, the deviation coefficient between the verification concentration and the initial quantification index is calculated to confirm the validity of the abnormal element detection results. All data in the chart are within the allowable range, intuitively demonstrating the reliability of the depth verification process. It eliminates systematic errors such as matrix effects and instrument fluctuations, improves the confidence level of abnormal element identification, and is a key step in avoiding false positives / false negatives, thus ensuring the accuracy of the final element content distribution map.

[0100] Example 5: In specific implementation, generating the final elemental content distribution map begins with precisely associating the valid elemental concentration data, verified through a deep validation process, with their spatial locations on the material surface. The three-dimensional spatial coordinates of each detection point come from the location information recorded during dynamic detection path planning, while the elemental concentration data for that point comes from the results of quantitative calculation and deep validation. For each metallic element whose distribution needs to be analyzed, such as chromium or nickel, the concentration values ​​of that element corresponding to all detection points are combined with their three-dimensional coordinates to form a discrete set of spatial data points. The data point set includes X, Y, and Z coordinates, as well as the concentration value C. To generate a continuous elemental concentration distribution surface from the discrete data point set to visually display the distribution trend of the element across the entire material surface, a spatial interpolation algorithm is required. Kriging interpolation, an optimal linear unbiased estimation method based on geostatistics, is used to accomplish this task. The Kriging interpolation algorithm first analyzes the spatial autocorrelation of the concentration values ​​in the spatial data point set, quantifying the characteristics of concentration values ​​changing with increasing spatial distance by calculating the experimental variability function. The experimental variability function describes the relationship between the concentration difference and the distance between point pairs. Based on the fitted theoretical variogram model, the Kriging interpolation algorithm calculates the optimal weight coefficients for each grid node position to be interpolated, so that the variance of the interpolation estimate is minimized and the estimate is unbiased. Finally, a smooth and spatially statistically consistent continuous element concentration distribution surface covering the entire material surface is constructed.

[0101] In practice, contour lines are extracted from the element concentration distribution surface generated by the Kriging interpolation algorithm. Contour lines are lines connecting points on the surface with equal concentration values. The contour line extraction algorithm traverses the entire interpolated concentration grid, finds grid edges where the concentration value equals a series of preset contour line levels, and accurately determines the location of the contour lines through linear interpolation. The extracted contour lines are superimposed on a two-dimensional projection or three-dimensional model of the material surface. Areas with dense contour lines indicate a large element concentration gradient, which may correspond to element segregation zones, diffusion interfaces, or regions with inhomogeneous microstructures; while areas with sparse contour lines indicate a gentle concentration change and a relatively uniform element distribution. The concentration distribution surfaces of various metal elements are integrated to form a multi-level elemental content distribution map. In software implementation, a layer management approach is usually adopted, with each layer corresponding to the distribution information of a single metal element. Users can show or hide the distribution map of a specific element by checking or unchecking the boxes, and can also adjust the opacity of different layers to observe the superposition relationship between the distributions of multiple elements. Finally, the elemental content distribution map is output as an image file or in a raster data format containing georeferenced information.

[0102] In practice, updating the material standard database based on the final elemental content distribution map is a data-driven self-learning process. Statistical feature parameters characterizing the elemental distribution are extracted from the final elemental content distribution map. These parameters include, but are not limited to: the average concentration of each element in the batch of material, the standard deviation of the concentration, the maximum and minimum concentration values, the skewness coefficient of the concentration distribution, the kurtosis coefficient of the concentration distribution, and the spatial uniformity index calculated based on a spatial interpolation grid. The spatial uniformity index can be used to assess the disorder of the distribution by calculating the coefficient of variation of the concentration grid values ​​or by using information entropy theory. Similarity matching is then performed between these extracted statistical feature parameters and the statistical feature parameters of historical test data of similar materials stored in the material standard database. Similarity matching can employ distance metrics in multidimensional space, such as calculating the Euclidean distance between the current statistical feature parameter vector and each vector in the historical statistical feature parameter vector set, and taking the minimum distance as the similarity index. The calculated similarity index is compared with a preset update threshold. If the similarity index is lower than the update threshold, it indicates a significant difference between the elemental distribution characteristics of the current tested material and the historical data, at which point the adaptive update mechanism of the database is activated.

[0103] In its implementation, the adaptive database update mechanism employs a sliding window algorithm to manage historical data in the material standard database. The sliding window algorithm sets a fixed window size, for example, retaining only data records from the most recent 100 qualified test batches and their corresponding statistical characteristic parameters. When new test batch data needs to be added and the update condition is triggered, the new data record is added to the database window. Simultaneously, if the window is full, the earliest historical data record added to the window is removed, thus maintaining a constant database window size. After updating the data records within the window, the upper and lower limits of the baseline content range for each metal element in that type of material need to be recalculated based on all current data records within the window. Recalculation is typically based on statistical methods; for example, the new upper limit of the baseline range can be the average of all average concentration values ​​of that element within the window plus three times the standard deviation, while the new lower limit of the baseline range is the average minus three times the standard deviation. The baseline range update formula can be expressed as:

[0104]

[0105] Where: symbol Represents the newly calculated lower limit of the benchmark range, symbol Represents the newly calculated upper limit of the baseline range, symbol This represents the arithmetic mean of the average concentration values ​​of the element within the sliding window, with the sign... The standard deviation of the average concentration of the element within the sliding window is represented by the symbol. It is a constant factor, typically taking the value of 2 or 3, used to control the width of the range. In this way, the material standard database can dynamically adapt to improvements in production processes, the introduction of new material grades, or changes in testing standards, ensuring that the benchmark range always reflects the normal level under current production conditions.

[0106] It is understandable that the Kriging interpolation algorithm can fully utilize the correlation of spatial data, generating a spatial distribution surface that is not only smooth but also reflects the spatial structural characteristics of the data. Contour extraction transforms numerical information into an intuitive graphical representation, facilitating rapid identification of abnormal areas. Multi-level elemental distribution maps provide comprehensive spatial distribution information of the composition. The sliding window update mechanism ensures the timeliness and adaptability of the material standard database, avoiding misjudgments caused by the use of outdated standards. It is understandable that the complete closed loop from distribution map generation to database update enables the entire detection system to possess the ability for continuous learning and self-optimization. Optionally, contour extraction can employ more complex contour filling algorithms, using different colors or patterns to fill the areas between adjacent contour lines to enhance visual contrast. Optionally, similarity matching can also employ other metrics such as cosine similarity or Mahalanobis distance to adapt to different data distribution characteristics. In some embodiments, statistical feature parameters can also include quantile information, such as the median and quartile range, to enhance the robustness of the description of the distribution shape. In some embodiments, for critical elements, smaller sliding windows or more frequent update trigger conditions can be set individually to achieve more granular monitoring.

[0107] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0108] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for detecting metallic elements in metallic materials, characterized in that, The method includes: A dynamic detection path is established for metallic materials, wherein the spatial distribution of detection points is adjusted in real time according to the material morphology. The detection probe is driven to scan according to the dynamic detection path, and the raw spectral signal stream returned by the detection probe is acquired simultaneously. The original spectral signal stream is evaluated for signal quality, and the signal enhancement mechanism is activated based on the evaluation results to generate an enhanced signal sequence. The enhanced signal sequence is input into the element feature decoupling network to decouple the feature components corresponding to different metal elements. The quantitative index of each metal element is calculated based on the decoupled characteristic components. The quantitative indicators are matched with the benchmark range in the material standard database to identify abnormal elements with deviations. A deep verification process is initiated for abnormal elements, and the deep verification process uses differentiated excitation parameters for re-detection; By integrating the initial detection results with the output of the deep verification process, a final elemental content distribution map is generated. Update the historical records in the material standard database based on the final elemental content distribution map; The establishment of a dynamic detection path for metallic materials includes: Obtain three-dimensional surface topology data of metallic materials and extract curvature features from the three-dimensional surface topology data; High-probability defect areas are identified based on curvature characteristics, and dense detection arrays are arranged in these areas. An adaptive mesh generation algorithm is used to generate sparse detection points in non-high probability defect areas; The dense and sparse detection points are combined through path optimization to form a complete dynamic detection path. The deep verification process includes: Adjust the energy parameters of the excitation source and use a stepped energy scanning mode for excitation; By changing the acquisition angle of the detection probe, multi-angle spectral signals can be obtained; Independent analysis of multi-angle spectral signals yields a set of verification concentration values; Calculate the deviation coefficient between the set of verified concentration values ​​and the initial quantification index. When the deviation coefficient is within the allowable range, the validity of the abnormal element detection results is confirmed.

2. The method for detecting metallic elements in metallic materials according to claim 1, characterized in that, The signal quality assessment of the original spectral signal stream includes: The original spectral signal stream is segmented, and the signal-to-noise ratio of each segment is calculated. When the signal-to-noise ratio falls below a preset threshold, the signal enhancement mechanism is triggered. The signal enhancement mechanism uses a multi-scale filtering algorithm to reduce noise in the signal; Baseline correction is performed on the denoised signal to eliminate background interference components; The processed signal segments are spliced ​​together into an enhanced signal sequence using a signal reconstruction algorithm.

3. The method for detecting metallic elements in metallic materials according to claim 2, characterized in that, The operation of inputting the enhanced signal sequence into the element feature decoupling network includes: Construct a feature template library containing standard spectra of multiple metal elements; The enhanced signal sequence is decomposed into a linear combination of feature templates using a sparse coding algorithm; The weight coefficients corresponding to each feature template are extracted using the orthogonal matching pursuit algorithm; Feature templates with weight coefficients greater than the activation threshold are identified as valid element features; Generate a set of feature components based on the characteristics of valid elements.

4. The method for detecting metallic elements in metallic materials according to claim 3, characterized in that, The quantitative indicators for calculating each metallic element include: Integral intensity calculation is performed on each feature component to obtain the original intensity value; The original strength value was corrected using the internal standard method to eliminate the influence of instrument fluctuations; The corrected intensity values ​​are converted into elemental concentration values ​​using a standard curve. Perform a statistical consistency test on the concentration values ​​of the same element from multiple detections; The arithmetic mean of the concentration values ​​that pass the consistency test is taken as the final quantitative indicator.

5. The method for detecting metallic elements in metallic materials according to claim 4, characterized in that, The generation of the final elemental content distribution map includes: Map the confirmed valid abnormal element concentration values ​​back to the corresponding dynamic detection path coordinates; The element concentration distribution surface of the entire material surface is constructed using the Kriging interpolation algorithm; Contour lines are extracted from the element concentration distribution surface to identify regions of concentration gradient change. The distribution surfaces of various metal elements are integrated into a multi-level element content distribution map.

6. The method for detecting metallic elements in metallic materials according to claim 5, characterized in that, The process of updating the material standard database based on the final elemental content distribution map includes: Statistical characteristic parameters were extracted from the final elemental content distribution map, and the statistical characteristic parameters were matched with historical data in the material standard database. When the similarity is lower than the update threshold, the database adaptive update mechanism is activated, and the sliding window algorithm is used to retain the latest batch of detection data. Recalculate the upper and lower limits of the reference range in the material standard database.

7. The method for detecting metallic elements in metallic materials according to claim 6, characterized in that, The signal enhancement mechanism employs a multi-scale filtering algorithm for signal noise reduction, including: Wavelet transform is applied to the original spectral signal stream to decompose the signal into a sequence of wavelet coefficients at multiple scales; For each scale of the wavelet coefficient sequence, a scale-dependent noise threshold is calculated, and the wavelet coefficients are subjected to soft thresholding to eliminate noise components. The wavelet coefficient sequence after thresholding is reconstructed into a denoised signal segment through inverse wavelet transform.

8. The method for detecting metallic elements in metallic materials according to claim 7, characterized in that, The step of extracting the weight coefficients corresponding to each feature template using the orthogonal matching pursuit algorithm includes: Initialize the residual to the enhanced signal sequence, initialize the set of activation atoms to an empty set, and initialize the weight coefficient vector to a zero vector; The following steps are performed iteratively until the norm of the residual is below a preset threshold or the maximum number of iterations is reached: Calculate the inner product between the current residual and each feature template in the feature template library, and select the feature template with the largest absolute value of the inner product as the activation atom of the current iteration; Add the currently active atom to the set of active atoms; The least squares method is used to solve the linear approximation of the enhanced signal sequence by the activation atom set, and the weight coefficients corresponding to the current activation atom set are calculated. The updated residual is the difference between the enhanced signal sequence and the weighted sum of the activated atom set; The final weight coefficient vector is output as the weight coefficients corresponding to the feature template.

Citation Information

Patent Citations

  • Method and system for intelligently detecting structural parameters of special-shaped aluminum plate based on spectral analysis

    CN120948466A

  • Online quality monitoring method and system for fine dried noodle production and storage medium

    CN121141642A