Search

CN-122017017-A - Vibration signal analysis-based rice harvesting loss rate monitoring method

CN122017017ACN 122017017 ACN122017017 ACN 122017017ACN-122017017-A

Abstract

The invention discloses a method for monitoring a rice harvesting loss rate based on vibration signal analysis, which aims to break through the bottleneck of the existing rice harvesting loss rate monitoring technology and construct a set of efficient, accurate and real-time monitoring system. The invention aims to solve the problems of effective separation and purification of vibration signals, precise identification and classification of rice grain collision signals and precise counting and real-time loss rate calculation of loss rice grains and harvest rice grains in a complex environment in the prior art. The method comprises the steps of S1, collecting rice grain collision vibration signals by using a vibration signal collecting system, S2, preprocessing and standardizing the vibration signals, S3, comparing and learning a self-supervision pre-training encoder, S4, training a rice grain classification and counting model, S5, detecting collision events and filtering secondary collision, S6, classifying and counting rice grains, and S7, calculating a rice harvesting loss rate.

Inventors

  • YI MINGWEI
  • LI JIAJUN

Assignees

  • 哈尔滨工业大学

Dates

Publication Date
20260512
Application Date
20260129

Claims (8)

  1. 1. A method for monitoring rice harvesting loss rate based on vibration signal analysis is characterized by comprising the following specific processes: step S1, a vibration signal acquisition system is deployed to collect rice grain collision vibration signals; s2, preprocessing and standardizing vibration signals; s3, comparing and learning the self-supervision pre-training encoder; s4, training a rice grain classification and counting model; s5, collision event detection and secondary collision filtering; S6, classifying and counting rice grains; And S7, calculating the harvesting loss rate of the rice.
  2. 2. The method for monitoring the harvesting loss rate of rice based on vibration signal analysis according to claim 1, wherein the step S1 is characterized in that a vibration signal acquisition system for collecting rice grain collision vibration signals comprises the following specific processes: S11, sensor model selection and deployment scheme, wherein the specific process is as follows: (1) A high-precision wireless vibration sensor (the sampling rate is more than or equal to 25600 Hz) is selected, the anti-interference capability and the low power consumption characteristic are provided, and the method is suitable for a complex farmland environment; (2) The sensor is arranged at the outlet part of the harvester separating device, so that vibration signals generated by rice grain collision can be effectively captured; (3) The sampling data is uploaded to a cloud server in real time through a network; s12, setting acquisition parameters and storing data, wherein the specific process comprises the following steps: (1) Setting the acquisition time length as the whole harvester operation course, and continuously acquiring (avoiding missing detection of instantaneous collision signals) in a triggering mode; (2) The data is stored in an original waveform format (such as CSV), and auxiliary information such as acquisition time, harvester position (combined with a GPS module), operation speed and the like is recorded at the same time, so that scene context is provided for subsequent analysis.
  3. 3. The method for monitoring the harvesting loss rate of the rice based on the vibration signal analysis according to claim 2, wherein the vibration signal preprocessing and standardization in the step S2 comprises the following specific processes: s21, noise reduction and filtering of signals, wherein the specific process is as follows: (1) Baseline correction, namely performing baseline correction on an original vibration signal to eliminate direct current offset; (2) Filtering noise, namely filtering environmental noise by adopting a 4-order Butterworth band-pass filter, and retaining rice grain collision characteristic frequency band signals. Analyzing the frequency spectrum distribution of the signal through short-time Fourier transform, and verifying the filtering effect; s22, signal segmentation and standardization, wherein the specific process is as follows: (1) Positioning collision events based on a peak detection algorithm, and extracting window segments for each collision signal; (2) And unified standardization of the segment data is realized, the amplitude scale difference is eliminated, and the data consistency is improved.
  4. 4. The method for monitoring the harvesting loss rate of rice based on vibration signal analysis according to claim 3, wherein the comparison learning self-supervision pre-training encoder in the step S3 comprises the following specific processes: s31, constructing a vibration signal enhancement and positive and negative sample pairs, wherein the specific process is as follows: A random enhancement strategy is applied to individual collision signal segments to generate positive sample pairs. Specifically, the enhancement strategies employed include: (1) Amplitude scaling, namely randomly scaling by 0.8-1.2 times, and simulating vibration signals generated by rice grain collision with different sizes; (2) Time domain translation, namely randomly moving 20 sampling points back and forth, and randomly cutting fragments from long signals. The negative sample is randomly selected from signals of collision events of different materials, so that no relevance with the anchoring sample is ensured; (3) Adding Gaussian noise, spiced salt noise or fuzzy processing, and simulating machine vibration interference in the actual vibration signal collection process; The invention adopts a series of random signal enhancement strategies for single collision signal segments to simulate vibration differences generated by rice grain collisions of different sizes, selection conditions of different segments in long signals and machine vibration interference in the actual vibration signal collection process. Each anchored collision signal segment and its enhanced version constitute a positive sample pair. The negative sample randomly selects other signal fragments with different sources (namely different material collision events) from the anchoring signal fragments from the data set, so that no correlation between the negative sample and the anchoring sample is ensured. Providing sufficient training data for a contrast learning self-supervision pre-training encoder by constructing a large number of positive and negative sample pairs; s32, selecting an encoder architecture, wherein the specific process is as follows: The invention selects the 1D convolutional neural network as the encoder for self-supervision pre-training. The 1D convolutional neural network mainly comprises a 3-layer convolutional module, realizes channel conversion, is compressed into 128-dimensional feature vectors through self-adaptive average pooling (AdaptiveAvgPool D), and is output through L2 normalization. The encoder has high-efficiency characteristic extraction capability aiming at one-dimensional signals, can effectively capture local characteristics and global characteristics in vibration signals, and is suitable for characteristic learning tasks of rice grain collision signals; s33, designing a contrast loss function, wherein the specific process is as follows: The present invention uses the NT-Xent loss function as a contrast-learned loss function to maximize the consistency of the feature representation between positive pairs of samples while minimizing the consistency of the feature representation between negative pairs of samples. For a batch of anchored samples The positive sample obtained by data enhancement is The randomly sampled negative sample set is . The NT-Xent loss function is defined as follows: Wherein the method comprises the steps of And Is the eigenvector of the positive sample pair, For temperature coefficient, is used for adjusting the differentiation between different sample pairs and controlling the separation degree of the positive and negative sample pairs in the characteristic space. Is of batch size. Adopting an Adam optimizer (learning rate 1 e-3) to store the weight of the pre-training encoder; s34, self-supervision pre-training, wherein the specific process is as follows: And inputting the constructed positive and negative sample pairs into a 1D convolutional neural network encoder to respectively obtain the anchor samples and the feature vectors of the enhanced versions thereof. And calculating the contrast loss of positive and negative sample pairs through the NT-Xent loss function, wherein the positive sample pairs are characteristic vector pairs obtained by different enhancement of the same collision signal, and the negative sample pairs are characteristic vector pairs of collision signals of different materials. Parameters of the encoder are updated using an Adam optimizer, minimizing contrast loss through iterative training. The pre-training is performed on the data set containing a large number of rice grains (full, shrunken), straw, light sundries and other different material collision vibration signals, so that the encoder can learn the characteristic representation of robustness and discrimination on various collision signals, and the characteristic extraction capability of the vibration signals of different materials is improved. After the pre-training is completed, the weight of the encoder is saved and is used for initializing a downstream rice grain classifier and a feature extraction part of a quantitative prediction model, so that knowledge migration from vibration signal features to full rice grain detection task features is realized.
  5. 5. The method for monitoring the harvesting loss rate of rice based on vibration signal analysis according to claim 4, wherein the rice grain classification and counting model training in the step S4 comprises the following specific steps: S41, training a downstream classifier (full/non-full grain identification), wherein the specific process is as follows: The rice grain classifying and counting model consists of a feature extraction module, a classifying head and a counting head. The feature extraction module adopts a 1D convolutional neural network encoder which is subjected to self-supervision pre-training in the step S3 and is responsible for extracting robust feature representation from vibration signals, the classification head adopts a random forest classifier and receives feature vectors output by the encoder to realize the two classification of full grains and other types (shrunken grains, straws, light sundries and the like), the counting head adopts a random forest regressor and predicts the number of overlapped grains based on the same feature vectors, and the signal overlapping problem caused by simultaneous collision of multiple grains is solved. The framework combines classification precision and counting efficiency by sharing the feature extraction capability of the pre-training encoder, and is suitable for a real-time rice grain detection scene; s42, training a superposition particle counting head, wherein the specific process is as follows: And (3) taking the encoder weight obtained through the self-supervision pre-training of the large-scale vibration signal in the step (S3) as the initialization weight of the downstream classification and counting model feature extraction module. Through knowledge migration, general characteristics (such as collision amplitude change, spectrum characteristics and the like) of vibration signals contained in the label-free data are fully utilized, so that the model can still keep strong characteristic discrimination capability under limited labeling data, training convergence is accelerated, and generalization performance is improved. In the migration process, firstly freezing the convolution parameters of the first two layers of the encoder (retaining the basic vibration characteristic extraction capability), and only training the classification head and the counting head; s43, designing a loss function, wherein the specific process is as follows: The classifying head is optimized by adopting a cross entropy loss function, the counting head is optimized by adopting a Mean Square Error (MSE) loss function, and the specific loss function is as follows: Wherein, the A true tag for sample i (1 for filled grain, 0 for other types), Predicting the probability of full grains for the model, wherein N is the number of samples; Wherein, the For the true grain number of sample i, The number of grains is predicted for the model, Is the number of samples; s44, selecting an optimizer and setting parameters, wherein the specific process is as follows: Adam was chosen as the deep learning optimizer. The sectional learning rate attenuation strategy is adopted, the higher learning rate is used for accelerating convergence in the initial stage of training, and the learning rate is reduced in the later stage to improve the accuracy. An early stop method is adopted in the training process to prevent the model from being fitted excessively; S45, training process: (1) Dividing the constructed classification and counting data set into a training set, a verification set and a test set respectively, wherein the training set, the verification set and the test set are divided according to the proportion of 7:2:1; (2) Loading weight of a pre-training encoder, initializing a feature extraction module, and randomly initializing parameters of a classification head and a counting head; (3) Inputting the training set into a model, extracting features through an encoder, respectively inputting a classification head and a counting head to obtain a prediction result, calculating classification loss and counting loss, and summing; (4) Calculating gradients through a back propagation algorithm, and updating model parameters by using an Adam optimizer; (5) After each training round, the model performance is evaluated on the verification set, and model parameters with highest classification F1 value and minimum count MAE are saved.
  6. 6. The method for monitoring the harvesting loss rate of rice based on vibration signal analysis according to claim 5, wherein the collision event detection and secondary collision filtering in step S5 comprises the following specific steps: s51, a peak detection algorithm, which comprises the following specific processes: The following peak detection procedure is performed on the vibration signal after pretreatment (bandpass filtering, baseline correction): (1) Amplitude envelope calculation, namely extracting the instantaneous amplitude envelope of the signal by using Hilbert transformation; Wherein the method comprises the steps of In order to pre-process the vibration signal, Representing the Hilbert transform, computing energy concentration characteristics highlighting the collision event by envelope; (2) Setting an adaptive threshold, namely setting a detection threshold based on the statistical characteristics of the envelope signal; wherein the method comprises the steps of As the mean value of the envelope signal, The threshold can dynamically adapt to signal noise levels under different working conditions as standard deviation of envelope signals; (3) Peak screening-identifying exceeding a threshold in an envelope signal using a local maxima detection algorithm While imposing a peak spacing constraint. The time interval between any two peak points is more than or equal to 0.005 seconds, so that repeated detection caused by high-frequency oscillation of signals is avoided, and finally, a time index set of potential collision peak values is output Wherein A timestamp representing the ith peak; s52, secondary collision filtering, wherein the specific process is as follows: Aiming at secondary collision redundancy peaks caused by rice grain bouncing, equipment resonance, straw friction and other factors, adopting a layered filtering strategy to remove secondary collision (redundancy peaks generated by rice grain bouncing, equipment resonance and the like), and keeping a real main collision event; (1) Time grouping, peak value collection Sequencing in time sequence, dividing the continuous peak values with time difference less than or equal to 0.2 seconds into the same group by taking the first peak value as a starting point to form a plurality of peak value groups ; (2) Amplitude ratio screening for each group Calculating the maximum amplitude peak value (main peak) in the group; Wherein the method comprises the steps of Is peak value Corresponding signal amplitude, calculated by the maximum absolute value within a 30ms window), the amplitude ratio of the remaining peaks (secondary peaks) to the main peak is ; (3) The retention rule in the group is that the time difference between the secondary peak and the main peak is less than or equal to 0.2 seconds and r is less than 0.6, the secondary collision is judged and removed, and each group only retains the main peak Forming a peak value set after preliminary filtration 1 Emphasis is placed on removing strong redundant signals with significant energy attenuation; (4) Modeling the domain relation, namely gathering the peak value after preliminary filtering Mapping to a set of points in a time-amplitude feature space; ( Is peak value Calculating through sampling point indexes and sampling intervals), constructing a neighborhood relation by adopting a sliding window grouping strategy, namely judging whether peaks belong to the same neighborhood through a time differential state, and ensuring that adjacent real collision events are not mistakenly classified as the same neighborhood; (5) Dynamic threshold filtering, namely, the time difference is 0.011 less than or equal to 0.011 Less than or equal to 0.08 seconds ) The peak value pair (p, q) of the (B) is segmented dynamic amplitude ratio threshold value when 0.011 is less than or equal to At less than or equal to 0.0045 seconds, the threshold is 0.85, if Q is a secondary collision when less than or equal to 0.85, and q is less than or equal to 0.045 At less than or equal to 0.08 seconds, the threshold is linearly reduced to 0.55, if Q is secondary collision less than or equal to 0.55; (6) And finally, determining main collision, namely, for the residual peak value after the dynamic threshold value filtering, preferentially selecting the peak value with the largest amplitude value in each group of adjacent areas by adopting the principle of 'amplitude value priority and energy secondary selection', and if the amplitude value is close (the difference value is less than 5 percent), carrying out energy secondary judgment through a window of 30ms, and finally outputting a main collision event set to ensure that the reserved peak value truly reflects the collision characteristics of rice grains.
  7. 7. The method for monitoring the harvesting loss rate of rice based on vibration signal analysis according to claim 6, wherein the rice grain classification and counting in the step S6 comprises the following specific steps: S61, sorting the single peak signals, wherein the specific process is as follows: And extracting characteristics of the signal fragments of each main collision event through a pre-training encoder, inputting the prediction 'full' or 'other' types of a downstream random forest classifier, and outputting classification confidence level for quantifying the prediction reliability. If the confidence coefficient is more than or equal to 0.7, directly adopting a classification result, otherwise, marking the classification result as low confidence coefficient, and carrying out secondary verification on the combination energy characteristics; s62, predicting the number of superimposed grains, wherein the specific process is as follows: Invoking a pre-trained quantity classification head for signals classified as full rice grains, and combining signal energy and peak amplitude verification (the energy is positively correlated with grain number), and estimating quantity for signals classified as other by adopting heuristic rules (energy/single grain energy threshold); s62, rice grain classification counting model test, wherein the specific process is as follows: (1) And a test data set independent of the training set and the verification set is used, so that objectivity and reliability of a test result are ensured. The test data set needs to cover collision vibration signals of different material combinations, such as full rice grains, shrunken rice grains, full rice grains, straw and the like; (2) And selecting a proper model performance evaluation index, and comprehensively evaluating the detection precision of the model. The classification task evaluation indexes comprise an accuracy rate, a recall rate and an F1 value, and the counting task evaluation indexes comprise an average absolute error (MAE), a Root Mean Square Error (RMSE) and a counting accuracy rate; (3) And testing the trained model by using the test data set, and calculating each performance evaluation index. And further optimizing the model or adjusting the training strategy according to the test result.
  8. 8. The method for monitoring the harvesting loss rate of rice based on vibration signal analysis according to claim 7, wherein the step S7 of calculating the harvesting loss rate of rice comprises the following specific steps: The total number of rice grains predicted to be "full" in all the main collision events is accumulated, and the loss rate is calculated by combining the total number of loss rice grains and the total number of harvest rice grains.

