A rapid detection method, device and system for soil pollution

By analyzing soil particle size and porosity, combining deep learning models, adaptively adjusting spectral processing, the impact of soil factors on detection is solved and the accuracy of soil pollution detection is improved.

CN120121652BActive Publication Date: 2025-07-18陕西恒信检测有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510616480.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-07-18
Estimated Expiration
2045-05-14

AI Technical Summary

Technical Problem

Traditional deep learning models fail to effectively consider the coupling relationship between soil factors and spectroscopy in soil pollution detection, resulting in poor spectral compensation effect and reducing detection accuracy.

Method used

By analyzing soil particle size, structural factors and equivalent porosity, the soil structural factors and equivalent porosity are constructed, combined with the dual-branch fusion deep learning network model, the spectral processing is adaptively adjusted, the spectral compensation coefficient is obtained, and the spectral intensity is corrected.

Benefits of technology

It improves the accuracy and reliability of soil pollution detection and realizes the accurate determination of heavy metal concentration in soil.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120121652B_ABST
    Figure CN120121652B_ABST
Patent Text Reader

Abstract

This application relates to the technical field of soil pollution detection, and specifically relates to a rapid soil pollution detection method, device and system. The method includes: by comparing the differences between each wavelength in the spectrogram of the heavy metal to be measured in each sample and the preset characteristic wavelength of the heavy metal to be measured, as well as the differences between each wavelength and the preset wavelength, and combining the soil structure factor and the equivalent porosity, determining the weight of each wavelength, and combining the spectrogram of the heavy metal to be measured in each sample and the reference spectrogram to determine the enhanced spectrogram, so as to obtain the spectral compensation coefficient; based on the enhanced spectrogram and spectral compensation coefficient of the heavy metal to be measured in each sample, and combining the reference spectrogram and the concentration, determining the concentration of the heavy metal to be measured in each sample. This application solves the problem of poor spectral compensation effect and improves the accuracy of soil pollution detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of soil pollution detection, and specifically relates to a rapid soil pollution detection method, device, and system. Background Art

[0002] Through soil testing, the content and distribution of harmful substances such as heavy metals, organic pollutants, and pesticide residues in the soil can be accurately grasped, providing a strong basis for scientifically formulating soil pollution prevention and control and remediation plans. This can not only ensure the quality and safety of agricultural products, prevent harmful substances from entering the human body through the food chain and damaging human health, but also protect the ecological environment, prevent soil pollution from spreading to other environmental media such as water bodies and the atmosphere, and cause more serious environmental problems.

[0003] In summary, when using a portable X-ray fluorescence spectrometer (XPF) for rapid soil pollution detection, machine learning technology can be used to compensate for errors caused by soil factors. However, traditional deep learning models usually directly process the original spectra without considering the coupling relationship between the spectra and soil factors, resulting in easy overfitting, only being able to learn the surface features of the data, poor spectral compensation effect, and reducing the accuracy of soil pollution detection. Summary of the Invention

[0004] In a first aspect, an embodiment of this application provides a rapid soil pollution detection method, which includes the following steps:

[0005] Collect multiple soil samples in the soil to be detected and record them as samples. Obtain the moisture content, temperature, humidity, particle size, spectral maps of the heavy metals to be detected in each sample, dry soil porosity, equivalent circular diameter of each particle in each sample, spectral maps and concentrations of the heavy metals to be detected in the standard soil samples of each sample. Record the spectral map of the heavy metals to be detected in the standard soil samples as the reference spectrum;

[0006] Compare the difference between the particle size of each sample and the preset standard particle size to determine the particle size related value of each sample, and combine the difference between the square equivalent circular diameter and the equivalent circular diameter of all particles in each sample to determine the soil structure factor of each sample; Measure the difference between the moisture content of each sample and the preset standard moisture content, and combine the dry soil porosity to determine the equivalent porosity of each sample;

[0007] By comparing the difference between each wavelength in the spectral map of the heavy metals to be detected in each sample and the preset characteristic wavelength of the heavy metals to be detected, as well as the difference between each wavelength and the preset wavelength, and combining the soil structure factor and the equivalent porosity, determine the weight of each wavelength in the spectral map of the heavy metals to be detected in each sample;

[0008] Multiply the spectral intensity, weight at each wavelength in the spectral graph of the heavy metal to be measured in each sample, and the spectral intensity at the corresponding wavelength in the reference spectrum, and use the product as the enhanced spectral intensity at each wavelength in the spectral graph of the heavy metal to be measured in each sample; replace the preset characteristic wavelength of the spectral intensity at each wavelength in the spectral graph of the heavy metal to be measured in each sample with the enhanced spectral intensity to obtain the enhanced spectral graph of the heavy metal to be measured in each sample; use the enhanced spectral graph of the heavy metal to be measured in each sample, the moisture content, the temperature and the humidity, the soil structure factor, the equivalent porosity and the concentration as the input of the neural network, and output the spectral compensation coefficient of the enhanced spectral graph of the heavy metal to be measured in each sample;

