Molten aluminum spectral feature selection method based on temperature adaptive signal-to-noise stability index

By using a method based on temperature-adaptive signal-to-noise stability index, the problem of inaccurate selection of characteristic wavelengths in aluminum liquid spectral analysis is solved, enabling efficient and accurate detection of aluminum liquid composition, which is suitable for online monitoring in the aluminum smelting industry.

CN121880943BActive Publication Date: 2026-06-09ALUMINUM CORP OF CHINA LTD +3

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALUMINUM CORP OF CHINA LTD
Filing Date
2026-03-23
Publication Date
2026-06-09

Smart Images

  • Figure CN121880943B_ABST
    Figure CN121880943B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of spectral analysis, and specifically provides an aluminum liquid spectral feature selection method based on a temperature adaptive signal-to-noise stability index, which comprises the following steps: obtaining spectral data of aluminum liquid with multiple concentration gradients at multiple aluminum liquid surface temperatures, respectively, dividing a training set and a verification set from the spectral data corresponding to the multiple concentration gradients, wherein each spectral data comprises spectral intensity of multiple wavelengths; determining a signal-to-noise stability index based on first spectral data in the training set, and determining a temperature sensitivity coefficient based on the first spectral data and a first surface temperature in the training set; determining a temperature adaptive signal-to-noise stability index based on the signal-to-noise stability index and the temperature sensitivity coefficient; and selecting a target feature wavelength from the multiple wavelengths based on the temperature adaptive signal-to-noise stability index and a second surface temperature and second spectral data in the verification set. The technical scheme provided by the application can improve the accuracy of aluminum liquid spectral feature selection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of spectral analysis technology, and in particular relates to a method for selecting spectral features of molten aluminum based on a temperature-adaptive signal-to-noise stability index. Background Technology

[0002] In the aluminum smelting industry, real-time compositional analysis of elements such as silicon and iron in molten aluminum is crucial for ensuring alloy quality and production efficiency. Traditional analytical methods such as chemical titration and ICP-OES require sampling, cooling, and offline operation, which is time-consuming and cannot meet the needs of online monitoring. Laser-induced breakdown spectroscopy (LIBS) technology, based on the principle of generating plasma on the surface of molten aluminum with a high-energy laser and collecting the emission spectrum, can achieve simultaneous, rapid, and non-destructive in-situ detection of multiple elements. It is simple to use and has a fast response speed, making it particularly suitable for high-temperature and high-dynamic environments like molten aluminum. However, fluctuations in the surface temperature of molten aluminum can lead to problems such as laser energy jitter, plasma inhomogeneity, and surface fluctuations in the melt. These issues result in high dimensionality, high noise, and severe signal fluctuations in the LIBS spectrum of molten aluminum, leading to low accuracy in the selection of characteristic wavelengths. Therefore, improving the accuracy of spectral feature selection in molten aluminum is an urgent technical problem to be solved. Summary of the Invention

[0003] The embodiments of this application provide a method, apparatus, program product, readable storage medium, and electronic device for selecting spectral features of molten aluminum based on a temperature-adaptive signal-to-noise stability index, thereby improving the accuracy of spectral feature selection of molten aluminum.

[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0005] According to a first aspect of the present application, a method for selecting spectral features of molten aluminum based on a temperature-adaptive signal-to-noise stability index is provided. The method comprises: acquiring spectral data of molten aluminum at multiple concentration gradients and at multiple surface temperatures, and dividing the spectral data corresponding to the multiple concentration gradients into a training set and a validation set, wherein each spectral data includes spectral intensities of multiple wavelengths; determining a signal-to-noise stability index corresponding to the multiple wavelengths based on first spectral data corresponding to each concentration gradient in the training set, and determining a temperature sensitivity coefficient corresponding to the multiple wavelengths based on the first spectral data and a first surface temperature corresponding to each concentration gradient in the training set; determining a temperature-adaptive signal-to-noise stability index corresponding to the multiple wavelengths based on the signal-to-noise stability index and the temperature sensitivity coefficient; and selecting a target feature wavelength from the multiple wavelengths based on the temperature-adaptive signal-to-noise stability index and a second surface temperature and second spectral data corresponding to each concentration gradient in the validation set, wherein the target feature wavelength is used to characterize the spectral features of the molten aluminum.

[0006] In some embodiments of this application, based on the aforementioned scheme, obtaining spectral data of aluminum liquids with multiple concentration gradients at multiple aluminum liquid surface temperatures includes: collecting initial spectral data of aluminum liquids with multiple concentration gradients at multiple aluminum liquid surface temperatures; and normalizing the spectral intensity of each wavelength in each initial spectral data using the internal standard method to obtain spectral data of aluminum liquids with multiple concentration gradients at multiple aluminum liquid surface temperatures.

[0007] In some embodiments of this application, based on the foregoing scheme, determining the signal-to-noise stability index corresponding to the plurality of wavelengths based on the first spectral data corresponding to each concentration gradient in the training set includes: determining the median of the plurality of concentration gradients in the training set, defining aluminum liquid with a concentration gradient greater than the median as high-concentration aluminum liquid, and defining aluminum liquid with a concentration gradient less than or equal to the median as low-concentration aluminum liquid; and determining the signal-to-noise stability index corresponding to the plurality of wavelengths using the following formula:

[0008]

[0009] in, Indicates the first j Signal-to-noise stability index corresponding to each wavelength; and The high-concentration aluminum liquid and the low-concentration aluminum liquid in the training set respectively represent the first and second concentrations of the aluminum liquid in the training set. j Average spectral intensity at each wavelength; and The high-concentration aluminum liquid and the low-concentration aluminum liquid in the training set respectively represent the first and second concentrations of the aluminum liquid in the training set. j Standard deviation of spectral intensity at each wavelength; This indicates the number of aluminum liquid concentration gradients in the training set; Indicates the first m Aluminum liquid with a concentration gradient of ... j The standard deviation of spectral intensity measured repeatedly at a wavelength; Indicates the first training set m Aluminum liquid with a concentration gradient of ... j The average value of the spectral intensity measured repeatedly at a wavelength.

[0010] In some embodiments of this application, based on the foregoing scheme, determining the temperature sensitivity coefficients corresponding to the plurality of wavelengths based on the first spectral data and the first surface temperatures corresponding to each concentration gradient in the training set includes: sorting the plurality of aluminum melt surface temperatures in ascending order to obtain a target temperature sequence; determining the normalized spectral intensities corresponding to the plurality of wavelengths in the first spectral data; and determining the temperature sensitivity coefficients corresponding to the plurality of wavelengths using the following formula:

[0011]

[0012] in, Indicates the first j Temperature sensitivity coefficient corresponding to each wavelength; Indicates the first training set m The target temperature sequence corresponding to each concentration gradient; Indicates the central difference step size; Indicates the first m Aluminum liquid with a concentration gradient of ... j Normalized spectral intensity of each wavelength; Indicates the first j The noise standard deviation for each wavelength.

[0013] In some embodiments of this application, based on the foregoing scheme, the noise standard deviation is determined by the following formula:

[0014]

[0015] in, This indicates the number of aluminum liquid concentration gradients in the training set; Indicates the first m Aluminum liquid with a concentration gradient of ... j The first wavelength k Normalized spectral intensity of the second measurement; Indicates the first m Aluminum liquid with a concentration gradient of ... j The number of times a measurement is repeated at each wavelength; Indicates the first m Aluminum liquid with a concentration gradient of ...j The arithmetic mean of all repeated measurements of spectral intensity at each wavelength.

