Continuous testing method for fruit quality

By combining visible near-infrared spectroscopy and acoustic vibration detection, a fruit quality detection model based on SwinT and machine learning is constructed, which solves the problems of inaccurate and destructive detection in the existing technology and achieves accurate, fast and continuous detection of fruit quality. .

CN118329833BActive Publication Date: 2024-09-03EAST CHINA JIAOTONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410761858.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-03
Estimated Expiration
2044-06-13

AI Technical Summary

Technical Problem

Among the existing fruit quality detection methods, traditional detection methods destroy the original state of the fruit, and single acoustic vibration or visible near-infrared spectrum detection is not accurate enough to fully reflect the fruit quality.

Method used

Using a continuous fruit quality detection method, combined with visible near-infrared spectroscopy and acoustic vibration detection, the resonant speaker outputs a sinusoidal frequency sweep signal for forced vibration, collects sound signals and visible near-infrared spectrum data, and performs time-frequency domain analysis and noise removal. Build a deep and shallow learning model based on SwinT and machine learning for quality prediction.

Benefits of technology

It achieves accurate, rapid and continuous detection of fruit quality, improves detection efficiency and accuracy, is suitable for a variety of fruits, and establishes a detection model with higher robustness and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118329833B
    Figure CN118329833B
Patent Text Reader

Abstract

The present invention relates to the technical field of quality detection of medium-sized thin-skinned fruits, and in particular to a method for continuous detection of fruit quality. It includes continuously collecting visible near-infrared spectra and sound signals of the fruit to be tested under forced vibration; performing time-frequency domain analysis on them, and converting the sound data from the time domain signal into a sound image; fusing the sound image and the reconstructed visible near-infrared spectrum data as data input, and outputting predicted quality data of the fruit to be tested. The present invention realizes rapid and continuous detection of multiple fruits, greatly improving detection efficiency and accuracy. The entire acoustic vibration data and visible near-infrared spectrum data are fused as the input of the fruit quality prediction model. Compared with the fruit quality prediction model using single data, the present invention has higher detection accuracy and feasibility, and can establish a model with stronger robustness and higher detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of quality detection of medium-sized thin-skinned fruits, and in particular to a continuous detection method for fruit quality. Background Art

[0002] The two commonly used detection methods for fruits are traditional detection methods and non-destructive detection methods. Traditional detection methods generally cannot truly and comprehensively reflect the quality of fruits, and destroy the original state of fruits. Fruit non-destructive detection technology is a detection method adopted to obtain internal and external information of fruits without destroying the original physical and chemical properties of fruits. Compared with traditional fruit quality detection methods, it has the advantages of high efficiency and non-destructiveness. Therefore, fruit non-destructive detection technology is increasingly used in fruit quality detection and grading. In fruit non-destructive detection technology, acoustic vibration method and visible near-infrared spectroscopy are both simple to operate, fast to analyze, low cost, and suitable for online detection. They are the two most common methods for fruit quality detection. Among them, the excitation source of the acoustic vibration method for detecting fruit quality can be divided into impact vibration and forced vibration. The impact vibration method is to use various tools (such as impact hammers, pressurized air valves, pulsed lasers, etc.) to apply a transient force to the fruit to make it vibrate freely. This method is considered to be a more suitable excitation method for online detection. However, the impact vibration has a short duration, low impact energy, and poor signal quality, which makes it difficult to obtain good hardness prediction accuracy. The forced vibration method uses an excitation source (such as a vibration table, piezoelectric transducer, etc.) to sweep the frequency to excite the fruit to vibrate. The forced vibration method can obtain better signal quality, but the required excitation time is long and is generally considered unsuitable for online detection.

[0003] In addition, changes in fruit quality are related to parameters such as viscosity, tension, porosity, and expansion pressure between fruit cells, and are reflected in macroscopic aspects as changes in physical properties such as elastic modulus and resonance frequency. The acoustic vibration response signal of fruit is closely related to its physical properties (such as elastic modulus, shape, size, weight, etc.), and can indirectly reflect the physical information of the fruit. At the same time, changes in fruit quality are usually accompanied by the degradation of pectin, cellulose, and hemicellulose and the loss of water. Visible near-infrared light is very sensitive to the CH, OH, and NH molecular bonds in these substances, so visible near-infrared spectroscopy can also indirectly reflect the quality of fruit. However, there are large differences in the detection principles between acoustic vibration detection and spectral detection, and a single detection method is often inaccurate for the detection of fruit quality. Summary of the invention