[0009] Based on the enhanced spectral graph and the spectral compensation coefficient of the heavy metal to be measured in each sample, and in combination with the reference spectrum and the concentration, determine the concentration of the heavy metal to be measured in each sample.

[0010] Preferably, the expression of the particle size related value of each sample is: ; where represents the particle size related value of sample i; represents the particle size of sample i; represents a preset first value; represents a preset standard particle size; represents the logarithmic function with the natural constant as the base.

[0011] Preferably, the expression of the soil structure factor of each sample is: ; where represents the soil structure factor of sample i; represents the particle size related value of sample i; represents the result of the sum of the squared equivalent circle diameters of all particles in sample i divided by the total sum of the equivalent circle diameters of all particles; represents a preset second value.

[0012] Preferably, the expression of the equivalent porosity of each sample is: ; where represents the equivalent porosity of sample i; represents the dry soil porosity of sample i; represents the moisture content of sample i; represents a preset moisture content sensitivity coefficient; represents a preset standard moisture content; represents the logarithmic function with the natural constant as the base.

[0013] Preferably, the method for determining the weight at each wavelength in the spectral graph of the heavy metal to be measured in each sample is:

[0014] The ratio between the preset characteristic wavelength of the heavy metal to be measured and each wavelength in the spectrogram of the heavy metal to be measured in each sample is used as the first weight of each wavelength in the spectrogram of the heavy metal to be measured in each sample;

[0015] Take the opposite of the ratio between each wavelength in the spectrogram of the heavy metal to be measured in each sample and the preset wavelength, and use the opposite number as the independent variable of the exponential function with the natural constant as the base, and the obtained result is used as the second weight of each wavelength in the spectrogram of the heavy metal to be measured in each sample;

[0016] The weight of the preset characteristic wavelength j in the spectrogram of the heavy metal to be measured in sample i The expression is: ; In the formula, 、 respectively represent the first weight and the second weight of wavelength j of the preset characteristic wavelength in the spectrogram of the heavy metal to be measured in sample i; represents the soil structure factor of sample i; represents the equivalent porosity of sample i; exp( ) represents the exponential function with the natural constant as the base.

[0017] Preferably, the expression of the concentration of the heavy metal to be measured in each sample is: ; In the formula, represents the concentration of the heavy metal to be measured in sample i; represents the spectral intensity at the preset characteristic wavelength in the enhanced spectrogram of the heavy metal to be measured in sample i; represents the spectral compensation coefficient of the heavy metal to be measured in sample i; represents the ratio of the spectral intensity at the preset characteristic wavelength in the reference spectrogram to the concentration of the heavy metal to be measured in the standard soil sample.

[0018] In a second aspect, an embodiment of the present application further provides a soil pollution rapid detection device, in which a computer program is stored, and when the computer program is executed by a processor, it implements a soil pollution rapid detection method according to any one of the above.

[0019] In a third aspect, an embodiment of the present application provides a soil pollution rapid detection system, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of a soil pollution rapid detection method according to any one of the above.

[0020] As can be seen from the above embodiments, a soil pollution rapid detection method provided by an embodiment of the present application has at least the following beneficial effects:

[0021] This application constructs a soil structure factor by comparing the differences in particle sizes of various samples with a preset standard particle size and combining the differences between the squared equivalent circle diameters and the equivalent circle diameters of all particles within each sample, quantifies the influence of the degree of soil particle aggregation and particle size on the detection results of X-ray fluorescence spectrometers, helps to identify and eliminate spectral measurement errors caused by soil aggregation and particle size differences, and thus improves the accuracy of spectral detection; further, measures the differences in the moisture content of each sample from a preset standard moisture content and, in combination with the dry soil porosity, determines an equivalent porosity, which can compensate for the dual attenuation effect of moisture on X-ray signals and improve the accuracy of spectral detection; further, by comparing the differences between each wavelength in the spectral diagram of the heavy metal to be measured within each sample and a preset characteristic wavelength and combining the soil structure factor and the equivalent porosity, determines the weights of each wavelength in the spectral diagram of the heavy metal to be measured in each sample, which helps to adaptively adjust spectral processing, effectively remove noise, and improve the accuracy and reliability of heavy metal detection in soil; further, based on the spectral diagrams of the heavy metals to be measured within each sample and the weights of all wavelengths therein, as well as a reference spectrum, trains a neural network to obtain a spectral compensation coefficient, which helps to correct the spectral intensities in the spectral diagrams of the heavy metals to be measured in each sample and improves the accuracy of soil pollution detection; this application analyzes physical properties such as soil particle size, structure factor, and equivalent porosity, and uses a deep learning network model to process spectral data to obtain a spectral compensation coefficient, ultimately achieving accurate determination of the concentrations of heavy metals to be measured in soil and improving the accuracy of soil pollution detection. Description of the Drawings

