Spectrum detection adaptive sampling method and related device

CN122901155APending Publication Date: 2026-10-13XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611044253.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0006]本发明所要解决的技术问题在于针对上述现有技术中的不足,提供一种光谱检测自适应采样方法及相关设备,用于解决针对非均质粉末矿样LIBS检测中因目标元素空间分布不均导致的预测偏差的技术问题

Benefits of technology

[0018]本发明的有益效果在于:本发明提供了一种光谱检测自适应采样方法,通过对待测样品进行多点检测获取当前光谱集合,覆盖样品的空间分布差异。基于定标模型将光谱数据集合转换为当前预测含量集合,使原始光谱信息被映射为可直接用于统计评价的含量预测值;对预测含量集合进行多次不放回随机抽取并计算各子样本的样本方差,得到子采样方差集合,其中不放回抽取避免单个子样本内部重复抽取同一测点。,而多子采样点数的设置使得评价不局限于单一数据规模,能够揭示预测结果在不同信息量下的离散特性;进一步地,对子采样方差集合求方差获得子采样方差的方差,该二阶统计量刻画的是方差本身的波动程度,与现有技术仅依赖一阶方差判断稳定性的方案相比,本发明能够有效区分因采样点数不足导致的方差偏高和因样品本身不均匀导致的方差偏高这两种截然不同的情形;根据子采样方差的方差随子采样点数增加的变化特征生成稳定性评价参数,该参数综合反映了预测结果收敛趋势的陡峭程度,变化特征越平缓表明数据已趋于充分,变化特征越剧烈则表明仍需补充信息;最后将评价参数与预设阈值比对,大于阈值时触发补充采样并更新光谱集合后重新执行抽取步骤,小于等于阈值时停止采样并输出最终检测结果,这一闭环决策机制使采样过程不再依赖人工经验或固定规则,而是由数据自身的统计特征驱动,在保证检测精度的前提下最大限度减少不必要的检测操作。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122901155A_ABST
    Figure CN122901155A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of laser diagnosis and rapid element analysis, and particularly relates to a spectral detection adaptive sampling method and related equipment. The method is as follows: a current spectrum set is obtained by multi-point detection of a sample to be detected, and is converted into a current predicted content set based on a calibration model. A sub-sample is generated by multiple non-replacement random extraction of the predicted content set under a plurality of different sub-sampling point numbers, a sample variance of each sub-sample is calculated to obtain a sub-sampling variance set, a variance of the sub-sampling variance is calculated, and a stability evaluation parameter is generated according to the change characteristic of the sub-sampling variance with the increase of the sub-sampling point number. The evaluation parameter is compared with a threshold value: if greater than the threshold value, supplementary sampling is triggered, the current spectrum set is updated, and the extraction step is re-executed; if less than or equal to the threshold value, sampling is stopped, and a detection result is output based on the current spectrum set. The present method effectively improves the stability and reliability of the detection result through an adaptive sampling strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of laser diagnostics and rapid elemental analysis technology, and specifically relates to an adaptive sampling method for spectral detection and related equipment. Background Technology

[0002] With the increasing scale of mineral processing and the growing demand for online detection, the analysis of elemental content in mineral samples needs to strike a balance between minimal sample preparation, rapid detection speed, and high reliability. LIBS (Laser-induced Breakdown Spectroscopy) technology uses pulsed lasers to ablate the surface of the sample to create plasma, and then collects the plasma emission spectrum to achieve qualitative or quantitative elemental analysis. It offers advantages such as in-situ, rapid, remote, and minimally destructive testing, making it suitable for mineral exploration, mineral processing monitoring, and nuclear industry-related sample screening.

[0003] However, ore powder samples typically exhibit significant compositional heterogeneity. Even after crushing, grinding, sieving, and pelleting, some elements may still be randomly dispersed in a low-concentration matrix as locally enriched particles. Due to the small ablation area and low ablation quality of LIBS single ablation, when the number of measurement points is insufficient, whether or not locally enriched particles are hit can significantly affect the spectral intensity, leading to large deviations in the prediction results.

[0004] Existing methods typically improve stability by fixing the number of measurement points, increasing the averaging frequency, or removing outliers using statistical criteria after measurement. However, fixing the number of measurement points cannot adjust the measurement workload in real time to address the heterogeneity of unknown samples; simple outlier removal may delete regions with high content as outliers, leading to a systematic underestimation of the average content; and simply increasing the number of measurement points increases online detection time, making it difficult to meet the efficiency requirements of rapid detection scenarios.

[0005] Therefore, there is an urgent need for a method that can evaluate in real time whether the current sampling is sufficient based on the collected data during the measurement process, and adaptively determine whether to continue sampling based on the degree of sample heterogeneity, so as to improve the reliability of LIBS quantitative detection of heterogeneous powder mineral samples. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide an adaptive sampling method and related equipment for spectral detection, which addresses the shortcomings of the prior art and solves the problem of prediction deviation caused by the uneven spatial distribution of target elements in LIBS detection of heterogeneous powder mineral samples.