[0004] The present invention aims to at least improve one of the technical problems existing in the prior art. To this end, the present invention proposes a continuous fruit quality detection method.

[0005] A method for continuous detection of fruit quality, wherein the method adopts a continuous detection device for fruit quality to perform detection, and comprises the following steps:

[0006] Step S100, continuously collecting visible and near infrared spectra of the fruit to be tested as first sample data;

[0007] Step S200, outputting a sine frequency sweep signal according to the resonance speaker, exciting the fruit to be tested to generate a sound signal in a forced vibration manner, and acquiring the sound signal as second sample data;

[0008] Step S300, measuring the hardness value of the fruit to be tested by the texture analyzer as the target measured value data;

[0009] Step S400, performing time-frequency domain analysis on the second sample data, using continuous wavelet transform and Gram angle field to convert the second sample data from a time domain signal into a sound image;

[0010] Step S500, preprocessing the first sample data according to fully adaptive noise set empirical mode decomposition, removing background noise of the first sample data, and obtaining reconstructed visible near infrared spectrum data;

[0011] Step S600, constructing a deep and shallow learning model (SwinT-PLS / SVR) based on SwinT and machine learning as a fruit quality prediction model, using the sound image and the reconstructed visible near infrared spectrum data as inputs of the fruit quality prediction model, and outputting predicted quality data of the fruit to be tested after the data is subjected to feature fusion of the fruit quality prediction model;

[0012] Step S700, detection and verification, performing data fitting on the predicted quality data of the fruit to be tested and the target measured value data to obtain a fitting result, and verifying the effectiveness and accuracy of the model for the fruit quality;

[0013] Step S800, accurately detecting the quality of the fruit according to the fruit quality detection model constructed above.

[0014] The fruit quality continuous detection device comprises:

[0015] Conveyor belts;

[0016] A free-style fruit cup, which is placed on the conveyor belt and moves with the conveyor belt, and is used for continuous detection of fruits. The free-style fruit cup has a cavity, a resonance horn is installed in the cavity, and the resonance horn is connected to an external power amplifier for outputting a sine frequency sweep signal. The free-style fruit cup located above the resonance horn is installed with an excitation unit;

[0017] A visible near-infrared detection device, which is arranged on the side beam of the conveyor belt and is used to collect the visible near-infrared spectrum of the fruit in the free-style fruit cup;

[0018] An annular synchronous sound signal collection unit, the annular synchronous sound signal collection unit is arranged above the conveyor belt, the annular synchronous sound signal collection unit comprises a sound signal collection sleeve, a microphone, an annular conveying device and a lifting rod, the annular conveying device is arranged above the conveyor belt, a lifting rod is installed on the movable slide rail of the annular conveying device, a sound signal collection sleeve is fixedly installed at the driving end of the lifting rod away from the annular conveying device, the sound signal collection sleeve has a sleeve cup, which is used to tightly cover the top of the fruit when the lifting rod moves downward, and stimulate the fruit to generate a sound signal in a forced vibration manner, and a microphone is fixedly installed at the end of the sound signal collection sleeve connected to the driving end of the lifting rod;

[0019] A data acquisition module, the data acquisition module is electrically connected to the microphone;

[0020] A data processing unit, wherein the data processing unit is electrically connected to the data acquisition module, and the data processing unit is electrically connected to the power amplifier.

[0021] In a possible implementation of the first aspect, in step S400, in order to fully extract time-frequency information from the sound signal, a continuous wavelet transform (CWT) is used to convert the sound response signal into a time-frequency image, and the calculation formula is as follows:

[0022] ,

[0023] in is the time domain signal, is the scale factor, is the displacement factor, is the complex conjugate, is the complex conjugate mother wavelet function of displacement and expansion;