[0022] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0023] Figure 1 It is a flowchart of the steps of a rapid soil pollution detection method provided by an embodiment of this application;

[0024] Figure 2 It is a network structure diagram provided by an embodiment of this application. Detailed Embodiments

[0025] In order to further elaborate on the technical means and effects adopted by this application to achieve the intended invention purpose, the following specifically describes, in conjunction with the accompanying drawings and preferred embodiments, a rapid soil pollution detection method, device, and system proposed according to this application, including its specific implementation manners, structures, features, and effects, as follows. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs.

[0027] The following specifically describes the specific solutions of a rapid soil pollution detection method, device, and system provided by this application in conjunction with the accompanying drawings.

[0028] Please refer to Figure 1 , which shows a step flowchart of a rapid soil pollution detection method provided by an embodiment of this application. The method includes the following steps:

[0029] S1: Collect multiple soil samples from the soil to be detected, denoted as samples, and obtain the moisture content, temperature, humidity, particle size, spectral diagrams of heavy metals to be detected in each sample, dry soil porosity, equivalent circle diameter of each particle in each sample, spectral diagrams and concentrations of heavy metals to be detected in the standard soil samples of each sample. Denote the spectral diagram of the heavy metal to be detected in the standard soil sample as the reference spectrum.

[0030] In this embodiment, according to the HJ / T 166-200 standard, the grid method (100m×100m, spacing of 1m) is used to arrange soil sampling points. At each sampling point, the surface soil of 0-20 cm is taken, and 5 sub-samples are mixed to form a soil sample, with a total of 2000 soil samples. For the sake of simplicity of expression, the following content uses "sample" to replace "soil sample" for description.

[0031] Collect the moisture content, temperature, and humidity at each sub-sample. Take the mean value of the moisture content, temperature mean value, and humidity mean value at the sampling points of all sub-samples of each soil sample as the moisture content, temperature, and humidity of each soil sample respectively; and use an X-ray fluorescence spectrometer to collect the spectral diagrams and particle sizes of each sample.

[0032] Take 2 g of air-dried soil from each sample, pass it through a 2 mm sieve, place it on a glass slide, collect soil particle size images using a microscope, perform gray-scale conversion and binarization, and then use the watershed algorithm to segment the adhering particles, and calculate the equivalent circular diameter of each particle. Take 2 g of air-dried soil from each sample to calculate the dry soil porosity of each sample, and make 2 g of soil into a standard soil sample. To ensure that the standard soil sample is consistent with the heavy metal types contained in its sample, the samples are usually mixed evenly before sampling. Through a series of processes for making standard soil samples, standard soil samples are obtained. Further, obtain the concentrations of various heavy metals in the standard soil samples, and use an X-ray fluorescence spectrometer to obtain the spectrogram of the standard soil samples. Denote the spectrogram of the standard soil sample as the reference spectrum. Different heavy metals in the spectrogram are located in different wavelength ranges.

[0033] Among them, the calculation methods of gray-scale conversion, binarization processing, watershed algorithm, equivalent circular diameter, and dry soil porosity, as well as the preparation process of the standard soil sample, are all well-known technologies, and their specific principles will not be elaborated here.

[0034] S2: Compare the differences between the particle sizes of each sample and the preset standard particle size, determine the particle size-related values of each sample, and combine the differences between the squared equivalent circular diameters and the equivalent circular diameters of all particles in each sample to determine the soil structure factor of each sample; measure the differences between the moisture contents of each sample and the preset standard moisture content, and combine the dry soil porosity to determine the equivalent porosity of each sample.

[0035] The X-ray fluorescence spectrometer bombards the soil sample by emitting a high-energy X-ray beam, causing the inner-layer electrons of the atoms to transition and generate holes. When the outer-layer electrons fill the holes, characteristic X-rays are released, and their energy corresponds to the element type. The detector measures the energy and intensity of the fluorescent X-rays, and the element concentration is inversely calculated through an algorithm. However, the X-ray fluorescence spectrometer ignores the influence of soil particle size and soil moisture on X-rays, resulting in deviations in the measured pollutant concentrations. In traditional machine learning-based soil pollutant detection, the collected original spectral data is directly used for training without utilizing the high heterogeneity of soil samples, resulting in the pollution signal in the original spectral data being submerged by noise. When traditional deep learning models directly process the original spectrum, they are prone to overfitting and can only learn the surface features of the data, rather than the real pollution law.

