Vehicle-mounted soil nutrient detection method and device based on soil spectral data classification
By collecting soil near-infrared spectral data on vehicle-mounted equipment and using spectral clustering algorithms and detection models, the problem of low detection accuracy of soil spectral data is solved, and high accuracy detection of soil total nitrogen and organic matter content is achieved.
Patent Information
- Application Number
- CN202510113703.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-24
Smart Images

Figure CN119555633B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of soil detection, and in particular to a vehicle-mounted soil nutrient detection method and device based on soil spectral data classification. Background Art
[0002] The growth and reproduction of crops cannot be separated from the supply of nutrients such as total nitrogen and organic matter in the soil. Accurate, rapid and effective detection of soil total nitrogen and organic matter content is of great significance in guiding the planting of crops.
[0003] Near-infrared spectroscopy is one of the common spectral analysis methods. It can reflect the combined frequency and double frequency information of CH, NH and other groups in the soil. It also has the characteristics of large light spot and rich information. Therefore, it is used in vehicle-mounted equipment to detect soil total nitrogen and organic matter.
[0004] However, in the actual detection process, the accuracy of the test results obtained by testing the total nitrogen and organic matter content in the soil based on the soil spectral data collected by the spectrometer is low, which leads to poor detection results. Summary of the invention
[0005] The present invention provides a vehicle-mounted soil nutrient detection method and device based on soil spectral data classification, which is used to solve the technical problem in the prior art that the detection effect of total nitrogen and organic matter content in the soil at the current location (i.e., farmland in situ) based on soil spectral data is poor.
[0006] The present invention provides a vehicle-mounted soil nutrient detection method based on soil spectral data classification, comprising the following steps:
[0007] Collect soil near-infrared spectral data of the current soil in the farmland area to be tested by using vehicle-mounted equipment;
[0008] Based on the soil near-infrared spectrum data, obtaining the combined frequency and double frequency information of the CH molecular group of the soil at the current location in the tested farmland area, and the combined frequency and double frequency information of the NH molecular group;
[0009] Based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, first spectrum difference information is obtained, and based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be measured, second spectrum difference information is obtained;
[0010] Determining the similarity of the soil near-infrared spectrum data based on the first spectrum difference information and the second spectrum difference information;
[0011] Based on the similarity of the soil near-infrared spectral data, the soil near-infrared spectral data are analyzed by a spectral clustering algorithm to obtain a plurality of different soil near-infrared spectral data subsets;
[0012] Based on the multiple different soil near-infrared spectral data subsets, a soil nutrient detection result is obtained through a farmland soil nutrient detection model; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection result includes the total nitrogen content and organic matter content of the soil at the current location.
[0013] According to a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention, the soil nutrient detection result is obtained through a farmland soil nutrient detection model based on the multiple different soil near-infrared spectral data subsets, including:
[0014] Inputting each soil near-infrared spectral data subset into a plurality of different soil nutrient primary detection models respectively, and obtaining weights of a plurality of different spectral bands output by the plurality of different soil nutrient primary detection models;
[0015] Performing pooling calculation on the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models to obtain an average weight of each spectral band;
[0016] The average weight of each spectral band is input into the soil nutrient secondary detection model to obtain the soil nutrient detection result.
[0017] According to a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention, the soil near-infrared spectral data of the soil at the current location in the farmland area to be tested is collected by the vehicle-mounted equipment, including:
[0018] The soil detection unit and the soil breaking unit are cleaned by a pneumatic dust blowing gun to remove the surface loose soil of the soil detection unit and the soil breaking unit, and the length of the rake nails in the soil breaking unit is determined according to a preset soil breaking depth;
[0019] The soil-breaking unit after starting the tractor to remove the surface soil and determining the length of the rake nails moves forward in the farmland area to be tested, crushes the soil blocks in the farmland area to be tested, and presses part of the crop straw and rhizomes into the ground, preliminarily removes the soil particles, part of the crop straw and rhizomes to obtain a flat ground;
[0020] The soil detection unit after removing the surface soil collects soil near-infrared spectrum data of the soil sample in the farmland area to be tested on the flat ground to obtain soil near-infrared spectrum data of the soil at the current location in the farmland area to be tested.
[0021] According to a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention, the steps of constructing the farmland soil nutrient detection model include:
[0022] The vehicle-mounted equipment is used to collect soil near-infrared spectral data at various locations within the tested farmland area, and the true value of farmland soil detection at various locations within the tested farmland area is obtained through standard detection methods;
[0023] Based on the soil near-infrared spectrum data, data analysis is performed by using a spectral clustering algorithm to divide the soil near-infrared spectrum data into multiple categories of soil near-infrared spectrum data subsets;
[0024] Using each category of soil near-infrared spectral data subset as a training set and the farmland soil detection true value corresponding to each category of soil near-infrared spectral data subset as a label, multiple different soil nutrient primary detection models are trained respectively to obtain the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models and the trained soil nutrient primary detection models;
[0025] Performing pooling calculation on the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models to obtain an average weight of each spectral band;
[0026] Based on the average weight of each spectral band, the soil nutrient secondary detection model is trained to obtain a trained soil nutrient secondary detection model;
[0027] The farmland soil nutrient detection model is constructed using the trained soil nutrient primary detection model and the trained soil nutrient secondary detection model.
[0028] According to a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention, the soil nutrient primary detection model includes a support vector machine, XGBoost, a least squares regression model and a random forest.
[0029] According to a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention, the soil nutrient secondary detection model is any one of an artificial neural network, a least squares regression model or a random forest.
[0030] The present invention also provides a vehicle-mounted soil nutrient detection device based on soil spectral data classification, comprising the following modules:
[0031] A collection module, used to collect soil near-infrared spectral data of the current location of the soil in the farmland area to be tested through a vehicle-mounted device;
[0032] The first analysis module is used to obtain the composite frequency and multiple frequency information of the CH molecular group and the composite frequency and multiple frequency information of the NH molecular group of the soil at the current location in the tested farmland area based on the soil near-infrared spectrum data;
[0033] The second analysis module is used to obtain the first spectrum difference information based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, and obtain the second spectrum difference information based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be measured;
[0034] A determination module, configured to determine the similarity of the soil near-infrared spectrum data based on the first spectrum difference information and the second spectrum difference information;
[0035] A spectral clustering module, used for analyzing the soil near-infrared spectral data by a spectral clustering algorithm based on the similarity of the soil near-infrared spectral data to obtain a plurality of different soil near-infrared spectral data subsets;
[0036] A detection module is used to obtain soil nutrient detection results based on the multiple different soil near-infrared spectral data subsets through a farmland soil nutrient detection model; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection results include the total nitrogen content and organic matter content of the soil at the current location.
[0037] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the vehicle-mounted soil nutrient detection method based on soil spectral data classification as described in any one of the above is implemented.
[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the vehicle-mounted soil nutrient detection method based on soil spectral data classification as described in any one of the above is implemented.
[0039] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the vehicle-mounted soil nutrient detection method based on soil spectral data classification as described above is implemented.
[0040] The present invention provides a vehicle-mounted soil nutrient detection method based on soil spectral data classification, which collects soil near-infrared spectral data of soil at a current location in a farmland area to be tested by a vehicle-mounted device; then, based on the soil near-infrared spectral data, obtains the combined frequency and double frequency information of CH molecular groups and the combined frequency and double frequency information of NH molecular groups of the soil at the current location in the farmland area to be tested; then, based on the combined frequency and double frequency information of the CH molecular groups and the combined frequency and double frequency information of the NH molecular groups, obtains first spectral difference information, and, based on the topography, soil particle size and soil moisture content of the soil at the current location in the farmland area to be tested, obtains second spectral difference information; then, the similarity of the soil near-infrared spectral data is determined according to the first spectral difference information and the second spectral difference information; then, the soil near-infrared spectral data is analyzed by a spectral clustering algorithm, and the soil near-infrared spectral data is divided into a plurality of different soil near-infrared spectral data subsets, thereby improving the accuracy and scientificity of data division; then, based on the plurality of different soil near-infrared spectral data subsets, the total nitrogen content and organic matter content of the soil at the current location are accurately and real-time output through a farmland soil nutrient detection model, thereby improving the detection effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 It is a flow chart of a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention.
[0043] Figure 2 It is a schematic diagram of farmland soil nutrient detection model training in a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention.
[0044] Figure 3 It is a structural schematic diagram of a vehicle-mounted soil nutrient detection system based on soil spectral data classification provided by the present invention.
[0045] Figure 4 It is a schematic diagram of the internal structure of the soil detection module provided by the present invention.
[0046] Figure 5 It is a structural schematic diagram of a vehicle-mounted soil nutrient detection device based on soil spectral data classification provided by the present invention.
[0047] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0048] In order to meet the actual needs of farmland production, the vehicle-mounted farmland nutrient detection platform and system have good application prospects in adapting to large plots of land, refined planting needs, etc. However, in the actual production process, due to factors such as crop residues, uneven irrigation, and farming habits, the soil nutrient detection results often fluctuate.
[0049] Near infrared spectroscopy is one of the common spectral analysis methods. Because it can reflect the combined frequency and double frequency information of groups such as CH and NH, and it has the characteristics of large light spot and rich information, it is used on vehicle-mounted equipment to detect soil total nitrogen and organic matter. However, in the actual detection process, due to the differences in soil texture, parent material, and state, the corresponding soil spectrum will have large deviations. For example, the reflective scales on crop residues cause noise in the spectrum; the irrigation method causes different soil moisture content, which in turn causes spectral baseline drift or the submergence of some band information. A single detection model has only limited fitting capabilities, which makes the detection of soil nutrients face various problems and challenges.
[0050] At present, the common solution is to filter out the noise in various types of spectral information through preprocessing to obtain stable and reliable spectral information. However, with the development of a large number of studies, it is found that the abuse of preprocessing methods causes the loss of key information in the original spectrum, which in turn leads to low accuracy of the obtained test results, affecting the effect of soil nutrient detection.
[0051] In order to solve the above problems, the present invention provides a vehicle-mounted soil nutrient detection method based on soil spectral data classification, and applies this method to propose a vehicle-mounted soil nutrient detection system based on soil spectral data classification. The system includes mechanical carriers such as tractors, soil-breaking units, detection and positioning wheels, soil detection units, and pneumatic dust blowers. The vehicle-mounted soil nutrient detection method based on soil spectral data classification in this system can classify and process soil spectral data according to spectral similarity (i.e., situations where influencing factors are consistent or similar), and ultimately achieve more accurate and efficient detection and analysis of vehicle-mounted soil organic matter and total nitrogen content.
[0052] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] Combine the following Figures 1 to 6 The present invention describes a vehicle-mounted soil nutrient detection method and device based on soil spectral data classification.
[0054] Figure 1 FIG. 1 is a flow chart of a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0055] Step 101: collect soil near-infrared spectrum data of the current location of the soil in the farmland area to be tested by using a vehicle-mounted device.
[0056] Specifically, a vehicle-mounted device (such as a tractor) travels in the farmland area to be tested. During the travel, a near-infrared spectrometer installed on the vehicle-mounted device collects soil near-infrared spectral data of the current location (i.e., the farmland in situ) in real time.
[0057] Since the near infrared spectrum can reflect the combined frequency and double frequency information of CH, NH and other groups in the soil, and also has the characteristics of large light spot and rich information, in the embodiment of the present invention, in order to fully obtain the spectral information of total nitrogen and organic matter in the soil, a near infrared spectrometer is selected to collect the soil spectral data of the current soil in real time.
[0058] At the same time, in order to improve the accuracy and stability of the near-infrared spectrometer, before using the near-infrared spectrometer to collect soil spectral data of various soils, the near-infrared spectrometer can also be initialized and calibrated using a black and white background block, that is, the response value of the near-infrared spectrometer is calibrated and converted into the corresponding light intensity value. The initialization calibration process is as follows:
[0059] (1) Set up black and white background blocks: usually black and white standard reflectance plates, used to calibrate the response value of the spectrometer;
[0060] (2) Check the optical path: Check and clean the dust or impurities in the optical path of the near-infrared spectrometer to prevent dust or impurities from affecting the measurement results;
[0061] (3) Initialization calibration: First measure the near-infrared spectrometer against a white standard reflectance plate, and then measure it against a black standard reflectance plate to obtain the corresponding response value;
[0062] (4) Calculation of correction coefficient: The black and white correction coefficient is calculated based on the measurement results and used to convert the near-infrared spectrometer response value into a light intensity value.
[0063] By using black and white background blocks to initialize and calibrate the near-infrared spectrometer, the changes in the response value of the near-infrared spectrometer caused by factors such as time change and temperature change can be eliminated, thereby improving the accuracy and stability of the near-infrared spectrometer when collecting soil near-infrared spectral data.
[0064] Step 102: Based on the soil near-infrared spectrum data, obtain the composite frequency and multiple frequency information of the CH molecular group and the composite frequency and multiple frequency information of the NH molecular group of the soil at the current location in the farmland area to be tested.
[0065] Specifically, the soil near-infrared spectral data collected by the near-infrared spectrometer, in which the spectral peaks can reflect the chemical bonds of various molecules, including the sum and multiple frequency information of molecular groups such as CH and NH, thereby indirectly reflecting the nutrient information such as organic matter and total nitrogen in the soil.
[0066] Step 103: obtaining first spectral difference information based on the composite frequency and double frequency information of the CH molecular group and the composite frequency and double frequency information of the NH molecular group, and obtaining second spectral difference information based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be measured.
[0067] Specifically, due to the different nutrients such as organic matter and total nitrogen in the soil, the corresponding spectral bands of the near-infrared spectrum are different, and the difference in the spectral bands is the first spectral difference information.
[0068] At the same time, when the vehicle-mounted equipment (such as a tractor) is moving in the farmland area to be tested, due to factors such as the undulating terrain of the farmland, different soil particle sizes (such as clods of earth, sand and gravel), and uneven distribution of soil moisture content at different locations in the farmland due to irrigation methods, different spectral bands will appear in the data collected by the near-infrared spectrometer, which is the second spectral difference information.
[0069] Step 104: Determine the similarity of the soil near-infrared spectrum data based on the first spectrum difference information and the second spectrum difference information.
[0070] Step 105: Based on the similarity of the soil near-infrared spectrum data, the soil near-infrared spectrum data is analyzed by a spectral clustering algorithm to obtain a plurality of different soil near-infrared spectrum data subsets.
[0071] Specifically, based on the first spectrum difference information and the second spectrum difference information, the spectrum bands in the soil near infrared spectrum data are analyzed to determine the similarity of the soil near infrared spectrum data.
[0072] Based on the similarity of soil near-infrared spectral data, a similarity matrix of soil near-infrared spectral data is constructed, and the soil near-infrared spectral data is divided by a spectral clustering algorithm. The data with a similarity greater than or equal to a preset threshold are divided into the same soil near-infrared spectral data subset, and the data with a similarity less than the preset threshold are divided into different soil near-infrared spectral data subsets, thereby obtaining multiple different soil near-infrared spectral data subsets.
[0073] The embodiment of the present invention combines the first spectral difference information of soil chemical properties (the combined frequency and double frequency information of molecular groups such as CH and NH in the soil) reflected in the soil near-infrared spectral data and the second spectral difference information of soil physical properties (undulating terrain, different soil particle sizes and uneven distribution of soil moisture content) reflected in the soil near-infrared spectral data to determine the degree of similarity, thereby scientifically and accurately dividing the soil near-infrared spectral data through a spectral clustering algorithm, thereby improving the accuracy of subsequent models in soil nutrient detection.
[0074] Step 106: Based on the multiple different soil near-infrared spectral data subsets, a soil nutrient detection result is obtained through a farmland soil nutrient detection model; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection result includes the total nitrogen content and organic matter content of the soil at the current location.
[0075] Specifically, Figure 2 FIG. 1 is a schematic diagram of a farmland soil nutrient detection model training in a vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the present invention, such as Figure 2 shown.
[0076] Firstly, various soil samples (original soil samples) in the farmland are preprocessed by crushing soil blocks, removing sand and stones, and removing crop straw. Then, a near-infrared spectrometer is used for spectral scanning to obtain corresponding spectral data sets with various soil spectral characteristics (i.e., soil near-infrared spectral data). Then, based on the similarity of the soil near-infrared spectral data, the spectral data are classified by a spectral clustering algorithm to divide the soil near-infrared spectral data into multiple different near-infrared spectral data subsets (e.g., spectral data subset 1, spectral data subset 2, spectral data subset 3, and spectral data subset 4, etc.), so as to train the soil nutrient primary detection model (i.e., Figure 2 The first-level detection model in the soil nutrient system) and the second-level detection model of soil nutrients (i.e. Figure 2 The trained soil nutrient primary detection model and the trained soil nutrient secondary detection model are used to construct a farmland soil nutrient detection model.
[0077] A plurality of different soil near-infrared spectral data subsets are input into the farmland soil nutrient detection model, and the soil nutrient detection results are output through the farmland soil nutrient detection model. The soil nutrient detection results include the total nitrogen content and organic matter content of the soil.
[0078] The embodiment of the present invention inputs soil spectral data into a trained farmland soil nutrient detection model corresponding to the category of the soil spectral data, and outputs the soil nutrient detection results in real time through the farmland soil nutrient detection model. On the basis of retaining the key information in the original spectrum, the trained farmland soil nutrient detection model corresponding to the category of the soil spectral data is used to perform targeted soil nutrient detection on this type of soil, thereby improving the accuracy and real-time performance of the detection of nutrient contents such as total nitrogen and organic matter in the soil.
[0079] The present invention provides a vehicle-mounted soil nutrient detection method based on soil spectrum data classification, which collects soil near-infrared spectrum data of the current location soil in the farmland area to be tested by a vehicle-mounted device; then, based on the soil near-infrared spectrum data, obtains the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group of the current location soil in the farmland area to be tested; then, based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, obtains the first spectrum difference information, and based on the topography, soil particles, and the soil at the current location soil in the farmland area to be tested, obtains the first spectrum difference information. The method uses a spectral clustering algorithm to analyze the soil near-infrared spectral data and divide the soil near-infrared spectral data into a plurality of different soil near-infrared spectral data subsets, thereby improving the accuracy and scientificity of the data division; and based on a plurality of different soil near-infrared spectral data subsets, the farmland soil nutrient detection model is used to accurately and real-time output the total nitrogen content and organic matter content of the soil at the current location, thereby improving the soil nutrient detection effect.
[0080] Optionally, the obtaining of soil nutrient detection results based on the multiple different soil near-infrared spectral data subsets through a farmland soil nutrient detection model includes:
[0081] Inputting each soil near-infrared spectral data subset into a plurality of different soil nutrient primary detection models respectively, and obtaining weights of a plurality of different spectral bands output by the plurality of different soil nutrient primary detection models;
[0082] Performing pooling calculation on the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models to obtain an average weight of each spectral band;
[0083] The average weight of each spectral band is input into the soil nutrient secondary detection model to obtain the soil nutrient detection result.
[0084] Specifically, the farmland soil nutrient detection model is constructed based on the trained soil nutrient primary detection model and the trained soil nutrient secondary detection model.
[0085] In the process of soil nutrient detection, first, each soil near-infrared spectral data subset is input into multiple different soil nutrient primary detection models to obtain the weights of multiple different spectral bands output by multiple different soil nutrient primary detection models; then, the weights of multiple different spectral bands output by multiple different soil nutrient primary detection models are pooled to obtain the average weight of each spectral band; finally, the average weight of each spectral band is input into the soil nutrient secondary detection model, and the soil nutrient detection results are output through the soil nutrient secondary detection model (see Figure 2 ), soil nutrient test results include the total nitrogen content and organic matter content of the soil at the current location.
[0086] The embodiment of the present invention inputs a scientifically divided subset of soil near-infrared spectral data into a primary soil nutrient detection model, calculates the weights of multiple different spectral bands output by the primary soil nutrient detection model, and then performs pooling calculation on the weights of multiple different spectral bands. The calculated average weight is further input into a secondary soil nutrient detection model, thereby obtaining the total nitrogen content and organic matter content of the soil at the current location output by the secondary soil nutrient detection model, and performing two-level detection (i.e., detection by the primary soil nutrient detection model and the secondary soil nutrient detection model) through the farmland soil nutrient detection model, thereby improving the accuracy of soil nutrient detection.
[0087] Optionally, collecting soil near-infrared spectral data of the current location soil in the farmland area to be tested by using the vehicle-mounted equipment includes:
[0088] The soil detection unit and the soil breaking unit are cleaned by a pneumatic dust blowing gun to remove the surface loose soil of the soil detection unit and the soil breaking unit, and the length of the rake nails in the soil breaking unit is determined according to a preset soil breaking depth;
[0089] The soil-breaking unit after starting the tractor to remove the surface soil and determining the length of the rake nails moves forward in the farmland area to be tested, crushes the soil blocks in the farmland area to be tested, and presses part of the crop straw and rhizomes into the ground, preliminarily removes the soil particles, part of the crop straw and rhizomes to obtain a flat ground;
[0090] The soil detection unit after removing the surface soil collects soil near-infrared spectrum data of the soil sample in the farmland area to be tested on the flat ground to obtain soil near-infrared spectrum data of the soil at the current location in the farmland area to be tested.
[0091] Specifically, Figure 3 FIG. 1 is a schematic diagram of the structure of a vehicle-mounted soil nutrient detection system based on soil spectral data classification provided by the present invention. Figure 3 The system at least includes a mechanical carrier, a pneumatic dust blower, a soil breaking unit and a soil detection unit.
[0092] Mechanical vehicles (including tractors, harvesters, etc.) are mainly used to mount soil-breaking units and soil detection units, and to transmit power to the soil-breaking units; pneumatic dust blowers are installed on mechanical vehicles to clean the residual soil on the surface of the soil-breaking units and the loose soil on the soil detection units; the soil-breaking units are used to break up and level the surface soil of farmland, and the larger soil blocks can be crushed through the adjustable rake nails embedded thereon to form a fine soil structure, ultimately constructing a flat ground that is convenient for the soil detection unit to detect.
[0093] The soil detection unit is used to collect, calculate, record, and transmit soil near-infrared spectral data. It specifically includes two parts: a positioning wheel and a soil detection module. The positioning wheel is a mechanism used to connect and fix the soil detection module, which can ensure that the soil detection module can change with the terrain and its height from the ground is constant (i.e., the positioning wheel radius height). The soil detection module is specifically responsible for the corresponding calculation and processing operations. Figure 4 FIG. 1 is a schematic diagram of the internal structure of the soil detection module provided by the present invention. Figure 4 As shown, the soil detection module includes at least a battery pack, a power management module, a positioning module, an interaction module, a calculation and control module and a spectrum acquisition module.
[0094] The battery pack is used to provide energy for the entire soil detection module, which can be charged by a mechanical vehicle; the power management module provides adaptive energy supply (such as appropriate voltage, current, etc.) for each module in the entire soil detection module; the positioning module obtains the operating position of the tractor vehicle, and the total nitrogen and organic matter in the soil detected can be bound to the geographical location by triggering the positioning module; the interaction module refers to the formulation and issuance of control instructions, as well as human-computer interaction (such as feedback on instructions) and other operations; the calculation and control module is used to receive and process control instructions, regularly receive soil near-infrared spectral data and perform model training through a timing switch, and use the trained model to perform soil detection, etc.; the spectral acquisition module includes a near-infrared spectrometer, a light source, a collimator and a lens. The near-infrared spectrometer is used to collect and obtain soil near-infrared spectral data, the light source is used to generate stable, uniform and continuous light signals, the collimator is used to converge light and adjust the direction and angle of light to ensure that the light signal enters the near-infrared spectrometer, and the lens is used to receive light signals.
[0095] When collecting soil near-infrared spectral data of the soil at the current location in the farmland area to be tested by means of a vehicle-mounted device (i.e., a mechanical vehicle), first, the soil detection unit and the soil-breaking unit are cleaned by means of a pneumatic dust blower to remove the surface loose soil of the soil detection unit and the soil-breaking unit, and the length of the rake nails in the soil-breaking unit is determined according to a preset soil-breaking depth; then, the soil-breaking unit is driven by a tractor to remove the surface loose soil and determine the rake nail length, and the soil clods in the farmland area to be tested are crushed, and part of the crop straw and rhizomes are pressed into the ground, and soil particles, part of the crop straw and rhizomes are preliminarily removed to obtain a flat ground; finally, soil near-infrared spectral data of the soil sample in the farmland area to be tested is collected on the flat ground by means of the soil detection unit after removing the surface loose soil, and soil near-infrared spectral data of the soil at the current location in the farmland area to be tested is obtained.
[0096] The embodiment of the present invention collects soil near-infrared spectral data of the current location of the soil in the farmland area to be tested through a vehicle-mounted device, so that the soil near-infrared spectral data can fully reflect the undulating terrain of the farmland, different soil particle sizes and uneven distribution of soil moisture content, thereby improving the scientificity and accuracy of the subsequent division of soil near-infrared spectral data, and further improving the effect of the model on soil nutrient detection.
[0097] Optionally, the steps of constructing the farmland soil nutrient detection model include:
[0098] The vehicle-mounted equipment is used to collect soil near-infrared spectral data at various locations within the tested farmland area, and the true value of farmland soil detection at various locations within the tested farmland area is obtained through standard detection methods;
[0099] Based on the soil near-infrared spectrum data, data analysis is performed by using a spectral clustering algorithm to divide the soil near-infrared spectrum data into multiple categories of soil near-infrared spectrum data subsets;
[0100] Using each category of soil near-infrared spectral data subset as a training set and the farmland soil detection true value corresponding to each category of soil near-infrared spectral data subset as a label, multiple different soil nutrient primary detection models are trained respectively to obtain the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models and the trained soil nutrient primary detection models;
[0101] Performing pooling calculation on the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models to obtain an average weight of each spectral band;
[0102] Based on the average weight of each spectral band, the soil nutrient secondary detection model is trained to obtain a trained soil nutrient secondary detection model;
[0103] The farmland soil nutrient detection model is constructed using the trained soil nutrient primary detection model and the trained soil nutrient secondary detection model.
[0104] Specifically, the steps for constructing the farmland soil nutrient detection model include:
[0105] First, through vehicle-mounted equipment (i.e. mechanical carrier, see Figure 3 ) Collect soil near-infrared spectrum data at various locations in the farmland area to be tested, and obtain the true value of farmland soil detection at various locations in the farmland area to be tested through standard detection methods;
[0106] Then, based on the soil near-infrared spectral data, the spectral clustering algorithm was used to analyze the data and divide the soil near-infrared spectral data into multiple categories of soil near-infrared spectral data subsets. For example, according to the difference information reflected in the soil near-infrared spectral data of organic matter, total nitrogen, soil clods, sand and gravel, water and crop residues contained in the original soil samples (including the first spectrum difference information and the second spectrum difference information), it was initially divided into four spectral data subsets (see Figure 2 );
[0107] Then, each category of soil near-infrared spectral data subset is used as a training set, and the farmland soil detection true value corresponding to each category of soil near-infrared spectral data subset is used as a label to train multiple different soil nutrient primary detection models, and the weights of multiple different spectral bands output by multiple different soil nutrient primary detection models and the trained soil nutrient primary detection models are obtained (see Figure 2 );
[0108] Then, the weights of multiple spectral bands output by multiple different soil nutrient primary detection models are pooled to obtain the average weight of each spectral band (see Figure 2 );
[0109] Then, based on the average weight of each spectral band, the soil nutrient secondary detection model is trained to obtain the trained soil nutrient secondary detection model (see Figure 2 );
[0110] Finally, the farmland soil nutrient detection model was constructed with the trained soil nutrient primary detection model and the trained soil nutrient secondary detection model (see Figure 2 ).
[0111] The embodiment of the present invention trains a soil nutrient primary detection model and a soil nutrient secondary detection model, and combines the trained soil nutrient primary detection model and the trained soil nutrient secondary detection model to construct a farmland soil nutrient detection model, thereby forming a two-level detection mode for soil nutrients. This enables the model to make full use of soil near-infrared spectral data and improves the accuracy of soil nutrient detection.
[0112] Optionally, the soil nutrient primary detection model includes support vector machine, XGBoost, least squares regression model and random forest.
[0113] Specifically, the soil nutrient primary detection model used in the embodiment of the present invention includes support vector machine, XGBoost, least squares regression model and random forest, such as Figure 2 As shown, the support vector machine, XGBoost, least squares regression model and random forest correspond to Figure 2 The first-level detection model 1, the first-level detection model 2, the first-level detection model 3 and the first-level detection model 4 are in no particular order.
[0114] During model training, each spectral data subset is input into four soil nutrient primary detection models respectively. The four soil nutrient primary detection models output the weights of multiple different spectral bands. Then the weight of each spectral band is pooled to obtain the average weight of each spectral band as the input to the soil nutrient secondary detection model, thereby forming a two-level detection of soil nutrients as a whole and improving the accuracy of soil nutrient detection.
[0115] Optionally, the soil nutrient secondary detection model is any one of an artificial neural network, a least squares regression model or a random forest.
[0116] Specifically, the soil nutrient secondary detection model can be any one of an artificial neural network, a least squares regression model or a random forest.
[0117] In an embodiment of the present invention, the secondary soil nutrient detection model uses the average weight of each spectral band as input, and fully utilizes the difference information (including the first spectral difference information and the second spectral difference information) of organic matter, total nitrogen, soil clods, sand, water and crop residues contained in the soil reflected in the soil near-infrared spectral data to achieve accurate and real-time detection of soil nutrients, thereby improving the effect of soil nutrient detection.
[0118] The following is a description of a vehicle-mounted soil nutrient detection device based on soil spectral data classification provided by the present invention. The vehicle-mounted soil nutrient detection device based on soil spectral data classification described below and the vehicle-mounted soil nutrient detection method based on soil spectral data classification described above can be referenced to each other.
[0119] Based on any of the above embodiments, Figure 5 is a structural schematic diagram of a vehicle-mounted soil nutrient detection device based on soil spectral data classification provided by the present invention, such as Figure 5 The embodiment of the present invention provides a vehicle-mounted soil nutrient detection device based on soil spectral data classification, including a collection module 501, a first analysis module 502, a second analysis module 503, a determination module 504, a spectrum clustering module 505 and a detection module 506, wherein:
[0120] The acquisition module 501 is used to collect soil near-infrared spectrum data of the current location of the soil in the farmland area to be tested through a vehicle-mounted device; the first analysis module 502 is used to obtain the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group of the current location of the soil in the farmland area to be tested based on the soil near-infrared spectrum data; the second analysis module 503 is used to obtain the first spectrum difference information based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, and obtain the second spectrum difference information based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be tested; the determination module 504 is used to determine the difference between the first spectrum difference and the second spectrum difference based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group. The first spectral difference information and the second spectral difference information determine the similarity of the soil near-infrared spectral data; the spectral clustering module 505 is used to analyze the soil near-infrared spectral data through a spectral clustering algorithm based on the similarity of the soil near-infrared spectral data to obtain multiple different soil near-infrared spectral data subsets; the detection module 506 is used to obtain soil nutrient detection results through a farmland soil nutrient detection model based on the multiple different soil near-infrared spectral data subsets; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection results include the total nitrogen content and organic matter content of the soil at the current location.
[0121] The present invention provides a vehicle-mounted soil nutrient detection device based on soil spectrum data classification. The vehicle-mounted device collects soil near-infrared spectrum data of the soil at the current location in the farmland area to be tested. Then, based on the soil near-infrared spectrum data, the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group of the soil at the current location in the farmland area to be tested are obtained. Then, based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, the first spectrum difference information is obtained, and based on the topography, soil particles, and the soil at the current location in the farmland area to be tested, the first spectrum difference information is obtained. The method uses a spectral clustering algorithm to analyze the soil near-infrared spectral data and divide the soil near-infrared spectral data into a plurality of different soil near-infrared spectral data subsets, thereby improving the accuracy and scientificity of the data division; and based on a plurality of different soil near-infrared spectral data subsets, the farmland soil nutrient detection model is used to accurately and real-time output the total nitrogen content and organic matter content of the soil at the current location, thereby improving the soil nutrient detection effect.
[0122] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communications interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the vehicle-mounted soil nutrient detection method based on soil spectral data classification, the method comprising:
[0123] Collect soil near-infrared spectral data of the current soil in the farmland area to be tested by using vehicle-mounted equipment;
[0124] Based on the soil near-infrared spectrum data, obtaining the combined frequency and double frequency information of the CH molecular group of the soil at the current location in the tested farmland area, and the combined frequency and double frequency information of the NH molecular group;
[0125] Based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, first spectrum difference information is obtained, and based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be measured, second spectrum difference information is obtained;
[0126] Determining the similarity of the soil near-infrared spectrum data based on the first spectrum difference information and the second spectrum difference information;
[0127] Based on the similarity of the soil near-infrared spectral data, the soil near-infrared spectral data are analyzed by a spectral clustering algorithm to obtain a plurality of different soil near-infrared spectral data subsets;
[0128] Based on the multiple different soil near-infrared spectral data subsets, a soil nutrient detection result is obtained through a farmland soil nutrient detection model; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection result includes the total nitrogen content and organic matter content of the soil at the current location.
[0129] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0130] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the above methods, the method includes:
[0131] Collect soil near-infrared spectral data of the current soil in the farmland area to be tested by using vehicle-mounted equipment;
[0132] Based on the soil near-infrared spectrum data, obtaining the combined frequency and double frequency information of the CH molecular group of the soil at the current location in the tested farmland area, and the combined frequency and double frequency information of the NH molecular group;
[0133] Based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, first spectrum difference information is obtained, and based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be measured, second spectrum difference information is obtained;
[0134] Determining the similarity of the soil near-infrared spectrum data based on the first spectrum difference information and the second spectrum difference information;
[0135] Based on the similarity of the soil near-infrared spectral data, the soil near-infrared spectral data are analyzed by a spectral clustering algorithm to obtain a plurality of different soil near-infrared spectral data subsets;
[0136] Based on the multiple different soil near-infrared spectral data subsets, a soil nutrient detection result is obtained through a farmland soil nutrient detection model; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection result includes the total nitrogen content and organic matter content of the soil at the current location.
[0137] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the vehicle-mounted soil nutrient detection method based on soil spectral data classification provided by the above methods, the method comprising:
[0138] Collect soil near-infrared spectral data of the current soil in the farmland area to be tested by using vehicle-mounted equipment;
[0139] Based on the soil near-infrared spectrum data, obtaining the combined frequency and double frequency information of the CH molecular group of the soil at the current location in the tested farmland area, and the combined frequency and double frequency information of the NH molecular group;
[0140] Based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, first spectrum difference information is obtained, and based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be measured, second spectrum difference information is obtained;
[0141] Determining the similarity of the soil near-infrared spectrum data based on the first spectrum difference information and the second spectrum difference information;
[0142] Based on the similarity of the soil near-infrared spectral data, the soil near-infrared spectral data are analyzed by a spectral clustering algorithm to obtain a plurality of different soil near-infrared spectral data subsets;
[0143] Based on the multiple different soil near-infrared spectral data subsets, a soil nutrient detection result is obtained through a farmland soil nutrient detection model; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection result includes the total nitrogen content and organic matter content of the soil at the current location.
[0144] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0146] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0147] It should also be noted that the terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0148] "Determine B based on A" in the embodiments of the present application means that the factor A should be considered when determining B. It is not limited to "B can be determined based on A alone", but should also include: "Determine B based on A and C", "Determine B based on A, C and E", "Determine C based on A, and further determine B based on C", etc. In addition, it can also include taking A as a condition for determining B, for example, "When A meets the first condition, use the first method to determine B"; for another example, "When A meets the second condition, determine B", etc.; for another example, "When A meets the third condition, determine B based on the first parameter", etc. Of course, it can also be a condition that takes A as a factor for determining B, for example, "When A meets the first condition, use the first method to determine C, and further determine B based on C", etc.
[0149] In the present invention, the term "plurality" refers to two or more than two, and other quantifiers are similar to them.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle-mounted soil nutrient detection method based on soil spectral data classification, characterized in that: include: Collect soil near-infrared spectral data of the current soil in the farmland area to be tested by using vehicle-mounted equipment; Based on the soil near-infrared spectrum data, obtaining the combined frequency and double frequency information of the CH molecular group of the soil at the current location in the tested farmland area, and the combined frequency and double frequency information of the NH molecular group; Based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, first spectrum difference information is obtained, and based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be measured, second spectrum difference information is obtained; Determining the similarity of the soil near-infrared spectrum data based on the first spectrum difference information and the second spectrum difference information; Based on the similarity of the soil near-infrared spectral data, the soil near-infrared spectral data are analyzed by a spectral clustering algorithm to obtain a plurality of different soil near-infrared spectral data subsets; Based on the multiple different soil near-infrared spectral data subsets, a soil nutrient detection result is obtained through a farmland soil nutrient detection model; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection result includes a total nitrogen content and an organic matter content of the soil at the current location; The method of obtaining soil nutrient detection results based on the multiple different soil near-infrared spectral data subsets through a farmland soil nutrient detection model includes: Inputting each soil near-infrared spectral data subset into a plurality of different soil nutrient primary detection models respectively, and obtaining weights of a plurality of different spectral bands output by the plurality of different soil nutrient primary detection models; Performing pooling calculation on the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models to obtain an average weight of each spectral band; The average weight of each spectral band is input into the soil nutrient secondary detection model to obtain the soil nutrient detection result.
2. The vehicle-mounted soil nutrient detection method based on soil spectral data classification according to claim 1 is characterized in that: The soil near infrared spectrum data of the soil at the current location in the farmland area to be tested is collected by the vehicle-mounted equipment, including: The soil detection unit and the soil breaking unit are cleaned by a pneumatic dust blowing gun to remove the surface loose soil of the soil detection unit and the soil breaking unit, and the length of the rake nails in the soil breaking unit is determined according to a preset soil breaking depth; The soil-breaking unit after starting the tractor to remove the surface soil and determining the length of the rake nails moves forward in the farmland area to be tested, crushes the soil blocks in the farmland area to be tested, and presses part of the crop straw and rhizomes into the ground, preliminarily removes the soil particles, part of the crop straw and rhizomes to obtain a flat ground; The soil detection unit after removing the surface soil collects soil near-infrared spectrum data of the soil sample in the farmland area to be tested on the flat ground to obtain soil near-infrared spectrum data of the soil at the current location in the farmland area to be tested.
3. The vehicle-mounted soil nutrient detection method based on soil spectral data classification according to claim 1 is characterized in that: The steps of constructing the farmland soil nutrient detection model include: The vehicle-mounted equipment is used to collect soil near-infrared spectral data at various locations within the tested farmland area, and the true value of farmland soil detection at various locations within the tested farmland area is obtained through standard detection methods; Based on the soil near-infrared spectrum data, data analysis is performed by using a spectral clustering algorithm to divide the soil near-infrared spectrum data into multiple categories of soil near-infrared spectrum data subsets; Using each category of soil near-infrared spectral data subset as a training set and the farmland soil detection true value corresponding to each category of soil near-infrared spectral data subset as a label, multiple different soil nutrient primary detection models are trained respectively to obtain the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models and the trained soil nutrient primary detection models; Performing pooling calculation on the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models to obtain an average weight of each spectral band; Based on the average weight of each spectral band, the soil nutrient secondary detection model is trained to obtain a trained soil nutrient secondary detection model; The farmland soil nutrient detection model is constructed using the trained soil nutrient primary detection model and the trained soil nutrient secondary detection model.
4. The vehicle-mounted soil nutrient detection method based on soil spectral data classification according to claim 1 is characterized in that: The soil nutrient primary detection model includes support vector machine, XGBoost, least squares regression model and random forest.
5. The vehicle-mounted soil nutrient detection method based on soil spectral data classification according to claim 1 is characterized in that: The soil nutrient secondary detection model is any one of an artificial neural network, a least squares regression model or a random forest.
6. A vehicle-mounted soil nutrient detection device based on soil spectral data classification, characterized in that: include: A collection module, used to collect soil near-infrared spectral data of the current location of the soil in the farmland area to be tested through a vehicle-mounted device; The first analysis module is used to obtain the composite frequency and multiple frequency information of the CH molecular group and the composite frequency and multiple frequency information of the NH molecular group of the soil at the current location in the tested farmland area based on the soil near-infrared spectrum data; The second analysis module is used to obtain the first spectrum difference information based on the combined frequency and double frequency information of the CH molecular group and the combined frequency and double frequency information of the NH molecular group, and obtain the second spectrum difference information based on the topography, soil particle size and soil moisture content of the current location of the soil in the farmland area to be measured; A determination module, configured to determine the similarity of the soil near-infrared spectrum data based on the first spectrum difference information and the second spectrum difference information; A spectral clustering module, used for analyzing the soil near-infrared spectral data by a spectral clustering algorithm based on the similarity of the soil near-infrared spectral data to obtain a plurality of different soil near-infrared spectral data subsets; A detection module, for obtaining soil nutrient detection results through a farmland soil nutrient detection model based on the multiple different soil near-infrared spectral data subsets; the farmland soil nutrient detection model is constructed based on a soil nutrient primary detection model and a soil nutrient secondary detection model; the soil nutrient detection results include a total nitrogen content and an organic matter content of the soil at a current location; The method of obtaining soil nutrient detection results based on the multiple different soil near-infrared spectral data subsets through a farmland soil nutrient detection model includes: Inputting each soil near-infrared spectral data subset into a plurality of different soil nutrient primary detection models respectively, and obtaining weights of a plurality of different spectral bands output by the plurality of different soil nutrient primary detection models; Performing pooling calculation on the weights of multiple different spectral bands output by the multiple different soil nutrient primary detection models to obtain an average weight of each spectral band; The average weight of each spectral band is input into the soil nutrient secondary detection model to obtain the soil nutrient detection result.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the vehicle-mounted soil nutrient detection method based on soil spectral data classification as described in any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the vehicle-mounted soil nutrient detection method based on soil spectral data classification as described in any one of claims 1 to 5 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the vehicle-mounted soil nutrient detection method based on soil spectral data classification as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Automatic vehicle-mounted soil nutrient detection and sampling device based on near infrared spectrum technology
CN104483285A
Hyperspectral image classification method based on texture features and affine propagation cluster algorithm
CN108446582A