[0016] In some embodiments of this application, based on the foregoing scheme, determining the temperature-adaptive signal-noise stability index corresponding to the plurality of wavelengths based on the signal-to-noise stability index and the temperature sensitivity coefficient includes: determining the temperature-adaptive signal-to-noise stability index corresponding to the plurality of wavelengths using the following formula:

[0017]

[0018] in, Indicates the first j Temperature-adaptive signal-to-noise stability index corresponding to each wavelength; Indicates the first j Signal-to-noise stability index corresponding to each wavelength; Indicates the first j Temperature sensitivity coefficient corresponding to each wavelength; This represents the temperature penalty adjustment coefficient.

[0019] In some embodiments of this application, based on the foregoing scheme, the step of selecting a target feature wavelength from the plurality of wavelengths based on the temperature adaptive signal-to-noise stability index and the second surface temperature and second spectral data corresponding to each concentration gradient in the validation set includes: sorting the plurality of wavelengths in descending order of the temperature adaptive signal-to-noise stability index to obtain a wavelength sequence; selecting a preset number of wavelengths from the wavelength sequence before sorting as test feature wavelengths, and constructing a test regression model based on the test feature wavelengths; and determining the temperature-weighted root mean square error of the test regression model using the following formula:

[0020]

[0021] in, This represents the temperature-weighted root mean square error; This indicates the number of aluminum liquid concentration gradients in the verification set; Indicates the first in the verification set i The concentration of impurities determined by a test regression model in aluminum liquid with a concentration gradient; Indicates the first in the verification set i The actual impurity concentrations in molten aluminum at each concentration gradient; Indicates the deviation penalty coefficient; Indicates the first iThe second surface temperature of the aluminum liquid with a concentration gradient; based on the preset number, increase the preset step size as the new preset number, and return to the step of selecting the preset number of wavelengths in the wavelength sequence before sorting, until the temperature weighted root mean square error of the test regression model reaches the minimum value; take the test feature wavelength corresponding to the minimum temperature weighted root mean square error as the target feature wavelength.

[0022] In some embodiments of this application, based on the foregoing scheme, the method further includes: constructing a target regression model based on the target characteristic wavelength; and determining the impurity concentration of the aluminum liquid to be tested through the target regression model.

[0023] In some embodiments of this application, based on the foregoing scheme, the method further includes: dividing a test set from the spectral data corresponding to the plurality of concentration gradients, excluding the training set and the validation set; and determining the prediction accuracy and generalization performance of the target regression model based on the third surface temperature and third spectral data corresponding to each concentration gradient in the test set.

[0024] According to a second aspect of the present application, an aluminum liquid spectral feature selection device based on a temperature-adaptive signal-to-noise stability index is provided. The device comprises: an acquisition unit, configured to acquire spectral data of aluminum liquids with multiple concentration gradients at multiple aluminum liquid surface temperatures, and to divide the spectral data corresponding to the multiple concentration gradients into a training set and a validation set, wherein each spectral data includes spectral intensities of multiple wavelengths; a first determination unit, configured to determine a signal-to-noise stability index corresponding to the multiple wavelengths based on the first spectral data corresponding to each concentration gradient in the training set, and to determine a temperature sensitivity coefficient corresponding to the multiple wavelengths based on the first spectral data and the first surface temperature corresponding to each concentration gradient in the training set; a second determination unit, configured to determine a temperature-adaptive signal-to-noise stability index corresponding to the multiple wavelengths based on the signal-to-noise stability index and the temperature sensitivity coefficient; and a selection unit, configured to select a target feature wavelength from the multiple wavelengths based on the temperature-adaptive signal-to-noise stability index and the second surface temperature and second spectral data corresponding to each concentration gradient in the validation set, wherein the target feature wavelength is used to characterize the spectral features of the aluminum liquid.

[0025] According to a third aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause a computer device having the processor to perform an operation as described in any of the embodiments of the first aspect above.

[0026] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by a processor to perform the operation performed by the method described in any of the embodiments of the first aspect above.

[0027] According to a fifth aspect of the present application, an electronic device is provided, the electronic device including one or more processors and one or more memories, the one or more memories storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the one or more processors to perform the operation performed by the method as described in any of the first aspect embodiments above.

[0028] Based on the technical solution proposed in this application, by acquiring spectral data under different concentration gradients and temperature conditions, a comprehensive dataset can be provided for the subsequent calculation of the signal-to-noise stability index and temperature sensitivity coefficient, improving the accuracy of characteristic wavelength selection and ensuring that the selected target characteristic wavelengths have good applicability and stability. Simultaneously, by determining the signal-to-noise stability index and temperature sensitivity coefficient, each wavelength in the spectral data is evaluated from two dimensions: signal stability and resistance to temperature interference. Then, based on the signal-to-noise stability index and temperature sensitivity coefficient, a temperature-adaptive signal-to-noise stability index is determined to comprehensively evaluate the signal stability and resistance to temperature interference of each wavelength, improving the accuracy of characteristic wavelength selection. Furthermore, through model validation, it is ensured that the selected combination of characteristic wavelengths can maximize the accuracy of quantitative analysis, further improving the accuracy of aluminum melt spectral characteristic selection.

[0029] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0031] Figure 1 A flowchart of a method for selecting spectral features of liquid aluminum based on a temperature-adaptive signal-to-noise stability index according to one embodiment of this application is shown;

[0032] Figure 2 This paper shows a trend graph of the temperature-weighted root mean square error of various test regression models in one embodiment of this application;

[0033] Figure 3 This paper shows a scatter plot of test set predictions for a full-spectrum PLS in one embodiment of this application.

[0034] Figure 4 This paper shows a scatter plot of test set predictions for a target regression model in one embodiment of the present application.

[0035] Figure 5 A block diagram of an aluminum liquid spectral feature selection device based on a temperature-adaptive signal-to-noise stability index according to one embodiment of this application is shown.

[0036] Figure 6 A schematic diagram of the structure of an electronic device according to one embodiment of this application is shown. Detailed Implementation

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

[0038] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0039] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0040] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0041] It should also be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such uses of these terms can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described.

[0042] In the aluminum smelting industry, real-time compositional analysis of elements such as silicon and iron in molten aluminum is crucial for ensuring alloy quality and production efficiency. Traditional analytical methods such as chemical titration and ICP-OES require sampling, cooling, and offline operation, which is time-consuming and cannot meet the needs of online monitoring. Laser-induced breakdown spectroscopy (LIBS) technology, based on the principle of generating plasma on the surface of molten aluminum with a high-energy laser and collecting the emission spectrum, can achieve simultaneous, rapid, and non-destructive in-situ detection of multiple elements. It is simple to use and has a fast response speed, and is particularly suitable for high-temperature and high-dynamic molten aluminum environments. However, temperature fluctuations on the surface of molten aluminum can lead to problems such as laser energy jitter, plasma inhomogeneity, and surface fluctuations in the melt, resulting in high dimensionality, high noise, and severe signal fluctuations in the LIBS spectrum of molten aluminum. Consequently, the accuracy of characteristic wavelength selection in LIBS spectra is low. Based on this, this application proposes a method for selecting spectral features of molten aluminum based on a temperature-adaptive signal-to-noise stability index to improve the accuracy of spectral feature selection.

[0043] Next, we will combine Figure 1 This paper elaborates on the method for selecting spectral features of liquid aluminum based on temperature adaptive signal-to-noise stability index.

