Soil nutrient classification method and device, electronic equipment and storage medium
By acquiring soil properties such as electrical conductivity, temperature, and spectral reflectance, performing data preprocessing and multi-sensor data fusion, and using a semi-supervised learning method for soil nutrient classification, the real-time and accuracy problems of soil nutrient detection in existing technologies are solved, and efficient soil nutrient analysis is achieved.
Patent Information
- Application Number
- CN202511646854.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies struggle to achieve real-time, continuous, and accurate soil nutrient detection, especially when there is a lack of large amounts of labeled data. Traditional machine learning is ill-suited for accurately predicting soil nutrient levels.
By acquiring soil electrical conductivity, soil temperature, and spectral reflectance, and performing data preprocessing to generate multi-channel time-series data, semi-supervised mutual learning is performed using a target feature extraction model. Combined with multi-sensor data fusion, an efficient multimodal data analysis method is adopted to classify soil nutrients.
It enables accurate and convenient soil nutrient classification in environments with few samples, solves the problem of lack of labeled data, and achieves efficient soil nutrient detection.
Smart Images

Figure CN121502468A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the fields of precision agriculture and intelligent sensing technology, and in particular to a method, device, electronic device and storage medium for soil nutrient classification. Background Technology
[0002] With the development of technology, agricultural technology is becoming increasingly intelligent. The quality of soil has a significant impact on the quality of crops. Therefore, effective soil quality testing is becoming increasingly important.
[0003] Currently, existing technologies for assessing soil quality often rely on laboratory testing to analyze soil nutrient content, making real-time, continuous monitoring difficult. Furthermore, in modern agriculture, where large amounts of labeled data are lacking, traditional machine learning struggles to accurately predict soil nutrient levels.
[0004] Furthermore, existing farmland environmental monitoring systems typically employ multi-node wireless sensor networks powered by solar energy to monitor soil temperature, humidity, and environmental parameters, wirelessly transmitting the data to a remote platform. However, these systems primarily focus on soil temperature, humidity, and meteorological indicators, exhibiting limited ability to detect soil nutrient content and making it difficult to directly obtain nutrient level information. Therefore, there is an urgent need for an accurate and convenient method to analyze soil nutrients, enabling efficient soil nutrient classification even in environments with limited sample sizes. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and storage medium for soil nutrient classification, enabling accurate and convenient analysis of soil nutrients and achieving efficient soil nutrient classification in environments with small sample sizes.
[0006] In a first aspect, embodiments of the present invention provide a method for soil nutrient classification, comprising:
[0007] Acquire soil property information of the target area within a preset time period; the soil property information includes: soil electrical conductivity, soil temperature, and spectral reflectance.
[0008] The soil property information is preprocessed to obtain preprocessed multi-channel time-series data;
[0009] Based on the target feature extraction model, the multi-channel time series data is used to extract and fuse features to obtain latent state features; the target feature extraction model is obtained by semi-supervised mutual learning of different enhanced samples obtained by performing different data augmentation processes on unlabeled samples respectively on the preset feature extraction model.
[0010] The soil nutrient classification results for the target area are determined based on the target classification model and the latent state features.
[0011] Optionally, the method further includes: imputing missing values in the soil attribute information to obtain complete soil attribute data; standardizing the soil attribute data to obtain reference soil attributes; and constructing the reference soil attributes based on a preset sliding window length to obtain multi-channel time-series data.
[0012] Optionally, the target feature extraction model includes a feature extraction sub-model and a temporal fusion sub-model. The method further includes: extracting features from the multi-channel temporal data based on the feature extraction sub-model to obtain multimodal features; and fusing the multimodal features based on the temporal fusion sub-model to obtain latent state features.
[0013] Optionally, the feature extraction sub-model includes a spectral feature sub-network and a numerical feature sub-network. The method further includes: extracting features from the spectral time-series data in the multi-channel time-series data based on the spectral feature sub-network to obtain spectral features; and extracting features from the conductivity time-series data and temperature time-series data in the multi-channel time-series data based on the numerical feature sub-network to obtain conductivity features and temperature features.
[0014] Optionally, the method further includes: splicing the spectral features, conductivity features, and temperature features in the multimodal features in the same dimension to obtain a fused feature sequence; and determining the hidden state features based on the temporal fusion sub-model and the fused feature sequence.
[0015] Optionally, the classification prediction sub-model corresponding to each preset category in the target classification model has two setting modes; mode one is that the classification prediction sub-models do not share any parameters and are set independently; mode two is that the first fully connected layer of each classification prediction sub-model shares some parameters.
[0016] Secondly, embodiments of the present invention also provide a soil nutrient classification device, the device comprising:
[0017] The soil property information acquisition module is used to acquire soil property information of a target area within a preset time period; the soil property information includes: soil electrical conductivity, soil temperature and spectral reflectance.
[0018] A multi-channel time-series data determination module is used to preprocess the soil attribute information to obtain preprocessed multi-channel time-series data.
[0019] The latent state feature determination module is used to extract and fuse features from the multi-channel time series data based on the target feature extraction model to obtain latent state features. The target feature extraction model is obtained by semi-supervised mutual learning of different enhanced samples obtained by performing different data augmentation processes on unlabeled samples.
[0020] The classification result determination module is used to determine the soil nutrient classification result of the target area based on the target classification model and the latent state features.
[0021] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0022] One or more processors;
[0023] Memory, used to store one or more programs;
[0024] When the one or more programs are executed by the one or more processors, the one or more processors implement the soil nutrient classification method as provided in any embodiment of the present invention.
[0025] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the soil nutrient classification method as provided in any embodiment of the present invention.
[0026] Fifthly, embodiments of the present invention provide a computer program product, including a computer program that, when executed by a processor, implements the soil nutrient classification method as provided in any embodiment of the present invention.
[0027] The technical solution of this invention acquires soil attribute information of a target area within a preset time period. This soil attribute information includes soil electrical conductivity, soil temperature, and spectral reflectance, avoiding reliance on data collected by a single sensor to analyze soil nutrient content, which makes real-time, continuous, and accurate detection difficult. The soil attribute information is preprocessed to obtain preprocessed multi-channel time-series data. Based on a target feature extraction model, features are extracted and fused from the multi-channel time-series data to obtain latent state features. The target feature extraction model is obtained by semi-supervised mutual learning of different enhanced samples obtained from different data augmentation processes on unlabeled samples. Multiple sensors are deployed to simultaneously collect information such as soil electrical conductivity, temperature, and spectral reflectance, and an efficient multi-sensor data fusion method is used, enabling more accurate soil nutrient classification through multimodal data. Furthermore, it solves the problem of not being able to train an accurate soil nutrient classification model when a large amount of labeled data is lacking. Based on the target classification model and the latent state features, the soil nutrient classification result of the target area is determined, thereby accurately and conveniently analyzing soil nutrients and achieving efficient soil nutrient classification in environments with few samples.
[0028] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart of a soil nutrient classification method provided in Embodiment 1 of the present invention;
[0031] Figure 2 This is a schematic diagram of the network structure of a target classification model according to Embodiment 1 of the present invention;
[0032] Figure 3 This is a flowchart of a soil nutrient classification method provided in Embodiment 2 of the present invention;
[0033] Figure 4 This is a diagram of a two-layer 1D convolutional neural network structure according to Embodiment 2 of the present invention;
[0034] Figure 5 This is a diagram of a two-layer fully connected neural network structure according to Embodiment 2 of the present invention;
[0035] Figure 6 This is a schematic diagram of the structure of a soil nutrient classification device provided in Embodiment 3 of the present invention;
[0036] Figure 7 This is a schematic diagram of the structure of an electronic device that implements the soil nutrient classification method of this invention.
[0037] Figure 8 This is a schematic diagram of the principle structure of an optional electronic device involved in implementing the soil nutrient classification method of the present invention.
[0038] Figure 9 This is a three-dimensional structural schematic diagram of an optional electronic device involved in implementing the soil nutrient classification method of the present invention. Detailed Implementation
[0039] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0041] Example 1
[0042] Figure 1 This invention provides a flowchart of a soil nutrient classification method according to Embodiment 1. This embodiment is applicable to the classification of soil nutrients within a certain area. The method can be executed by a soil nutrient classification device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0043] S110. Obtain soil property information of the target area within a preset time period; soil property information includes: soil electrical conductivity, soil temperature and spectral reflectance.
[0044] In this embodiment of the disclosure, the preset duration can refer to a pre-set time period for soil nutrient classification. The target area can refer to the area where soil nutrient classification is to be performed. The target area can be a planted field, such as a tobacco planted field. Soil attribute information can refer to various attributes of the soil within the target area collected by the sensor. Soil attribute information may also include: soil pH value, organic matter content, soil texture, soil moisture content / humidity, and soil bulk density.
[0045] Specifically, by deploying nodes integrating electrical conductivity, temperature sensors, and multi-channel spectral sensors in the target area, soil electrical conductivity, temperature, and spectral reflectance data are collected in real time, or the sensor nodes automatically collect soil property information such as soil electrical conductivity, soil temperature, and spectral reflectance from 410nm to 940nm at fixed time intervals.
[0046] S120. Perform data preprocessing on soil property information to obtain preprocessed multi-channel time series data.
[0047] In this embodiment of the disclosure, multi-channel time-series data can refer to time-series data corresponding to multimodal soil property information. Each channel of the multi-channel time-series data corresponds to one type of soil property information.
[0048] Specifically, the soil attribute information is processed by filling missing values, standard deviation (Z-Score) standardization, and time series window construction, and the preprocessed multi-channel time series data is output.
[0049] As an optional implementation of this disclosure, the soil attribute information is preprocessed to obtain preprocessed multi-channel time-series data. Specifically, this may include: imputing missing values in the soil attribute information to obtain complete soil attribute data; standardizing the soil attribute data to obtain reference soil attributes; and constructing the reference soil attributes based on a preset sliding window length to obtain multi-channel time-series data.
[0050] In this embodiment, soil attribute data can refer to discrete soil attribute information without missing values. Reference soil attributes can refer to standardized soil attribute data. The preset sliding window length can refer to a fixed-size continuous subset of data predefined on the time series data. This subset slides across the complete time series like a window, moving one or more time steps at a time, thereby dividing the entire long series into multiple consecutive, potentially overlapping, short series. The original time series data (i.e., reference soil attributes or soil attribute data) is simply a very long sequence, unsuitable for direct input into most machine learning models (such as LSTM and CNN). The sliding window, through segmentation, can generate a large number of samples with inputs and outputs.
[0051] Specifically, the interpolation methods in this embodiment can be used individually or in combination. One method is linear interpolation, which, for a specific sensor channel (such as conductivity EC or reflectivity in a certain band),... Lost data points, through adjacent time points and The observed values are linearly fitted, and the interpolated values are calculated: .in Here, x represents the observed value at the corresponding time. Secondly, model-based interpolation can employ regression models (such as elastic net regression, random forest regression, etc.) or multivariate interpolation based on the correlation between adjacent channels. For example, conductivity and temperature can be used to predict a missing spectral band value. In the training set, an interpolation model is constructed using complete samples (training a regression model). ), and perform operations on missing values during inference. To obtain the filled value.
[0052] Specifically, an autoencoder model is used to perform hyperspectral interpolation on the spectral reflectance of the input soil property information to obtain hyperspectral feature data from the soil property data. Z-Score normalization is used to eliminate dimensional and magnitude differences between different sensor channels. Z-Score normalization is performed separately for each channel (including conductivity, temperature, and reflectance in the 410nm~940nm band): Where μ is the mean of the channel on the training set, and σ is the standard deviation of the channel on the training set. If full historical data is unavailable during the experiment, a sliding window can be used to calculate the rolling mean and rolling standard deviation. After standardization, the data distribution of each channel is approximately N(0,1), which is beneficial for the convergence of the neural network during training.
[0053] Specifically, considering that soil nutrient changes are a time-series process, it is necessary to model multi-step time-series information. A preset sliding window length L is used (e.g., L=16 or 32, corresponding to data from the past 8 or 16 hours). For the current time t, the collected standardized data is chronologically segmented into time-series segments of length L: in Let i be the spectral reflectance vector in the reference soil properties. This represents the number of spectral bands. If there are fewer than L time points in the current data, the earliest data point can be repeated at the head of the queue or discarded during the training phase; in the inference phase, repeated padding is generally used.
[0054] S130. Based on the target feature extraction model, feature extraction and fusion are performed on multi-channel time series data to obtain latent state features. The target feature extraction model is obtained by using different augmented samples obtained by performing different data augmentation processes on unlabeled samples, and then performing semi-supervised mutual learning on the preset feature extraction model.
[0055] In this embodiment, the target feature extraction model can refer to a pre-trained model for feature extraction from multimodal data. The latent state feature can refer to a dynamic vector generated internally by the model when processing sequence data, used to remember and condense historical information. When processing each time point, the model not only refers to the input at the current time but also to the latent state at the previous time, then combines the two to generate a new latent state to be passed to the next time point. The latent state at the current time point can be understood as a highly condensed summary of all the information the model considers important from the beginning of the sequence to the current time point. The pre-set feature extraction model can refer to a pre-set model to be trained for feature extraction from multimodal data.
[0056] Specifically, multi-channel time-series data is input into the target feature extraction model for feature extraction and fusion to obtain latent state features. The target feature extraction model is trained based on a semi-supervised learning strategy (such as contrastive learning).
[0057] For example, semi-supervised learning strategies can also be applied to target feature extraction models and target classification models. Specifically, a semi-supervised learning strategy combining contrastive learning pre-training, pseudo-label generation, and consistency regularization can improve the model's generalization ability under conditions of limited manual labeling. In the training phase, a pre-defined feature extraction model is first self-supervised pre-trained (e.g., using contrastive learning). Then, pseudo-labels and consistency regularization strategies are used to jointly train the pre-defined classification model and the pre-trained feature extraction model, thereby enhancing the model's generalization ability. Specifically, a pre-defined feature extraction model is pre-trained on massive amounts of unlabeled sensor data using contrastive learning or temporal reconstruction tasks to obtain a generalized representation. The pre-trained feature extraction model is then fine-tuned using a small number of test labels. Finally, a pre-defined classification model is used to predict and select high-confidence pseudo-labels for unlabeled data. The model is then trained using a mixture of labeled and pseudo-labeled samples to improve its robustness.
[0058] For example, the model training process is as follows. First, for each time series sample in the training dataset... Two data augmentation strategies were randomly employed to generate two different views. One strategy involved randomly discarding 10% of the time steps in the original time series, or shifting the time series window slightly (±1 time step). Another strategy involved adding Gaussian noise (μ=0, σ=0.01) to the spectral reflectance or randomly blocking several bands (Dropout). This resulted in two positive sample pairs. Meanwhile, other samples As a negative sample.
[0059] Secondly, the augmented samples are processed through a pre-defined feature extraction model (such as spectral subnet + numerical subnet + temporal fusion) to obtain projection vectors. .
[0060] Next, using the Info NCE loss function, we obtain: .in, Let τ be the cosine similarity, τ be the temperature hyperparameter (e.g., 0.1), and M be the total number of positive and negative sample pairs in a batch.
[0061] Next, iteratively train all batches of samples for several rounds (e.g., 100 rounds) to complete self-supervised pre-training and obtain the parameters of the pre-trained feature extraction model. After pre-training, the feature extraction model parameters are retained for subsequent joint training or fine-tuning with labeled data. When labeled data is scarce, existing classification models (such as pre-defined or iterated models) can be used to predict unlabeled data, and high-confidence samples can be selected, assigned pseudo-label attributes, and used in training to expand the training set. The pre-defined classification model can be a supervised model directly trained on labeled data or a pre-trained feature extraction model. The classification head is trained on a small labeled set to obtain the classification model. .
[0062] Next, the pre-defined classification model is used to classify each unlabeled sample. By performing forward reasoning, we obtain the 5-class classification probability distributions for the three categories of nitrogen, phosphorus, and potassium: .
[0063] Next, a confidence threshold (e.g., 0.9) is set. For each soil nutrient category, if the maximum predicted probability is greater than the set confidence threshold, the nutrient category prediction is considered reliable. If nitrogen, phosphorus, and potassium all simultaneously meet the set confidence threshold, the prediction result of that sample is used as a pseudo-label and added to the labeled dataset. Otherwise, the sample is discarded, or pseudo-labels are only applied to nutrients that meet the threshold.
[0064] Furthermore, the model is required to maintain consistent output to minor perturbations in the input data to improve robustness. In this embodiment, this can be achieved by adding noise and data augmentation to make the model's predictions for different views of the same sample as similar as possible.
[0065] Furthermore, for any sample (real label or pseudo label) Two enhanced versions were generated: The enhancement methods can include spectral perturbations, numerical perturbations, and temporal perturbations.
[0066] Finally, the two augmented samples are input into a joint model consisting of a pre-trained feature extraction model and a pre-defined classification model to obtain the predicted probability distribution: ,in These correspond to five probability outputs for the three nutrient categories: nitrogen, phosphorus, and potassium. A consistency loss is defined. Where Dist can be taken as the KL divergence: The consistency loss, classification supervision loss (cross-entropy), and pseudo-label loss are weighted according to the weight coefficients α, β, and γ: ,in The cross-entropy loss is calculated for the real labeled samples. For the cross-entropy loss of pseudo-labeled samples, The consistency regularization loss is used. By jointly optimizing the above losses, the trained model can not only fit the real labeled samples, but also draw information from the pseudo-labels and consistency regularization, thus improving robustness.
[0067] S140. Based on the target classification model and latent state characteristics, determine the soil nutrient classification results of the target area.
[0068] In this embodiment of the disclosure, the soil nutrient classification result can be the result of predicting the content level of a preset classification category in the soil. The preset classification category may include elements such as nitrogen, phosphorus, and potassium. The content level can be a pre-defined level division based on the content data. For example, the content level may include five levels: extremely low, low, medium, high, and extremely high.
[0069] Specifically, the latent state features are input into the target classification model, which outputs the five-level classification probabilities of nitrogen, phosphorus, and potassium content, and determines the final soil nutrient classification results. The target classification model has three output heads that output the five-level classification results of nitrogen, phosphorus, and potassium in parallel.
[0070] For example, Figure 2 A schematic diagram of the network structure of an object classification model is given. See [link / reference] Figure 2 The hidden dimension in the middle of D′ is the Softmax layer, which maps the 5-dimensional output of each output head to a probability distribution, representing the probability that the corresponding nutrient belongs to one of the 5 classification levels (such as very low, low, medium, high, and very high).
[0071] For example, the target feature extraction model and the target classification model can be deployed on cloud or edge computing devices to achieve real-time online inference and remote monitoring, and to make real-time online predictions of soil N, P and K content.
[0072] As an optional implementation of this disclosure, the classification prediction sub-model corresponding to each preset category in the target classification model has two setting modes: mode one is that the classification prediction sub-models do not share any parameters and are set independently; mode two is that the first fully connected layer of each classification prediction sub-model shares some parameters.
[0073] In this embodiment of the disclosure, the classification prediction sub-model can refer to the output head that obtains the classification result by performing classification prediction based on the input latent state features, such as... Figure 2 The classification prediction architecture for any column in the dataset.
[0074] Specifically, see Figure 2 The three classification prediction sub-models can be configured independently without sharing any parameters. Alternatively, they can share some parameters (such as sharing the H→D′ projection) in the first fully connected layer (FC_1), and then use dedicated second fully connected layers (FC_2) to complete the branch tasks respectively, in order to balance training efficiency and performance. This embodiment recommends that they be configured independently to ensure that the feature distributions of different nutrient tasks can be adequately adapted.
[0075] For example, for real label samples Let its true label be ( If the values are all {1, 2, 3, 4, 5}, then the supervision loss for the three-way classification task is: .in The target feature extraction model (spectral subnetwork + numerical subnetwork + temporal fusion) is combined with the target classification model to form a complete joint model. For any new time-series data detected at any time t, the same preprocessing and feature extraction process is used to obtain the hidden state vector h; then, the classification prediction head outputs three probability distributions. The final category label can be the category with the highest probability: .
[0076] The technical solution of this invention acquires soil attribute information of a target area within a preset time period. This soil attribute information includes soil electrical conductivity, soil temperature, and spectral reflectance, avoiding reliance on data collected by a single sensor to analyze soil nutrient content, which hinders real-time, continuous, and accurate detection. The soil attribute information is preprocessed to obtain preprocessed multi-channel time-series data. Based on a target feature extraction model, features are extracted and fused from the multi-channel time-series data to obtain latent state features. The target feature extraction model is obtained by semi-supervised mutual learning of different enhanced samples obtained from different data augmentation processes on unlabeled samples. Multiple sensors are deployed to simultaneously collect information such as soil electrical conductivity, temperature, and spectral reflectance, and an efficient multi-sensor data fusion method is used, enabling more accurate soil nutrient classification through multi-modal data. Furthermore, it solves the problem of not being able to train an accurate soil nutrient classification model when a large amount of labeled data is lacking. Based on the target classification model and latent state features, the soil nutrient classification results of the target area are determined, thereby accurately and conveniently analyzing soil nutrients and achieving efficient soil nutrient classification in environments with few samples.
[0077] Example 2
[0078] Figure 3 This is a flowchart of a soil nutrient classification method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment describes in detail the process of extracting and fusing features from multi-channel time-series data using a target feature extraction model to obtain latent state features. Explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here. Figure 3 As shown, the method includes:
[0079] S310. Obtain soil property information of the target area within a preset time period; soil property information includes: soil electrical conductivity, soil temperature and spectral reflectance.
[0080] S320. Perform data preprocessing on soil property information to obtain preprocessed multi-channel time series data.
[0081] S330. Based on the feature extraction sub-model, feature extraction is performed on multi-channel time series data to obtain multimodal features.
[0082] In this embodiment of the disclosure, the target feature extraction model includes a feature extraction sub-model and a temporal fusion sub-model. The feature extraction sub-model is used to extract features for each modality of data. The temporal fusion sub-model can be used to fuse features from various modalities. Multimodal features can refer to various modal features extracted from multiple modalities of data.
[0083] Specifically, multi-channel time-series data is input into a feature extraction sub-model to extract the modal features corresponding to the time-series data in each channel, thereby obtaining multi-modal features extracted from the multi-channel time-series data. Each channel is considered as a modality.
[0084] As an optional implementation of this disclosure, feature extraction is performed on multi-channel time-series data based on a feature extraction sub-model to obtain multi-modal features. Specifically, the feature extraction sub-model includes a spectral feature sub-network and a numerical feature sub-network. Feature extraction is performed on the spectral time-series data in the multi-channel time-series data based on the spectral feature sub-network to obtain spectral features. Feature extraction is performed on the conductivity time-series data and temperature time-series data in the multi-channel time-series data based on the numerical feature sub-network to obtain conductivity features and temperature features.
[0085] In this embodiment, to fully exploit the deep features of different modalities (spectral and numerical), the feature extraction sub-model is divided into two sub-networks: a spectral feature sub-network and a numerical feature sub-network. The spectral feature sub-network includes at least two 1D convolutional layers, each coupled with BatchNorm and ReLU activation. The numerical feature sub-network is an MLP containing two fully connected layers.
[0086] The spectral feature subnetwork mainly consists of several 1D convolutional layers (Conv1d), batch normalization layers (BatchNorm1d), and ReLU activation function layers, used to extract high-order semantic features of spectral reflectance at each time step. While a minimum of two 1D convolutional layers is required by design, this invention can actually increase the number of layers to three or four to ensure optimal performance. Figure 4 A diagram of a two-layer 1D convolutional neural network structure provided in an embodiment of this application. See also... Figure 4 The input dimension of Conv1d-1 is The output dimension is C1, and the input dimension of Conv1d-2 is C1, while the output dimension is C2. Batch normalization (BatchNorm1d) stabilizes the training process and accelerates convergence. ReLU activation ensures nonlinear expressive power.
[0087] The two convolutional layers described above operate on the spectral dimension, meaning they convolve the spectral data at each time step. However, to preserve temporal information, spectral features can be extracted separately at each time step using the aforementioned convolutional module, and then the features from the L time steps can be concatenated. The sequence: , The kernel size can be 3 or 5. Padding should remain the same as the original size; the stride is generally 1. The number of channels C1 and C2 can be selected as 64 and 128 or 128 and 256 respectively, which can be flexibly adjusted according to hardware conditions and accuracy requirements. Global average pooling or adaptive pooling can be used to fix the output feature dimension at each time step.
[0088] For the numerical feature subnet, its numerical features mainly include: soil electrical conductivity sequence. and soil temperature sequence .
[0089] For example, Figure 5 A diagram of a two-layer fully connected neural network structure is provided for an embodiment of this application. This embodiment uses... Figure 5 The network architecture simply concatenates two numerical modes (conductivity and temperature) and inputs them into a two-layer fully connected layer (MLP) for deep abstraction. In this embodiment, a 1D convolutional neural network (Conv1D) is used to extract the spectral features at each time step, and a multilayer perceptron (MLP) is used to extract the conductivity and temperature features.
[0090] S340. Based on the temporal fusion sub-model, feature fusion is performed on multimodal features to obtain latent state features.
[0091] In an embodiment of the present disclosure, the temporal fusion sub-model may include LSTM or Transformer. The extracted multi-modal feature sequence is input into LSTM or Transformer, so as to splice the spectral features and numerical features at each moment according to the time series for temporal fusion, and obtain hidden state features. For example, the outputs of the spectral feature subnet and the numerical feature subnet are spliced at each time step to form a temporal feature sequence, and the spliced sequence is input into a long short-term memory network (LSTM) or a Transformer encoder to extract temporal dynamic information, and the hidden state vector at the last moment output by the LSTM / Transformer is obtained, that is, the hidden state feature.
[0092] As an optional implementation manner of an embodiment of the present disclosure, feature fusion is performed on multi-modal features based on the temporal fusion sub-model to obtain hidden state features, which may specifically include: splicing the spectral features, conductivity features, and temperature features in the multi-modal features in the same dimension to obtain a fused feature sequence; determining the hidden state features based on the temporal fusion sub-model and the fused feature sequence.
[0093] In an embodiment of the present disclosure, the fused feature sequence may refer to a feature sequence obtained by splicing and fusing multi-modal features in the same dimension (such as time series).
[0094] Specifically, the core idea of the temporal fusion module in this embodiment is to the feature sequence extracted by the spectral feature subnet, combine with the output of the numerical feature subnet, and then further capture the dynamic change information across moments through the temporal fusion sub-model (LSTM or Transformer), and finally output a hidden state vector
[0095] As an example, first, the output sequence of the spectral feature subnet is . The numerical features are also designed as temporal inputs. The MLP result can be regarded as the feature at the current moment, and the MLP outputs of several past moments are combined into a sequence according to the same steps: . In order to reduce the number of parameters, only the at the current moment is used in this embodiment and spliced with the spectral features at the t-th time step: . In this way, a multi-modal feature sequence with a length of L is obtained . For i < t, (only spectral), and at the moment i = t
[0096] (spectral + numerical). Optionally, if it is necessary to make the dimensions at each moment consistent, the numerical components at i < t moments can be filled with zeros or the numerical features at the current moment can be repeated. Taking a single-layer or multi-layer LSTM as an example, the input dimension is (If only the spectrum is considered) or (Multimodal unified dimension). Set the number of hidden units to H (e.g., 128 or 256).
[0097] Secondly, for a sequence of length L Perform time-step expansion and feed the data into the LSTM network: Finally, take the hidden state at the last time step. As a global feature of the sequence.
[0098] Optionally, for a stronger temporal representation capability, a multi-layer stacked LSTM (such as two or three layers) can be used, and Dropout can be added between layers to prevent overfitting.
[0099] Furthermore, the Transformer, with its core self-attention mechanism, offers significant advantages in parallel computation when dealing with long sequences. Features of each time step First, obtain the Query, Key, and Value through linear projection: ,in Calculate attention weights The Transformer encoder layer outputs a sequence of the same length as the input. .
[0100] Optionally, to obtain a single hidden state vector, pooling can be performed on the output sequence (e.g., taking the last position, average pooling, or max pooling). .
[0101] S350. Based on the target classification model and latent state characteristics, determine the soil nutrient classification results of the target area.
[0102] The technical solution of this invention includes a target feature extraction model comprising a feature extraction sub-model and a temporal fusion sub-model. Multimodal features are obtained by extracting features from multi-channel time-series data based on the feature extraction sub-model. The feature extraction sub-model can perform specialized and customized feature learning for raw sensor data with different physical meanings and dimensions, such as conductivity, temperature, and spectroscopy. For example, convolutional layers can be configured to capture local patterns for spectral data, and fully connected layers can be designed for transformation of conductivity data. This design ensures that the unique information of various modal data can be fully and independently extracted, providing a high-quality and high-purity input foundation for subsequent fusion. The temporal fusion sub-model performs feature fusion on the multimodal features to obtain latent state features. The fusion process is handled by a dedicated temporal fusion sub-model (such as LSTM or Transformer), which can accurately capture the dynamic evolution of soil properties over time. This sub-model focuses on learning the temporal dependencies of multimodal features, such as how early temperature changes affect later conductivity readings, thereby revealing deep patterns that cannot be discovered by single-point-of-time analysis. Furthermore, the hierarchical processing avoids the difficulty of the model simultaneously learning feature extraction and temporal correlation in a single complex network, reducing the optimization difficulty. The feature extraction sub-model can be pre-trained or converge independently, while the temporal fusion sub-model is trained on the stable and abstract features output by the former. The whole process is more efficient and helps to prevent overfitting, improving the model's generalization ability on unknown plots.
[0103] It's important to note that the modular design allows the two sub-models to be optimized and upgraded independently. When a new sensor type (such as a humidity sensor) is added, only the corresponding processing branch needs to be added to the feature extraction sub-model, without altering the core structure of the temporal fusion sub-model. This low coupling significantly enhances the model's adaptability to different sensor configurations and future changes in requirements.
[0104] It should be noted that this embodiment also provides a training process example to facilitate understanding of the overall working mechanism. The dataset is labeled, soil samples from several fields are collected, and the actual nitrogen, phosphorus, and potassium contents are measured through laboratory chemical analysis. Simultaneously, multi-sensor data is collected to construct a labeled time-series sample set. For long-running sensor nodes, a large amount of unlabeled time-series data will be continuously generated, denoted as... .exist Perform contrastive learning to obtain the parameters of the pre-trained feature extraction model. And the classification prediction head is randomly initialized. After several training rounds, only the classification task is optimized. To obtain model parameters Using the current model right Pseudo-label generation is performed on medium-sized samples, and a high-confidence pseudo-label set is selected. ,Will and Merge to form a new training set During the joint training phase, the supervised loss is calculated simultaneously. False label loss and consistency loss Optimize total loss After training for several rounds, update the model parameters to If the performance does not meet expectations, it can be used again. right The pseudo-labels are regenerated, the pseudo-label dataset is expanded, and the pseudo-label generation and joint training steps are repeated until the model converges or meets the performance requirements. Finally, the accuracy, precision, and recall of the three-way five-level classification of nitrogen, phosphorus, and potassium are evaluated on the independent test set (including labels) to ensure the robustness of the model under different soil types, seasons, and environments.
[0105] This invention also provides an optional method for soil nutrient classification, the specific process of which is as follows.
[0106] Fixed or mobile cameras are deployed in the tobacco planting area. These cameras are capable of covering the entire field and feature infrared night lighting and automatic focusing to ensure clear images of the tobacco leaves under varying lighting conditions. The cameras continuously record video at preset frame rates and resolutions, capturing data on the entire tobacco growth process from planting to harvest.
[0107] The acquired video data is transmitted in real time to a cloud server via wireless or wired networks. The cloud server possesses large-scale storage capacity and redundant backup mechanisms to ensure data security and long-term availability. Encryption protocols are used during transmission to prevent data leakage or tampering. Simultaneously, the system supports timestamping of the video data to ensure a one-to-one correspondence between data and growth stages in subsequent analysis.
[0108] The server first analyzes the received video data frame by frame. By setting automatic detection thresholds, it judges each frame based on indicators such as tobacco leaf coverage, light intensity, and image blur level, discarding invalid frames or low-quality frames caused by wind or obstruction. For the selected valid frames, the server further performs preprocessing operations, including image enhancement and noise removal.
[0109] Image enhancement employs methods such as color space conversion, histogram equalization, and adaptive contrast adjustment to improve overall image brightness and detail. Color correction compensates for lighting differences through white balance adjustment and gamma correction, eliminating color deviations caused by the natural environment and ensuring the consistency of tobacco leaf color characteristics. Noise removal utilizes Gaussian filtering, median filtering, or convolutional neural network denoising algorithms to remove sensor noise and environmental interference, improving image clarity and stability.
[0110] The preprocessed images are input into the target tobacco leaf growth analysis model. This model, through training, acquires characteristic patterns of tobacco leaves at different growth stages, and can automatically extract multi-dimensional features such as color changes, leaf morphology, and texture distribution. During the analysis process, the model can not only identify the overall growth status of the tobacco leaves, but also predict whether there is a deficiency of nutrients such as nitrogen, phosphorus, and potassium by comparing abnormal changes in specific features, and output corresponding confidence scores.
[0111] Based on the output of the analysis model, the server automatically generates a tobacco leaf growth anomaly report. This report includes: the current growth stage of the tobacco leaves; the type of anomaly detected and the category of missing elements; the potential impact of the anomaly on subsequent growth; and recommended field management or fertilization measures.
[0112] The report is presented in a graphic format, allowing growers to view it in real time on their mobile devices and also archive and compare it in the management backend, thus providing a scientific and precise management basis for tobacco cultivation.
[0113] The above-mentioned optional implementation methods can realize the whole process monitoring of tobacco leaf growth status, and have the characteristics of intelligence, automation and high reliability, solving the problems of low efficiency and strong subjectivity of traditional manual inspection.
[0114] The following are embodiments of the soil nutrient classification device provided in this invention. This device and the soil nutrient classification methods in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the soil nutrient classification device, please refer to the embodiments of the above soil nutrient classification methods.
[0115] Example 3
[0116] Figure 6 This is a schematic diagram of a soil nutrient classification device provided in Embodiment 3 of the present invention. Figure 6 As shown, the device includes: a soil property information acquisition module 610, a multi-channel time series data determination module 620, a latent state feature determination module 630, and a classification result determination module 640.
[0117] The system includes a soil attribute information acquisition module 610, which acquires soil attribute information of the target area within a preset time period; the soil attribute information includes soil electrical conductivity, soil temperature, and spectral reflectance; a multi-channel time-series data determination module 620, which preprocesses the soil attribute information to obtain preprocessed multi-channel time-series data; a latent state feature determination module 630, which extracts and fuses features from the multi-channel time-series data based on a target feature extraction model to obtain latent state features; the target feature extraction model is obtained by semi-supervised mutual learning of different enhanced samples obtained by performing different data enhancement processing on unlabeled samples; and a classification result determination module 640, which determines the soil nutrient classification result of the target area based on the target classification model and the latent state features.
[0118] The technical solution of this invention acquires soil attribute information of a target area within a preset time period. This soil attribute information includes soil electrical conductivity, soil temperature, and spectral reflectance, avoiding reliance on data collected by a single sensor to analyze soil nutrient content, which hinders real-time, continuous, and accurate detection. The soil attribute information is preprocessed to obtain preprocessed multi-channel time-series data. Based on a target feature extraction model, features are extracted and fused from the multi-channel time-series data to obtain latent state features. The target feature extraction model is obtained by semi-supervised mutual learning of different enhanced samples obtained from different data augmentation processes on unlabeled samples. Multiple sensors are deployed to simultaneously collect information such as soil electrical conductivity, temperature, and spectral reflectance, and an efficient multi-sensor data fusion method is used, enabling more accurate soil nutrient classification through multi-modal data. Furthermore, it solves the problem of not being able to train an accurate soil nutrient classification model when a large amount of labeled data is lacking. Based on the target classification model and latent state features, the soil nutrient classification results of the target area are determined, thereby accurately and conveniently analyzing soil nutrients and achieving efficient soil nutrient classification in environments with few samples.
[0119] Based on the above technical solution, the multi-channel time series data determination module 620 is specifically used for: imputing missing values in soil attribute information to obtain complete soil attribute data; standardizing the soil attribute data to obtain reference soil attributes; and constructing the reference soil attributes based on a preset sliding window length to obtain multi-channel time series data.
[0120] Based on the above technical solution, the target feature extraction model includes: a feature extraction sub-model and a temporal fusion sub-model; the latent state feature determination module 630 may include:
[0121] The multimodal feature determination submodule is used to extract features from multi-channel time-series data based on the feature extraction submodel to obtain multimodal features;
[0122] The latent state feature determination submodule is used to perform feature fusion on multimodal features based on the temporal fusion submodel to obtain latent state features.
[0123] Based on the above technical solution, the feature extraction sub-model includes: a spectral feature sub-network and a numerical feature sub-network;
[0124] The multimodal feature determination submodule is specifically used for: extracting features from spectral time-series data in multi-channel time-series data based on the spectral feature subnetwork to obtain spectral features; and extracting features from conductivity and temperature time-series data in multi-channel time-series data based on the numerical feature subnetwork to obtain conductivity and temperature features.
[0125] Based on the above technical solution, the hidden state feature determination submodule is specifically used to: splice the spectral features, conductivity features and temperature features in the multimodal features in the same dimension to obtain the fused feature sequence; and determine the hidden state features based on the time-series fusion submodel and the fused feature sequence.
[0126] Based on the above technical solution, there are two setting modes for the classification prediction sub-model corresponding to each preset category in the target classification model; mode one is that the classification prediction sub-models do not share any parameters and are set independently; mode two is that the first fully connected layer of each classification prediction sub-model shares some parameters.
[0127] The soil nutrient classification device provided in this embodiment of the invention can execute the soil nutrient classification method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the soil nutrient classification method.
[0128] It is worth noting that in the above embodiments of soil nutrient classification, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0129] Example 4
[0130] Figure 7A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0131] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0132] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0133] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as soil nutrient classification methods.
[0134] In some embodiments, the soil nutrient classification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the soil nutrient classification method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the soil nutrient classification method by any other suitable means (e.g., by means of firmware).
[0135] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0136] In this embodiment of the disclosure, Figure 8 A schematic diagram of the underlying structure of one alternative electronic device is provided. See also... Figure 8 The monitoring device 800 provided in this application includes: a multi-channel spectral sensor 811, a soil conductivity and temperature sensor 812, a signal conditioning circuit 813, a microprocessor 814, a wireless communication module 815, and a cloud server 820.
[0137] In this embodiment of the disclosure, Figure 9 A three-dimensional structural diagram of one alternative electronic device is provided. See also... Figure 9 The monitoring device 900 provided in this application includes: a connecting cable 901, a housing 902, an optical quartz glass 903, a multi-channel spectral sensor 904, an LED cold light source array 905, and a conductivity monitoring probe 906.
[0138] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0139] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0141] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0142] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0143] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the soil nutrient classification method as provided in any embodiment of this application.
[0144] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). This program product belongs to the same inventive concept as the soil nutrient classification method disclosed in the embodiments of this application, and therefore will not be described further here.
[0145] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0146] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for classifying soil nutrients, characterized in that, include: Obtain soil property information for the target area within a preset time period; The soil property information includes: soil electrical conductivity, soil temperature, and spectral reflectance; The soil property information is preprocessed to obtain preprocessed multi-channel time-series data; Based on the target feature extraction model, the multi-channel time series data is used to extract and fuse features to obtain latent state features; the target feature extraction model is obtained by semi-supervised mutual learning of different enhanced samples obtained by performing different data augmentation processes on unlabeled samples respectively on the preset feature extraction model. The soil nutrient classification results for the target area are determined based on the target classification model and the latent state features.
2. The method according to claim 1, characterized in that, The process of preprocessing the soil property information to obtain preprocessed multi-channel time-series data includes: The missing values of the soil attribute information are imputed to obtain complete soil attribute data; The soil property data is standardized to obtain reference soil properties; The reference soil properties are constructed based on a preset sliding window length to obtain multi-channel time-series data.
3. The method according to claim 1, characterized in that, The target feature extraction model includes: a feature extraction sub-model and a temporal fusion sub-model; The feature extraction and fusion of the multi-channel time-series data based on the target feature extraction model to obtain latent state features includes: Based on the feature extraction sub-model, feature extraction is performed on the multi-channel time-series data to obtain multimodal features; Based on the temporal fusion sub-model, feature fusion is performed on the multimodal features to obtain latent state features.
4. The method according to claim 3, characterized in that, The feature extraction sub-model includes: a spectral feature sub-network and a numerical feature sub-network; The feature extraction sub-model is used to extract features from the multi-channel time-series data to obtain multimodal features, including: Based on the spectral feature subnet, spectral features are extracted from the spectral time-series data in the multi-channel time-series data to obtain spectral features; Based on the numerical feature subnet, feature extraction is performed on the conductivity time series data and temperature time series data in the multi-channel time series data to obtain conductivity features and temperature features.
5. The method according to claim 4, characterized in that, Based on the temporal fusion sub-model, feature fusion is performed on the multimodal features to obtain latent state features, including: The spectral features, electrical conductivity features, and temperature features in the multimodal features are spliced together in the same dimension to obtain a fused feature sequence; Based on the temporal fusion sub-model and the fusion feature sequence, the hidden state features are determined.
6. The method according to claim 1, characterized in that, The target classification model has two setting modes for each preset category's corresponding classification prediction sub-model; mode one is that the classification prediction sub-models do not share any parameters and are set independently; mode two is that the first fully connected layer of each classification prediction sub-model shares some parameters.
7. A soil nutrient classification device, characterized in that, The device includes: The soil property information acquisition module is used to acquire soil property information of a target area within a preset time period; the soil property information includes: soil electrical conductivity, soil temperature and spectral reflectance. A multi-channel time-series data determination module is used to preprocess the soil attribute information to obtain preprocessed multi-channel time-series data. The latent state feature determination module is used to extract and fuse features from the multi-channel time series data based on the target feature extraction model to obtain latent state features. The target feature extraction model is obtained by semi-supervised mutual learning of different enhanced samples obtained by performing different data augmentation processes on unlabeled samples. The classification result determination module is used to determine the soil nutrient classification result of the target area based on the target classification model and the latent state features.
8. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the soil nutrient classification method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the soil nutrient classification method as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the soil nutrient classification method as described in any one of claims 1-6.
Citation Information
Cited By
Soil moisture content time sequence data processing method and device
CN122019987A