A geological sample detection data dynamic correction method and system

By adjusting the width of the variable window and the fitting formula correction of the detection data, the problems of algorithm complexity and computational resource consumption in geological sample detection are solved, thereby improving the accuracy and efficiency of the detection data.

CN120847154BActive Publication Date: 2026-01-23BEIJING YIXINGYUAN PETROCHEMICAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510937154.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2026-01-23
Estimated Expiration
2045-07-08

AI Technical Summary

Technical Problem

In existing technologies, the algorithm for correcting geological sample testing data involves many input variables, complex procedures, and consumes a lot of computing resources, which affects the accuracy of the testing results.

Method used

The width of the variable window is dynamically corrected by adjusting the detection data. The window width is initialized using the signal-to-noise ratio. Feature values ​​are calculated in partitions and fitted curves are fitted and denoised to reduce input variables. The fitting formula is used for correction.

Benefits of technology

It simplifies the calibration method, improves detection efficiency, reduces computational resource consumption, avoids overfitting problems, and improves the accuracy of detection data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120847154B_ABST
    Figure CN120847154B_ABST
Patent Text Reader

Abstract

The application provides a geological sample detection data dynamic correction method and system, and belongs to the technical field of element measurement. Initial energy spectrum detection data of a geological sample to be detected is obtained, a variable window width of detection data dynamic correction is initialized according to a signal-to-noise ratio of the initial energy spectrum detection data, a region corresponding to the variable window width is equally divided into N sub-regions, eigenvalues of detection data of each sub-region are calculated, and the eigenvalues are fitted and denoised; the width of the variable window of the detection data dynamic correction is adjusted, and geological sample detection data correction is performed based on the stored denoised eigenvalues. The application only needs to adjust the variable window width of the detection data dynamic correction, thereby reducing input variables of a correction method or algorithm; the variable window width of the detection data dynamic correction is initialized according to the signal-to-noise ratio of the initial energy spectrum detection data, thereby matching data correction and data pollution degree; the eigenvalues are fitted by using a fitting formula, and overfitting problems are not prone to occur.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of element measurement, and particularly relates to a geological sample detection data dynamic correction method and system. BACKGROUND

[0002] XRF (X-Ray Fluorescence Spectrometer) can be used for detection of the types of metals contained in geological samples. However, the mineral composition and structure of geological samples are complex, and the mutual influence of elements between different mineral phases will cause XRF fluorescence to deviate from the linear relationship, thereby affecting the accuracy of the detection results. In addition, factors such as aging and zero drift of the XRF instrument itself, detection environment electromagnetic noise, etc. are also important factors affecting the accuracy of the detection results, so it is necessary to dynamically correct the detection data.

[0003] Common dynamic correction methods include empirical coefficient method (correction by establishing mathematical relationship between mutual influence of elements), internal standard method (introduction of internal standard element correction), and mathematical model correction method (data correction by establishing complex mathematical model and adjusting mathematical model parameters combined with experimental data). The correction accuracy of the mathematical model correction method is the highest, and it has become the mainstream data correction method. For example, in the document "Deep learning assisted XRF spectrum classification", data correction is performed by mathematical model through the steps of spectrum data preprocessing, real-time data correction optimization and abnormal data processing. The step of real-time data correction optimization relies on the LSTM network model to predict the instrument state drift trend and adjust the correction parameters in advance, and the step of abnormal data processing needs the isolation forest algorithm model to automatically identify and eliminate abnormal spectra. However, the mathematical model correction method usually needs to establish a complex mathematical model combined with AI algorithm, the algorithm input variables are many, the algorithm corresponding program is complex, and it needs to occupy more computing resources. SUMMARY

[0004] In order to solve the above problems in the prior art, the present application proposes a geological sample detection data dynamic correction method and system to solve the problems of many algorithm input variables, complex algorithm program and more occupied computing resources in the test data correction process in the prior art.