[0044] See Figure 1 The flowchart illustrates a method for selecting spectral features of liquid aluminum based on a temperature-adaptive signal-to-noise stability index according to one embodiment of this application. Figure 1 As shown, the method may include at least the following steps 110 to 140:

[0045] Step 110: Obtain spectral data of aluminum liquid with multiple concentration gradients at multiple aluminum liquid surface temperatures, and divide the spectral data corresponding to the multiple concentration gradients into training set and validation set, wherein each spectral data includes spectral intensities of multiple wavelengths.

[0046] Step 120: Based on the first spectral data corresponding to each concentration gradient in the training set, determine the signal-to-noise stability index corresponding to the multiple wavelengths, and based on the first spectral data and the first surface temperature corresponding to each concentration gradient in the training set, determine the temperature sensitivity coefficient corresponding to the multiple wavelengths.

[0047] Step 130: Based on the signal-to-noise stability index and the temperature sensitivity coefficient, determine the temperature-adaptive signal-to-noise stability index corresponding to the multiple wavelengths.

[0048] Step 140: Based on the temperature adaptive signal-to-noise stability index and the second surface temperature and second spectral data corresponding to each concentration gradient in the verification set, a target feature wavelength is selected from the plurality of wavelengths. The target feature wavelength is used to characterize the spectral characteristics of the aluminum melt.

[0049] In this application, the concentration gradient refers to the different content levels of impurity elements (such as silicon, iron, etc.) in the aluminum liquid. By setting multiple concentration gradients, the composition variation range of the aluminum liquid in actual production can be covered, ensuring that the selected characteristic wavelength is suitable for the detection of aluminum liquid with different compositions. The spectral data refers to the raw data collected by the LIBS detection system, which contains the spectral intensities corresponding to multiple wavelengths. The spectral intensity of each wavelength point can be used to reflect the characteristic radiation intensity of the element corresponding to that wavelength.

[0050] In this application, the training set is a dataset used to construct evaluation metrics (signal-to-noise stability index and temperature sensitivity coefficient) and to initially select wavelengths. The amount of data in the training set can account for 60% to 80% of the total data to ensure the reliability of the evaluation metrics. Specifically, for example, for 50 concentration gradients and their corresponding spectral data, 30 concentration gradients (accounting for 60% of the total data) and their corresponding spectral data can be randomly selected as the training set, or 35 concentration gradients (accounting for 70% of the total data) and their corresponding spectral data can be randomly selected as the training set, or 40 concentration gradients (accounting for 80% of the total data) and their corresponding spectral data can be randomly selected as the training set. This application does not make specific limitations on this.

[0051] In this application, the validation set is used to verify the performance of regression models constructed with different wavelength combinations, selecting the dataset with the optimal feature wavelengths. The data volume of the validation set can account for 10% to 20% of the total data volume to avoid model overfitting. Specifically, for example, for 50 concentration gradients and their corresponding spectral data, 10 concentration gradients (accounting for 20% of the total data volume) and their corresponding spectral data can be randomly selected as the training set, or 8 concentration gradients (accounting for 16% of the total data volume) and their corresponding spectral data can be randomly selected as the training set, or 5 concentration gradients (accounting for 10% of the total data volume) and their corresponding spectral data can be randomly selected as the training set. This application does not make specific limitations in this regard.

[0052] In this application, the signal-to-noise stability index comprehensively reflects the signal intensity difference and stability of wavelengths in aluminum liquids of different concentrations. The larger the signal-to-noise stability index, the greater the signal intensity difference and the higher the stability, and the better the index. The temperature sensitivity coefficient can be used to quantify the degree to which the spectral intensity of the wavelength is affected by the change in the surface temperature of the aluminum liquid. The smaller the temperature sensitivity coefficient, the stronger the wavelength's resistance to temperature interference. The temperature-adaptive signal-to-noise stability index is a comprehensive evaluation index that combines the signal-to-noise stability index and the temperature sensitivity coefficient, taking into account both the stability of the signal itself and the resistance to temperature interference. The target characteristic wavelength refers to the wavelength combination most suitable for quantitative analysis of aluminum liquid composition after multi-dimensional selection, which has the characteristics of signal stability and strong resistance to temperature interference.

[0053] In this application, by acquiring spectral data under different concentration gradients and temperature conditions, a comprehensive dataset can be provided for the subsequent calculation of the signal-to-noise stability index and temperature sensitivity coefficient, improving the accuracy of characteristic wavelength selection and ensuring that the selected target characteristic wavelengths have good applicability and stability. Simultaneously, by determining the signal-to-noise stability index and temperature sensitivity coefficient, each wavelength in the spectral data is evaluated from two dimensions: signal stability and resistance to temperature interference. Then, based on the signal-to-noise stability index and temperature sensitivity coefficient, a temperature-adaptive signal-to-noise stability index is determined to comprehensively evaluate the signal stability and resistance to temperature interference of each wavelength, improving the accuracy of characteristic wavelength selection. Furthermore, through model validation, it is ensured that the selected combination of characteristic wavelengths can maximize the accuracy of quantitative analysis, further improving the accuracy of aluminum melt spectral characteristic selection.

[0054] In step 110 above, obtaining spectral data of aluminum liquids with multiple concentration gradients at multiple aluminum liquid surface temperatures can be specifically performed according to steps 111 to 112 below:

[0055] Step 111: Collect initial spectral data of aluminum liquid with multiple concentration gradients at multiple aluminum liquid surface temperatures.

[0056] Step 112: The spectral intensity of each wavelength in each initial spectral data is normalized using the internal standard method to obtain the spectral data of aluminum liquid with multiple concentration gradients at multiple aluminum liquid surface temperatures.

[0057] In this application, the multiple aluminum liquids with different concentration gradients can specifically be 50 aluminum liquids with different iron concentration gradients, 60 aluminum liquids with different iron concentration gradients, or 40 aluminum liquids with different iron concentration gradients. The concentration gradients specifically cover a range of 0.05wt% to 0.8wt%. The multiple aluminum liquid surface temperatures can specifically be 5 surface temperatures, 6 surface temperatures, or 7 surface temperatures. All surface temperatures are distributed between 680℃ and 820℃. This application does not make specific limitations in this regard.

[0058] In this application, the wavelength range of the spectrometer for laser-induced breakdown spectroscopy can be set to 227 nm to 345 nm to cover key analytical lines such as Fe I 258.59 nm and Fe II 259.94 nm. Other wavelength ranges can also be set according to actual needs to cover key analytical lines of other impurities.

[0059] In this application, the initial spectral data refers to the raw spectral data directly acquired by the LIBS detection system, which may be affected by system factors such as laser energy fluctuations and instrument response differences. The internal standard method is a spectral data normalization method, which specifically involves selecting an internal standard element with stable content and spectral intensity, and calculating the ratio between the spectral intensity of the target element and the spectral intensity of the internal standard element to eliminate systematic errors. The normalization process refers to the process of eliminating systematic errors and random fluctuations in the raw data through a specific algorithm, making the data comparable, which can effectively improve the reliability of the data and thus improve the accuracy of characteristic wavelength selection.

[0060] In this application, the internal standard method is used to normalize the spectral intensity of each wavelength in each initial spectral data. Specifically, the aluminum matrix spectral line Al I256.88nm, which is less affected by the self-absorption effect and has a stable signal, can be selected as the internal standard line. The spectral intensity of each wavelength in the initial spectral data is divided by the spectral intensity of the internal standard line to obtain the normalized spectral intensity of each wavelength. After integrating the normalized spectral intensities of each wavelength, the spectral data of aluminum liquid with multiple concentration gradients at multiple aluminum liquid surface temperatures can be obtained.

