A method and system for detecting soil for Chinese herbal medicine planting
Through the division and parameter collection of soil areas for Chinese herbal planting, combined with machine learning growth compensation and unevenness analysis, the setting of soil detection points is optimized, and the problem of inaccurate soil detection in Chinese herbal planting is solved, achieving higher detection reliability and accuracy.
Patent Information
- Application Number
- CN202510570148.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-06
AI Technical Summary
Traditional soil detection methods have resulted in inaccurate and unreliable soil detection in Chinese herbal planting under complex terrain and dynamically changing planting conditions, especially due to the influence of natural conditions such as slope and light, resulting in unreasonable setting of sampling points.
By dividing the target soil area, collecting slope and light parameters, constructing parameter distribution, combining the growth parameters of Chinese herbal medicines, using machine learning's growth compensation channel to eliminate the impact of light, calculate the actual soil nutrient distribution, and performing unevenness analysis to optimize the setting of soil detection points.
It improves the reliability and accuracy of soil detection, ensures that the sampling points are properly configured and fully reflects the soil condition.
Smart Images

Figure CN120084981B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of soil detection, and in particular to a method and system for detecting soil for Chinese herbal medicine planting. Background Art
[0002] Chinese herbal medicine cultivation places extremely stringent demands on the soil. Testing the soil to determine actual soil nutrients before the current fallow period or soil addition can effectively adjust planting strategies. However, traditional soil testing methods typically employ uniform grid sampling, which has significant limitations in complex terrain and dynamically changing planting conditions. For example, soil nutrients are affected by natural conditions such as slope, which can lead to nutrient loss with soil and water loss. Consequently, nutrient distribution varies significantly across regions. Uniform grid sampling can lead to irrational sampling point placement, making it easy to undersample key areas or oversample non-key areas, resulting in inaccurate and unreliable soil testing. Summary of the Invention
[0003] The present invention aims to solve the technical problem of inaccurate and unreliable soil detection for Chinese herbal medicine planting in the prior art, and provides a method and system for detecting soil for Chinese herbal medicine planting.
[0004] The technical solution of the present invention to solve the above technical problems is as follows:
[0005] In a first aspect, the present invention provides a method for detecting soil for Chinese herbal medicine planting, comprising:
[0006] Divide the target soil area, collect slope parameters and light parameters for the divided multiple soil grids, obtain slope parameter distribution and light parameter distribution, and collect Chinese herbal medicine growth parameters in the target soil area over a historical period to obtain a historical growth parameter distribution;
[0007] According to the light parameter distribution, the historical growth parameter distribution is impact compensated to obtain a compensated growth parameter distribution, and nutrient consumption is classified to obtain the actual soil nutrient distribution of the target soil area before the current fallow or soil addition;
[0008] Performing an unevenness analysis on a plurality of soil grids based on the slope parameter distribution to obtain a grid unevenness distribution, and performing an unevenness analysis on the target soil region based on the illumination parameter distribution and actual soil nutrient distribution to obtain a regional unevenness;
[0009] According to the unevenness distribution and regional unevenness, the soil detection point settings of the multiple soil grids are optimized to obtain an optimized soil detection point distribution, and soil sampling and detection are performed to obtain soil detection results.
[0010] In a second aspect, the present invention provides a Chinese herbal medicine planting soil detection system, comprising:
[0011] A data acquisition module is used to divide the target soil area and collect slope parameters and light parameters for the divided multiple soil grids to obtain slope parameter distribution and light parameter distribution, and collect Chinese herbal medicine growth parameters in the target soil area over a historical period to obtain a historical growth parameter distribution;
[0012] A soil nutrient analysis module is used to compensate for the impact of the historical growth parameter distribution based on the light parameter distribution to obtain a compensated growth parameter distribution, classify nutrient consumption, and process to obtain the actual soil nutrient distribution of the target soil area before the current fallow or soil addition;
[0013] an unevenness analysis module for performing unevenness analysis on a plurality of soil grids based on the slope parameter distribution to obtain a grid unevenness distribution, and performing unevenness analysis on the target soil region based on the illumination parameter distribution and the actual soil nutrient distribution to obtain a regional unevenness;
[0014] The optimization output module is used to optimize the soil detection point settings of the multiple soil grids according to the unevenness distribution and regional unevenness, obtain the optimized soil detection point distribution, perform soil sampling and detection, and obtain soil detection results.
[0015] The beneficial effects of the present invention are:
[0016] This application first divides the target soil area and establishes coordinates, then collects the slope parameters and light parameters of the soil grid, constructs the slope parameter distribution and the light parameter distribution, and collects the growth parameters of the target soil area during the last time Chinese herbal medicine was planted in the history, constructs the historical growth parameter distribution, and provides necessary data support for the optimization setting of the subsequent soil detection sampling points. Then, the impact compensation of the sample historical growth parameter distribution is performed through the growth compensation channel to obtain the compensated growth parameter distribution, and the nutrients consumed by the Chinese herbal medicine plants under different compensated growth parameters are obtained. Combined with the soil nutrients detected before the last Chinese herbal medicine was planted, the actual soil nutrient distribution of the target soil area before the current fallow or soil addition is calculated. Then, the grid unevenness distribution is calculated based on the slope parameters of the soil grid, and the regional light unevenness and regional nutrient unevenness are calculated based on the standard deviation of the light parameters and the standard deviation of the soil nutrients. The regional unevenness is calculated, and the data such as slope, light, and initial soil nutrient distribution are converted into indicators for the optimization configuration of sampling points. Finally, the effects of uneven distribution and regional unevenness on the distribution of soil testing sampling points were comprehensively considered. Through multiple rounds of random setting of sampling points and calculation of the corresponding soil testing fitness, the sampling point distribution was continuously optimized until the optimal soil testing point distribution was output. Then, soil sampling and testing were carried out based on this to obtain soil testing results.
[0017] Through the above technical solution, this application divides the target soil area, collects the slope parameters, light parameters, and growth parameters of the last time Chinese herbal medicine was planted in the soil grid, and then uses the growth compensation channel to compensate for the impact of the sample's historical growth parameter distribution. In this way, the current actual soil nutrient distribution is calculated, and then the unevenness distribution and regional unevenness are calculated. Finally, considering the unevenness distribution and regional unevenness, the soil detection adaptability is calculated to output the optimal soil detection point distribution. In this way, the optimal configuration of sampling points is achieved, and the reliability and accuracy of soil detection are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of a process for detecting soil for Chinese herbal medicine planting provided by the present invention;
[0019] Figure 2 This is a structural schematic diagram of a Chinese herbal medicine planting soil detection system provided by the present invention.
[0020] In the accompanying drawings, the components represented by the reference numerals are as follows:
[0021] Data acquisition module 11, soil nutrient analysis module 12, unevenness analysis module 13, optimization output module 14. DETAILED DESCRIPTION
[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0023] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the specified features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0024] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or illustration". Any embodiment of the present invention described as "for example" is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any person skilled in the art to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed herein.
[0025] Example 1, as Figure 1 As shown, an embodiment of the present invention provides a method for detecting soil for Chinese herbal medicine planting, comprising:
[0026] S10: Dividing the target soil area, and collecting slope parameters and light parameters for the divided multiple soil grids to obtain slope parameter distribution and light parameter distribution, and collecting Chinese herbal medicine growth parameters in the target soil area over a historical period to obtain a historical growth parameter distribution;
[0027] Soil nutrient distribution in Chinese herbal medicine cultivation areas is influenced by natural factors such as light intensity and slope, often exhibiting significant spatial heterogeneity. Traditional uniform sampling methods in such environments can easily lead to irrational sampling point placement, such as undersampling in key areas or oversampling in non-critical areas, resulting in inaccurate and unreliable soil testing.
[0028] To address the above problems, this application first divides the target soil area and establishes coordinates, then collects the slope parameters and light parameters of the soil grid to obtain the slope parameter distribution and light parameter distribution, and collects the growth parameters of Chinese herbal medicines in the target soil area over a historical period to obtain the historical growth parameter distribution.
[0029] Specifically, step S10 in the method includes:
[0030] Divide the target soil area to obtain multiple soil grids;
[0031] Collecting slope parameters and illumination parameters of the plurality of soil grids to obtain a plurality of slope parameters and a plurality of illumination parameters, wherein the illumination parameters include illumination time within each soil grid;
[0032] According to the coordinates of the plurality of soil grids, a plurality of slope parameters and a plurality of light parameters are combined to construct a slope parameter distribution and a light parameter distribution;
[0033] The growth parameters of the target soil area during the last planting of Chinese herbal medicines in the historical period are collected to obtain a plurality of historical growth parameters and to construct a distribution of historical growth parameters.
[0034] In this embodiment, the target soil area is first divided into multiple soil grids. A two-dimensional coordinate system is then established within the target soil area, with the geometric center of each soil grid selected as its coordinate (x, y). For example, a 100m×100m target soil area is evenly divided into 400 5m×5m soil grids. A two-dimensional coordinate system is established with the center of the target soil area as the coordinate origin (0, 0), where the coordinates of one of the soil grids are (-15, 20).
[0035] Secondly, the slope parameter and light parameter of the soil grid are collected. The slope parameter is the average slope of the soil grid, and the light parameter is the duration of sunlight within the soil grid, such as 9 hours / day or 270 hours / month. Furthermore, the slope parameter can be measured using a digital elevation model (DEM) or a slope meter, and the light parameter can be recorded using a light sensor network. For example, the average slope of the soil grid with coordinates (-15, 20) is measured as 5° using a slope meter, which is used as its slope parameter; and the duration of sunlight for the soil grid with coordinates (-15, 20) is recorded as 9 hours / day using a light sensor network, which is used as its light parameter.
[0036] Next, associate the collected slope and light parameters with the soil grid coordinates, establishing a correspondence of [(x, y) + slope parameter + light parameter] to obtain the slope and light parameter distributions. For example, associate the coordinates (-15, 20), the slope parameter 5°, and the light parameter 9 hours / day to obtain the slope and light parameter characteristics for the soil grid (-15, 20). Repeat these steps to establish a one-to-one correspondence between the (x, y) coordinates of all soil grids within the target soil area and the slope and light parameters, thereby obtaining the slope and light parameter distributions within the target soil area.
[0037] Finally, the growth parameters of the last Chinese herbal medicine planting in the historical time of multiple soil grids are collected to obtain multiple historical growth parameters, and then the soil grid coordinates are associated with the corresponding historical growth parameters to obtain the distribution of historical growth parameters. Among them, the growth parameters such as plant height and yield can be statistically quantified. For example, the yield of the soil grid with coordinates (-15, 20) during the last Chinese herbal medicine planting is 10kg, and then the soil grid coordinates (-15, 20) are associated with the historical growth parameter 10kg. Repeat the above steps to collect the historical growth parameters of all soil grids in the target soil area, establish a one-to-one correspondence between the coordinates (x, y) and the growth parameters, and thereby obtain the distribution of historical growth parameters in the target soil area.
[0038] In summary, this application divides the target soil area and establishes coordinates. It then collects the slope and light parameters of the soil grid to construct slope and light parameter distributions. It then collects the growth parameters of the target soil area during the last time Chinese herbal medicines were planted to construct a historical growth parameter distribution. This provides the necessary data support for the optimization of subsequent soil testing sampling points.
[0039] S20: Based on the illumination parameter distribution, compensating for the impact of the historical growth parameter distribution to obtain a compensated growth parameter distribution, and classifying nutrient consumption to obtain the actual soil nutrient distribution of the target soil area before the current fallow or soil addition;
[0040] In the existing technology, when the actual soil nutrient distribution of the target soil area before the current fallow or soil addition is obtained by subtracting the corresponding nutrient consumption parameters from the historical soil nutrient parameters, the influence of light conditions is ignored. Specifically, light can cause plants to grow differently when absorbing the same nutrients. For example, when planting a certain light-loving Chinese medicinal herb, the sunny slope consumes 100kg of nitrogen fertilizer per mu and produces 1000kg, while the shady slope consumes 100kg of nitrogen fertilizer per mu and produces only 800kg. Therefore, if you want to accurately obtain the current actual soil nutrient distribution, you first need to eliminate the influence of light conditions.
[0041] To address these issues, this application compensates for the historical growth parameter distribution of the sample by collecting growth parameters under the same growth conditions and standard lighting parameters to eliminate the influence of light differences on the results. The nutrient consumption of the Chinese herbal medicine plants under different compensated growth parameters is then obtained. Combined with the soil nutrients tested before the last Chinese herbal medicine planting, the actual soil nutrient distribution of the target soil area before the current fallow or soil addition is calculated.
[0042] Specifically, step S20 in the method includes:
[0043] Based on the historical growth monitoring data of Chinese herbal medicines, a sample light parameter set and a sample growth parameter set are collected. The growth parameters under the same growth conditions and standard light parameters are collected and annotated to obtain a sample compensation growth parameter set.
[0044] Constructing a growth compensation channel, using the sample illumination parameter set, the sample growth parameter set, and the sample compensation growth parameter set, and training the growth compensation channel until it meets the requirements, wherein the growth compensation channel is constructed using machine learning;
[0045] The illumination parameters and historical growth parameters of the same soil grid within the illumination parameter distribution and historical growth parameter distribution are combined, input into the growth compensation channel, and output to obtain a compensated growth parameter distribution.
[0046] In the examples of this application, due to significant differences in the topographic conditions (such as slope) and surrounding environment (such as obstruction by tall plants or structures) of the Chinese medicinal material planting area, the duration of light in some areas is lower than the standard duration of light in the area, which in turn causes the plants to have significantly different growth parameters when consuming the same nutrients. Therefore, when analyzing the current soil nutrient distribution, it is necessary to compensate the sample growth parameters with the growth parameters under the same growth conditions and standard light parameters to eliminate the impact of light differences and improve the accuracy of the analysis. Specifically:
[0047] First, based on the aforementioned light parameter distribution and historical growth parameter distribution, sample light parameter sets and sample growth parameter sets were collected. For example, light parameters (8 h / day) and growth parameters (plant height 30 cm) were collected for the soil grid (-15, 20), and light parameters (7.2 h / day) and growth parameters (plant height 28 cm) were collected for the soil grid (10, 30). These were used as sample light parameter sets and sample growth parameter sets. Growth parameters were then collected under the same growth conditions but standard light parameters, and labeled to obtain a sample compensated growth parameter set. For example, growth parameters (plant height 35 cm) were collected for the same plant under the same growth conditions and standard light parameters (9 h), and 35 cm was labeled as the sample compensated growth parameter.
[0048] Secondly, machine learning is used to construct a growth compensation channel. Among them, the growth compensation channel can be constructed and trained through the following technical paths: 1. Data preparation: The corresponding sample illumination parameter set, sample growth parameter set and sample compensation growth parameter set are divided into training set, validation set and test set in a ratio of 7.5:1.5:1.5. 2. Model construction: The gradient boosting decision tree (GBDT) algorithm is used to establish a compensation model, with the regression tree as the base learner, and it is iterated through the forward step-by-step algorithm. In each round of iteration, the residual between the current predicted value and the standard value is calculated, and then a new decision tree is trained to fit these residuals. The maximum depth of the tree is set to 5 layers to prevent overfitting, and the learning rate is set to 0.1 to balance the training speed and accuracy. The Friedman mean square error is used as the splitting criterion, and an early stopping mechanism is introduced to terminate the training when the validation set loss has not decreased for 10 consecutive rounds. 3. Model training: The training process adopts a curriculum learning strategy. The model is first trained on the training set, then fine-tuned by expanding difficult samples using a generative adversarial network (GAN). Bayesian hyperparameter search is introduced in the model optimization stage. Finally, an accuracy of 95% is achieved on the test set, which is considered model convergence.
[0049] Finally, the light parameters and historical growth parameters for the same soil grid are combined and fed into the trained growth compensation channel, which outputs the compensated growth parameter distribution. For example, the light parameter (7.2 h / day) and historical growth parameter (plant height 28 cm) for the soil grid (10, 30) are combined and fed into the trained growth compensation channel, which outputs the compensated growth parameter (plant height 35 cm).
[0050] Furthermore, the “classifying nutrient consumption and obtaining the actual soil nutrient distribution of the target soil area before the current fallow or soil addition” includes:
[0051] Inputting the plurality of compensation growth parameters in the compensation growth parameter distribution into a nutrient consumption classification table respectively to obtain a plurality of nutrient consumption parameters by classification, wherein the nutrient consumption classification table is constructed based on a mapping relationship between the sample compensation growth parameters and the sample nutrient consumption parameters;
[0052] Obtaining historical soil nutrient parameter distribution of the target soil area before the last planting of Chinese herbal medicine;
[0053] By subtracting the corresponding nutrient consumption parameter from each historical soil nutrient parameter in the historical soil nutrient parameter distribution, a plurality of actual soil nutrient parameters of the target soil area before current fallow or soil addition are obtained to construct the actual soil nutrient distribution.
[0054] In an embodiment of the present application, first, the multiple compensation growth parameters within the compensation growth parameter distribution are respectively input into the nutrient consumption classification table, and multiple nutrient consumption parameters are obtained by classification. Among them, the nutrient consumption parameters are the consumption of different nutrients (such as N, P, and K) by the plant. The nutrient consumption classification table is constructed based on the mapping relationship between the sample compensation growth parameters and the sample nutrient consumption parameters. Specifically, by collecting the consumption of different nutrients corresponding to the sample compensation growth parameters (such as plant height 35cm) (such as consumption N: 0.6g, consumption P: 0.35g, consumption K: 0.8g), and then establishing a mapping relationship (35cm and consumption N: 0.6g, P: 0.35g, K: 0.8g), the nutrient consumption classification table is constructed. For example, the compensation growth parameter 30cm is input into the nutrient consumption classification table, and the following nutrient consumption parameters are obtained: N: 0.58g, P: 0.33g, K: 0.7g.
[0055] Secondly, the historical soil nutrient parameter distribution of the target soil area before the last Chinese herbal medicine planting is obtained. For example, a historical soil sample of the target soil area before the last Chinese herbal medicine planting is collected through experimental means, and the nutrient content of each nutrient is tested to be: N: 200kg, P: 26kg, K: 400kg, which is used as the historical soil nutrient parameter distribution.
[0056] Finally, the actual soil nutrient distribution is constructed by subtracting the corresponding nutrient consumption parameter from each historical soil nutrient parameter within the historical soil nutrient parameter distribution to obtain multiple actual soil nutrient parameters for the target soil area before the current fallow or soil addition. Specifically, the actual soil nutrient distribution = historical soil nutrient parameter minus nutrient consumption parameter. For example, if the historical soil nutrient parameters for the target soil area are (N: 200 kg, P: 98 kg, K: 240 kg), and the nutrient consumption parameters for a particular Chinese medicinal herb are (N: 36 kg, P: 29 kg, K: 44 kg), then the actual soil nutrient distribution is (N: 164 kg, P: 69 kg, K: 196 kg).
[0057] In summary, compared with the existing technology, this application uses a growth compensation channel constructed by machine learning to compensate for the impact of the sample's historical growth parameter distribution, obtain a compensated growth parameter distribution, and eliminate the influence of light parameters. Then, the nutrients consumed by the Chinese herbal medicine plants under different compensation growth parameters are obtained, and combined with the soil nutrients detected before the last Chinese herbal medicine planting, the actual soil nutrient distribution of the target soil area before the current fallow or soil addition is calculated. In this way, the influence of light is eliminated, and the actual soil nutrient distribution of the target soil area before the current fallow or soil addition is accurately obtained.
[0058] S30: performing unevenness analysis on a plurality of soil grids according to the slope parameter distribution to obtain a grid unevenness distribution, and performing unevenness analysis on the target soil region according to the illumination parameter distribution and the actual soil nutrient distribution to obtain a regional unevenness;
[0059] When setting up sampling points for soil testing, due to differences in natural conditions such as slope, sunlight, and soil nutrient distribution, different numbers of sampling points should be set within different grids to improve testing accuracy and reliability. Specifically, slope can cause nutrient loss with soil erosion, so more sampling points should be set in grids that are significantly affected by slope. Furthermore, sunlight and actual soil nutrient distribution can also lead to significant regional heterogeneity within the target soil area.
[0060] To address the above problems, this application performs unevenness analysis of multiple soil grids based on the slope parameter distribution to obtain grid unevenness distribution, and performs unevenness analysis of the target soil area based on the illumination parameter distribution and actual soil nutrient distribution to obtain regional unevenness.
[0061] Specifically, step S30 in the method includes:
[0062] According to the slope parameter distribution, an average slope parameter is calculated;
[0063] Calculating the ratio of each slope parameter to the average slope parameter to obtain a plurality of grid unevennesses and obtain a grid unevenness distribution;
[0064] Calculating the standard deviation of the light parameters and the standard deviation of the soil nutrients according to the light parameter distribution and the actual soil nutrient distribution;
[0065] According to the illumination parameter standard deviation and the soil nutrient standard deviation, the regional illumination unevenness and the regional nutrient unevenness are calculated, and the regional unevenness is also calculated.
[0066] In the present embodiment, the average slope parameter is first calculated based on the slope parameter distribution. For example, the slope parameters of all soil grids within the target soil area are first collected as follows: 5°, 4.2°, -0.8°, -1°, 2°, 3.22°, -0.06°, 6.7°, and 2.63°. The average slope parameter is calculated to be 2.43°.
[0067] Next, the ratio of each slope parameter to the average slope parameter is calculated to obtain multiple grid unevennesses, thereby obtaining a grid unevenness distribution. For example, the ratios of the slope parameters of the soil grids to the average slope parameter are calculated, for example: 5° / 2.43° = 2.06, and 4.2° / 2.43° = 1.73, to obtain a grid unevenness distribution.
[0068] Next, based on the illumination parameter distribution and the actual soil nutrient distribution, the illumination parameter standard deviation and the soil nutrient standard deviation are calculated. For example, the illumination parameter standard deviation of the soil grid in the target soil area can be calculated by the following formula:
[0069] ;
[0070] Where N is the total number of soil grids, x i is the illumination parameter of the i-th soil grid, and u is the average illumination parameter of the soil grid.
[0071] Finally, the regional illumination unevenness and regional nutrient unevenness are calculated based on the illumination parameter standard deviation and the soil nutrient standard deviation, and the regional unevenness is calculated. Specifically, the illumination parameter standard deviation and the soil nutrient standard deviation are integrated to calculate the ratios of the illumination parameter standard deviation and the soil nutrient standard deviation to the average illumination parameter standard deviation and the average soil nutrient standard deviation of other soil regions, and then the regional unevenness is obtained by weighted or normalized calculation. Exemplarily, regional unevenness=w1 illumination parameter standard deviation ratio+w2 soil nutrient standard deviation ratio, wherein w1 and w2 are the weights of the illumination parameter standard deviation ratio and the soil nutrient standard deviation ratio, which can be adjusted according to the importance of illumination and soil nutrients to plants, for example, 0.7 and 0.3 respectively.
[0072] In summary, compared to existing techniques, this application first calculates the grid unevenness distribution based on the slope parameter of the soil grid. Then, based on the standard deviation of the illumination parameter and the standard deviation of the soil nutrients, it calculates the regional illumination unevenness and regional nutrient unevenness, and finally the regional unevenness. In this way, data such as slope, illumination, and initial soil nutrient distribution are converted into indicators for optimizing the configuration of sampling points, providing the necessary data support for subsequent optimization of sampling point configuration.
[0073] S40: Optimizing the soil detection point settings of the plurality of soil grids according to the unevenness distribution and the regional unevenness, obtaining an optimized soil detection point distribution, performing soil sampling and detection, and obtaining a soil detection result.
[0074] When setting sampling points based on the total number of sampling points within the soil grid of the target soil area, grids with greater unevenness require more soil detection points to improve detection accuracy. However, when regional unevenness is also large, the difference in the number of detection points between different grids cannot be too large, otherwise it will result in too few detection points in some grids, resulting in a loss of comprehensiveness in the detection of the entire area.
[0075] In response to the above problems, this application is based on the uneven distribution and regional unevenness. By randomly setting sampling points, the corresponding soil detection adaptability is calculated, and then the sampling points are randomly set to optimize the detection point settings. After multiple rounds of optimization, the optimized soil detection point distribution is obtained, soil sampling and detection are carried out, and soil detection results are obtained.
[0076] Specifically, step S40 in the method includes:
[0077] Randomly setting sampling points in the plurality of soil grids according to the total number of sampling points, and obtaining the number of first grid sampling points and the coordinate distribution of the first sampling points in the plurality of soil grids as the first soil detection point distribution;
[0078] Calculating a first soil detection adaptability of the first soil detection point distribution according to the grid unevenness distribution and the regional unevenness;
[0079] Continue to randomly set sampling points in the multiple soil grids, optimize the detection point settings, obtain the optimal soil detection point distribution, perform soil sampling and detection, and obtain soil detection results.
[0080] In an embodiment of the present application, sampling points are first randomly set within multiple soil grids according to the total number of sampling points, and the number of first grid sampling points and the coordinate distribution of the first sampling points are obtained as the first soil detection point distribution. The number of first grid sampling points within the soil grid is a range, such as (0, 20). For example, the target soil area is evenly divided into four 5m×5m soil grids, with a total number of 50 sampling points. Sampling points 5, 25, 12, and 8 are randomly set within the four soil grids, respectively, and the coordinates of the corresponding 50 sampling points are obtained as the first soil detection point distribution.
[0081] Secondly, a first soil detection fitness of the first soil detection point distribution is calculated based on the grid unevenness distribution and the regional unevenness, wherein the soil detection fitness reflects the rationality of the first soil detection point distribution, and a larger soil detection fitness indicates a more rational soil detection point distribution.
[0082] Finally, random sampling points are continuously set within the multiple soil grids, and the test point settings are optimized to obtain an optimal soil test point distribution. Soil sampling and testing are then performed to obtain soil test results. Specifically, random sampling points are re-set within the multiple soil grids to obtain the number of sampling points in the first grid and the coordinate distribution of the first sampling points, which serve as the first soil test point distribution. A new soil test fitness is then calculated based on the grid unevenness distribution and the regional unevenness. Finally, the result with the highest soil test fitness score is output as the optimal soil test point distribution. Soil sampling and testing are then performed to obtain soil test results.
[0083] Furthermore, the “calculating the first soil detection adaptability of the first soil detection point distribution according to the grid unevenness distribution and the regional unevenness” is as follows:
[0084] ;
[0085] Among them, SLFIT is soil test fitness, and is the weight, M is the number of soil grids, is the number of grid sampling points of the i-th soil grid, is the grid unevenness of the i-th soil grid, KQ is the regional unevenness, is the standard deviation of the number of grid sampling points within multiple soil grids.
[0086] In the embodiment of the present application, SLFIT is the soil detection fitness, which reflects the reasonableness of the distribution of the first soil detection point. The larger the soil detection fitness, the more reasonable the distribution of the soil detection points. Furthermore, the first term in the above formula reflects the impact of the grid unevenness distribution on the detection fitness. Under the same unevenness distribution, the more grid sampling points there are, the larger the first term is, and the higher the soil detection fitness score is. The second term in the above formula reflects the impact of regional unevenness on the detection fitness. Under the same regional unevenness, the larger the standard deviation of the grid sampling points (i.e., the greater the discreteness of the number of sampling points), the smaller the second term is, and the lower the soil detection fitness score is. Among them, 10 and 100 in the formula are determined based on experimental data. In actual applications, those skilled in the art can adjust them according to actual conditions.
[0087] Specifically, and is the weight, for example =0.6, =0.4, the importance of the results can be adjusted according to the grid unevenness distribution and regional unevenness; M is the number of multiple soil grids in the target soil area; is the number of grid sampling points of the i-th soil grid. For example, the number of grid sampling points of the first soil grid is 5. =5; is the grid unevenness of the i-th soil grid; KQ is the regional unevenness; is the standard deviation of the number of grid sampling points within multiple soil grids.
[0088] For example, =0.6, =0.4, the total number of soil grids M is 4, and the number of grid sampling points of the soil grid is The order is 8, 2, 7, and 3. The unevenness of the soil grid is The values are 1.31, 1.61, 1.56, and 1.23, respectively. The regional heterogeneity KQ is 2.13, and the standard deviation of the number of grid sampling points within the soil grid is 2.55. Substituting this into the formula, the soil testing fitness SLFIT = 15.93 is calculated. The purpose of optimization is to set more sampling points within soil grids with large grid heterogeneity to avoid unreliable soil testing within the soil grid and failure to reflect the soil conditions within the grid. At the same time, it also avoids setting too many sampling points within some soil grids, resulting in incomplete sampling and testing of the target soil area.
[0089] In summary, compared to existing technologies, this application comprehensively considers the impact of uneven distribution and regional unevenness on the distribution of soil testing sampling points. By randomly setting sampling points over multiple rounds and calculating the corresponding soil testing fitness, the sampling point distribution is continuously optimized until the optimal soil testing point distribution is output. This is then used to conduct soil sampling and testing, and obtain soil testing results. This optimizes the configuration of sampling points and improves the reliability and accuracy of testing.
[0090] In summary, the embodiments of the present application have at least the following technical effects:
[0091] Compared to existing technologies, this application first divides the target soil area and establishes coordinates. It then collects slope and light parameters from the soil grid to construct slope and light parameter distributions. Furthermore, it collects growth parameters from the last time Chinese herbal medicines were planted in the target soil area to construct a historical growth parameter distribution. This provides the necessary data support for optimizing the subsequent soil testing sampling point settings.
[0092] Secondly, a growth compensation channel constructed using machine learning was used to compensate for the influence of the historical growth parameter distribution of the sample, obtaining a compensated growth parameter distribution to eliminate the influence of light parameters. The nutrient consumption of the Chinese herbal medicine plants under different compensated growth parameters was then calculated. Combined with the soil nutrient data from the previous pre-planting test of the Chinese herbal medicines, the actual soil nutrient distribution of the target soil area before the current fallow or soil addition was calculated. This eliminates the influence of light and accurately obtains the actual soil nutrient distribution of the target soil area before the current fallow or soil addition.
[0093] Next, we calculated the grid unevenness distribution based on the slope parameter of the soil grid. Then, we calculated the regional unevenness of illumination and nutrients based on the standard deviation of the illumination parameter and the standard deviation of the soil nutrients, and finally the regional unevenness. In this way, we converted data such as slope, illumination, and initial soil nutrient distribution into indicators for optimizing the configuration of sampling points, providing the necessary data support for subsequent optimization of sampling points.
[0094] Finally, the impact of both uneven distribution and regional unevenness on the distribution of soil testing sampling points was comprehensively considered. Through multiple rounds of random sampling point placement and calculation of the corresponding soil testing fitness, the sampling point distribution was continuously optimized until the optimal soil testing point distribution was output. This was then used to conduct soil sampling and testing, yielding soil testing results. This optimized configuration of sampling points was achieved, improving the reliability and accuracy of testing.
[0095] Through the above technical solution, this application divides the target soil area, collects the slope parameters, light parameters, and growth parameters of the last time Chinese herbal medicine was planted in the soil grid, and then uses the growth compensation channel to compensate for the impact of the sample's historical growth parameter distribution. In this way, the current actual soil nutrient distribution is calculated, and then the unevenness distribution and regional unevenness are calculated. Finally, considering the unevenness distribution and regional unevenness, the soil detection adaptability is calculated to output the optimal soil detection point distribution. In this way, the optimal configuration of sampling points is achieved, and the reliability and accuracy of soil detection are improved.
[0096] Example 2, as Figure 2 As shown, based on the same inventive concept as the method for detecting Chinese herbal medicine planting soil provided in Example 1, an embodiment of the present invention further provides a Chinese herbal medicine planting soil detection system, comprising:
[0097] The data acquisition module 11 is used to divide the target soil area, collect slope parameters and light parameters of the divided multiple soil grids, obtain slope parameter distribution and light parameter distribution, and collect Chinese herbal medicine growth parameters in the target soil area over a historical period of time to obtain a historical growth parameter distribution;
[0098] A soil nutrient analysis module 12 is configured to compensate for the impact of the historical growth parameter distribution based on the light parameter distribution to obtain a compensated growth parameter distribution, classify nutrient consumption, and obtain the actual soil nutrient distribution of the target soil area before the current fallow or soil addition.
[0099] The unevenness analysis module 13 is configured to perform unevenness analysis on multiple soil grids based on the slope parameter distribution to obtain a grid unevenness distribution, and perform unevenness analysis on the target soil region based on the illumination parameter distribution and the actual soil nutrient distribution to obtain a regional unevenness.
[0100] The optimization output module 14 is used to optimize the soil detection point settings of the multiple soil grids according to the unevenness distribution and regional unevenness, obtain the optimized soil detection point distribution, perform soil sampling and detection, and obtain soil detection results.
[0101] The data acquisition module 11 is specifically used for:
[0102] Divide the target soil area to obtain multiple soil grids;
[0103] Collecting slope parameters and illumination parameters of the plurality of soil grids to obtain a plurality of slope parameters and a plurality of illumination parameters, wherein the illumination parameters include illumination time within each soil grid;
[0104] According to the coordinates of the plurality of soil grids, a plurality of slope parameters and a plurality of light parameters are combined to construct a slope parameter distribution and a light parameter distribution;
[0105] The growth parameters of the target soil area during the last planting of Chinese herbal medicines in the historical period are collected to obtain a plurality of historical growth parameters and to construct a distribution of historical growth parameters.
[0106] The soil nutrient analysis module 12 is specifically used for:
[0107] Based on the historical growth monitoring data of Chinese herbal medicines, a sample light parameter set and a sample growth parameter set are collected. The growth parameters under the same growth conditions and standard light parameters are collected and annotated to obtain a sample compensation growth parameter set.
[0108] Constructing a growth compensation channel, using the sample illumination parameter set, the sample growth parameter set, and the sample compensation growth parameter set, and training the growth compensation channel until it meets the requirements, wherein the growth compensation channel is constructed using machine learning;
[0109] The illumination parameters and historical growth parameters of the same soil grid within the illumination parameter distribution and historical growth parameter distribution are combined, input into the growth compensation channel, and output to obtain a compensated growth parameter distribution.
[0110] Furthermore, the “classifying nutrient consumption and obtaining the actual soil nutrient distribution of the target soil area before the current fallow or soil addition” includes:
[0111] Inputting the plurality of compensation growth parameters in the compensation growth parameter distribution into a nutrient consumption classification table respectively to obtain a plurality of nutrient consumption parameters by classification, wherein the nutrient consumption classification table is constructed based on a mapping relationship between the sample compensation growth parameters and the sample nutrient consumption parameters;
[0112] Obtaining historical soil nutrient parameter distribution of the target soil area before the last planting of Chinese herbal medicine;
[0113] By subtracting the corresponding nutrient consumption parameter from each historical soil nutrient parameter in the historical soil nutrient parameter distribution, a plurality of actual soil nutrient parameters of the target soil area before current fallow or soil addition are obtained to construct the actual soil nutrient distribution.
[0114] The unevenness analysis module 13 is specifically used to:
[0115] According to the slope parameter distribution, an average slope parameter is calculated;
[0116] Calculating the ratio of each slope parameter to the average slope parameter to obtain a plurality of grid unevennesses and obtain a grid unevenness distribution;
[0117] Calculating the standard deviation of the light parameters and the standard deviation of the soil nutrients according to the light parameter distribution and the actual soil nutrient distribution;
[0118] According to the illumination parameter standard deviation and the soil nutrient standard deviation, the regional illumination unevenness and the regional nutrient unevenness are calculated, and the regional unevenness is also calculated.
[0119] The optimization output module 14 is specifically configured to:
[0120] Randomly setting sampling points in the plurality of soil grids according to the total number of sampling points, and obtaining the number of first grid sampling points and the coordinate distribution of the first sampling points in the plurality of soil grids as the first soil detection point distribution;
[0121] Calculating a first soil detection adaptability of the first soil detection point distribution according to the grid unevenness distribution and the regional unevenness;
[0122] Continue to randomly set sampling points in the multiple soil grids, optimize the detection point settings, obtain the optimal soil detection point distribution, perform soil sampling and detection, and obtain soil detection results.
[0123] Furthermore, the “calculating the first soil detection adaptability of the first soil detection point distribution according to the grid unevenness distribution and the regional unevenness” is as follows:
[0124] ;
[0125] Among them, SLFIT is soil test fitness, and is the weight, M is the number of soil grids, is the number of grid sampling points of the i-th soil grid, is the grid unevenness of the i-th soil grid, KQ is the regional unevenness, is the standard deviation of the number of grid sampling points within multiple soil grids.
[0126] In summary, the embodiments of the present application have at least the following technical effects:
[0127] The data acquisition module divides the target soil area and establishes coordinates. It then collects the slope parameters and light parameters of the soil grid to construct slope parameter distributions and light parameter distributions. It also collects the growth parameters of the target soil area during the last time Chinese herbal medicines were planted to construct a historical growth parameter distribution, providing necessary data support for the optimization of subsequent soil testing sampling points. The soil nutrient analysis module uses a growth compensation channel constructed using machine learning to compensate for the impact of the sample's historical growth parameter distribution, obtain a compensated growth parameter distribution, and eliminate the influence of light parameters. The nutrients consumed by the Chinese herbal medicine plants under different compensated growth parameters are then obtained. Combined with the soil nutrients detected before the last Chinese herbal medicine planting, the actual soil nutrient distribution of the target soil area before the current fallow or soil addition is calculated, eliminating the influence of light and accurately obtaining the actual soil nutrient distribution of the target soil area before the current fallow or soil addition. The unevenness analysis module calculates the grid unevenness distribution based on the slope parameter of the soil grid. It then calculates regional illumination unevenness, regional nutrient unevenness, and regional unevenness based on the standard deviation of illumination parameters and soil nutrients. This module converts data such as slope, illumination, and initial soil nutrient distribution into indicators for optimizing the configuration of sampling points. The optimized output module considers the impact of unevenness distribution and regional unevenness on the distribution of soil testing sampling points. By randomly setting sampling points and calculating the corresponding soil testing fitness over multiple rounds, it continuously optimizes the sampling point distribution until it outputs the optimal soil testing point distribution. This distribution is then used to conduct soil sampling and testing, resulting in soil testing results. This optimizes the configuration of sampling points and improves the reliability and accuracy of testing.
[0128] It should be noted that, in the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0129] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0133] Although preferred embodiments of the present invention have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts become known.
[0134] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the present invention and its equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for detecting soil for Chinese herbal medicine planting, characterized in that: The method comprises: Divide the target soil area, collect slope parameters and light parameters for the divided multiple soil grids, obtain slope parameter distribution and light parameter distribution, and collect Chinese herbal medicine growth parameters in the target soil area over a historical period to obtain a historical growth parameter distribution; According to the light parameter distribution, the historical growth parameter distribution is impact compensated to obtain a compensated growth parameter distribution, and nutrient consumption is classified to obtain the actual soil nutrient distribution of the target soil area before the current fallow or soil addition; Performing unevenness analysis on multiple soil grids based on the slope parameter distribution to obtain grid unevenness distribution, and performing unevenness analysis on the target soil region based on the illumination parameter distribution and actual soil nutrient distribution to obtain regional unevenness, including: According to the slope parameter distribution, an average slope parameter is calculated; Calculating the ratio of each slope parameter to the average slope parameter to obtain a plurality of grid unevennesses and obtain a grid unevenness distribution; Calculating the standard deviation of the light parameters and the standard deviation of the soil nutrients according to the light parameter distribution and the actual soil nutrient distribution; Calculating the regional illumination unevenness and the regional nutrient unevenness according to the illumination parameter standard deviation and the soil nutrient standard deviation, and calculating the regional unevenness; Optimizing the soil detection point settings of the plurality of soil grids according to the unevenness distribution and the regional unevenness to obtain an optimized soil detection point distribution, performing soil sampling and detection, and obtaining soil detection results, including: Randomly setting sampling points in the plurality of soil grids according to the total number of sampling points, and obtaining the number of first grid sampling points and the coordinate distribution of the first sampling points in the plurality of soil grids as the first soil detection point distribution; According to the grid unevenness distribution and the regional unevenness, the first soil detection adaptability of the first soil detection point distribution is calculated as follows: ; Among them, SLFIT is soil test fitness, and is the weight, M is the number of soil grids, is the number of grid sampling points of the i-th soil grid, is the grid unevenness of the i-th soil grid, KQ is the regional unevenness, is the standard deviation of the number of grid sampling points within multiple soil grids; Continue to randomly set sampling points in the multiple soil grids, optimize the detection point settings, obtain the optimal soil detection point distribution, perform soil sampling and detection, and obtain soil detection results.
2. The method for detecting soil for planting Chinese herbal medicine according to claim 1, characterized in that: The target soil area is divided, and slope parameters and light parameters are collected for the divided multiple soil grids to obtain slope parameter distribution and light parameter distribution. The growth parameters of Chinese herbal medicines in the target soil area over a historical period are collected to obtain a historical growth parameter distribution, including: Divide the target soil area to obtain multiple soil grids; Collecting slope parameters and illumination parameters of the plurality of soil grids to obtain a plurality of slope parameters and a plurality of illumination parameters, wherein the illumination parameters include illumination time within each soil grid; According to the coordinates of the plurality of soil grids, a plurality of slope parameters and a plurality of light parameters are combined to construct a slope parameter distribution and a light parameter distribution; The growth parameters of the target soil area during the last planting of Chinese herbal medicines in the historical period are collected to obtain a plurality of historical growth parameters and to construct a distribution of historical growth parameters.
3. The method for detecting soil for planting Chinese herbal medicine according to claim 1, characterized in that: Compensating the historical growth parameter distribution for its impact according to the illumination parameter distribution to obtain a compensated growth parameter distribution includes: Based on the historical growth monitoring data of Chinese herbal medicines, a sample light parameter set and a sample growth parameter set are collected. The growth parameters under the same growth conditions and standard light parameters are collected and annotated to obtain a sample compensation growth parameter set. Constructing a growth compensation channel, using the sample illumination parameter set, the sample growth parameter set, and the sample compensation growth parameter set, and training the growth compensation channel until it meets the requirements, wherein the growth compensation channel is constructed using machine learning; The illumination parameters and historical growth parameters of the same soil grid within the illumination parameter distribution and historical growth parameter distribution are combined, input into the growth compensation channel, and output to obtain a compensated growth parameter distribution.
4. The method for detecting soil for planting Chinese herbal medicine according to claim 1, characterized in that: Classify nutrient consumption and process the actual soil nutrient distribution of the target soil area before current fallow or soil addition, including: Inputting the plurality of compensation growth parameters in the compensation growth parameter distribution into a nutrient consumption classification table respectively to obtain a plurality of nutrient consumption parameters by classification, wherein the nutrient consumption classification table is constructed based on a mapping relationship between the sample compensation growth parameters and the sample nutrient consumption parameters; Obtaining historical soil nutrient parameter distribution of the target soil area before the last planting of Chinese herbal medicine; By subtracting the corresponding nutrient consumption parameter from each historical soil nutrient parameter in the historical soil nutrient parameter distribution, a plurality of actual soil nutrient parameters of the target soil area before current fallow or soil addition are obtained to construct the actual soil nutrient distribution.
5. A Chinese herbal medicine planting soil detection system, characterized in that: Used to perform the method according to any one of claims 1 to 4, comprising: A data acquisition module is used to divide the target soil area and collect slope parameters and light parameters for the divided multiple soil grids to obtain slope parameter distribution and light parameter distribution, and collect Chinese herbal medicine growth parameters in the target soil area over a historical period to obtain a historical growth parameter distribution; A soil nutrient analysis module is used to compensate for the impact of the historical growth parameter distribution based on the light parameter distribution to obtain a compensated growth parameter distribution, classify nutrient consumption, and process to obtain the actual soil nutrient distribution of the target soil area before the current fallow or soil addition; an unevenness analysis module for performing unevenness analysis on a plurality of soil grids based on the slope parameter distribution to obtain a grid unevenness distribution, and performing unevenness analysis on the target soil region based on the illumination parameter distribution and the actual soil nutrient distribution to obtain a regional unevenness; The optimization output module is used to optimize the soil detection point settings of the multiple soil grids according to the unevenness distribution and regional unevenness, obtain the optimized soil detection point distribution, perform soil sampling and detection, and obtain soil detection results.
Citation Information
Patent Citations
Method for determining spatial distribution of suitable transplanting period of flue-cured tobacco in complicated hilly area
CN104851048A
Soil nutrient prediction and comprehensive evaluation method based on machine learning algorithm
CN109374860A