[0024] In the process of generating the sound time-frequency domain image, the sound signal is first converted into an intermediate time-frequency data matrix of size 224×8192 using CWT, and then the convolution block Conv1 is used to reduce the dimension of the intermediate time-frequency data matrix to obtain a sound CWT time-frequency domain image (S-CWT) of size 224×224. The data in the sound CWT time-frequency domain image is a complex matrix containing amplitude and phase information;

[0025] In order to further utilize the time-frequency information in the time domain and frequency domain signals of the tested fruit, the Gram angular field (GAF) is used to encode the one-dimensional time-frequency signal to generate GAF time domain image and GAF ​​frequency domain image. Specifically, the Gram angular difference field (GADF) is used to encode the time domain signal into a sound GAF ​​time domain image (S-GAF) with a size of 224×224. T ), then the sound response signal is converted into a sound frequency domain signal through fast Fourier transform, and then reduced to a frequency domain signal through convolution block Conv2, and the frequency domain signal is encoded into a sound GAF ​​frequency domain image (S-GAF) of size 224×224 using the Gram Angular Difference Field (GADF). F ), and finally generated CWT time-frequency image, GAF time domain image and GAF ​​frequency domain image, and superimposed these three images into a 224×224×3 sound image.

[0026] In a possible implementation of the first aspect, in step S200, the resonant speaker outputs a sinusoidal swept frequency signal, specifically the resonant speaker, driven by a power amplifier, outputs a 100 Hz to 1500 Hz sinusoidal swept frequency signal within 0.5 seconds, and stimulates the fruit to be tested to generate a sound signal in a forced vibration manner, and the sound signal is detected by a microphone in a sound signal acquisition sleeve, and is collected in real time by a signal acquisition module and transmitted to a data processing unit for storage.

[0027] In a possible implementation of the first aspect, in step S300, after collecting the first sample data and the second sample data, using a texture analyzer to measure the hardness of the fruit to be tested, specifically including: when measuring the hardness of the fruit to be tested, taking three measuring points at equal intervals along the equator of the fruit to be tested, each measuring point is 120° apart, and a cylindrical probe with a diameter of 5 mm is inserted into the flesh of the fruit to be tested for 8 mm at a speed of 1 mm / s to obtain three force-displacement curves; extracting the slope from the origin to the maximum force point from each curve as the hardness value, and taking the average of the three hardness values ​​as the target measured value data.

[0028] In a possible implementation of the first aspect, step S500 specifically includes decomposing the first sample data into four modal components and a residual by fully adaptive noise set empirical mode decomposition, analyzing the correlation between the modal components and the original first sample data by Pearson correlation, adding the top three components of the correlation to obtain the reconstructed first sample data, thereby effectively removing the background noise.

[0029] In a possible implementation manner of the first aspect, a calculation formula of the Gram angle difference field (GADF) is as follows:

[0030] ,

[0031] in, , n is a positive integer, is a time domain signal Middle i Angle value, is a time domain signal The i Normalized data points.

[0032] In a possible implementation manner of the first aspect, the fruits to be tested include medium-sized fruits such as apples and yellow peaches.

[0033] The continuous fruit quality detection method according to the embodiment of the present invention has the following advantages compared with the prior art:

[0034] (1) The present invention integrates acoustic vibration detection and visible near-infrared spectroscopy detection. When detecting fruits, it collects acoustic signals containing the physical properties of fruits and visible near-infrared spectra containing the biochemical characteristics of fruits. Compared with a single detection technology, the present invention can detect the quality of fruits from multiple aspects and can be used for the detection of a variety of fruits.

[0035] (2) The annular synchronous sound signal acquisition unit designed in the present invention applies the forced vibration method in acoustic vibration detection to the actual online detection of fruit quality, and realizes rapid and continuous detection of multiple fruits while obtaining high-quality signals, thereby greatly improving the detection efficiency and accuracy.

[0036] (3) The present invention combines the entire acoustic data and visible near-infrared spectral data as the input of the fruit quality prediction model. Compared with the fruit quality prediction model using single data, the present invention has higher detection accuracy and feasibility, and can establish a model with stronger robustness and higher detection accuracy.