[0005] In order to achieve the above object, the present application adopts the following technical scheme: A geological sample detection data dynamic correction method comprises the following steps: step S1: using a handheld XRF analysis instrument to detect a to-be-detected geological sample to obtain initial energy spectrum detection data of the to-be-detected geological sample, the initial energy spectrum detection data being energy-count data; step S2: initializing the width of a detection data dynamic correction variable window according to the signal-to-noise ratio of the initial energy spectrum detection data; step S3: dividing the region corresponding to the width of the detection data dynamic correction variable window into N sub-regions, and calculating the characteristic values of the detection data in each of the N sub-regions; step S4: fitting the characteristic values to obtain a characteristic value fitting curve, performing characteristic value denoising according to the characteristic value fitting curve, and storing the denoised characteristic values; step S5: adjusting the width of the detection data dynamic correction variable window, and repeating steps S3-S4; and step S6: stopping the adjustment of the width of the detection data dynamic correction variable window when a repeated execution stop condition is met, and performing final detection data correction of the to-be-detected geological sample based on the stored denoised characteristic values.

[0006] Further, in step S2, the width of the detection data dynamic correction variable window is initialized according to the signal-to-noise ratio of the initial energy spectrum detection data, specifically, when the signal-to-noise ratio of the initial energy spectrum detection data is greater than or equal to a signal-to-noise ratio threshold, the width of the detection data dynamic correction variable window is initialized as a first width, and when the signal-to-noise ratio of the initial energy spectrum detection data is less than the signal-to-noise ratio threshold, the width of the detection data dynamic correction variable window is initialized as a second width, the first width being greater than the second width.

[0007] Further, in step S3, the characteristic values of the detection data in each sub-region are calculated, specifically, the mean value of the count data in the sub-region is calculated, the data in the initial energy spectrum detection data that is closest to the mean value is found as the characteristic value.

[0008] Further, in step S4, the characteristic values are fitted according to the following fitting formula:

[0009] y=a0+a1×x+a2×x 2 +a3×x 3 +a4×x 4 ;

[0010] wherein y represents the dependent variable of the characteristic value fitting curve, x represents the independent variable of the fitting curve, a0, a1, a2, a3, and a4 represent fitting coefficients respectively; the characteristic values are denoised according to the characteristic value fitting curve, specifically, the Euclidean distance between the characteristic values in the sub-region and the characteristic value fitting curve is calculated, and the characteristic values with a Euclidean distance greater than a preset distance threshold are discarded, and the remaining characteristic values are stored as denoised characteristic values.

[0011] Further, the step S5 adjusts the width of the detection data dynamic correction variable window, and specifically comprises: a step S51 of counting the number of the characteristic values with the Euclidean distance greater than the preset distance threshold in the step S4, and when the number is greater than or equal to a first number threshold, a step S52 is performed; otherwise, a step S53 is performed; the step S52 adjusts the width of the current detection data dynamic correction variable window to the current width plus a preset step width; and the step S53 adjusts the width of the current detection data dynamic correction variable window to the current width minus the preset step width.

[0012] Further, the step S5 repeatedly performs the stopping condition that the adjustment number is equal to a preset adjustment number or the width of the adjusted detection data dynamic correction variable window is less than or equal to a lower limit value or greater than or equal to an upper limit value.

[0013] Further, the step S6 performs the final detection data correction of the to-be-detected geological sample based on the stored denoised characteristic values, and specifically comprises fitting the stored denoised characteristic values by using a fitting formula to obtain correction data, and then subtracting the correction data from the initial energy spectrum detection data to complete the final detection data correction of the to-be-detected geological sample.

[0014] The present application also provides a geological sample detection data dynamic correction system for performing the above-mentioned geological sample detection data dynamic correction method, which comprises a data acquisition unit, a window width adjustment unit and a detection data correction unit, the data acquisition unit is connected with the window width adjustment unit, the window width adjustment unit is connected with the detection data correction unit, the data acquisition unit is used to obtain the energy spectrum detection data of the to-be-detected geological sample, the window width adjustment unit is used to adjust the width of the detection data dynamic correction variable window, and the detection data correction unit is used to perform the dynamic correction of the geological sample detection data.