[0007] The objective of this invention is achieved through the following technical solutions: In a first aspect, the present invention provides an adaptive sampling method for spectral detection, comprising: Obtain the current spectral set, which is obtained based on multi-point detection of the sample to be tested; The current predicted content set is obtained by transforming the current spectral data set based on the calibration model; Under several different numbers of sub-sampling points, the current predicted content set is randomly sampled multiple times without replacement to generate multiple sub-samples, and the sample variance corresponding to each sub-sample is calculated to obtain the sub-sampling variance set corresponding to each number of sub-sampling points. The variance of the subsample variance set is calculated to obtain the variance of the subsample variance corresponding to the number of subsample points; and stability evaluation parameters are generated based on the variation characteristics of the variance of the subsample variance as the number of subsample points increases. The evaluation parameter is compared with a preset threshold. If the evaluation parameter is greater than the preset threshold, a supplementary sampling operation is triggered to obtain new spectral data. The new spectral data is updated to the current spectral data set, and multiple random sampling steps without replacement are performed again based on the updated current spectral data set. If the evaluation parameter is less than or equal to the preset threshold, sampling is stopped, and the final detection result of the target element is output based on the current spectral data set.

[0008] As a further improvement of the present invention, the sample to be tested is a heterogeneous powder mineral sample, and the multi-point detection is laser-induced breakdown spectroscopy detection, which uses a pulsed laser focused on the surface of the powder tablet sample to generate plasma and collects the plasma emission spectrum.

[0009] As a further improvement of the present invention, the step of generating stability evaluation parameters based on the variation characteristics of the variance of the sub-sampling variance with the increase of the number of sub-sampling points includes: Calculate the difference in variances corresponding to the variances of two adjacent sub-sampling points; Calculate the ratio of the difference to the corresponding difference in the number of sampling points, and use the normalized value of the ratio relative to the variance of the subsampling variance as the stability evaluation parameter.

[0010] As a further improvement of the present invention, multiple random samplings without replacement are performed on the current predicted content set, including: In the current predicted content set, an incremental sequence of sub-sampling point numbers is set, wherein the largest sub-sampling point number in the incremental sequence is not greater than the total number of measurement points currently collected; For each sub-sampling point in the increasing sequence of sub-sampling points, a random sampling operation without replacement is performed at least 50 times.

[0011] As a further improvement of the present invention, in the triggering of supplementary sampling operation to obtain new spectral data, the number of new measurement points corresponding to the new spectral data is a preset fixed increment, or a dynamic increment adaptively determined according to the difference between the stability evaluation parameter and the preset threshold.

[0012] As a further improvement of the present invention, before performing the step of multiple random sampling without replacement, the method further includes: calculating at least one of the skewness, kurtosis, relative standard deviation, and quantile-quantile plot deviation of the current spectral data set to characterize the degree of heterogeneity of the sample to be tested, and using the degree of heterogeneity as an auxiliary parameter to dynamically adjust the preset threshold or the number of new measurement points in the supplementary sampling operation.

[0013] As a further improvement of the present invention, before converting the current spectral data set based on the calibration model to obtain the current predicted content set, the method further includes: acquiring the spectral signals of standard samples with known target element content at multiple measurement locations, extracting the net intensity of the target element characteristic spectral lines in the spectral signals, and establishing a mapping relationship between the net intensity and the target element content to generate the calibration model.

[0014] As a further improvement of the present invention, the calibration model is a linear calibration model based on the characteristic spectral lines of the target element, a multivariate linear model based on spectral lines, a partial least squares regression model, a support vector regression model, or a neural network regression model.

[0015] Secondly, the present invention provides a spectral detection adaptive sampling system, comprising: The data acquisition module is used to acquire the current spectral set, which is obtained based on multi-point detection of the sample to be tested; The prediction conversion module is used to convert the current spectral data set based on the calibration model to obtain the current predicted content set; The subsampling calculation module is used to perform multiple random samplings without replacement on the current predicted content set under several different numbers of subsampling points to generate multiple subsamples, and calculate the sample variance corresponding to each subsample to obtain the subsampling variance set corresponding to each number of subsampling points. The evaluation parameter generation module is used to calculate the variance of the sub-sampling variance set to obtain the variance of the sub-sampling variance corresponding to the number of sub-sampling points; and to generate stability evaluation parameters based on the variation characteristics of the variance of the sub-sampling variance as the number of sub-sampling points increases. An adaptive control module is used to compare the evaluation parameter with a preset threshold. If the evaluation parameter is greater than the preset threshold, a supplementary sampling operation is triggered to obtain new spectral data, the new spectral data is updated to the current spectral data set, and multiple random sampling steps without replacement are performed again based on the updated current spectral data set. If the evaluation parameter is less than or equal to the preset threshold, sampling is stopped, and the final detection result of the target element is output based on the current spectral data set.

[0016] Thirdly, the present invention provides a computer device, comprising: a processor and a computer-readable storage medium; A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program that, when executed by the processor, implements the spectral detection adaptive sampling method as described above.