[0037] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 is a schematic diagram of the overall structure of a continuous fruit quality detection device according to an embodiment of the present invention;

[0040] Figure 2is a flow chart of a method for continuous detection of fruit quality according to an embodiment of the present invention;

[0041] Figure 3 is an example diagram of a force-displacement curve of a yellow peach according to an embodiment of the present invention;

[0042] Figure 4 is a flow chart of sound image generation according to an embodiment of the present invention;

[0043] Figure 5 is the prediction result of the yellow peach sample in the prediction set by SwinT-PLS according to an embodiment of the present invention;

[0044] Figure 6 It is the prediction result of SwinT-SVR for the yellow peach samples in the prediction set according to an embodiment of the present invention.

[0045] Reference numerals:

[0046] Conveyor belt 1, sound signal collection sleeve 2, excitation unit 3, free-style fruit cup 4, resonance speaker 5, microphone 6, ring-shaped conveyor 7, lifting rod 8, visible near-infrared detection device 9, ring-shaped synchronous sound signal collection unit 10, fruit 11, power amplifier 12, data collection module 13, data processing unit 14. DETAILED DESCRIPTION

[0047] The embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be an intermediate element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be an intermediate element at the same time.

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0050] The terms "first", "second", "third", etc. in the specification and claims of the present application and the drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a series of steps or units are included, or optionally, steps or units not listed are included, or optionally, other steps or units inherent to these processes, methods, products or devices are included.

[0051] Only the part relevant to the present application is shown in the accompanying drawings, but not all of the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the process can be terminated, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0052] The terms "component", "module", "system", "unit", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a unit can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or distributed between two or more computers. In addition, these units can be executed from various computer-readable media having various data structures stored thereon. Units can communicate through local and / or remote processes, for example, based on signals having one or more data packets (e.g., data from a second unit interacting with another unit in a local system, a distributed system, and / or a network. For example, the Internet interacts with other systems via signals).

[0053] like Figure 1 As shown, this embodiment provides a continuous fruit quality detection device, which includes:

[0054] Conveyor belt 1;

[0055] A free-style fruit cup 4, which is placed on the conveyor belt 1 and moves with the conveyor belt 1. The free-style fruit cup 4 can flexibly adapt to fruits of different sizes, and is convenient for continuous detection of the fruit 11. The free-style fruit cup 4 has a cavity, and a resonance speaker 5 is installed in the cavity. When detecting, the resonance speaker 5 is cleverly integrated at the bottom of the free-style fruit cup 4. The resonance speaker 5 is connected to an external power amplifier 12 for outputting a sine sweep signal. The free-style fruit cup 4 located above the resonance speaker 5 is installed with an excitation unit 3;

[0056] A visible near-infrared detection device 9, which is disposed on a side beam of the conveyor belt 1 and is used to collect a visible near-infrared spectrum of the fruit in the free-style fruit cup 4;

[0057] A ring-shaped synchronous sound signal collection unit 10, which is arranged above the conveyor belt 1, and includes a sound signal collection sleeve 2, a microphone 6, a ring-shaped transmission device 7 and a lifting rod 8. The ring-shaped transmission device 7 is arranged above the conveyor belt 1. The ring-shaped transmission device 7 uses a conventional ring track and a moving block driven by a motor, so that the moving block (not shown in the figure) can be controlled to move along the ring track. The lifting rod 8 is installed on the moving block of the ring-shaped transmission device 7. The driving end of the lifting rod 8 away from the ring-shaped transmission device 7 is fixedly installed with a sound signal collection sleeve 2. The sound signal collection sleeve 2 has a sleeve cup, which is used to tightly cover the top of the fruit 11 when the lifting rod 8 moves downward, and stimulate the fruit 11 to generate a sound signal in a forced vibration manner. The end of the sound signal collection sleeve 2 connected to the driving end of the lifting rod 8 is fixedly installed with a microphone 6;

[0058] A data acquisition module 13, wherein the data acquisition module 13 is electrically connected to the microphone 6;