[0036] In soil pollution detection, both the size and aggregation state of soil particles can have a significant impact on the detection results of XRF. Soil is not in an ideal uniform state, with differences in particle size and possible aggregation between particles. Soil particles of different sizes have different absorption and scattering capabilities for X-rays. Large soil particles will make the penetration path of X-rays in them longer, resulting in more X-rays being absorbed or scattered, thus weakening the detected spectral intensity and affecting the accurate judgment of the concentration of pollutant elements. Moreover, the aggregation of soil particles will also change the propagation path of X-rays. Multiple scattering inside the aggregates will make the spectral signal complex and cause deviation in the detection results.

[0037] Therefore, in order to eliminate the interference of particle size and aggregation state on the detection results, compare the differences between the particle sizes of each sample and the preset standard particle size, determine the particle size-related values of each sample, and combine the differences between the squared equivalent circle diameter and the equivalent circle diameter of all particles in each sample to determine the soil structure factor of each sample. The specific process is as follows:

[0038] (1) Compare the differences between the particle sizes of each sample and the preset standard particle size, and determine the particle size-related values of each sample. Specifically:

[0039] The particle size-related value of sample i is expressed as: ; where represents the particle size of sample i; represents the preset first value, which is the particle size weight coefficient and is used to quantify the influence degree of particle size change on X-ray signal attenuation; represents the preset standard particle size; represents the logarithmic function with the natural constant as the base.

[0040] It should be noted that the values of the preset first value and the preset standard particle size are both set artificially. In this embodiment, the value of the preset first value is 0.8, and the value of the preset standard particle size is 75 , and the implementer can also set them according to specific situations by himself / herself. This embodiment does not make special restrictions.

[0041] From the particle size-related values of each sample, it can be understood that the particle size-related value reflects the influence degree of particle size on spectral intensity. Because the propagation of X-rays in substances follows the exponential attenuation law, the size of soil particles will affect the penetration depth and scattering degree of X-rays. When the particle size d is greater than the preset standard particle size, the absorption and scattering of X-rays in large soil particles increase, resulting in a weakening of spectral intensity. The logarithmic function is used because it can better describe this non-linear relationship. As the particle size increases, the value of the logarithmic function also increases, that is, the particle size-related value will increase, but the growth rate gradually slows down, which conforms to the changing trend of the influence of particle size on spectral intensity in reality.

[0042] (2) Further, based on the particle size related values of each sample and combined with the difference between the squared equivalent circle diameter and the equivalent circle diameter of all particles within each sample, the soil structure factor of each sample is determined as follows:

[0043] The soil structure factor of sample i is expressed as: ; where represents the particle size related value of sample i; represents the result of the sum of the squared equivalent circle diameters of all particles within sample i divided by the total sum of the equivalent circle diameters of all particles; represents a preset second value.

[0044] It should be noted that the value of the preset second value is set artificially. To ensure that is greater than 0, it is necessary to satisfy , where represents, determined by the soil type, generally with a value range of , in this embodiment takes a value of 0.28. Implementers can also set it according to specific situations. This embodiment does not make special restrictions.

[0045] From the soil structure factors of each sample, it can be understood that quantifies the degree of aggregation of soil particles. When soil particles aggregate, that is, when is larger, larger aggregates will be formed. The pores inside these aggregates will cause X-rays to scatter multiple times, causing the X-rays that should have directly reached the detector to be scattered and enter the detector multiple times, resulting in an increase in the detected spectral intensity. However, this increase is not due to a real increase in the concentration of contaminant elements. Therefore, is used to suppress this scattering enhancement effect caused by aggregation;

[0046] When the particle size increases, that is, the particle size related value increases, it reflects that the larger the particle size, the longer the scattering path and the more significant the signal attenuation; conversely, the smaller the particle size, the closer the particle size related value approaches 1; and the higher the degree of aggregation, the fewer the pores between particles, the increase in effective density, and the weakening of X-ray scattering. Therefore, decreases as increases, and conversely, increases as decreases. The soil structure factor represents the coupling relationship between the two and their opposite effects on X-rays through their product, thus more realistically reflecting the comprehensive influence of soil structure on the detection signal.