[0015] The present application has the following beneficial technical effects compared with the prior art: (1) after obtaining the initial energy spectrum detection data of the to-be-detected geological sample, the present application only needs to adjust the width of the detection data dynamic correction variable window as the input data of iteration, thereby reducing the input variables of the correction method or correction algorithm; (2) the width of the detection data dynamic correction variable window is initialized by the signal-to-noise ratio of the initial energy spectrum detection data of the to-be-detected geological sample, thereby matching the data correction and the data pollution degree and improving the correction efficiency; (3) the fitting formula is used to fit the characteristic values, thereby adapting the dynamic correction method of the geological sample detection data with multiple peak points and avoiding overfitting problem. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can also be obtained from the provided drawings without creative labor.

[0017] Figure 1 A flow chart of a geological sample detection data dynamic correction method of the present application;

[0018] Figure 2 A flow chart of adjusting the detection data dynamic correction variable window width in the present application. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0020] The concepts involved in the present application will be described below in combination with the drawings. It should be noted that the following description of the concepts is only to make the content of the present application easier to understand, and does not represent the limitation of the protection scope of the present application; meanwhile, the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0021] In combination with the drawings in the specification Figure 1The application discloses a geological sample detection data dynamic correction method, which comprises the following steps: S1, a handheld XRF with a graphene window detector is used to non-destructively detect and analyze a geological sample to be detected; an excitation source of the XRF is used to irradiate the geological sample to be detected; and then a detection system of the XRF is used to obtain initial energy spectrum detection data of the geological sample to be detected, wherein the initial energy spectrum detection data is energy-count data, that is, data with energy (keV) as a horizontal axis and count as a vertical axis; S2, a width of a detection data dynamic correction variable window is initialized according to a signal-to-noise ratio (a ratio of a signal to noise) of the initial energy spectrum detection data; the signal-to-noise ratio can be detected by using professional detection tools or can be obtained by using a ratio of a net peak intensity to background noise of the initial energy spectrum detection data; the width of the detection data dynamic correction variable window is initialized, specifically, when the signal-to-noise ratio of the initial energy spectrum detection data is greater than or equal to a signal-to-noise ratio threshold, the width of the detection data dynamic correction variable window is initialized as a first width, and when the signal-to-noise ratio of the initial energy spectrum detection data is less than the signal-to-noise ratio threshold, the width of the detection data dynamic correction variable window is initialized as a second width, wherein the first width is greater than the second width. It can be understood that the signal-to-noise ratio threshold can be flexibly set by detection personnel, and in addition, the wider the width of the detection data dynamic correction variable window is, the greater the initial covered horizontal axis data amount is, and the narrower the width of the detection data dynamic correction variable window is, the smaller the initial covered horizontal axis data amount is.

[0022] S3, a region corresponding to the width of the detection data dynamic correction variable window is equally divided into N sub-regions (that is, the horizontal axis is equally divided into N equal parts in the window width range, and N is preferably set to 10 in the application), and characteristic values of detection data in the N sub-regions are calculated; specifically, a mean value of count data in a sub-region is calculated, a data closest to the mean value in the initial energy spectrum detection data is found as a characteristic value (when two or more count values are closest to the mean value, one of them can be selected as the characteristic value).

[0023] S4, a characteristic value fitting curve is obtained by fitting the characteristic values, so that the characteristic value fitting curve covers or approaches all the characteristic value data points as much as possible, then the characteristic values are denoised according to the characteristic value fitting curve, and the denoised characteristic values are stored; in S4, the characteristic values are fitted according to the following fitting formula:

[0024] y=a0+a1x+a2x 2 +a3x 3 +a4x 4 ;