[0059] The data processing unit 14 is electrically connected to the data acquisition module 13 , and the data processing unit 14 is electrically connected to the power amplifier 12 .

[0060] The specific implementation process is as follows: when detecting the fruit 11, the fruit 11 only needs to be placed on the free-style fruit cup 4 on the conveyor belt 1. As the conveyor belt 1 moves, the excitation unit 3 of the integrated free-style fruit cup will automatically enter the visible near-infrared detection device 9 to collect the visible near-infrared spectrum of the fruit 11 in the range of 300nm to 1100nm. The collected visible near-infrared spectrum contains the biochemical characteristics of the fruit and is transmitted to the data processing unit 14 for storage. Subsequently, the excitation unit 3 of the integrated free-style fruit cup enters the sound signal collection area with the conveyor belt 1. When the excitation unit 3 of the integrated free-style fruit cup reaches below the sound signal collection sleeve 2, the lifting rod 8 will quickly drive the sound signal collection sleeve 2 to move downward and tightly fit on the top of the fruit 11. At this time, the resonant speaker 5, driven by the power amplifier 12, outputs a sine sweep frequency signal in the range of 100 Hz to 1500 Hz within 0.5 seconds, and excites the fruit 11 to generate sound signals in the form of forced vibration. These sound signals contain the physical characteristics of the fruit. This sound signal is accurately detected by the microphone 6 in the sound signal collection sleeve 2, and is collected in real time by the data collection module 13 and transmitted to the data processing unit 14 for storage;

[0061] The saved sound signal is processed in the data processing unit 14, and the sound signal is converted into sound frequency domain data by fast Fourier transform. The saved visible near infrared spectrum data is processed in the data processing unit 14, and the background noise in the visible near infrared spectrum is removed by using fully adaptive noise set empirical mode decomposition. The fused sound image and visible near infrared spectrum data are used as inputs of the fruit quality prediction model, and then the fruit quality prediction model outputs the predicted quality of the fruit.

[0062] A method for continuous detection of fruit quality in this embodiment, wherein the method uses the above-mentioned continuous detection device for fruit quality to perform detection, comprises the following steps:

[0063] Step S100, continuously collecting visible and near infrared spectra of the fruit to be tested as first sample data;

[0064] Step S200, outputting a sine swept frequency signal according to the resonance horn, exciting the fruit to be tested to generate a sound signal in a forced vibration mode, and obtaining the sound signal as the second sample data, specifically, outputting a sine swept frequency signal according to the resonance horn, specifically, the resonance horn under the drive of the power amplifier outputs a 100 Hz-1500 Hz sine swept frequency signal within 0.5 seconds, and exciting the fruit to be tested to generate a sound signal in a forced vibration mode, the sound signal is accurately detected by a microphone in a sound signal acquisition sleeve, and is collected in real time by a signal acquisition module and transmitted to a data processing unit for storage;

[0065] Step S300, measuring the hardness value of the fruit to be tested by the texture analyzer as the target measured value data;

[0066] Step S400, performing time-frequency domain analysis on the second sample data, using continuous wavelet transform and Gram angle field to convert the second sample data from a time domain signal into a sound image;

[0067] Step S500, preprocessing the first sample data according to fully adaptive noise set empirical mode decomposition, removing background noise of the first sample data, and obtaining reconstructed visible near infrared spectrum data;

[0068] Step S600, constructing a deep and shallow learning model (SwinT-PLS / SVR) based on SwinT and machine learning as a fruit quality prediction model, using the sound image and the reconstructed visible near infrared spectrum data as inputs of the fruit quality prediction model, and outputting predicted quality data of the fruit to be tested after the data is subjected to feature fusion of the fruit quality prediction model;

[0069] Step S700, detection and verification, performing data fitting on the predicted quality data of the fruit to be tested and the target measured value data to obtain a fitting result, and verifying the effectiveness and accuracy of the model for the fruit quality;

[0070] Step S800, accurately detecting the quality of the fruit according to the fruit quality detection model constructed above.