[0047] The degree of soil aggregation is quantified by the equivalent circular diameter of soil particles, so as to obtain the influence of pores in aggregates on X-ray scattering. However, only the influence of aggregate pores is considered, and the influence of soil moisture on pores is not taken into account. The porosity in soil is closely related to the moisture content because moisture fills the pores in the soil. During the detection process, moisture will have a significant impact on the propagation of X-rays. The presence of moisture increases the scattering path of X-rays in the soil, causing more X-rays to be scattered and absorbed during propagation, resulting in a decrease in the detected spectral intensity. Different soil porosities mean different moisture contents, and thus the degrees of X-ray scattering and absorption are also different. In order to eliminate the influence of moisture on the detection results through porosity, porosity correction is required.

[0048] Therefore, by measuring the difference between the moisture content of each sample and the preset standard moisture content, and combining with the dry soil porosity of the sample, the equivalent porosity of each sample is determined. The specific process is as follows:

[0049] The equivalent porosity of sample i is expressed as: ; in the formula, represents the equivalent porosity of sample i; represents the dry soil porosity of sample i; represents the moisture content of sample i; represents the preset moisture content sensitivity coefficient, which is used to quantify the non-linear influence degree of soil moisture content change on the equivalent porosity, and reflects the sensitivity degree of soil porosity change with the moisture content when moisture fills the pores; represents the preset standard moisture content; represents the logarithmic function with the natural constant as the base.

[0050] It should be noted that the values of the preset moisture content sensitivity coefficient and the preset standard moisture content are both artificially set. The value range of the preset moisture content sensitivity coefficient is generally , in this embodiment, the value of the preset moisture content sensitivity coefficient is 0.2, and the value of the preset standard moisture content is 10%. The implementer can also set them according to the specific situation by himself, and this embodiment does not make special restrictions.

[0051] From the equivalent porosity of each sample, it can be understood that the equivalent porosity reflects the volume ratio of pores in the soil, that is, the space ratio filled with moisture. As the equivalent porosity increases, the scattering path of X-rays in the soil becomes longer, and the spectral intensity attenuation intensifies. The logarithmic transformation is used to convert the exponential influence of the moisture content into a linear relationship to compensate for the double attenuation effect of density change and pore structure change caused by moisture on the X-ray signal.

[0052] So far, by analyzing the difference between the particle size of each sample and the preset standard particle size, and combining the difference between the square equivalent circle diameter and the equivalent circle diameter of all particles in each sample, the soil structure factor has been obtained; by measuring the difference between the water content of each sample and the preset standard water content, and combining the dry soil porosity, the equivalent porosity has been obtained, thereby reducing the measurement deviation and improving the accuracy of detecting pollution by the X-ray fluorescence spectrometer.

[0053] S3: By comparing the differences between each wavelength in the spectral graph of the heavy metal to be measured in each sample and the preset characteristic wavelength of the heavy metal to be measured, and the differences between each wavelength and the preset wavelength, and combining the soil structure factor and the equivalent porosity, determine the weights of each wavelength in the spectral graph of the heavy metal to be measured in each sample.

[0054] The soil structure factor and the equivalent porosity take into account the influence of soil physical factors on the spectrum. However, the spectral data itself may still contain noise and interference. By directly using these physical parameters to filter the spectrum in the preprocessing stage, the present embodiment introduces dynamic weights, enabling the spectral processing to be adaptively adjusted according to specific soil conditions, and can more effectively remove the noise related to soil structure and moisture, thereby improving the accuracy and reliability of the subsequent model.

[0055] The heavy metal element to be measured will have unique absorption or emission spectral characteristics at the characteristic wavelength, and these characteristics can be obtained through spectral analysis of standard soil samples. Among them, the characteristic wavelength is a well-known technology, and its specific concept will not be elaborated here.

[0056] Based on the above analysis, by comparing the differences between each wavelength in the spectral graph of the heavy metal to be measured in each sample and the preset characteristic wavelength of the heavy metal to be measured, and the differences between each wavelength and the preset wavelength, and combining the soil structure factor and the equivalent porosity, determine the weights of each wavelength in the spectral graph of the heavy metal to be measured in each sample, specifically:

[0057] Take the ratio between the preset characteristic wavelength of the heavy metal to be measured and each wavelength in the spectral graph of the heavy metal to be measured in each sample as the first weight of each wavelength in the spectral graph of the heavy metal to be measured in each sample;

[0058] It should be noted that the value of the preset characteristic wavelength is set artificially. In this embodiment, taking the heavy metal lead as an example, the value of the corresponding preset characteristic wavelength is 283.3 nm. The heavy metal type can be identified through the characteristic wavelength. The selection of this preset characteristic wavelength is set based on the spectral graph of the heavy metal to be measured in the sample, that is, the spectral graph contains this preset characteristic wavelength. The implementer can also set it according to the specific situation, and this embodiment does not make special restrictions.