[0025] wherein y represents a characteristic value fitting curve strain variable, x represents a fitting curve independent variable, a0, a1, a2, a3, a4 represent fitting coefficients respectively; the characteristic value denoising is performed according to the characteristic value fitting curve, specifically, the Euclidean distance between the characteristic values in the sub-region and the characteristic value fitting curve is calculated, and the characteristic values with the Euclidean distance greater than the preset distance threshold are discarded, and the remaining characteristic values are stored as the denoised characteristic values. The Euclidean distance can better reflect the straight line distance of the data points and the fitting curve in the two-dimensional space, and the calculation method is simple, which is conducive to finding out the characteristic values deviating from the fitting curve too much and located above the fitting curve (these characteristic values are usually abnormal characteristic values caused by noise and the like), and discarding the above characteristic values.

[0026] Step S5: adjusting the width of the detection data dynamic correction variable window, and repeatedly executing steps S3-S4; further combined with the description of the accompanying drawings Figure 2 In step S5, the width of the detection data dynamic correction variable window is adjusted, specifically including: step S51: counting the number of characteristic values with the Euclidean distance greater than the preset distance threshold in step S4, when the number is greater than or equal to a first number threshold, step S52 is executed; otherwise, step S53 is executed; step S52: adjusting the width of the current detection data dynamic correction variable window to the current width plus a preset step width; step S53: adjusting the width of the current detection data dynamic correction variable window to the current width minus a preset step width.

[0027] The repeated execution stop condition in step S5 is that the adjustment number is equal to a preset adjustment number, or the width of the adjusted detection data dynamic correction variable window is less than or equal to a lower limit value or greater than or equal to an upper limit value. The preset adjustment number is set to further balance the contradictory relationship between the calculation resources and the data correction, and the upper limit value and the lower limit value of the width are set to facilitate the convergence of the detection data dynamic correction method and avoid falling into an infinite adjustment dead loop.

[0028] Step S6: stopping the adjustment of the width of the detection data dynamic correction variable window when the repeated execution stop condition is met, and performing the final detection data correction of the to-be-detected geological sample based on the stored denoised characteristic values. Specifically, the stored denoised characteristic values are fitted to obtain correction data, and then the correction data is subtracted from the initial energy spectrum detection data to complete the final detection data correction of the to-be-detected geological sample. It can be understood that the correction data after fitting the stored denoised characteristic values is abnormal data caused by environmental noise or instrument zero drift, and removing these abnormal data from the initial energy spectrum detection data can ensure that the geological sample detection data is not disturbed too much by the instrument itself or the external environment, thereby improving the detection accuracy.

[0029] The application further provides a geological sample detection data dynamic correction system for executing the geological sample detection data dynamic correction method, which comprises a data acquisition unit, a window width adjustment unit and a detection data correction unit.

[0030] The above-mentioned embodiments and / or implementation manners are only used to illustrate the preferred embodiments and / or implementation manners of the present application, and do not limit the implementation manners of the present application in any form, and any person skilled in the art can make some changes or modifications or other equivalent embodiments without departing from the technical means disclosed in the present application, but should be regarded as the same technology or embodiment as the present application.

[0031] The principles and implementation manners of the present application are described by using specific examples herein, and the above-mentioned embodiment is only used to help understand the method and core idea of the present application. The above-mentioned is only the preferred implementation manner of the present application, and it should be pointed out that due to the limited expression, there are infinite specific structures, and for the person skilled in the art in the technical field, some improvements, refinements or changes can be made without departing from the principle of the present application, and the above-mentioned technical features can be combined in a proper way; the improvements, refinements, changes or combinations, or the direct application of the inventive concept and technical scheme to other occasions without improvement, should be regarded as the protection scope of the present application.

Claims

