Soil component detection system based on big data model
Through a soil composition detection system based on a big data model, the effectiveness of spectral features is quantified and screened and integrated, which solves the problem of low detection accuracy in existing technologies and achieves efficient and accurate soil composition detection.
Patent Information
- Application Number
- CN202510859339.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Among the existing soil composition detection methods, the multivariate linear regression and neural network hybrid models rely on a single physical indicator to screen spectral features, resulting in low detection accuracy and a lack of objective quantitative standards. It is easy to miss or retain invalid features, causing fluctuations in detection accuracy.
A soil composition detection system based on a big data model is adopted. The spectral feature validity index generation module is used to quantify the spectral feature validity. The final spectral feature subset is generated by combining dual-threshold feature screening and feature correlation constraint. The detection results are generated through cross-scale feature fusion and residual attention network.
It realizes the objective quantitative evaluation of spectral characteristics, effectively screens out characteristics that are highly correlated with the elements to be measured, improves detection accuracy, reduces noise interference, enhances detection efficiency and accuracy, and has the flexibility to adapt to different detection scenarios.
Smart Images

Figure CN120741359A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to a soil composition detection system based on a big data model. Background Art
[0002] Soil composition detection is a core technology in fields such as precision agriculture, environmental monitoring, and geological exploration. Spectral analysis has become one of the mainstream methods due to its advantages of being fast and non-destructive.
[0003] Publication No. CN114813709B discloses a soil composition detection method, equipment, and system, which include obtaining spectral data of a soil sample to be tested; preprocessing the spectral data to remove noise in the spectral data; screening characteristic spectral line groups of each element to be tested in the soil sample from the preprocessed spectral data according to the element to be tested in the soil sample; and inputting the screened characteristic spectral line groups into a pre-trained mixed model to obtain the content of each element in the soil sample to be tested.
[0004] However, the above application still has the following problems:
[0005] While the hybrid model of multivariate linear regression and neural networks in the above-mentioned application alleviates the inherent flaws of physical and statistical models to a certain extent, the screening process is primarily based on physical matching of the element standard spectral library, which is a single physical indicator. It only indirectly filters weak signal peaks through "physical model calculation + algorithm screening," and its essence is still a reliance on a single physical indicator, peak intensity. This screening mechanism based solely on a single indicator results in a large number of redundant features with low validity and low discrimination being introduced into the subsequent modeling process, reducing detection accuracy.
[0006] The aforementioned application lacks objective quantitative criteria for screening spectral features. Because the physical dimensions of different spectral peaks, such as intensity units and half-width (FWHM) vary, it is difficult to directly compare their contributions to detection. This can lead to the screening results often missing features associated with the elemental content or retaining invalid features with strong noise interference, ultimately causing further fluctuations in detection accuracy. Summary of the Invention
[0007] In order to solve the technical problems existing in the background technology, the present invention proposes a soil composition detection system based on a big data model.
[0008] The present invention proposes a soil composition detection system based on a big data model, comprising:
[0009] Data acquisition module: used to obtain spectral data of the soil sample to be tested;
[0010] Spectral feature validity index generation module: obtains the spectral data in the data acquisition module, takes each spectral peak in the spectral data as an independent spectral feature, quantifies the validity of the spectral feature, and obtains the spectral feature validity index E i ;
[0011] Feature screening module: The spectral features obtained by the spectral feature validity index generation module are screened using a dual-threshold feature screening strategy and feature correlation constraints to generate the final spectral feature subset;
[0012] Cross-scale feature fusion module: receives the final spectral feature subset generated by the feature screening module as input, captures spectral features of different scales through one-dimensional convolution with different dilation rates, and forms multi-scale features;
[0013] The attention gating mechanism is used to dynamically assign weights of multi-scale features to multi-scale features, and 1×1 convolution is used to fuse multi-scale features to generate a fused spectral feature vector.
[0014] Soil composition detection generation module: based on the fused spectral feature vector generated by the cross-scale feature fusion module and the spectral feature validity index E generated by the spectral feature validity index generation module i ,The residual attention network is adopted to generate the spectral feature validity weight matrix through the parameter learning mechanism of the residual attention network;
[0015] The spectral feature validity weight matrix is used to characterize the contribution of spectral features to the prediction of element content;
[0016] A nonlinear mapping model is constructed through the spectral feature validity weight matrix. The nonlinear mapping model takes the fused spectral feature vector as input and generates the content detection results of each element in the soil sample through the hierarchical feature transformation of the residual attention network.
[0017] Preferably, in the spectral feature validity index generation module, the spectral feature validity index E i Generate it as follows:
[0018] Assume that the number of spectral features in the spectral data is b, i = 1, 2, ..., b, I i is the peak intensity of the i-th spectral feature, I bg is the background noise intensity, I max is the maximum intensity of the whole spectrum, W i is the half-peak width of the ith spectral feature, δ(λ i ∈S elem ) is the element characteristic line indicator function;
[0019] Then the i-th spectral feature validity index E i The calculation formula is as follows:
[0020]
[0021] In the formula, α, β, and γ are weight coefficients, and the values of α, β, and γ are calculated by the entropy weight method;
[0022] δ(λ i ∈S elem ), S elem is the standard spectrum library of the element to be measured, λ i is the wavelength of the i-th spectral feature, in the standard spectral line library S of the element to be measured elem Query whether there is a matching characteristic wavelength, if the match is successful, λ i Belongs to the standard spectrum library S of the element to be measured elem , at this time δ(λ i ∈S elem )=1, otherwise δ(λ i ∈S elem )=0;
[0023] The element to be tested is the specific element that is predetermined before testing and whose content needs to be analyzed;
[0024] By performing the same calculation on each spectral peak in the spectral data, the spectral feature validity index of each spectral feature can be obtained.
[0025] Preferably, in the feature screening module, the dual-threshold feature screening strategy is as follows:
[0026] Primary screening: Filter E i Spectral features with values less than the set threshold are retained. i Spectral features with values greater than or equal to the set threshold are candidate spectral features;
[0027] Secondary screening: Calculate the information entropy contribution H of all candidate spectral features in the first screening based on information entropy j ;
[0028] For H j Perform Z-score standardization and filter H j Spectral features whose values after normalization are less than the set threshold are retained. j Spectral features whose values after normalization are greater than or equal to the set threshold are high-discrimination spectral features.
[0029] Preferably, in the feature screening module, the feature correlation constraints are as follows:
[0030] Assume that the number of high-discrimination spectral features obtained by the dual-threshold feature screening strategy is m, j = 1, 2, ..., m;
[0031] Assume that the number of types of elements to be tested is n, k = 1, 2, ..., n;
[0032] Based on the element standard spectral line library, the element-band correlation matrix M is constructed for high-discrimination spectral features. n×m ;
[0033] Element-band correlation matrix M n×m Each row represents an element to be measured, and each column represents the wavelength corresponding to a high-resolution spectral feature;
[0034] Element-band correlation matrix M n×m The values of the matrix elements are 1 or 0;
[0035] The matrix element M k,j =1 indicates the wavelength λ corresponding to the jth high-discrimination spectral feature j Belongs to the standard spectrum line of the kth element to be measured, otherwise M k,j =0;
[0036] Assume that the maximum number of spectral features allowed to be associated with a single element to be measured is T;
[0037] For the element-band correlation matrix M n×m Filter out all matrix elements with values of 0 in the row corresponding to any element to be tested in the matrix;
[0038] If the number of matrix elements with a value of 1 is greater than T, retain T matrix elements with a value of 1 and filter the remaining matrix elements with a value of 1;
[0039] The matrix elements with the value of 1 for all the elements to be measured are aggregated to obtain the final spectral features, forming the final spectral feature subset.
[0040] Preferably, the data acquisition module further includes dark noise subtraction and spectrum normalization processing on the spectral data;
[0041] Among them, dark noise subtraction is achieved by collecting 50 dark spectra and averaging them, and then using median filtering to remove salt and pepper noise;
[0042] Spectral normalization was based on Savitzky-Golay filtering and smoothing, combined with standard normal variate transformation to eliminate baseline drift;
[0043] The data acquisition module integrates a high-resolution LIBS spectrometer and a spectral calibration device to ensure that the signal-to-noise ratio of the spectral data is greater than 50dB. The spectrometer resolution is 0.05nm.
[0044] Preferably, in the feature correlation constraint of the feature screening module, if the number of matrix elements with a value of 1 is greater than T, when T matrix elements with a value of 1 are retained, for the matrix elements with a value of 1, the matrix elements are calculated according to the E of the high-discrimination spectral feature. i Arrange the values from large to small, keep E i The first T matrix elements whose values are 1.
[0045] Preferably, priority labels for detection of elements to be detected are preset, and the priority labels include high-priority elements to be detected, medium-priority elements to be detected, and low-priority elements to be detected;
[0046] In the cross-scale feature fusion module, the attention gating mechanism is used to dynamically assign weights of features of different scales to multi-scale features:
[0047] For the multi-scale features corresponding to the high-priority elements to be measured, the weight value of the corresponding spectral features is increased by Z times the original weight value when calculating the multi-scale feature weight, where Z>1;
[0048] For the multi-scale features corresponding to the medium-priority elements to be tested, no additional weight adjustment is made when calculating the multi-scale feature weights. The feature weights are assigned according to the default rules of the attention gating mechanism.
[0049] For the multi-scale features corresponding to the low-priority analyte elements, the weight value of the corresponding spectral feature is reduced by X times the original weight value when calculating the multi-scale feature weight, where X is less than 1.
[0050] A soil composition detection method based on a big data model comprises the following steps:
[0051] S1. Obtain spectral data of a soil sample to be tested, take each spectral peak in the spectral data as an independent spectral feature, quantify the effectiveness of the spectral feature, and obtain a spectral feature effectiveness index;
[0052] S2, based on the spectral features and spectral feature validity index obtained in S1, a double-threshold feature screening strategy and feature correlation constraint are used to screen and generate the final spectral feature subset;
[0053] S3 receives the final spectral feature subset generated by S2 as input, captures spectral features of different scales through one-dimensional convolution with different expansion rates, and forms multi-scale features;
[0054] The attention gating mechanism is used to dynamically assign weights of multi-scale features to multi-scale features, and 1×1 convolution is used to fuse multi-scale features to generate a fused spectral feature vector.
[0055] S4, based on the fused spectral feature vector generated by S3 and the spectral feature validity index generated by S1, uses the residual attention network to generate a spectral feature validity weight matrix through the parameter learning mechanism of the residual attention network;
[0056] A nonlinear mapping model is constructed through the spectral feature validity weight matrix. The nonlinear mapping model takes the fused spectral feature vector as input and generates the content detection results of each element in the soil sample through the hierarchical feature transformation of the residual attention network.
[0057] The soil composition detection system based on the big data model proposed in the present invention has the following beneficial technical effects:
[0058] 1. This application treats each spectral peak in the spectral data as an independent spectral feature, and converts the physical properties of the spectral peak into comparable numerical values through mathematical modeling, so that the effectiveness of the spectral feature has an objective quantitative standard. The spectral feature effectiveness index provides a unified evaluation scale for spectral peaks of different wavelengths and different forms, solving the problem of incomparability of spectral features caused by differences in physical dimensions. The larger the value of the spectral feature effectiveness index, the more effective the spectral feature is in subsequent soil composition detection, and the more likely it is to be closely correlated with the content of the element to be detected. This design uses a data-driven approach to screen out features that are highly correlated with the content of the element to be detected, reduce the interference of invalid features on the test results, and improve the detection accuracy of soil composition detection.
[0059] 2. By generating the spectral feature validity index, in the feature screening module, a screening based on E i Low-value features are filtered out, noise and irrelevant features are quickly eliminated, and the secondary screening evaluates the ability of spectral features to distinguish data distribution through information entropy contribution. High-discrimination features are retained after Z-score standardization. The two-step screening mechanism effectively removes redundant features with low effectiveness and low discrimination. The feature correlation constraint avoids interference from redundant features of the same element to be measured by limiting the maximum number of spectral features allowed to be associated with a single element to be measured, generating the final spectral feature subset, significantly reducing the subsequent computational complexity, improving the efficiency of soil composition detection, and further improving the detection accuracy of soil composition detection.
[0060] 3. When this application retains T matrix elements with a value of 1, for the matrix elements with a value of 1, the matrix elements are calculated according to the E of the high-resolution spectral feature. i Arrange the values from large to small, keep E iThe first T matrix elements with values of 1 are selected to avoid missing key features due to random screening. The quality of the final spectral feature subset is further improved through the effectiveness-prioritized screening rule, providing higher-quality input for the subsequent cross-scale feature fusion module and soil component detection generation module, thereby further improving the detection accuracy of soil component detection.
[0061] 4. This application implements differentiated weight adjustment in the attention gating mechanism by presetting priority labels for the elements to be tested, integrating the actual needs of soil testing. Through dynamic weight allocation, precise focusing on key elements can be achieved, making the system more suitable for differentiated testing scenarios and improving application flexibility and practicality.
[0062] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is a principle block diagram of the system of the present invention;
[0064] Figure 2 Flowchart of the method of the present invention. DETAILED DESCRIPTION
[0065] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention, and are not to be construed as limiting the present invention.
[0066] like Figure 1 A soil composition detection system based on a big data model is shown, comprising a data acquisition module, a spectral feature validity index generation module, a feature screening module, a cross-scale feature fusion module, and a soil composition detection generation module;
[0067] Data acquisition module: used to obtain spectral data of the soil sample to be tested;
[0068] In an optional embodiment, the data acquisition module further includes performing dark noise subtraction and spectrum normalization processing on the spectral data;
[0069] Among them, dark noise subtraction is achieved by collecting 50 dark spectra and averaging them, and then using median filtering to remove salt and pepper noise;
[0070] Spectral normalization was based on Savitzky-Golay filtering and smoothing, combined with standard normal variate transformation to eliminate baseline drift;
[0071] Savitzky-Golay filtering is an existing sliding window smoothing algorithm based on polynomial fitting;
[0072] The data acquisition module integrates a high-resolution LIBS spectrometer and a spectral calibration device to ensure that the signal-to-noise ratio of the spectral data is greater than 50dB. The spectrometer resolution is 0.05nm.
[0073] LIBS spectrometer is an existing analytical instrument based on laser-induced plasma spectroscopy technology;
[0074] Spectral feature validity index generation module: obtains the spectral data in the data acquisition module, takes each spectral peak in the spectral data as an independent spectral feature, quantifies the validity of the spectral feature, and obtains the spectral feature validity index E i ;
[0075] In an optional embodiment, in the spectrum feature validity index generation module, the spectrum feature validity index E i Generate it as follows:
[0076] Assume that the number of spectral features in the spectral data is b, i = 1, 2, ..., b, I i is the peak intensity of the i-th spectral feature, I bg is the background noise intensity, I max is the maximum intensity of the whole spectrum, W i is the half-peak width of the ith spectral feature, δ(λ i ∈S elem ) is the element characteristic line indicator function;
[0077] Then the i-th spectral feature validity index E i The calculation formula is as follows:
[0078]
[0079] Where α, β, and γ are weight coefficients, and the values of α, β, and γ are calculated by entropy weight method; δ(λ i ∈S elem ), S elem is the standard spectrum library of the element to be measured, λ i is the wavelength of the i-th spectral feature, in the standard spectral line library S of the element to be measured elem Query whether there is a matching characteristic wavelength, if the match is successful, λ i Belongs to the standard spectrum library S of the element to be measured elem , at this time δ(λ i ∈S elem )=1, otherwise δ(λ i ∈S elem )=0;
[0080] The element to be tested is the specific element that is predetermined before testing and whose content needs to be analyzed;
[0081] By performing the same calculation on each spectral peak in the spectral data, the spectral feature validity index of each spectral feature can be obtained;
[0082] This application treats each spectral peak in the spectral data as an independent spectral feature, and converts the physical properties of the spectral peak into comparable numerical values through mathematical modeling, so that the effectiveness of the spectral feature has an objective quantitative standard. The spectral feature effectiveness index provides a unified evaluation scale for spectral peaks of different wavelengths and different forms, solving the problem of incomparability of spectral features caused by differences in physical dimensions such as intensity and width; the larger the value of the spectral feature effectiveness index, the more effective the spectral feature is in subsequent soil composition detection, and the more likely it is to be closely correlated with the content of the element to be detected. This design changes the subjectivity of traditional manual experience screening, and screens out features that are highly correlated with the content of the element to be detected in a data-driven manner, reducing the interference of invalid features on the test results, and improving the detection accuracy of soil composition detection.
[0083] Feature screening module: The spectral features obtained by the spectral feature validity index generation module are screened using a dual-threshold feature screening strategy and feature correlation constraints to generate a final spectral feature subset and reduce the feature dimension;
[0084] In an optional embodiment, in the feature screening module, the dual-threshold feature screening strategy is as follows:
[0085] Primary screening: Filter E i Spectral features with values less than the set threshold are retained. i Spectral features with values greater than or equal to the set threshold are candidate spectral features;
[0086] Secondary screening: Calculate the information entropy contribution H of all candidate spectral features in the first screening based on information entropy j ;
[0087] For H j Perform Z-score standardization and filter H j Spectral features whose values after normalization are less than the set threshold are retained. j The spectral features whose values after normalization are greater than or equal to the set threshold are high-discrimination spectral features;
[0088] In an optional embodiment, in the feature screening module, the feature correlation constraint is as follows:
[0089] Assume that the number of high-discrimination spectral features obtained by the dual-threshold feature screening strategy is m, j = 1, 2, ..., m;
[0090] Assume that the number of types of elements to be tested is n, k = 1, 2, ..., n;
[0091] Based on the element standard spectral line library, the element-band correlation matrix M is constructed for high-discrimination spectral features. n×m ;
[0092] Element-band correlation matrix M n×m Each row represents an element to be measured, and each column represents the wavelength corresponding to a high-resolution spectral feature;
[0093] Element-band correlation matrix M n×m The values of the matrix elements are 1 or 0;
[0094] The matrix element M k,j =1 indicates the wavelength λ corresponding to the jth high-discrimination spectral feature j Belongs to the standard spectrum line of the kth element to be measured, otherwise M k,j =0;
[0095] Assume that the maximum number of spectral features allowed to be associated with a single element to be measured is T;
[0096] For the element-band correlation matrix M n×m Filter out all matrix elements with values of 0 in the row corresponding to any element to be tested in the matrix;
[0097] If the number of matrix elements with a value of 1 is greater than T, retain T matrix elements with a value of 1 and filter the remaining matrix elements with a value of 1;
[0098] The matrix elements with the value of 1 for all the elements to be measured are aggregated to obtain the final spectral features, forming the final spectral feature subset.
[0099] In an optional embodiment, the value range of T is 3-5;
[0100] By generating the spectral feature validity index, in the feature screening module, a screening based on E i Low-value features are filtered out, noise and irrelevant features are quickly eliminated, and the secondary screening evaluates the ability of spectral features to distinguish data distribution through information entropy contribution. High-discrimination features are retained after Z-score standardization. The two-step screening mechanism effectively removes redundant features with low effectiveness and low discrimination. The feature correlation constraint avoids interference from redundant features of the same element to be measured by limiting the maximum number of spectral features allowed to be associated with a single element to be measured, generating the final spectral feature subset, significantly reducing the subsequent computational complexity, improving the efficiency of soil composition detection, and further improving the detection accuracy of soil composition detection.
[0101] The triple guarantee of spectral feature quality is the effectiveness filtering of the first screening, the discrimination screening of the second screening, and the correlation constraint, which significantly improves the detection accuracy. The Z-score standardization processing in the second screening makes the information entropy contribution of the feature comparable across data sets, effectively suppressing the impact of sample distribution differences on feature screening results, and ensuring that the model performs consistently in different regions and different types of soil.
[0102] Cross-scale feature fusion module: receives the final spectral feature subset generated by the feature screening module as input, captures spectral features of different scales through one-dimensional convolution with different dilation rates, and forms multi-scale features;
[0103] The attention gating mechanism is used to dynamically assign weights of multi-scale features to multi-scale features, and 1×1 convolution is used to fuse multi-scale features to generate a fused spectral feature vector.
[0104] The attention gating mechanism is a combination of the attention mechanism and the gating mechanism. The attention gating mechanism is an existing dynamic feature weight allocation technology based on the attention mechanism.
[0105] Soil composition detection and generation module:
[0106] Based on the fused spectral feature vector generated by the cross-scale feature fusion module and the spectral feature validity index E generated by the spectral feature validity index generation module i ,The residual attention network is adopted to generate the spectral feature validity weight matrix through the parameter learning mechanism of the residual attention network;
[0107] The spectral feature validity weight matrix is used to characterize the contribution of spectral features to the prediction of element content;
[0108] A nonlinear mapping model is constructed through the spectral feature validity weight matrix. The nonlinear mapping model takes the fused spectral feature vector as input and generates the content detection results of each element in the soil sample through the hierarchical feature transformation of the residual attention network.
[0109] In an optional embodiment, in the feature correlation constraint of the feature screening module, if the number of matrix elements with a value of 1 is greater than T, when T matrix elements with a value of 1 are retained, for the matrix elements with a value of 1, the matrix elements are calculated according to the E of the high-discrimination spectral feature. i Arrange the values from large to small, keep E i The first T matrix elements whose values are 1.
[0110] When the present application retains T matrix elements with a value of 1, for the matrix elements with a value of 1, the matrix elements are divided into two groups according to the E of the high-resolution spectral feature. i Arrange the values from large to small, keep Ei The first T matrix elements with values of 1 are selected to avoid missing key features due to random screening. The quality of the final spectral feature subset is further improved through the effectiveness-prioritized screening rule, providing higher-quality input for the subsequent cross-scale feature fusion module and soil component detection generation module, thereby further improving the detection accuracy of soil component detection.
[0111] In an optional embodiment, priority labels for detection of elements to be detected are preset, and the priority labels include high-priority elements to be detected, medium-priority elements to be detected, and low-priority elements to be detected;
[0112] In the cross-scale feature fusion module, the attention gating mechanism is used to dynamically assign weights of features of different scales to multi-scale features:
[0113] For the multi-scale features corresponding to the high-priority elements to be measured, the weight value of the corresponding spectral features is increased by Z times the original weight value when calculating the multi-scale feature weight, where Z>1;
[0114] For the multi-scale features corresponding to the medium-priority elements to be tested, no additional weight adjustment is made when calculating the multi-scale feature weights. The feature weights are assigned according to the default rules of the attention gating mechanism.
[0115] For the multi-scale features corresponding to the low-priority analyte elements, the weight value of the corresponding spectral feature is reduced by X times the original weight value when calculating the multi-scale feature weight, where X is less than 1.
[0116] This application implements differentiated weight adjustments in the attention gating mechanism by presetting priority labels for the elements to be tested, integrating the actual needs of soil testing. Through dynamic weight allocation, precise focusing on key elements can be achieved, making the system more suitable for differentiated testing scenarios and improving application flexibility and practicality.
[0117] For high-priority elements to be tested, the contribution of their corresponding spectral features in multi-scale fusion is forced to be enhanced through weight amplification, ensuring that the characteristic signals of key elements are significantly enhanced in the fused spectral feature vector, solving the problem that key features are easily submerged in complex backgrounds.
[0118] like Figure 2 A soil composition detection method based on a big data model is shown, comprising the following steps:
[0119] S1. Obtain spectral data of a soil sample to be tested, take each spectral peak in the spectral data as an independent spectral feature, quantify the effectiveness of the spectral feature, and obtain a spectral feature effectiveness index;
[0120] S2, based on the spectral features and spectral feature validity index obtained in S1, a double-threshold feature screening strategy and feature correlation constraint are used to screen and generate the final spectral feature subset;
[0121] S3 receives the final spectral feature subset generated by S2 as input, captures spectral features of different scales through one-dimensional convolution with different expansion rates, and forms multi-scale features;
[0122] The attention gating mechanism is used to dynamically assign weights of multi-scale features to multi-scale features, and 1×1 convolution is used to fuse multi-scale features to generate a fused spectral feature vector.
[0123] S4, based on the fused spectral feature vector generated by S3 and the spectral feature validity index generated by S1, uses the residual attention network to generate a spectral feature validity weight matrix through the parameter learning mechanism of the residual attention network;
[0124] A nonlinear mapping model is constructed through the spectral feature validity weight matrix. The nonlinear mapping model takes the fused spectral feature vector as input and generates the content detection results of each element in the soil sample through the hierarchical feature transformation of the residual attention network.
[0125] Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
[0126] In the embodiments provided by the present invention, it should be understood that the disclosed systems or methods can be implemented in other ways. For example, the embodiments of the invention described above are merely illustrative. For example, the division of modules is only a logical function division, and other division methods may be used in actual implementation.
[0127] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, and may be located in one place or distributed across multiple network modules. Some or all of these modules may be selected to achieve the objectives of this embodiment based on actual needs.
[0128] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing module, each module may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or hardware plus software functional modules.
[0129] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the basic characteristics of the present invention.
[0130] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A soil composition detection system based on a big data model, characterized in that: include: Data acquisition module: used to obtain spectral data of the soil sample to be tested; Spectral feature validity index generation module: obtains the spectral data in the data acquisition module, takes each spectral peak in the spectral data as an independent spectral feature, quantifies the validity of the spectral feature, and obtains the spectral feature validity index E i ; Feature screening module: The spectral features obtained by the spectral feature validity index generation module are screened using a dual-threshold feature screening strategy and feature correlation constraints to generate the final spectral feature subset; Cross-scale feature fusion module: receives the final spectral feature subset generated by the feature screening module as input, captures spectral features of different scales through one-dimensional convolution with different dilation rates, and forms multi-scale features; The attention gating mechanism is used to dynamically assign weights of multi-scale features to multi-scale features, and 1×1 convolution is used to fuse multi-scale features to generate a fused spectral feature vector. Soil composition detection generation module: based on the fused spectral feature vector generated by the cross-scale feature fusion module and the spectral feature validity index E generated by the spectral feature validity index generation module i ,The residual attention network is adopted to generate the spectral feature validity weight matrix through the parameter learning mechanism of the residual attention network; A nonlinear mapping model is constructed through the spectral feature validity weight matrix. The nonlinear mapping model takes the fused spectral feature vector as input and generates the content detection results of each element in the soil sample through the hierarchical feature transformation of the residual attention network.
2. The soil composition detection system based on big data model according to claim 1 is characterized in that: In the spectral feature validity index generation module, the spectral feature validity index E i Generate it as follows: Assume that the number of spectral features in the spectral data is b, i = 1, 2, ..., b, I i is the peak intensity of the i-th spectral feature, I bg is the background noise intensity, I max is the maximum intensity of the whole spectrum, W i is the half-peak width of the ith spectral feature, δ(λ i ∈S elem ) is the element characteristic line indicator function; Then the i-th spectral feature validity index E i The calculation formula is as follows: Where α, β, and γ are weight coefficients, and the values of α, β, and γ are calculated using the entropy weight method.
3. The soil composition detection system based on big data model according to claim 2 is characterized in that: In the feature screening module, the dual-threshold feature screening strategy is as follows: Primary screening: Filter E i Spectral features with values less than the set threshold are retained. i Spectral features with values greater than or equal to the set threshold are candidate spectral features; Secondary screening: Calculate the information entropy contribution H of all candidate spectral features in the first screening based on information entropy j ; For H j Perform Z-score standardization and filter H j Spectral features whose values after normalization are less than the set threshold are retained. j Spectral features whose values after normalization are greater than or equal to the set threshold are high-discrimination spectral features.
4. The soil composition detection system based on big data model according to claim 3 is characterized in that: In the feature screening module, the feature correlation constraints are as follows: Assume that the number of high-discrimination spectral features obtained by the dual-threshold feature screening strategy is m, j = 1, 2, ..., m; Assume that the number of types of elements to be tested is n, k = 1, 2, ..., n; Based on the element standard spectral line library, the element-band correlation matrix M is constructed for high-discrimination spectral features. n×m ; Element-band correlation matrix M n×m Each row represents an element to be measured, and each column represents the wavelength corresponding to a high-resolution spectral feature; Element-band correlation matrix M n×m The values of the matrix elements are 1 or 0; The matrix element M k,j =1 indicates the wavelength λ corresponding to the jth high-discrimination spectral feature j Belongs to the standard spectrum line of the kth element to be measured, otherwise M k,j =0; Assume that the maximum number of spectral features allowed to be associated with a single element to be measured is T; For the element-band correlation matrix M n×m Filter out all matrix elements with values of 0 in the row corresponding to any element to be tested in the matrix; If the number of matrix elements with a value of 1 is greater than T, retain T matrix elements with a value of 1 and filter the remaining matrix elements with a value of 1; The matrix elements with the value of 1 for all the elements to be measured are aggregated to obtain the final spectral features, forming the final spectral feature subset.
5. The soil composition detection system based on big data model according to claim 4 is characterized in that: In the feature correlation constraint of the feature screening module, if the number of matrix elements with a value of 1 is greater than T, when T matrix elements with a value of 1 are retained, the matrix elements with a value of 1 are calculated according to the E of the high-discrimination spectral feature. i Arrange the values from large to small, keep E i The first T matrix elements whose values are 1.
6. The soil composition detection system based on big data model according to claim 5 is characterized in that: Preset priority labels for the detection of elements to be tested, the priority labels include high priority elements to be tested, medium priority elements to be tested, and low priority elements to be tested; In the cross-scale feature fusion module, the attention gating mechanism is used to dynamically assign weights of features of different scales to multi-scale features: For the multi-scale features corresponding to the high-priority elements to be measured, the weight value of the corresponding spectral features is increased by Z times the original weight value when calculating the multi-scale feature weight, where Z>1; For the multi-scale features corresponding to the medium-priority elements to be tested, no additional weight adjustment is made when calculating the multi-scale feature weights. The feature weights are assigned according to the default rules of the attention gating mechanism. For the multi-scale features corresponding to the low-priority analyte elements, the weight value of the corresponding spectral feature is reduced by X times the original weight value when calculating the multi-scale feature weight, where X is less than 1.
7. The soil composition detection system based on big data model according to claim 1, characterized in that: The data acquisition module also includes dark noise subtraction and spectrum normalization processing of spectral data; Among them, dark noise subtraction is achieved by collecting 50 dark spectra and averaging them, and then using median filtering to remove salt and pepper noise; Spectral normalization was based on Savitzky-Golay smoothing and combined with standard normal variate transformation to eliminate baseline drift.
8. The soil composition detection method based on the big data model according to any one of claims 1 to 7 is characterized in that: The following steps are involved: S1. Obtain spectral data of a soil sample to be tested, take each spectral peak in the spectral data as an independent spectral feature, quantify the effectiveness of the spectral feature, and obtain a spectral feature effectiveness index; S2, based on the spectral features and spectral feature validity index obtained in S1, a double-threshold feature screening strategy and feature correlation constraint are used to screen and generate the final spectral feature subset; S3 receives the final spectral feature subset generated by S2 as input, captures spectral features of different scales through one-dimensional convolution with different expansion rates, and forms multi-scale features; The attention gating mechanism is used to dynamically assign weights of multi-scale features to multi-scale features, and 1×1 convolution is used to fuse multi-scale features to generate a fused spectral feature vector. S4, based on the fused spectral feature vector generated by S3 and the spectral feature validity index generated by S1, uses the residual attention network to generate a spectral feature validity weight matrix through the parameter learning mechanism of the residual attention network; A nonlinear mapping model is constructed through the spectral feature validity weight matrix. The nonlinear mapping model takes the fused spectral feature vector as input and generates the content detection results of each element in the soil sample through the hierarchical feature transformation of the residual attention network.
Citation Information
Patent Citations
Soil composition testing methods, equipment and systems
CN114813709B