[0061] In this application, the initial spectral data is normalized using the internal standard method, which solves the problem of poor stability caused by system interference in the original spectral data. During LIBS detection, system factors such as laser energy fluctuations and spectrometer detector response drift can cause fluctuations in the spectral intensity of the same wavelength under the same conditions. If the original data is used directly for subsequent index calculations, the evaluation results will be distorted. However, by selecting aluminum matrix elements as internal standards and using their stable content and spectral intensity to normalize the spectral intensity of the target wavelength, the interference caused by system factors can be effectively offset. The normalized spectral intensity can more accurately reflect the content characteristics and temperature influence of the target element, thereby providing accurate data for the subsequent calculation of the signal-to-noise stability index and effectively improving the accuracy of selecting spectral characteristics of molten aluminum.

[0062] In step 120 above, determining the signal-to-noise stability index corresponding to the multiple wavelengths based on the first spectral data corresponding to each concentration gradient in the training set can be specifically performed according to steps 121 to 122 as follows:

[0063] Step 121: Determine the median of multiple concentration gradients in the training set, and define aluminum liquid with a concentration gradient greater than the median as high-concentration aluminum liquid, and aluminum liquid with a concentration gradient less than or equal to the median as low-concentration aluminum liquid.

[0064] Step 122: Determine the signal-to-noise stabilization index corresponding to the multiple wavelengths using the following formula (1):

[0065] (1)

[0066] in, Indicates the first j Signal-to-noise stability index corresponding to each wavelength; and The high-concentration aluminum liquid and the low-concentration aluminum liquid in the training set respectively represent the first and second concentrations of the aluminum liquid in the training set. j Average spectral intensity at each wavelength; and The high-concentration aluminum liquid and the low-concentration aluminum liquid in the training set respectively represent the first and second concentrations of the aluminum liquid in the training set. j Standard deviation of spectral intensity at each wavelength; This indicates the number of aluminum liquid concentration gradients in the training set; Indicates the first m Aluminum liquid with a concentration gradient of ... j The standard deviation of spectral intensity measured repeatedly at a wavelength; Indicates the first training set m Aluminum liquid with a concentration gradient of ... j The average value of the spectral intensity measured repeatedly at a wavelength.

[0067] In this application, the above formula (1) can be derived using the following formulas (2) and (3):

[0068] (2)

[0069] (3)

[0070] in, Indicates the first training set m Aluminum liquid with a concentration gradient of ... j Characteristic coefficients at each wavelength The training set represents M The overall coefficient of variation in a sample.

[0071] In this application, the signal-to-noise stability index can be obtained by calculating the inter-class signal-to-noise ratio to characterize the wavelength's ability to distinguish concentration, and by calculating the intra-class coefficient of variation through repeated measurements of each sample to characterize the wavelength's stability. The higher the value, the better and more stable the wavelength's ability to distinguish concentration, and the richer the effective information it contains.

[0072] In this application, the median refers to the concentration value in the middle position after sorting multiple concentration gradients from smallest to largest or from largest to smallest. It can be used to distinguish between high-concentration aluminum liquid and low-concentration aluminum liquid, ensuring that the number of data in the two groups is relatively balanced. The average spectral intensity is the arithmetic mean of the spectral intensity of aluminum liquid of the same concentration group (high concentration or low concentration) measured multiple times at a certain wavelength, which can reflect the average signal level of the concentration group at that wavelength. The standard deviation of spectral intensity refers to the degree of dispersion of spectral intensity measured multiple times at a certain wavelength for the same concentration group. The smaller the standard deviation, the better the signal stability at that wavelength.

[0073] In this application, the determination of the median of multiple concentration gradients in the training set is specifically, for example, assuming that the aluminum liquid concentration gradients corresponding to the training set are 0.1wt%, 0.2wt%, 0.3wt%, 0.4wt%, and 0.5wt%, a total of 5 concentration gradients, after sorting them from smallest to largest, the median is 0.3wt% corresponding to the 3rd concentration gradient. Aluminum liquid with a concentration gradient greater than the median is defined as high-concentration aluminum liquid, that is, aluminum liquid with a concentration gradient of 0.4wt% and 0.5wt% is high-concentration aluminum liquid, and aluminum liquid with a concentration gradient less than or equal to the median is defined as low-concentration aluminum liquid, that is, aluminum liquid with a concentration gradient of 0.1wt%, 0.2wt%, and 0.3wt% is low-concentration aluminum liquid.

[0074] In this application, by dividing the data into high and low concentration groups, the signal intensity differences of spectral data at different concentrations can be quantified, ensuring that the selected wavelength can effectively distinguish aluminum liquids of different compositions. At the same time, by introducing signal stability indices for each concentration gradient, wavelengths with large signal fluctuations can be avoided, thereby improving the accuracy of characteristic wavelength selection. Furthermore, by quantifying the signal dispersion by summing the standard deviations of the high and low concentration groups, the signal stability of the wavelength can be ensured, which in turn can further improve the accuracy of characteristic wavelength selection.

[0075] In step 120 above, determining the temperature sensitivity coefficients corresponding to the multiple wavelengths based on the first spectral data and the first surface temperatures corresponding to each concentration gradient in the training set can be specifically performed according to steps 123 to 125 as follows:

[0076] Step 123: Sort the multiple aluminum liquid surface temperatures in ascending order to obtain the target temperature sequence.

[0077] Step 124: Determine the normalized spectral intensities corresponding to the plurality of wavelengths in the first spectral data.

[0078] Step 125: Determine the temperature sensitivity coefficients corresponding to the multiple wavelengths using the following formula (4):

[0079] (4)

[0080] in, Indicates the first j Temperature sensitivity coefficient corresponding to each wavelength; Indicates the first training set m The target temperature sequence corresponding to each concentration gradient; Indicates the central difference step size; Indicates the first m Aluminum liquid with a concentration gradient of ... j Normalized spectral intensity of each wavelength; Indicates the first j The noise standard deviation for each wavelength.

[0081] In this application, the target temperature sequence refers to a set of temperatures obtained by arranging multiple aluminum liquid surface temperatures in ascending order, or in descending order, which facilitates the calculation of the impact of temperature changes on spectral intensity. The normalized spectral intensity is the spectral intensity of each wavelength obtained after processing with the internal standard method. The normalized spectral intensity has eliminated systematic errors and can more accurately reflect the impact of temperature on spectral intensity. The central difference step size is the temperature interval step size used in the central difference calculation. The central difference is a numerical differential calculation method that can calculate the derivative of a point by using the function values ​​of two adjacent points before and after a point, which can more accurately reflect the rate of change of the function at that point. The noise standard deviation can reflect the degree of random fluctuation of the spectral intensity of a certain wavelength in multiple repeated measurements.

[0082] In this application, the surface temperature of the molten aluminum fluctuates continuously, and the relationship between spectral intensity and temperature is a complex continuous function. If a first-order precision forward difference is used, which only uses the temperature points following the current temperature point for calculation, it is easily affected by random noise at a single temperature point, leading to deviations in the rate of change calculation. Similarly, if a first-order precision backward difference is used, which only uses the temperature points preceding the current temperature point for calculation, it is also affected by random noise at a single temperature point. However, the central difference, through the fusion of data from symmetrical points before and after the current temperature point, can cancel out the random noise interference at a single temperature point and more accurately reflect the overall trend of spectral intensity changing with temperature. Furthermore, if the temperature in the temperature sequence is subtracted or the central difference step size is increased, spectral data corresponding to unmeasured temperatures will appear, which can be determined by interpolation calculation using adjacent temperature point data in the training set.