[0059] Further, take the negative value of the ratio between each wavelength in the spectrogram of the heavy metal to be measured in each sample and the preset wavelength, and use the negative value as the independent variable of the exponential function with the natural constant as the base. The result obtained is used as the second weight of each wavelength in the spectrogram of the heavy metal to be measured in each sample.

[0060] The weight of wavelength j in the spectrogram of the heavy metal to be measured in sample i The expression is: ; where 、 respectively represent the first weight and the second weight of wavelength j in the spectrogram of the heavy metal to be measured in sample i; represents the soil structure factor of sample i; represents the equivalent porosity of sample i; exp( ) represents the exponential function with the natural constant as the base.

[0061] It can be understood from the weights of each wavelength in the spectrogram of the heavy metal to be measured in each sample that is the first weight of the preset characteristic wavelength j in the spectrogram of the heavy metal to be measured in sample i, which is used to characterize the weighting of the soil structure factor. According to the scattering efficiency formula in the Rayleigh scattering region, the scattering efficiency of short-wavelength X-rays is higher, resulting in a more significant attenuation effect of the soil structure on it. Therefore, the weight of the soil structure factor should decay with the increase of the wavelength, so that a larger value is taken at the preset characteristic wavelength j of the heavy metal element to be measured, strengthening the compensation for the interference of the soil structure, and reducing the compensation intensity at non-preset characteristic wavelength j, thereby realizing the suppression of wavelength-specific physical interference;

[0062] represents the second weight of the preset characteristic wavelength j in the spectrogram of the heavy metal to be measured in sample i, which is used as the weighting of the equivalent porosity. Since the attenuation degrees of different-wavelength X-rays by moisture are different, long-wavelength X-rays are more easily absorbed and scattered by moisture. Therefore, the weight of the equivalent porosity should decay with the increase of the wavelength, so that in the long-wavelength region, the attenuation compensation effect of moisture on the spectrum is stronger. This design can effectively compensate for the significant interference of moisture on low-energy X-rays, while reducing the overcorrection of high-energy X-rays, thereby improving the signal quality at the preset characteristic wavelength of the target element and ensuring the accuracy of the detection result;

[0063] When the soil structure factor is large, it indicates that the soil structure is relatively compact, and the scattering and absorption effects on the spectral signal are strong. At this time, the said weight will become smaller, meaning that the weight of the spectral signal at this wavelength is reduced, thereby suppressing the noise signal generated by soil structure interference. Similarly, when the equivalent porosity is large, the propagation path of the spectral signal is affected, and the said weight will also become smaller, reducing the influence of this interference on the target spectral characteristics.

[0064] So far, by comparing the differences between the wavelengths in the soil sample spectrogram and the characteristic wavelengths of heavy metals, and combining the soil structure factor and the equivalent porosity, the weights of the wavelengths in the spectrogram have been determined to adaptively adjust the spectrum, effectively removing noise and improving the accuracy and reliability of heavy metal detection in soil.

[0065] S4: Based on the spectrogram of the heavy metal to be measured in each sample and the weights of all wavelengths therein, as well as the reference spectrogram, determine the enhanced spectrogram of the heavy metal to be measured in each sample, and combine the moisture content, the temperature, the humidity, the soil structure factor, the equivalent porosity and the concentration to train the neural network to obtain the spectral compensation coefficient of the heavy metal to be measured in each sample.

[0066] First, take the product of the spectral intensity at each wavelength in the spectrogram of the heavy metal to be measured in each sample, the weight, and the spectral intensity at the corresponding wavelength in the reference spectrogram as the enhanced spectral intensity at each wavelength in the spectrogram of the heavy metal to be measured in each sample.

[0067] Replace the spectral intensity at each wavelength in the spectrogram of the heavy metal to be measured in each sample with the enhanced spectral intensity to obtain the enhanced spectrogram of the heavy metal to be measured in each sample.

[0068] Furthermore, in this embodiment, a dual-branch fusion deep learning network model is used for training to finally obtain the spectral compensation coefficient, specifically:

[0069] The input layer of the dual-branch fusion deep learning network model includes a spectral feature extraction layer. Its input is the spectrogram of the heavy metal to be measured in the sample extracted by portable XRF. A window of 5 consecutive wavelength points is used to extract local spectral patterns; non-linearity is introduced through ReLU activation to enhance the learning ability for the complex attenuation law of spectral signals; dimensionality reduction is performed through max pooling to retain the main spectral features and reduce the computational amount; a window of 3 wavelength points is used again to extract finer spectral details, and the output is a 256-dimensional spectral feature vector, representing the core pattern of the original spectrum.