[0071] It should be noted that, in step S400, in order to fully extract the time-frequency information from the sound signal, the sound response signal is converted into a time-frequency image using continuous wavelet transform (CWT). The CWT time-frequency image describes the contribution of each frequency component to the signal energy within a time interval. Its calculation formula is as follows:

[0072] ,

[0073] in is the time domain signal, is the scale factor, is the displacement factor, is the complex conjugate, is the complex conjugate mother wavelet function of displacement and expansion;

[0074] In the process of generating the sound time-frequency domain image, the sound signal is first converted into an intermediate time-frequency data matrix of size 224×8192 using CWT, and then the convolution block Conv1 is used to reduce the dimension of the intermediate time-frequency data matrix to obtain a sound CWT time-frequency domain image (S-CWT) of size 224×224. The data in the sound CWT time-frequency domain image is a complex matrix containing amplitude and phase information;

[0075] Taking yellow peach as an example, in order to further utilize the time-frequency information in the time domain and frequency domain signals, the Gram angle field (GAF) is used to encode the one-dimensional time-frequency signal to generate the GAF time domain image and the GAF frequency domain image. The calculation formula of the Gram angle difference field (GADF) is as follows:

[0076] ,

[0077] in, , n is a positive integer, is a time domain signal Middle i Angle value, is a time domain signal The i Normalized data points.

[0078] The process of generating the time domain and frequency domain images of the yellow peach sound is as follows: Figure 4 As shown in the figure, the convolution block Conv1 is first used to reduce the dimension of the sound signal to a time domain signal of size 1×224, and the Gram Angular Difference Field (GADF) is used to encode the time domain signal into a sound GAF ​​time domain image (S-GAF) of size 224×224. T), then the sound signal is converted into a sound frequency domain signal through fast Fourier transform, and then reduced to a frequency domain signal through convolution block Conv2, and the frequency domain signal is encoded into a sound GAF ​​frequency domain image (S-GAF) of size 224×224 using the Gram Angular Difference Field (GADF). F ), and finally generated the ST time-frequency image, GAF time domain image and GAF ​​frequency domain image, and superimposed these three images into a 224×224×3 sound image.

[0079] It should be noted that in step S300, after the first sample data and the second sample data are collected, the hardness of the fruit to be tested is measured using a texture analyzer. In this embodiment, yellow peach is taken as an example, including: when measuring the hardness of the yellow peach to be tested, three measuring points are taken at equal intervals along the equator of the yellow peach, and each measuring point is 120° apart. A cylindrical probe with a diameter of 5 mm is inserted into the yellow peach sample flesh for 8 mm at a speed of 1 mm / s to obtain three force-displacement curves; the slope from the origin to the maximum force point is extracted from each curve as the hardness value, and the average of the three hardness values ​​is taken as the target measured value data, such as Figure 3 Shown is one of the force-displacement curves.

[0080] It should be noted that step S500 specifically includes decomposing the first sample data into four modal components and a residual by fully adaptive noise set empirical mode decomposition, analyzing the correlation between the modal components and the original first sample data by Pearson correlation, adding the top three components of the correlation, and obtaining the reconstructed first sample data, thereby effectively removing the background noise.

[0081] It should be noted that the fruits to be tested in this embodiment include medium-sized fruits such as apples and yellow peaches, but are not limited thereto.

[0082] In this embodiment, a deep and shallow learning model (SwinT-PLS / SVR) based on SwinT and machine learning was constructed as a fruit quality prediction model based on the sound image and visible near-infrared spectrum, wherein the SwinT model is used to extract sound image features from the sound image, and the feature size extracted for each sample is 1×768, and partial least squares (PLS) or support vector regression (SVR) is used to output the predicted hardness of yellow peach. The sound image and the reconstructed visible near-infrared spectrum data are input as data into the fruit quality prediction model to obtain the output quality of the fruit, as shown in Table 1. It can be seen from Table 1 that the SwinT-PLS and SwinT-SVR models trained based on the sound image features combined with the visible near-infrared spectrum features have good prediction performance. Compared with SwinT-SVR, SwinT-PLS performs better on the prediction set, with the coefficient of determination (R 2 P ), prediction root mean square error (RMSEP ), relative analytical error (RPD P ) are 0.951 N / mm, 0.443, and 4.339 respectively. Figure 5 and Figure 6 The prediction results of SwinT-PLS and SwinT-SVR for yellow peach samples in the prediction set are shown respectively. It can be seen that the predicted hardness values ​​of the two models are well fitted with the measured hardness values. This shows that the combination of sound information and visible near-infrared spectral information can more accurately predict the hardness of yellow peaches and realize continuous detection of fruit quality.