[0083] In this application, temperatures are arranged sequentially to facilitate the calculation of the rate of change of spectral intensity with temperature using the central difference method, ensuring the accuracy of the calculation. Obtaining the normalized spectral intensity after eliminating systematic errors ensures that the temperature sensitivity coefficient truly reflects the influence of temperature on spectral intensity. Furthermore, by calculating the rate of change of spectral intensity with temperature using the central difference method and normalizing the rate of change using the noise standard deviation, the temperature sensitivity coefficient can be obtained. The smaller the coefficient, the less the wavelength is affected by temperature, and the stronger the anti-interference ability. In this way, a basis can be provided for the subsequent calculation of the temperature adaptive signal-to-noise stability index, thereby selecting a characteristic wavelength that is more suitable for the temperature fluctuation environment of molten aluminum and improving the accuracy of characteristic wavelength selection.

[0084] In step 125 above, the noise standard deviation can be specifically determined by the following formula (5):

[0085] (5)

[0086] in, This indicates the number of aluminum liquid concentration gradients in the training set; Indicates the firstm Aluminum liquid with a concentration gradient of ... j The first wavelength k Normalized spectral intensity of the second measurement; Indicates the first m Aluminum liquid with a concentration gradient of ... j The number of times a measurement is repeated at each wavelength; Indicates the first m Aluminum liquid with a concentration gradient of ... j The arithmetic mean of all repeated measurements of spectral intensity at each wavelength.

[0087] In this application, the number of repeated measurements refers to the number of times the aluminum liquid spectrum is collected under the same concentration and temperature conditions, specifically 3 to 5 times, to fully reflect the distribution of random noise; the arithmetic mean is the sum of the spectral intensities of multiple repeated measurements divided by the number of measurements, which can reflect the average level of spectral intensity under the conditions; the noise standard deviation is a dispersion index calculated from multiple repeated measurement data, which can directly reflect the random noise level of the wavelength and is an important parameter for evaluating the quality of spectral data.

[0088] In this application, by integrating repeated measurement data from multiple concentration gradients, noise bias caused by a single concentration or single measurement can be avoided, ensuring the reliability of the noise standard deviation. At the same time, unbiased estimation of noise can further improve the accuracy of the calculation results, thereby improving the accuracy of the temperature sensitivity coefficient calculation, improving the quantification accuracy of the temperature sensitivity coefficient, and further improving the accuracy of characteristic wavelength selection.

[0089] In step 130 above, determining the temperature-adaptive signal-noise stability index corresponding to the multiple wavelengths based on the signal-to-noise stability index and the temperature sensitivity coefficient can be specifically performed according to step 131 below:

[0090] Step 131: Determine the temperature-adaptive signal-to-noise stability index corresponding to the multiple wavelengths using the following formula (6):

[0091] (6)

[0092] in, Indicates the first j Temperature-adaptive signal-to-noise stability index corresponding to each wavelength; Indicates the first j Signal-to-noise stability index corresponding to each wavelength; Indicates the first j Temperature sensitivity coefficient corresponding to each wavelength; This represents the temperature penalty adjustment coefficient.

[0093] In this application, the temperature-adaptive signal-to-noise stability index is a comprehensive evaluation index that combines the signal-to-noise stability index and the temperature sensitivity coefficient. It can evaluate the wavelength from two dimensions: signal stability and resistance to temperature interference. The temperature penalty adjustment coefficient can be used to adjust the weight of the temperature sensitivity coefficient in the temperature-adaptive signal-to-noise stability index. Specifically, it can be adjusted according to the severity of temperature fluctuations in actual industrial scenarios. The value range can be 0.3 to 0.8, specifically 0.5 or 0.6. When the temperature fluctuation is large, the coefficient can be increased to strengthen the penalty for temperature sensitivity; when the temperature fluctuation is small, the coefficient can be decreased to focus on signal performance.

[0094] In this application, the signal-to-noise stability index only reflects the signal performance of the wavelength, while the temperature sensitivity coefficient only reflects the ability to resist temperature interference. If only one of the indicators is used for wavelength selection, the selected wavelength may have obvious defects. Therefore, the two indicators can be weighted and fused by the temperature penalty adjustment coefficient to obtain the temperature-adaptive signal-to-noise stability index. This allows the comprehensive evaluation index to reflect both signal performance and the ability to resist temperature interference, providing a basis for subsequent wavelength ranking. Furthermore, the weight of the temperature factor can be adjusted according to the actual operating conditions to make the temperature-adaptive signal-to-noise stability index more in line with application requirements, thereby effectively improving the accuracy of characteristic wavelength selection.

[0095] In step 140 above, the selection of the target feature wavelength from the plurality of wavelengths based on the temperature adaptive signal-to-noise stability index and the second surface temperature and second spectral data corresponding to each concentration gradient in the validation set can be specifically performed according to steps 141 to 145 as follows:

[0096] Step 141: Sort the multiple wavelengths in descending order of temperature adaptive signal-to-noise stability index to obtain a wavelength sequence.

[0097] Step 142: Select a preset number of wavelengths from the wavelength sequence before sorting as test feature wavelengths, and construct a test regression model based on the test feature wavelengths.

[0098] Step 143, determine the temperature-weighted root mean square error of the test regression model using the following formula (7):

[0099] (7)

[0100] in, This represents the temperature-weighted root mean square error; This indicates the number of aluminum liquid concentration gradients in the verification set; Indicates the first in the verification set i The concentration of impurities determined by a test regression model in aluminum liquid with a concentration gradient; Indicates the first in the verification set i The actual impurity concentrations in molten aluminum at each concentration gradient; Indicates the deviation penalty coefficient; Indicates the first i The second surface temperature of molten aluminum with a concentration gradient.

[0101] Step 144: Increase the preset step size based on the preset number as the new preset number, and return to the step of selecting the preset number of wavelengths in the wavelength sequence before sorting, until the temperature-weighted root mean square error of the test regression model reaches the minimum value.

[0102] Step 145: The test characteristic wavelength corresponding to the minimum temperature-weighted root mean square error is taken as the target characteristic wavelength.

[0103] Please refer to the following in this application: Figure 2 The diagram illustrates the temperature-weighted root mean square error trend of various test regression models in one embodiment of this application, such as... Figure 2 As shown, the preset step size is 50, and the initial preset number is 50. By increasing the preset step size based on the preset number, test regression models are continuously built, and the temperature-weighted root mean square error of the test regression models is determined. It is found that the preset number has a minimum value between 550 and 600. Then, the preset step size can be appropriately reduced, and multiple test regression models can be built starting from the preset number of 550. The temperature-weighted root mean square error of the test regression models is determined, and finally, the number of test feature wavelengths corresponding to the minimum temperature-weighted root mean square error is 567.