[0070] It also includes a physical feature processing layer. Its input is 5-dimensional soil physical features, namely the concentration of lead in the standard soil sample, the soil structure factor, the equivalent porosity, and the temperature and humidity of the sample. First, map the 5-dimensional features to a 64-dimensional space to initially expand the feature expression; then eliminate the scale differences of different features through LayerNorm; then use the GELU function to adaptively adjust the activation threshold to enhance the modeling ability for non-linear physical parameters; finally, further map to a 128-dimensional space to highlight the synergistic effects of soil structure and environmental factors.

[0071] The input of the fusion prediction layer is spectral features (256 - dimensional) and physical features (128 - dimensional). First, the spectral and physical features are merged into a 384 - dimensional multi - modal feature vector. 30% of the neurons are randomly deactivated by Dropout to prevent overfitting. LayerNorm is used again to stabilize the training process, and then the GELU activation function is used to learn the high - order interactions between features. Finally, a linear layer outputs the spectral compensation coefficients of the heavy metals to be measured in each sample, which are used to correct the spectral intensities in the spectral maps of the heavy metals to be measured in each sample.

[0072] Among them, the above content is a brief process of training the dual - branch fusion deep - learning network model. Since the dual - branch fusion deep - learning network model is a well - known technology, its specific principle steps will not be elaborated here.

[0073] So far, in this embodiment, the high - dimensional spectral data and low - dimensional physical features are fused to form a multi - modal input space, enabling the model to simultaneously capture spectral fingerprints and soil structure features, enhancing the adaptability to complex pollution scenarios, and reducing the risk of overfitting of the model to the training data. The network structure diagram of this embodiment is as Figure 2 shown.

[0074] Step S5: Based on the enhanced spectral maps and spectral compensation coefficients of the heavy metals to be measured in each sample, and in combination with the reference spectrum and the concentration, determine the concentration of the heavy metals to be measured in each sample.

[0075] Based on the spectral compensation coefficients obtained in step S4, further, based on the enhanced spectral maps and spectral compensation coefficients of the heavy metals to be measured in each sample, and in combination with the reference spectrum and the concentration, determine the concentration of the heavy metals to be measured in each sample. Specifically:

[0076] The expression for the concentration of the heavy metal to be measured in sample i is: ; where represents the concentration of the heavy metal to be measured in sample i; represents the spectral intensity at the preset characteristic wavelength in the enhanced spectral map of the heavy metal to be measured in sample i; represents the spectral compensation coefficient of the heavy metal to be measured in sample i; represents the ratio of the spectral intensity at the preset characteristic wavelength in the reference spectrum to the concentration of the heavy metal to be measured in the standard soil sample.

[0077] It should be noted that the preset characteristic wavelength is selected based on the spectral map of the heavy metal to be measured, that is, the enhanced spectral map of the heavy metal to be measured and the reference spectrum contain the spectral intensity at this preset characteristic wavelength, and the spectral intensity at the characteristic wavelength is more reference - worthy. Therefore, the spectral intensity at the characteristic wavelength is selected for calculating the heavy metal concentration.

[0078] So far, in this embodiment, the physical properties such as soil particle size, structure factor, and equivalent porosity are first analyzed, and then the spectral data is processed by using a dual-branch fusion deep learning network model to obtain the spectral compensation coefficient. Finally, the accurate determination of the concentration of heavy metals to be measured in the soil is realized, the accuracy and adaptability of the detection are improved, and reliable technical support is provided for soil pollution monitoring.

[0079] Based on the same inventive concept as the above method, an embodiment of the present application further provides a rapid soil pollution detection device, in which a computer program is stored, and when the computer program is executed by a processor, it implements the rapid soil pollution detection method described in any one of the above.

[0080] Based on the same inventive concept as the above method, an embodiment of the present application further provides a rapid soil pollution detection system, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the rapid soil pollution detection method described in any one of the above.

[0081] It should be noted that the above sequence of embodiments of the present application is only for description and does not represent the advantages or disadvantages of the embodiments. And the above describes specific embodiments of this specification. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0082] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other. The key point of each embodiment is to illustrate the differences from other embodiments.

[0083] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present application shall be included in the protection scope of the present application.

Claims