[0083] Table 1: SwinT-PLS / SVR prediction results of yellow peach firmness

[0084]

[0085] The continuous fruit quality detection method according to the embodiment of the present invention has the following advantages compared with the prior art:

[0086] (1) The present invention integrates acoustic vibration detection and visible near-infrared spectrum detection. When detecting fruits, it collects acoustic vibration signals containing the physical properties of fruits and visible near-infrared spectra containing the biochemical characteristics of fruits. Compared with a single detection technology, the present invention can detect the quality of fruits from multiple aspects and can be used for the detection of a variety of fruits.

[0087] (2) The annular synchronous sound signal acquisition unit designed in the present invention applies the forced vibration method in acoustic vibration detection to the actual online detection of fruit quality, and realizes rapid and continuous detection of multiple fruits while obtaining high-quality signals, thereby greatly improving the detection efficiency and accuracy.

[0088] (3) The present invention combines the entire acoustic vibration data and visible near-infrared spectral data as the input of the fruit quality prediction model. Compared with the fruit quality prediction model using single data, the present invention has higher detection accuracy and feasibility, and can establish a model with stronger robustness and higher detection accuracy.

[0089] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation to the invention.

[0090] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.

[0091] Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present embodiment application. The appearance of this phrase in various positions in the specification is not necessarily the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It can be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0092] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A continuous detection method for fruit quality, It is characterized in that The method adopts a continuous fruit quality detection device for detection, and comprises the following steps: Step S100, continuously collecting visible and near infrared spectra of the fruit to be tested as first sample data; Step S200, outputting a sine frequency sweep signal according to the resonance speaker, exciting the fruit to be tested to generate a sound signal in a forced vibration manner, and acquiring the sound signal as second sample data; Step S300, measuring the hardness value of the fruit to be tested by the texture analyzer as the target measured value data; Step S400, performing time-frequency domain analysis on the second sample data, using continuous wavelet transform and Gram angle field to convert the second sample data from a time domain signal into a sound image; Step S500, preprocessing the first sample data according to fully adaptive noise set empirical mode decomposition, removing background noise of the first sample data, and obtaining reconstructed visible near infrared spectrum data; Step S600, constructing a deep and shallow learning model based on SwinT and machine learning as a fruit quality prediction model, using the sound image and the reconstructed visible near infrared spectrum data as inputs of the fruit quality prediction model, and outputting predicted quality data of the fruit to be tested after the data are subjected to feature fusion of the fruit quality prediction model; Step S700, detection and verification, performing data fitting on the predicted quality data of the fruit to be tested and the target measured value data to obtain a fitting result, and verifying the effectiveness and accuracy of the model for the fruit quality; Step S800, accurately detecting the quality of the fruit according to the fruit quality detection model constructed above; The fruit quality continuous detection device comprises: Conveyor belt (1); A free-style fruit cup (4), the free-style fruit cup (4) being placed on the conveyor belt (1) and moving along with the conveyor belt (1), the free-style fruit cup (4) having a cavity, a resonance speaker (5) being installed in the cavity, the resonance speaker (5) being connected to an external power amplifier (12), and an excitation unit (3) being installed in the free-style fruit cup (4) located above the resonance speaker (5); A visible near-infrared detection device (9), the visible near-infrared detection device (9) being arranged on a side beam of the conveyor belt (1) and being used to collect a visible near-infrared spectrum of the fruit in the free-style fruit cup (4); A ring-shaped synchronous sound signal collection unit (10), the ring-shaped synchronous sound signal collection unit (10) being arranged above the conveyor belt (1), the ring-shaped synchronous sound signal collection unit (10) comprising a sound signal collection sleeve (2), a microphone (6), a ring-shaped conveying device (7) and a lifting rod (8), the ring-shaped conveying device (7) being arranged above the conveyor belt (1), the lifting rod (8) being installed on a movable slide rail of the ring-shaped conveying device (7), the driving end of the lifting rod (8) away from the ring-shaped conveying device (7) being fixedly installed with the sound signal collection sleeve (2), the sound signal collection sleeve (2) having a sleeve cup, and the end of the sound signal collection sleeve (2) connected to the driving end of the lifting rod (8) being fixedly installed with the microphone (6); A data acquisition module (13), the data acquisition module (13) being electrically connected to the microphone (6); A data processing unit (14), the data processing unit (14) is electrically connected to the data acquisition module (13), and the data processing unit (14) is electrically connected to the power amplifier (12).