[0017] Fourthly, the present invention provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed as described above for the adaptive sampling method for spectral detection.

[0018] The beneficial effects of this invention are as follows: This invention provides an adaptive sampling method for spectral detection, which obtains the current spectral set by performing multi-point detection on the sample to be tested, covering the spatial distribution differences of the sample. Based on a calibration model, the spectral data set is converted into a current predicted content set, so that the original spectral information is mapped into content prediction values ​​that can be directly used for statistical evaluation; the predicted content set is randomly sampled multiple times without replacement, and the sample variance of each subsample is calculated to obtain a subsample variance set, wherein the sampling without replacement avoids repeatedly sampling the same measurement point within a single subsample. The setting of multiple sub-sampling points allows the evaluation to be not limited to a single data scale, revealing the discrete characteristics of the prediction results under different information levels. Furthermore, the variance of the sub-sampling variance set is obtained by calculating the variance of the sub-sampling variance. This second-order statistic describes the degree of fluctuation of the variance itself. Compared with the existing technology that only relies on the first-order variance to judge stability, this invention can effectively distinguish between two completely different situations: high variance caused by insufficient sampling points and high variance caused by the inhomogeneity of the sample itself. Based on the change characteristics of the sub-sampling variance as the number of sub-sampling points increases, a stability evaluation parameter is generated. This parameter comprehensively reflects the steepness of the convergence trend of the prediction results. The smoother the change characteristics, the more sufficient the data is. The more drastic the change characteristics, the more information is needed. Finally, the evaluation parameter is compared with a preset threshold. If it is greater than the threshold, supplementary sampling is triggered and the spectral set is updated before the extraction step is re-executed. If it is less than or equal to the threshold, sampling is stopped and the final detection result is output. This closed-loop decision mechanism makes the sampling process no longer dependent on human experience or fixed rules, but driven by the statistical characteristics of the data itself, minimizing unnecessary detection operations while ensuring detection accuracy. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the LIBS experimental system in an embodiment of the present invention; Figure 2 In the embodiments of the present invention, (a) the U II 409.01 nm spectral line and (b) the uranium element calibration model are shown. Figure 3 This is a flowchart illustrating the generation of Monte Carlo subsampling evaluation parameters in an embodiment of the present invention. Figure 4 This is a schematic diagram of the parameter-average prediction deviation relationship of the method in samples with different distribution non-uniformity in an embodiment of the present invention; Figure 5 This is a distribution diagram of prediction deviation under different control thresholds in an embodiment of the present invention; Figure 6 This is a schematic diagram of the internal structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives and technical solutions of this invention clearer and easier to understand, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. The specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0022] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. The described embodiments are only some embodiments of the present invention, and not all embodiments.

[0023] With the increasing scale of mineral processing and the growing demand for online detection, elemental analysis of mineral samples needs to strike a balance between minimal sample preparation, rapid detection speed, and high reliability. Laser-induced breakdown spectroscopy (LAS) uses pulsed lasers to ablate the surface of the sample to create plasma, and then collects the plasma emission spectrum to achieve qualitative or quantitative elemental analysis. It offers advantages such as in-situ, rapid, remote, and minimally destructive testing, making it suitable for mineral exploration, mineral processing monitoring, and nuclear industry-related sample screening. Ore powder samples typically exhibit significant compositional heterogeneity. Even after crushing, grinding, sieving, and pelleting, some elements may still be randomly dispersed in a low-concentration matrix as locally enriched particles. Due to the small ablation area and low ablation quality of LAS, when the number of measurement points is insufficient, whether or not locally enriched particles are hit can significantly affect the spectral intensity, leading to large deviations in the prediction results. Existing methods typically improve stability by fixing the number of measurement points, increasing the averaging frequency, or removing outliers after measurement using statistical criteria. However, fixing the number of measurement points cannot adjust the measurement workload in real time to address the heterogeneity of unknown samples. Simple outlier removal may mistakenly delete regions with high concentrations as anomalies, leading to a systematic underestimation of the average concentration. Simply increasing the number of measurement points, however, increases online detection time, failing to meet the efficiency requirements of rapid detection scenarios.

[0024] Example 1 This embodiment provides an adaptive sampling method for spectral detection, and the specific implementation method is as follows.

[0025] S1. Obtain the current spectral set, which is obtained based on multi-point detection of the sample to be tested.

[0026] An initial measurement dataset is established by acquiring spectral signals from multiple spatial locations on the surface of the sample. The sample is a heterogeneous powder mineral sample; multi-point detection utilizes laser-induced breakdown spectroscopy (LAS) to generate plasma by focusing a pulsed laser onto the surface of the powder-pressed sample and collecting the plasma emission spectrum. Figure 1 The overall structure of the laser-induced breakdown spectroscopy experimental system is shown. This system includes a pulsed laser, an optical focusing module, a spectral acquisition module, and a data processing unit. After being focused, the laser acts on the sample surface to generate plasma. The emitted light from the plasma is transmitted via optical fiber to the spectrometer for spectroscopic detection. Each measurement position can correspond to a single laser pulse or the spectrum accumulated from multiple laser pulses, balancing spatial representativeness and single-point spectral signal-to-noise ratio. The current spectral set contains spectral data from M measurement points, where M is the initial number of measurement points, which can be set to 20, 50, 60, or other values ​​depending on the detection efficiency requirements.