[0104] In this application, the wavelength sequence is a sequence obtained by sorting all wavelengths from largest to smallest according to their temperature adaptive signal-to-noise stability index. The larger the temperature adaptive signal-to-noise stability index, the better the overall performance of the wavelengths, and the higher they are ranked; conversely, the smaller the index, the higher they are ranked. The test feature wavelengths are a preset number of wavelengths selected from the wavelength sequence, which can be used to construct a test regression model to verify the impact of different wavelength numbers on model performance. The test regression model is a quantitative analysis model constructed from the spectral data of the test feature wavelengths, which can be used to predict the impurity concentration in molten aluminum. Specifically, it can be constructed using common algorithms such as partial least squares regression and support vector machine regression. The temperature-weighted root mean square error is a model prediction error evaluation index with temperature weighting, which can more accurately reflect the prediction accuracy of the model under temperature fluctuation scenarios. The preset number is the number of test feature wavelengths initially selected, which can be set according to actual conditions. The preset step size refers to the number of test feature wavelengths added each time, which can be used to iteratively optimize the number of wavelengths.

[0105] In this application, by introducing As a temperature deviation weighting term, higher error weights are assigned to extreme high-temperature or low-temperature samples that deviate far from the reference temperature. This enables the suppression of wavelengths that perform well only at normal temperatures but fail at extreme temperatures during the feature selection process, ensuring that the final selected target feature wavelengths have good prediction accuracy across the entire temperature range.

[0106] In this application, iterative verification and temperature-weighted error evaluation ensure that the selected combination of characteristic wavelengths has good quantitative analysis performance. First, sorting by temperature-adaptive signal-to-noise stability index ensures that the initially selected wavelengths have superior overall performance. Second, by gradually increasing the number of wavelengths and verifying model errors, the subjectivity of wavelength selection can be avoided, the optimal number of wavelengths can be determined, and the model complexity and prediction accuracy can be balanced. Finally, by using the influence of temperature fluctuations on model prediction through temperature-weighted root mean square error, the selected target characteristic wavelengths can maintain high prediction accuracy under different temperature conditions, thereby effectively improving the accuracy of characteristic wavelength selection.

[0107] Based on the technical solution proposed in this application, the method can also be performed according to the following steps 210 to 220:

[0108] Step 210: Construct a target regression model based on the target characteristic wavelength.

[0109] Step 220: Determine the impurity concentration of the aluminum melt to be tested using the target regression model.

[0110] In this application, the target regression model is a final quantitative analysis model constructed based on the target characteristic wavelength, which can be used to predict the impurity concentration of the aluminum liquid to be tested. The aluminum liquid to be tested refers to the aluminum liquid that needs to be tested for composition in industrial production. Its concentration and temperature are unknown. By collecting its spectral data and inputting it into the target regression model, the predicted value of the impurity concentration can be obtained. The impurity concentration is the content of the target element (such as silicon and iron) in the aluminum liquid, usually expressed as mass fraction (wt%).

[0111] In this application, the target characteristic wavelength has strong signal stability and weak temperature sensitivity. Therefore, the target regression model constructed based on the target characteristic wavelength can effectively resist the interference of aluminum liquid temperature fluctuation and signal noise, and reduce prediction error. The target regression model is constructed based on the data of the training set and the test set to improve the fitting effect and ensure the accuracy of the model prediction.

[0112] Furthermore, based on the technical solution proposed in this application, the method may also perform the following steps 230 to 240:

[0113] Step 230: Divide the test set from the spectral data corresponding to the multiple concentration gradients, excluding the training set and the validation set.

[0114] Step 240: Based on the third surface temperature and third spectral data corresponding to each concentration gradient in the test set, determine the prediction accuracy and generalization performance of the target regression model.

[0115] Please refer to the following in this application: Figure 3 and Figure 4 , Figure 3 This paper shows a scatter plot of test set predictions for a full-spectrum PLS in one embodiment of this application. Figure 4 This paper illustrates a scatter plot of test set predictions for a target regression model in one embodiment of this application, as shown below. Figure 3 As shown, the scatter distribution of the predicted test set for traditional full-spectrum PLS is relatively scattered, indicating that the regression model determined by this method has low accuracy in predicting impurity concentration; while... Figure 4 In the test set plot predicted by the target regression model determined by the technical solution of this application, the test set plot is more concentrated near the reference line, indicating that the target regression model has high accuracy in predicting impurity concentration.

[0116] In a specific embodiment of this application, the test set RMSEP of the target regression model is 0.064wt%, R²=0.908; the training set RMSEC is 0.054wt%, R²=0.935; single-sample temperature drift bias (TDD), i.e., the mean relative standard deviation of the predicted values ​​of the same concentration sample at 5 different temperatures, is introduced to evaluate robustness, and the result shows that the TDD is 9.5%; two comparative models are constructed using the same dataset: traditional full-spectrum PLS (without feature selection) and RF-PLS based on random forest feature selection. Compared with the target regression model, the model performance parameters are shown in Table 1 below. The target regression model determined by the technical solution of this application has the smallest standard deviation, the most stable prediction results, and the best model performance.

[0117] Table 1 Comparison of Model Performance Parameters

[0118]

[0119] In this application, the test set is a dataset partitioned from the total spectral data to verify the generalization performance of the target regression model. Its data volume typically accounts for 10%-20% of the total data volume and does not overlap with the training or validation sets, ensuring the objectivity of the validation results. The third surface temperature is the aluminum liquid surface temperature corresponding to each set of spectral data in the test set, used to verify the model's adaptability under different temperature conditions. The third spectral data is the spectral data in the test set, including the original spectral data and the normalized spectral data, used as input to the target regression model for prediction. The prediction accuracy refers to the degree of agreement between the model's predicted values ​​and the actual values, typically measured by metrics such as mean absolute error (MAE) and root mean square error (RMSE). Generalization performance refers to the model's ability to adapt to new data (test set data) that has not participated in training and validation. Good generalization performance indicates that the model has broad applicability in practical applications and will not exhibit overfitting.

[0120] In this application, the prediction accuracy and generalization performance of the target regression model are evaluated using an independent test set, which effectively ensures the reliability and practicality of the model. At the same time, the training set is used for model parameter fitting, the validation set is used for feature wavelength selection, and the test set is used for model generalization performance verification. The three datasets are independent of each other, which can avoid the phenomenon of model overfitting. In addition, the prediction accuracy is evaluated by quantitative indicators such as mean absolute error and root mean square error, making the evaluation of model performance more objective and accurate.

[0121] Based on the technical solution proposed in this application, by acquiring spectral data under different concentration gradients and temperature conditions, a comprehensive dataset can be provided for the subsequent calculation of the signal-to-noise stability index and temperature sensitivity coefficient, improving the accuracy of characteristic wavelength selection and ensuring that the selected target characteristic wavelengths have good applicability and stability. Simultaneously, by determining the signal-to-noise stability index and temperature sensitivity coefficient, each wavelength in the spectral data is quantitatively evaluated from two dimensions: signal stability and resistance to temperature interference. Then, based on the signal-to-noise stability index and temperature sensitivity coefficient, a temperature-adaptive signal-to-noise stability index is determined to comprehensively evaluate the signal stability and resistance to temperature interference of each wavelength, improving the accuracy of characteristic wavelength selection. Furthermore, through model validation, it is ensured that the selected combination of characteristic wavelengths can maximize the accuracy of quantitative analysis, further improving the accuracy of aluminum melt spectral characteristic selection.

[0122] The following describes an embodiment of the apparatus described in this application, which can be used to execute the aluminum liquid spectral feature selection method based on temperature adaptive signal-to-noise stability index described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the aluminum liquid spectral feature selection method based on temperature adaptive signal-to-noise stability index described in the above applications.