2. The method for continuous detection of fruit quality according to claim 1, It is characterized in that In step S400, in order to fully extract the time-frequency information from the sound signal, the sound signal is converted into a time-frequency image using continuous wavelet transform, and the calculation formula is as follows: , in, is the time domain signal, is the scale factor, is the displacement factor, is the complex conjugate, is the complex conjugate mother wavelet function of displacement and expansion; In the process of generating the sound time-frequency domain image, the sound signal is first converted into an intermediate time-frequency data matrix of size 224×8192 using continuous wavelet transform, and then the convolution block Conv1 is used to reduce the dimension of the intermediate time-frequency data matrix to obtain a sound CWT time-frequency domain image of size 224×224; In order to further utilize the time-frequency information in the tested fruit, the Gram angle field is used to encode the time-frequency information to generate the Gram angle field time domain image and the Gram angle field frequency domain image. Specifically, the time domain signal is encoded into a sound GAF ​​time domain image with a size of 224×224 using the Gram angle difference field, and then the sound signal is converted into an acoustic audio domain signal by fast Fourier transform, and then reduced to a frequency domain signal by the convolution block Conv2, and then the frequency domain signal is encoded into a sound GAF ​​frequency domain image with a size of 224×224 using the Gram angle difference field. Finally, the CWT time-frequency image, GAF time domain image and GAF ​​frequency domain image are generated, and these three images are superimposed into a sound image of 224×224×3.

3. The method for continuous detection of fruit quality according to claim 1, It is characterized in that In step S200, the resonant speaker outputs a sine swept frequency signal of 100 Hz to 1500 Hz within 0.5 seconds under the drive of the power amplifier, and stimulates the fruit to be tested to generate a sound signal in a forced vibration manner. The sound signal is detected by a microphone in a sound signal acquisition sleeve, and is collected in real time by a signal acquisition module and transmitted to a data processing unit for storage.

4. The method for continuous detection of fruit quality according to claim 1, It is characterized in that In step S300, after the first sample data and the second sample data are collected, the hardness of the fruit to be tested is measured using a texture analyzer, specifically including: when measuring the hardness of the fruit to be tested, three measuring points are taken at equal intervals along the equator of the fruit to be tested, each measuring point is 120° apart, and a cylindrical probe with a diameter of 5 mm is inserted into the flesh of the fruit to be tested for 8 mm at a speed of 1 mm / s to obtain three force-displacement curves; the slope from the origin to the maximum force point is extracted from each curve as the hardness value, and the average of the three hardness values ​​is taken as the target measured value data.

5. The method for continuous detection of fruit quality according to claim 1, It is characterized in that Step S500 specifically includes decomposing the first sample data into four modal components and a residual by fully adaptive noise set empirical mode decomposition, analyzing the correlation between the modal components and the original first sample data by Pearson correlation, adding the top three components of the correlation, and obtaining the reconstructed first sample data.

6. The method for continuous detection of fruit quality according to claim 2, It is characterized in that in, The calculation formula of Gram angle difference field is as follows: , , n is a positive integer, is a time domain signal Middle i Angle value, is a time domain signal The i Normalized data points.

7. The method for continuous detection of fruit quality according to claim 1, It is characterized in that The fruits to be tested include apples and yellow peaches.