[0027] S2. Based on the calibration model, the current spectral data set is transformed to obtain the current predicted content set.

[0028] The spectral signal intensity is mapped to the predicted value of the target element content, providing a numerical basis for subsequent stability evaluation. The calibration model is established by using the spectral signals of standard samples with known target element contents at multiple measurement locations. The net intensity of the characteristic spectral lines of the target element in the spectral signal is extracted, and the mapping relationship between the net intensity and the target element content is established. Figure 2 The correspondence between uranium characteristic spectral lines and calibration models is shown, where (a) is the waveform of the U II 409.01 nm characteristic spectral line, and (b) is the calibration fitting curve between the net intensity of the spectral line and the uranium content. The calibration models include linear calibration models based on the target element's characteristic spectral lines, multivariate linear models based on spectral lines, partial least squares regression models, support vector regression models, or neural network regression models. The net intensity of the characteristic spectral line is the peak intensity of the spectral line minus the average background intensity on both sides of the spectral line, or the integrated net intensity obtained by integrating the spectral window and subtracting the background. The net intensity of the characteristic spectral line at each measurement point is converted into the corresponding predicted content through the calibration model, resulting in a current predicted content set containing M predicted values.

[0029] S3. Under several different numbers of sub-sampling points, perform multiple random samplings without replacement on the current predicted content set to generate multiple sub-samples, and calculate the sample variance corresponding to each sub-sample to obtain the sub-sampling variance set corresponding to each number of sub-sampling points.

[0030] This step is used to evaluate the statistical stability of the current measurement data at different sampling scales using the Monte Carlo subsampling method. Figure 3This demonstrates the complete workflow for generating Monte Carlo subsampling evaluation parameters. The workflow begins with the input of the current predicted content set, and sequentially executes multiple random samplings at different numbers of subsampling points, subsample variance calculation, subsample variance calculation, and rate of change calculation, ultimately outputting stability evaluation parameters. An incremental sequence of subsampling point numbers is defined within the current predicted content set, where the largest subsampling point number in the incremental sequence does not exceed the total number of currently collected measurement points. For each subsampling point number in the incremental sequence, a random sampling operation without replacement is repeated at least 50 times. For each subsampling point number, a corresponding number of predicted content values ​​are extracted each time to form a subsample, and the sample variance of this subsample is calculated. The sample variance is:

[0031]

[0032] In the formula, The mean, For subsample C i,b A predicted content value, c i ∈C i,b . , Let i be the number of the i-th sub-sampling points. This represents the sample variance.

[0033] After repeated sampling, each number of sub-sampling points corresponds to a set of sub-sampling variances composed of multiple sub-sample variances.

[0034] S4. Calculate the variance of the subsample variance set to obtain the variance of the subsample variance corresponding to the number of subsample points. Then, generate stability evaluation parameters based on the variation characteristics of the subsample variance as the number of subsample points increases.

[0035] This step quantifies the convergence of the subsampling variance and establishes a quantitative evaluation index for sampling adequacy. The variance of the subsampling variance characterizes whether the dispersion of different random subsamples is consistent when using the corresponding number of subsampling points for detection within the current set of measurement points. When there are randomly distributed enriched particles in the sample, some subsamples may capture high-content areas while others fail to capture them with a smaller number of subsampling points, resulting in a large difference in subsample variance and thus a large subsampling variance. As the number of subsampling points increases, the coverage of low-content matrix areas and locally high-content areas in the sample by each subsample tends to be sufficient, and the variance of the subsampling variance gradually converges. When generating stability evaluation parameters, the difference between the variances of the subsampling variances corresponding to two adjacent numbers of subsampling points is calculated, and the ratio of this difference to the difference in the corresponding number of sampling points is calculated. The normalized value of this ratio relative to the variance of the subsampling variance is used as the stability evaluation parameter. The stability evaluation parameter is:

[0036] In the formula, Let R be the variance of the subsampling variance. When the stability evaluation parameter R approaches zero or falls below the preset threshold, it indicates that the sampling variance of the current set of measurement points has basically stabilized, and the current number of measurement points can well characterize the heterogeneity fluctuations of the sample.

[0037] S5. Compare the evaluation parameters with the preset threshold. If the evaluation parameters are greater than the preset threshold, a supplementary sampling operation is triggered to obtain new spectral data. The new spectral data is then updated to the current spectral dataset, and multiple random sampling steps without replacement are performed again based on the updated current spectral dataset. If the evaluation parameters are less than or equal to the preset threshold, sampling is stopped, and the final detection result of the target element is output based on the current spectral dataset.