[0123] Figure 5A block diagram of an aluminum liquid spectral feature selection device based on a temperature-adaptive signal-to-noise stability index according to one embodiment of this application is shown.

[0124] Reference Figure 5 According to one embodiment of this application, an aluminum liquid spectral feature selection device 500 based on temperature adaptive signal-to-noise stability index includes: an acquisition unit 501, a first determination unit 502, a second determination unit 503, and a selection unit 504.

[0125] The system includes: an acquisition unit 501, configured to acquire spectral data of molten aluminum at multiple concentration gradients and at multiple surface temperatures, and to divide the spectral data corresponding to the multiple concentration gradients into a training set and a validation set, wherein each spectral data includes spectral intensities of multiple wavelengths; a first determination unit 502, configured to determine the signal-to-noise stability index corresponding to the multiple wavelengths based on the first spectral data corresponding to each concentration gradient in the training set, and to determine the temperature sensitivity coefficient corresponding to the multiple wavelengths based on the first spectral data and the first surface temperature corresponding to each concentration gradient in the training set; a second determination unit 503, configured to determine the temperature adaptive signal-to-noise stability index corresponding to the multiple wavelengths based on the signal-to-noise stability index and the temperature sensitivity coefficient; and a selection unit 504, configured to select a target feature wavelength from the multiple wavelengths based on the temperature adaptive signal-to-noise stability index and the second surface temperature and second spectral data corresponding to each concentration gradient in the validation set, wherein the target feature wavelength is used to characterize the spectral features of the molten aluminum.

[0126] In some embodiments of this application, based on the foregoing scheme, the acquisition unit 501 is configured to: acquire initial spectral data of aluminum liquids with multiple concentration gradients at multiple aluminum liquid surface temperatures; and normalize the spectral intensity of each wavelength in each initial spectral data using the internal standard method to obtain spectral data of aluminum liquids with multiple concentration gradients at multiple aluminum liquid surface temperatures.

[0127] In some embodiments of this application, based on the foregoing scheme, the first determining unit 502 is configured to: determine the median of multiple concentration gradients in the training set, and define aluminum liquid with a concentration gradient greater than the median as high-concentration aluminum liquid, and aluminum liquid with a concentration gradient less than or equal to the median as low-concentration aluminum liquid; and determine the signal-to-noise stability index corresponding to the multiple wavelengths using the following formula:

[0128]

[0129] in, Indicates the first j Signal-to-noise stability index corresponding to each wavelength; and The high-concentration aluminum liquid and the low-concentration aluminum liquid in the training set respectively represent the first and second concentrations of the aluminum liquid in the training set. j Average spectral intensity at each wavelength; and The high-concentration aluminum liquid and the low-concentration aluminum liquid in the training set respectively represent the first and second concentrations of the aluminum liquid in the training set. j Standard deviation of spectral intensity at each wavelength; This indicates the number of aluminum liquid concentration gradients in the training set; Indicates the first m Aluminum liquid with a concentration gradient of ... j The standard deviation of spectral intensity measured repeatedly at a wavelength; Indicates the first training set m Aluminum liquid with a concentration gradient of ... j The average value of the spectral intensity measured repeatedly at a wavelength.

[0130] In some embodiments of this application, based on the foregoing scheme, the first determining unit 502 is further configured to: sort the plurality of aluminum liquid surface temperatures in ascending order to obtain a target temperature sequence; determine the normalized spectral intensity corresponding to the plurality of wavelengths in the first spectral data; and determine the temperature sensitivity coefficient corresponding to the plurality of wavelengths using the following formula:

[0131]

[0132] in, Indicates the first j Temperature sensitivity coefficient corresponding to each wavelength; Indicates the first training set m The target temperature sequence corresponding to each concentration gradient; Indicates the central difference step size; Indicates the first m Aluminum liquid with a concentration gradient of ... j Normalized spectral intensity of each wavelength; Indicates the first j The noise standard deviation for each wavelength.

[0133] In some embodiments of this application, based on the foregoing scheme, the first determining unit 502 is further configured as follows:

[0134]

[0135] in, This indicates the number of aluminum liquid concentration gradients in the training set; Indicates the first m Aluminum liquid with a concentration gradient of ... j The first wavelength k Normalized spectral intensity of the second measurement; Indicates the firstm Aluminum liquid with a concentration gradient of ... j The number of times a measurement is repeated at each wavelength; Indicates the first m Aluminum liquid with a concentration gradient of ... j The arithmetic mean of all repeated measurements of spectral intensity at each wavelength.

[0136] In some embodiments of this application, based on the foregoing scheme, the second determining unit 503 is configured to: determine the temperature adaptive signal-to-noise stability index corresponding to the plurality of wavelengths using the following formula:

[0137]

[0138] in, Indicates the first j Temperature-adaptive signal-to-noise stability index corresponding to each wavelength; Indicates the first j Signal-to-noise stability index corresponding to each wavelength; Indicates the first j Temperature sensitivity coefficient corresponding to each wavelength; This represents the temperature penalty adjustment coefficient.

[0139] In some embodiments of this application, based on the foregoing scheme, the selection unit 504 is configured to: sort the plurality of wavelengths in descending order of temperature adaptive signal-to-noise stability index to obtain a wavelength sequence; select a preset number of wavelengths from the wavelength sequence before sorting as test feature wavelengths, and construct a test regression model based on the test feature wavelengths; and determine the temperature-weighted root mean square error of the test regression model using the following formula:

[0140]

[0141] in, This represents the temperature-weighted root mean square error; This indicates the number of aluminum liquid concentration gradients in the verification set; Indicates the first in the verification set i The concentration of impurities determined by a test regression model in aluminum liquid with a concentration gradient; Indicates the first in the verification set i The actual impurity concentrations in molten aluminum at each concentration gradient; Indicates the deviation penalty coefficient; Indicates the first iThe second surface temperature of the aluminum liquid with a concentration gradient; based on the preset number, increase the preset step size as the new preset number, and return to the step of selecting the preset number of wavelengths in the wavelength sequence before sorting, until the temperature weighted root mean square error of the test regression model reaches the minimum value; take the test feature wavelength corresponding to the minimum temperature weighted root mean square error as the target feature wavelength.

[0142] In some embodiments of this application, based on the foregoing scheme, the device further includes a construction unit, which is configured to: construct a target regression model based on the target characteristic wavelength; and determine the impurity concentration of the aluminum liquid to be tested through the target regression model.

[0143] In some embodiments of this application, based on the foregoing scheme, the device further includes a testing unit, which is configured to: divide a test set from the spectral data corresponding to the plurality of concentration gradients, excluding the training set and the validation set; and determine the prediction accuracy and generalization performance of the target regression model based on the third surface temperature and third spectral data corresponding to each concentration gradient in the test set.

[0144] As another embodiment of this application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods described in the above embodiments.

[0145] As another embodiment of this application, a computer-readable storage medium is also provided. This computer-readable storage medium may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0146] Based on the same inventive concept, embodiments of this application also provide an electronic device. (Reference) Figure 6 The diagram illustrates a structural schematic of an electronic device according to one embodiment of this application. The electronic device includes one or more memories 604, one or more processors 602, and at least one computer program (program code) stored in the memories 604 and executable on the processors 602. When the processors 602 execute the computer program, they implement the method described above.