1. A method for dynamic correction of geological sample test data, characterized in that, Includes the following steps: Step S1: Use a handheld XRF analyzer to test the geological sample to obtain the initial energy spectrum detection data of the geological sample. The initial energy spectrum detection data is energy-count data. Step S2: Based on the signal-to-noise ratio of the initial energy spectrum detection data, initialize the width of the dynamic correction variable window for the detection data; Step S3: Divide the area corresponding to the width of the dynamic correction variable window of the detection data into N sub-regions, and calculate the feature value of the detection data in each of the N sub-regions; Step S4: Fit the above feature values ​​to obtain the feature value fitting curve, perform feature value denoising based on the feature value fitting curve, and store the denoised feature values; Step S5: Adjust the width of the variable window for dynamic correction of detection data, and repeat steps S3-S4; Step S6: When the repetitive execution stop condition is met, stop adjusting the variable window width for dynamic correction of detection data, and perform final detection data correction of the geological sample to be tested based on the stored denoised feature values. In step S3, the feature value of the detection data of each sub-region is calculated. Specifically, the mean value of the count data in the sub-region is calculated, and the data whose count value is closest to the mean value in the initial energy spectrum detection data is used as the feature value. In step S4, the feature values ​​are fitted according to the following fitting formula: ; Where y represents the dependent variable of the eigenvalue fitting curve, x represents the independent variable of the fitting curve, and a0, a1, a2, a3, and a4 represent the fitting coefficients, respectively; the eigenvalue denoising based on the eigenvalue fitting curve specifically involves calculating the Euclidean distance between the eigenvalues ​​in the sub-region and the eigenvalue fitting curve, discarding eigenvalues ​​with an Euclidean distance greater than a preset distance threshold, and storing the remaining eigenvalues ​​as denoised eigenvalues. The step S5, adjusting the width of the dynamic correction variable window for the detection data, specifically includes: Step S51: Count the number of feature values ​​whose Euclidean distance is greater than a preset distance threshold in step S4. When the number is greater than or equal to a first number threshold, execute step S52. Otherwise, proceed to step S53; Step S52: Adjust the width of the current detection data dynamic correction variable window to the current width plus the preset step width; Step S53: Adjust the width of the current detection data dynamic correction variable window to the current width minus the preset step width.

2. The method for dynamic correction of geological sample test data according to claim 1, characterized in that, In step S2, the dynamic correction variable window width of the detection data is initialized based on the signal-to-noise ratio of the initial energy spectrum detection data. Specifically, when the signal-to-noise ratio of the initial energy spectrum detection data is greater than or equal to the signal-to-noise ratio threshold, the width of the dynamic correction variable window of the detection data is initialized to a first width. When the signal-to-noise ratio of the initial energy spectrum detection data is less than the signal-to-noise ratio threshold, the dynamic correction variable window of the detection data is initialized to a second width, wherein the first width is greater than the second width.

3. The method for dynamic correction of geological sample test data according to claim 1, characterized in that, In step S5, the condition for stopping repeated execution is that the number of adjustments equals the preset number of adjustments or the width of the dynamic correction variable window of the adjusted detection data is less than or equal to the lower limit or greater than or equal to the upper limit.

4. The method for dynamic correction of geological sample test data according to claim 1, characterized in that, In step S6, the final detection data correction of the geological sample to be tested is performed based on the stored denoised feature values. Specifically, the denoised feature values ​​are fitted using the fitting formula to obtain the corrected data, and then the corrected data is subtracted from the initial energy spectrum detection data to complete the final detection data correction of the geological sample to be tested.

5. A dynamic correction system for geological sample testing data, used to execute the dynamic correction method for geological sample testing data as described in any one of claims 1-4, comprising a data acquisition unit, a window width adjustment unit, and a testing data correction unit, wherein the data acquisition unit is connected to the window width adjustment unit, and the window width adjustment unit is connected to the testing data correction unit, characterized in that, The data acquisition unit is used to obtain energy dispersive spectroscopy (EDS) data of the geological sample to be tested. The window width adjustment unit is used to adjust the variable window width for dynamic correction of the detection data. The detection data correction unit is used to perform dynamic correction of the geological sample detection data.

Citation Information

Patent Citations

  • Spectral analysis method, sample component analysis method and device, equipment and medium

    CN118169110A

  • Soil heavy metal content detection and correction method based on X-ray fluorescence spectrum

    CN119355025A