[0038] Specifically, the preset threshold is determined by the allowable prediction deviation, the allowable confidence interval width, or the allowable 95th percentile prediction deviation. This can be set by establishing an empirical relationship between the evaluation parameters and the prediction deviation using standard samples or historical validation samples. When triggering supplementary sampling to acquire new spectral data, the number of new measurement points corresponding to the new spectral data is a preset fixed increment, or a dynamically determined increment adaptively based on the difference between the stability evaluation parameter and the preset threshold. When the evaluation parameter is much greater than the threshold, it indicates that the current sample has a high degree of heterogeneity or insufficient sampling, and more measurement points can be added at once. When the evaluation parameter is slightly higher than the threshold, only a small number of measurement points can be added to reduce detection time. Before performing multiple random sampling steps without replacement, at least one of the following can be calculated: skewness, kurtosis, relative standard deviation, and quantile-quantile plot deviation of the current spectral data set. This skewness characterizes the degree of heterogeneity of the sample to be tested, and the degree of heterogeneity is used as an auxiliary parameter to dynamically adjust the preset threshold or the number of new measurement points in the supplementary sampling operation. After sampling is stopped, the average net intensity of the target element's spectral lines or the average predicted content is calculated based on the current spectral data set. The target element concentration is then output in combination with the calibration model. At the same time, reliability information such as stability evaluation parameters, prediction deviation estimates, relative standard deviation, confidence intervals or prediction deviation percentiles are also output. Figure 4 The curves showing the relationship between the evaluation parameters and the average prediction deviation of this method in samples with different distribution inhomogeneities are presented. Different curves correspond to samples with different degrees of inhomogeneity. As the evaluation parameters decrease, the average prediction deviation shows a convergence trend. Figure 5 The distribution of prediction bias under different control thresholds is shown. The more stringent the threshold, the narrower the distribution range of prediction bias and the higher the consistency of the detection results.

[0039] Specifically, the laser-induced breakdown spectroscopy quantitative detection of heterogeneous uranium ore powder pellets is used as an example to fully illustrate the actual implementation process of the technical solution.

[0040] Several uranium ore powder pellets with known uranium contents were selected as standard samples, with uranium contents of 100 ppm, 300 ppm, 750 ppm, 1400 ppm, 4500 ppm, and 7200 ppm, respectively. Natural ore was crushed, ground, and sieved to pass through a 200-mesh sieve before being pressed into pellets. Multi-point measurements were then performed on the sample surface using a laser-induced breakdown spectroscopy system. 900 measurement points were uniformly collected for each sample, and the spectrum at each measurement point was obtained by accumulating 10 laser pulses. The uranium content of each sample is shown in Table 1.

[0041] Table 1. Uranium content of each sample

[0042] UII409.01nm was selected as the characteristic spectral line of uranium. The peak intensity of this spectral line was extracted, and the average value of the background intensity on both sides of the spectral line was used as the background. The net intensity of the spectral line was obtained by subtracting the two values.

[0043] A linear calibration model between net spectral intensity and uranium content was established by fitting the average net spectral intensity of 900 measurement points for each standard sample to its reference uranium content. A LIBS calibration model between net spectral intensity and uranium content was also established. In the example, the coefficient of determination R of the calibration curve established using the average spectrum is... 2 The accuracy reached 0.9821, with a root mean square calibration error (RMSEC) of 382.78 ppm. This calibration model is used to convert the spectral intensity of any subsequent measurement point or any subsample into a predicted content.

[0044] For an unknown powder mineral sample, first collect the spectra of the initial M0 measurement points. M0 can be set to 20, 50, 60, or other values ​​according to the detection efficiency requirements. Let the currently obtained set of measurement points be X = {x1, x2, ..., x...} M}, where M is the number of currently collected measurement points; the net intensity of U II 409.01 nm at each measurement point is converted into the corresponding predicted content c using a calibration model. i Thus, the current predicted content set C={c1,c2,...,c M}

[0045] Set the sequence of sub-sampling point numbers n1, n2, ..., n in the current measurement set C. I , where n1 <n2<...<n I ≤ M. For any number of sub-sampling points n i n are randomly selected from C without replacement. i There are 1 measurement point, and the sampling is repeated B times. B can be 400 times or other times sufficient to obtain stable statistical results. The subsample obtained by the b-th subsample at the i-th subsample point is denoted as C.i,b Calculate its mean μ i,b and sample variance s ² i,b .

[0046] For the same sub-sampling point number n i Sample variance obtained from subsampling B s ² i,b Calculate the variance again to obtain the variance D(n) of the subsampling variance. i )=Var{ s ² i,b}。 D(n i ) is used to characterize the number of points in the current set of measurement points when only n is used. i When testing at multiple measurement points, is the degree of dispersion consistent across different random subsamples? When randomly distributed uranium-enriched particles exist in the sample, a smaller n... i Some subsamples may have high particle content while others have not, leading to... s ² i,b The difference is large, thus D(n) i (It is relatively large.)