1. A rapid detection method for soil pollution, characterized in that, The method includes the following steps: Collect multiple soil samples from the soil to be detected, and record them as samples. Obtain the moisture content, temperature, humidity, particle size, spectral maps of the heavy metals to be detected in each sample, dry soil porosity, equivalent circular diameter of each particle in each sample, spectral maps and concentrations of the heavy metals to be detected in the standard soil samples of each sample. Denote the spectral map of the heavy metals to be detected in the standard soil samples as the reference spectrum; Compare the particle size of each sample with the preset standard particle size to determine the particle size related value of each sample, and combine the difference between the squared equivalent circular diameter and the equivalent circular diameter of all particles in each sample to determine the soil structure factor of each sample; Measure the difference between the moisture content of each sample and the preset standard moisture content, and combine the dry soil porosity to determine the equivalent porosity of each sample; By comparing the differences between each wavelength in the spectral map of the heavy metals to be detected in each sample and the preset characteristic wavelengths of the heavy metals to be detected, as well as the differences between each wavelength and the preset wavelengths, and combining the soil structure factor and the equivalent porosity, determine the weights of each wavelength in the spectral map of the heavy metals to be detected in each sample; Take the product of the spectral intensity at each wavelength in the spectral map of the heavy metals to be detected in each sample, the weight, and the spectral intensity at the corresponding wavelength in the reference spectrum as the enhanced spectral intensity at each wavelength in the spectral map of the heavy metals to be detected in each sample; Replace the spectral intensity at the preset characteristic wavelength with the enhanced spectral intensity at each wavelength in the spectral map of the heavy metals to be detected in each sample to obtain the enhanced spectral map of the heavy metals to be detected in each sample; Use the enhanced spectral map of the heavy metals to be detected in each sample, the moisture content, the temperature and the humidity, the soil structure factor, the equivalent porosity and the concentration as the input of the neural network, and output the spectral compensation coefficient of the enhanced spectral map of the heavy metals to be detected in each sample; Based on the enhanced spectral map and the spectral compensation coefficient of the heavy metals to be detected in each sample, and combining the reference spectrum and the concentration, determine the concentration of the heavy metals to be detected in each sample.

2. The rapid soil pollution detection method according to claim 1, characterized in that, The expression for the particle size related value of each sample is as follows: ; where represents the particle size related value of sample i; represents the particle size of sample i; represents a preset first value; represents a preset standard particle size; represents the logarithmic function with the natural constant as the base.

3. The rapid soil pollution detection method according to claim 1, characterized in that, The expression of the soil structure factor of each sample is as follows: ; In the formula, represents the soil structure factor of sample i; represents the particle size related value of sample i; represents the result of the sum of the squared equivalent circle diameters of all particles in sample i divided by the total sum of the equivalent circle diameters of all particles; represents a preset second value.

4. The rapid soil pollution detection method according to claim 1, characterized in that, The expression for the equivalent porosity of each sample is as follows: ; where represents the equivalent porosity of sample i; represents the dry soil porosity of sample i; represents the water content of sample i; represents the preset water content sensitivity coefficient; represents the preset standard water content; represents the logarithmic function with the natural constant as the base.

5. The rapid soil pollution detection method according to claim 1, characterized in that, The method for determining the weights of each wavelength in the spectral map of the heavy metals to be detected in each sample is as follows: Take the ratio between the preset characteristic wavelength of the heavy metals to be detected and each wavelength in the spectral map of the heavy metals to be detected in each sample as the first weight of each wavelength in the spectral map of the heavy metals to be detected in each sample; Take the opposite of the ratio between each wavelength in the spectral map of the heavy metals to be detected in each sample and the preset wavelength, and use the opposite as the independent variable of the exponential function with the natural constant as the base, and the obtained result as the second weight of each wavelength in the spectral map of the heavy metals to be detected in each sample; The weight of the preset characteristic wavelength j in the spectrogram of the heavy metal to be measured in sample i The expression is as follows: ; In the formula, , respectively represent the first weight and the second weight of the wavelength j of the preset characteristic wavelength in the spectrogram of the heavy metal to be measured in sample i; represents the soil structure factor of sample i; represents the equivalent porosity of sample i; exp( ) represents the exponential function with the natural constant as the base.

6. The rapid soil pollution detection method according to claim 1, characterized in that, The expression for the concentration of the heavy metal to be measured in each sample is as follows: ; where represents the concentration of the heavy metal to be measured in sample i; represents the spectral intensity at the preset characteristic wavelength in the enhanced spectral diagram of the heavy metal to be measured in sample i; represents the spectral compensation coefficient of the heavy metal to be measured in sample i; represents the ratio of the spectral intensity at the preset characteristic wavelength in the reference spectrum to the concentration of the heavy metal to be measured in the standard soil sample.

7. A rapid soil pollution detection device, in which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements a rapid soil pollution detection method according to any one of claims 1-6.

8. A rapid soil pollution detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements a rapid soil pollution detection method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Rapid prediction method for physical property indexes of classic famous formula extract powder

    CN115963078A

  • KR1017800580000B1