Description

Vibration signal analysis-based rice harvesting loss rate monitoring method Technical Field The invention relates to the technical field of intelligent agriculture, in particular to a rice harvesting loss rate monitoring technology based on vibration signal detection and analysis. Background The harvesting loss rate of the rice harvester is a core index for measuring the operation quality, and directly influences the grain yield and the economic benefits of farmers. Currently, the monitoring of the harvesting loss rate of rice mainly depends on a manual inspection weighing method, namely, the loss rate is calculated by manually collecting and weighing missing rice grains in the field and combining with the actual harvesting rate of a harvester. However, the method has the obvious defects of low manual collection efficiency, high labor intensity, easy error of collection results due to the influence of field topography and crop distribution, incapability of carrying out the monitoring process in real time, difficulty in carrying out instant adjustment on the operation parameters of the harvester after the harvesting operation is finished, and incapability of timely controlling the loss rate. There are also loss rate monitoring schemes in the prior art based in part on image recognition or sensor detection, but there are many limitations. The traditional sensor detection scheme is mostly dependent on single physical parameter collection, cannot fully mine vibration signal characteristics generated by rice grain collision, is difficult to accurately distinguish effective rice grain signals from background noise, cannot effectively identify the superposition collision situation of multiple rice grains, causes larger rice grain counting error and further affects the accuracy of loss rate calculation. In order to solve the problems, the invention provides a rice harvesting loss rate monitoring method based on vibration signal analysis, which is used for accurately identifying the number of uncollected rice grains and harvested rice grains without collection by collecting vibration signals of a granary inlet baffle and a harvester outlet baffle and combining self-supervision learning and characteristic engineering technologies, so that real-time and high-precision monitoring of the loss rate is realized, and technical support is provided for operation optimization of a rice harvester. Disclosure of Invention The invention aims to break through the bottleneck of the existing rice transplanting quality evaluation technology and provides a high-precision, intelligent and multifunctional comprehensive solution. The invention is expected to provide powerful technical support for realizing large-scale intelligent accurate agriculture and boosting and improving the production efficiency and management level of rice by solving the key technical problems of robust detection and accurate positioning of seedlings in complex environments (particularly focusing on relieving model generalization problem by contrast learning), seedling shortage accurate identification and position inference, seedling quantity and interval rationality evaluation, visual output based on geographic coordinates and the like. A method for monitoring rice harvesting loss rate based on vibration signal analysis comprises the following specific processes: step S1, a vibration signal acquisition system is deployed to collect rice grain collision vibration signals; s2, preprocessing and standardizing vibration signals; s3, comparing and learning the self-supervision pre-training encoder; s4, training a rice grain classification and counting model; s5, collision event detection and secondary collision filtering; S6, classifying and counting rice grains; And S7, calculating the harvesting loss rate of the rice. The beneficial effects of the invention are as follows: aiming at the current rice harvesting loss rate calculation method, the rice grain vibration signal classification and superposition counting method based on SimCLR self-supervision learning provided by the invention has obvious advantages in various aspects, effectively overcomes the limitations of the prior art, and is specifically as follows: 1. The characteristic extraction robustness in the complex vibration environment is remarkably improved, the existing rice grain vibration signal analysis method is mostly dependent on manual design characteristics (such as peak amplitude and spectrum centroid) or traditional supervised learning, has limited characteristic expression capacity, and is difficult to cope with complex factors such as noise interference, equipment drift, rice grain physical characteristic difference (plumpness and impurity type) and the like in vibration signals, so that the classification accuracy and the counting stability are insufficient. In addition, supervised depth models trained based on a small number of labeling samples are prone to overfitting and difficult to migr