[0047] As the number of sub-sampling points n i As the number of samples increases, the coverage of low-matrix areas and locally high-matrix areas in the sample becomes more sufficient, D(n) i The convergence gradually occurs. Therefore, D(n) can be further calculated. i ) with n i The increased difference, slope, or normalized rate of change is used as the sampling stability evaluation parameter R. Compared to directly examining the variance of the subsample mean, using the variance of the subsample variance as the evaluation parameter is more suitable for the heterogeneous powder mineral samples in this embodiment. This is because uranium-enriched particles cause the spectral intensity distribution to exhibit a heavy-tailed characteristic, and the simple mean is easily affected by whether it hits a local high-content region at a low number of measurement points; while the variance of the subsample variance can more sensitively reflect whether the coverage of the overall distribution width by different subsamples is stable, thus having better discriminative consistency among samples with different degrees of heterogeneity.

[0048] Pre-set the evaluation parameter threshold τ, the number of new measurement points per measurement ΔM, and the maximum allowed number of measurement points M. max After completing the initial M0 measurement points, the evaluation parameter R is calculated using the method described above. If R ≤ τ, the current measurement is deemed to have met the stability requirements, sampling is stopped, and the average predicted content of the current M measurement points is used as the final LIBS detection result for the sample. Simultaneously, reliability indicators such as the evaluation parameter R, relative standard deviation RSD, estimated prediction deviation, confidence interval, or 95th percentile prediction deviation are output.

[0049] If R > τ, it is determined that the current measurement points have not fully covered the heterogeneous fluctuations in the sample. ΔM additional measurement points are added to the sample surface to obtain an updated measurement set C. The Monte Carlo subsampling and evaluation parameter calculations are repeated until R ≤ τ or M reaches M0. max ΔM can be a fixed increment, or it can be adaptively determined based on the difference between R and τ: when R is much greater than τ, it indicates that the current sample is highly heterogeneous or insufficiently sampled, and more measurement points can be added at once; when R is slightly higher than τ, only a few measurement points can be added to reduce the detection time.

[0050] The threshold τ can be determined using standard samples or historical validation samples. Specifically, multiple rounds of random sampling can be performed on samples with known reference content to establish an empirical relationship between the evaluation parameter R and the average prediction deviation, the 95th percentile prediction deviation, or the confidence interval width. When the user requires the prediction deviation to be lower than a set value, the corresponding τ is selected as the termination criterion. The stricter the threshold, the more likely the prediction deviation is to converge to the true value. However, for a very small number of extremely high content points, constraints can still be imposed by combining the maximum number of measurement points, quantile monitoring, or even stricter thresholds.

[0051] Using an average of approximately 60 measurement points as a benchmark, in a fixed measurement point scheme, 60 points were collected for each sample. In this embodiment, the system automatically adjusts the number of measurement points based on the evaluation parameters. For samples with small fluctuations, the method can stop with fewer measurement points; for samples with large fluctuations, the method automatically increases the number of measurement points, thereby making the detection reliability of samples with different degrees of heterogeneity more consistent. As shown in Table 2.

[0052] Table 2. Predictive performance using this method and with a fixed number of measurements

[0053] In Table 2, the number of measurement points refers to the average number of measurement points across 400 repetitions. As shown in Table 2, with a fixed 60 measurement points, the 95th percentile prediction bias for some heterogeneous samples can reach approximately 20.30%. Using the method of this embodiment, the system allocates more measurement resources to samples with greater fluctuations. For example, the average number of measurement points for sample 5 increases to 98.80, and its 95th percentile prediction bias decreases from 20.30% to 14.75%. For samples with smaller fluctuations, the method can stop around 50 measurement points, thus avoiding unnecessary repeated measurements.

[0054] Furthermore, when a stricter threshold τ is used, the average prediction bias can be limited to below 200 ppm. Therefore, this embodiment does not simply eliminate high-intensity outliers, but rather evaluates the coverage of the heterogeneous distribution by the current sampling set to determine whether to continue sampling. This reduces the LIBS prediction bias caused by the random distribution of uranium-enriched particles and provides a real-time reliability assessment while outputting the target element content.

[0055] In summary, this embodiment combines Monte Carlo non-replacement subsampling, the variance and rate of change of subsampling variance, threshold termination criteria, and adaptive addition of measurement points to form a real-time uncertainty quantification method suitable for online LIBS detection of heterogeneous powder mineral samples. This method does not require prior knowledge of the overall distribution characteristics of the unknown sample and can automatically determine the sufficiency of measurement points based on the acquired spectra. It is applicable to uranium ore powder and other mineral powder samples with locally enriched particles or heavy tail distribution characteristics.

[0056] Optionally, the calibration model can be replaced with a partial least squares regression model, while the remaining technical features remain consistent with the aforementioned embodiments. In this implementation, instead of using only the net intensity of a single characteristic spectral line for calibration, the intensity values ​​at multiple wavelength positions in the spectrum are extracted to construct a spectral feature matrix. A multivariate mapping relationship between spectral features and target element content is established using partial least squares regression. This implementation is suitable for detection scenarios where matrix effects are significant and single spectral lines are easily interfered with. By employing a multivariate regression model, the impact of matrix composition fluctuations on the intensity of single spectral lines is reduced, improving the accuracy of target element content prediction in complex matrix samples.