[0147] Among them, Figure 6In this document, a bus architecture (represented by bus 600) is used. Bus 600 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 602 and memory represented by memory 604. Bus 600 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 605 provides an interface between bus 600 and receiver 601 and transmitter 603. Receiver 601 and transmitter 603 may be the same element, i.e., a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 602 is responsible for managing bus 600 and general processing, while memory 604 can be used to store data used by processor 602 during operation.

[0148] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on or transmitted via a computer-readable medium. Other examples and embodiments are within the scope and spirit of this application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwired, or any combination thereof. Furthermore, the functional units may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0150] The units described as separate components may or may not be physically separate. Similarly, the components of the control device may or may not be physical units; they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0151] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0152] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for selecting spectral features of molten aluminum based on a temperature-adaptive signal-to-noise stability index, characterized in that, The method includes: Spectral data of aluminum liquid with multiple concentration gradients at multiple aluminum liquid surface temperatures are obtained, and training set and validation set are divided from the spectral data corresponding to the multiple concentration gradients. Each spectral data includes spectral intensities of multiple wavelengths. Based on the first spectral data corresponding to each concentration gradient in the training set, the signal-to-noise stability index corresponding to the multiple wavelengths is determined, and based on the first spectral data and the first surface temperature corresponding to each concentration gradient in the training set, the temperature sensitivity coefficient corresponding to the multiple wavelengths is determined. Based on the signal-to-noise stability index and the temperature sensitivity coefficient, the temperature-adaptive signal-to-noise stability index corresponding to the multiple wavelengths is determined; Based on the temperature adaptive signal-to-noise stability index and the second surface temperature and second spectral data corresponding to each concentration gradient in the validation set, a target feature wavelength is selected from the plurality of wavelengths. The target feature wavelength is used to characterize the spectral characteristics of the aluminum melt. The step of determining the signal-to-noise stability index corresponding to the multiple wavelengths based on the first spectral data corresponding to each concentration gradient in the training set includes: Determine the median of multiple concentration gradients in the training set, and define aluminum liquid with a concentration gradient greater than the median as high-concentration aluminum liquid, and aluminum liquid with a concentration gradient less than or equal to the median as low-concentration aluminum liquid; The signal-to-noise stability index corresponding to the multiple wavelengths is determined by the following formula: in, Indicates the first j Signal-to-noise stability index corresponding to each wavelength; and The high-concentration aluminum liquid and the low-concentration aluminum liquid in the training set respectively represent the first and second concentrations of the aluminum liquid in the training set. Average spectral intensity at each wavelength; and The high-concentration aluminum liquid and the low-concentration aluminum liquid in the training set respectively represent the first and second concentrations of the aluminum liquid in the training set. Standard deviation of spectral intensity at each wavelength; This indicates the number of aluminum liquid concentration gradients in the training set; Indicates the first m Aluminum liquid with a concentration gradient of ... j The standard deviation of spectral intensity measured repeatedly at a wavelength; Indicates the first training set m Aluminum liquid with a concentration gradient of ... j The average value of the spectral intensity measured repeatedly at a wavelength.

2. The method according to claim 1, characterized in that, The acquisition of spectral data of aluminum liquid with multiple concentration gradients at multiple aluminum liquid surface temperatures includes: Initial spectral data of molten aluminum with multiple concentration gradients were collected at multiple molten aluminum surface temperatures; The spectral intensity of each wavelength in each initial spectral data was normalized using the internal standard method to obtain spectral data of aluminum liquid with multiple concentration gradients at multiple aluminum liquid surface temperatures.

3. The method according to claim 1, characterized in that, The step of determining the temperature sensitivity coefficients corresponding to the multiple wavelengths based on the first spectral data and the first surface temperatures corresponding to each concentration gradient in the training set includes: The surface temperatures of the multiple molten aluminum solutions are sorted in ascending order to obtain the target temperature sequence. Determine the normalized spectral intensities corresponding to the plurality of wavelengths in the first spectral data; The temperature sensitivity coefficients corresponding to the multiple wavelengths are determined using the following formula: in, Indicates the first j Temperature sensitivity coefficient corresponding to each wavelength; Indicates the first training set m The target temperature sequence corresponding to each concentration gradient; Indicates the central difference step size; Indicates the first m Aluminum liquid with a concentration gradient of ... j Normalized spectral intensity of each wavelength; Indicates the first j The noise standard deviation for each wavelength.

4. The method according to claim 3, characterized in that, The noise standard deviation is determined by the following formula: in, This indicates the number of aluminum liquid concentration gradients in the training set; Indicates the first m Aluminum liquid with a concentration gradient of ... j The first wavelength k Normalized spectral intensity of the second measurement; Indicates the first m Aluminum liquid with a concentration gradient of ... j The number of times a measurement is repeated at each wavelength; Indicates the first m Aluminum liquid with a concentration gradient of ... j The arithmetic mean of all repeated measurements of spectral intensity at each wavelength.

5. The method according to claim 1, characterized in that, The step of determining the temperature-adaptive signal-to-noise stability index corresponding to the multiple wavelengths based on the signal-to-noise stability index and the temperature sensitivity coefficient includes: The temperature-adaptive signal-to-noise stability index corresponding to the multiple wavelengths is determined by the following formula: in, Indicates the first j Temperature-adaptive signal-to-noise stability index corresponding to each wavelength; Indicates the first j Signal-to-noise stability index corresponding to each wavelength; Indicates the first j Temperature sensitivity coefficient corresponding to each wavelength; This represents the temperature penalty adjustment coefficient.

6. The method according to claim 1, characterized in that, The step of selecting a target feature wavelength from the plurality of wavelengths based on the temperature adaptive signal-to-noise stability index and the second surface temperature and second spectral data corresponding to each concentration gradient in the validation set includes: The wavelengths are sorted in descending order of temperature adaptive signal-to-noise stability index to obtain a wavelength sequence. Select a predetermined number of wavelengths from the wavelength sequence before sorting as test feature wavelengths, and construct a test regression model based on the test feature wavelengths; The temperature-weighted root mean square error of the test regression model is determined using the following formula: in, This represents the temperature-weighted root mean square error; This indicates the number of aluminum liquid concentration gradients in the verification set; Indicates the first in the verification set i The concentration of impurities determined by a test regression model in aluminum liquid with a concentration gradient; Indicates the first in the verification set i The actual impurity concentrations in molten aluminum at each concentration gradient; Indicates the deviation penalty coefficient; Indicates the first i The second surface temperature of molten aluminum with a concentration gradient; Based on the preset number, increase the preset step size as the new preset number, and return to the step of selecting the preset number of wavelengths in the wavelength sequence before sorting, until the temperature-weighted root mean square error of the test regression model reaches the minimum value. The test characteristic wavelength corresponding to the minimum temperature-weighted root mean square error is taken as the target characteristic wavelength.

7. The method according to claim 1, characterized in that, The method further includes: A target regression model is constructed based on the target characteristic wavelength; The impurity concentration of the aluminum melt to be tested is determined using the target regression model.

8. The method according to claim 1, characterized in that, The method further includes: From the spectral data corresponding to the multiple concentration gradients, a test set is delineated, excluding the training set and the validation set; Based on the third surface temperature and third spectral data corresponding to each concentration gradient in the test set, the prediction accuracy and generalization performance of the target regression model are determined.

9. An electronic device, characterized in that, The electronic device includes one or more processors and one or more memories, wherein at least one piece of program code is stored in the one or more memories, and the at least one piece of program code is loaded and executed by the one or more processors to implement the method as described in any one of claims 1 to 8.