[0057] In some embodiments of this application, the degree of heterogeneity is introduced as an auxiliary adjustment parameter, while the remaining technical features remain consistent with the aforementioned embodiments. In this embodiment, before performing subsampling calculations, the skewness, kurtosis, and relative standard deviation of the current spectral data set are calculated to comprehensively characterize the degree of heterogeneity of the sample to be tested. When the skewness is greater than 2 or the relative standard deviation is greater than 30%, the sample is determined to be highly heterogeneous, and the preset threshold is appropriately increased and the single sampling increment is increased. When the skewness is less than 1 and the relative standard deviation is less than 15%, the sample is determined to be low heterogeneous, and the preset threshold is appropriately decreased and the single sampling increment is reduced. By adjusting the control parameters in conjunction with the statistical characteristics of the sample itself, the adaptability of the adaptive sampling method to samples with different degrees of heterogeneity is further improved.

[0058] Example 2 This embodiment provides a spectral detection adaptive sampling system, including a data acquisition module, a prediction and conversion module, a subsampling calculation module, an evaluation parameter generation module, and an adaptive control module connected by communication. Each module includes: The data acquisition module is used to acquire the current spectral set, which is obtained based on multi-point detection of the sample to be tested. The prediction conversion module is used to convert the current spectral data set based on the calibration model to obtain the current predicted content set; The subsampling calculation module is used to perform multiple random samplings without replacement on the current predicted content set under several different numbers of subsampling points, generate multiple subsamples, and calculate the sample variance corresponding to each subsample to obtain the subsampling variance set corresponding to each number of subsampling points. The evaluation parameter generation module is used to calculate the variance of the subsample variance set, obtain the variance of the subsample variance corresponding to the number of subsample points, and generate stability evaluation parameters based on the variation characteristics of the subsample variance as the number of subsample points increases. An adaptive control module is used to compare the evaluation parameters with a preset threshold. If the evaluation parameters are greater than the preset threshold, a supplementary sampling operation is triggered to obtain new spectral data, which is then updated to the current spectral data set. Based on the updated current spectral data set, multiple random sampling steps without replacement are performed again. If the evaluation parameters are less than or equal to the preset threshold, sampling is stopped, and the final detection result of the target element is output based on the current spectral data set.

[0059] Specific limitations regarding the adaptive sampling system for spectral detection can be found in the limitations of the adaptive sampling method for spectral detection described above; the corresponding technical effects are equivalent and will not be repeated here. Each module in the aforementioned adaptive sampling system for spectral detection can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0060] Example 3 Figure 6 An internal structural diagram of a computer device is shown in one embodiment. This computer device may specifically be a terminal or a server. Figure 6As shown, the computer device includes a processor, memory, network interface, display, camera, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a spectral detection adaptive sampling method. The display screen can be an LCD screen or an e-ink display screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad located on the computer device casing, or an external keyboard, touchpad, or mouse.

[0061] As will be understood by those skilled in the art, computer equipment Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computing device may include more or fewer components than those shown in the figure, or combine certain components, or have the same component arrangement.

[0062] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.

[0063] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0064] In summary, the adaptive sampling method, system, computer equipment, and storage medium for spectral detection provided in this application repeatedly perform non-replacement subsampling on the acquired spectrum to evaluate the convergence of the sampling variance under different numbers of sampling points, and decide whether to continue adding measurement points accordingly, thereby reducing unnecessary measurements while ensuring measurement reliability. This method can adaptively determine the number of measurement points based on the actual fluctuation of the target element distribution in heterogeneous powder mineral samples, avoiding insufficient sampling in highly heterogeneous samples using a fixed measurement point scheme. The stability of the current data is evaluated through Monte Carlo non-replacement subsampling, eliminating the need to understand the overall distribution characteristics before detecting unknown samples, making it suitable for online and field detection. Using the variance and rate of change of the subsampling variance as a stability evaluation index better reflects the impact of heavy-tailed distributions and locally high-content particles on the detection results compared to simple average value fluctuations. It eliminates the need for simple removal of high-intensity points, reducing the risk of systematic underestimation of target element content caused by traditional outlier screening. Under similar average measurement point numbers, it can reduce the prediction bias of heterogeneous uranium ore powder samples and improve the reliability of laser-induced breakdown spectroscopy quantitative analysis results.

[0065] The various embodiments in this specification are described in a progressive manner. For directly identical or similar parts of the embodiments, refer to each other. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. It should be noted that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0066] The above-described embodiments are merely preferred embodiments of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various improvements and substitutions without departing from the principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention. Therefore, the scope of protection of this invention should be determined by the scope of the claims.

Claims

1. An adaptive sampling method for spectral detection, characterized in that, include: Obtain the current spectral set, which is obtained based on multi-point detection of the sample to be tested; The current predicted content set is obtained by transforming the current spectral data set based on the calibration model; Under several different numbers of sub-sampling points, the current predicted content set is randomly sampled multiple times without replacement to generate multiple sub-samples, and the sample variance corresponding to each sub-sample is calculated to obtain the sub-sampling variance set corresponding to each number of sub-sampling points. The variance of the subsample variance set is calculated to obtain the variance of the subsample variance corresponding to the number of subsample points; and stability evaluation parameters are generated based on the variation characteristics of the variance of the subsample variance as the number of subsample points increases. The evaluation parameter is compared with a preset threshold. If the evaluation parameter is greater than the preset threshold, a supplementary sampling operation is triggered to obtain new spectral data. The new spectral data is updated to the current spectral data set, and multiple random sampling steps without replacement are performed again based on the updated current spectral data set. If the evaluation parameter is less than or equal to the preset threshold, sampling is stopped, and the final detection result of the target element is output based on the current spectral data set.

2. The adaptive sampling method for spectral detection according to claim 1, characterized in that, The sample to be tested is a heterogeneous powder mineral sample. The multi-point detection is a laser-induced breakdown spectroscopy detection method that uses a pulsed laser focused on the surface of the powder tablet sample to generate plasma and collects the plasma emission spectrum.

3. The adaptive sampling method for spectral detection according to claim 1, characterized in that, The process of generating stability evaluation parameters based on the variation characteristics of the variance of the sub-sampling variance with the increase of the number of sub-sampling points includes: Calculate the difference in variances corresponding to the variances of two adjacent sub-sampling points; Calculate the ratio of the difference to the corresponding difference in the number of sampling points, and use the normalized value of the ratio relative to the variance of the subsampling variance as the stability evaluation parameter.

4. The adaptive sampling method for spectral detection according to claim 1, characterized in that, Perform multiple random samplings without replacement on the current predicted content set, including: In the current predicted content set, an incremental sequence of sub-sampling point numbers is set, wherein the largest sub-sampling point number in the incremental sequence is not greater than the total number of measurement points currently collected; For each sub-sampling point in the increasing sequence of sub-sampling points, a random sampling operation without replacement is performed at least 50 times.

5. The adaptive sampling method for spectral detection according to claim 3, characterized in that, In the process of triggering supplementary sampling to obtain new spectral data, the number of new measurement points corresponding to the new spectral data is a preset fixed increment, or a dynamic increment adaptively determined based on the difference between the stability evaluation parameter and the preset threshold.

6. The adaptive sampling method for spectral detection according to claim 4, characterized in that, Before performing the step of multiple random sampling without replacement, the method further includes: calculating at least one of the skewness, kurtosis, relative standard deviation, and quantile-quantile plot deviation of the current spectral data set to characterize the degree of heterogeneity of the sample to be tested, and using the degree of heterogeneity as an auxiliary parameter to dynamically adjust the preset threshold or the number of new measurement points in the supplementary sampling operation.

7. The adaptive sampling method for spectral detection according to claim 1, characterized in that, Before converting the current spectral data set to obtain the current predicted content set based on the calibration model, the method further includes: acquiring the spectral signals of standard samples with known target element content at multiple measurement locations, extracting the net intensity of the target element characteristic spectral lines in the spectral signals, and establishing a mapping relationship between the net intensity and the target element content to generate the calibration model.

8. The adaptive sampling method for spectral detection according to claim 7, characterized in that, The calibration model can be a linear calibration model based on the characteristic spectral lines of the target element, a multivariate linear model based on spectral lines, a partial least squares regression model, a support vector regression model, or a neural network regression model.

9. A spectral detection adaptive sampling system, characterized in that, include: The data acquisition module is used to acquire the current spectral set, which is obtained based on multi-point detection of the sample to be tested; The prediction conversion module is used to convert the current spectral data set based on the calibration model to obtain the current predicted content set; The subsampling calculation module is used to perform multiple random samplings without replacement on the current predicted content set under several different numbers of subsampling points to generate multiple subsamples, and calculate the sample variance corresponding to each subsample to obtain the subsampling variance set corresponding to each number of subsampling points. The evaluation parameter generation module is used to calculate the variance of the sub-sampling variance set to obtain the variance of the sub-sampling variance corresponding to the number of sub-sampling points; and to generate stability evaluation parameters based on the variation characteristics of the variance of the sub-sampling variance as the number of sub-sampling points increases. An adaptive control module is used to compare the evaluation parameter with a preset threshold. If the evaluation parameter is greater than the preset threshold, a supplementary sampling operation is triggered to obtain new spectral data, the new spectral data is updated to the current spectral data set, and multiple random sampling steps without replacement are performed again based on the updated current spectral data set. If the evaluation parameter is less than or equal to the preset threshold, sampling is stopped, and the final detection result of the target element is output based on the current spectral data set.

10. A computer device, characterized in that, include: Processor and computer-readable storage media; A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program that, when executed by the processor, implements the spectral detection adaptive sampling method as described in any one of claims 1 to 8.