Fruit sweetness nondestructive determination method and device
The fruit characteristic data was collected by spectrometer and the sweetness value was predicted using machine learning models, which solved the shortcomings of lossy and non-destructive detection in the existing fruit sweetness detection technology, and achieved efficient and accurate fruit sweetness non-destructive determination.
Patent Information
- Application Number
- CN202311141320.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-05
- Publication Date
- 2025-03-07
AI Technical Summary
Among the existing fruit quality testing technologies, destructive testing technology is time-consuming and labor-intensive, causing damage to the environment and fruits. Non-destructive testing technology has not yet been popularized in personal use, making it difficult to achieve efficient and accurate fruit sweetness non-destructive measurement.
The fruit characteristic data is collected by using a spectrometer, combined with the Android terminal and the main processing module for data processing, and the fruit sweetness value is predicted using a machine learning model (nonlinear support vector machine regression model) to achieve lossless measurement.
It realizes efficient and accurate non-destructive measurement of fruit sweetness. The device is portable and has low environmental requirements. It can measure the sweetness value of fruit anytime and anywhere.
Smart Images

Figure CN119574471A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of food detection, and in particular to a method and a device for non-destructive determination of fruit sweetness. Background Art
[0002] The sugar content of fruits is not only an important indicator for evaluating the edible quality of fruits, but also an important indicator for testing the maturity of fruits. In agricultural research, agricultural production and fruit storage environment, the sugar content of fruits is one of the important bases for determining picking, transportation and storage. Farmers can know the sugar content of fruits when they produce fruits, judge the best time to sell them, reduce production costs and achieve high efficiency. Consumers can also buy more assured high-quality fruits based on the intuitive sugar content value. Existing fruit quality detection technologies can be divided into destructive testing and non-destructive testing. Destructive testing technology is time-consuming and labor-intensive, pollutes the environment and damages fruits. It is gradually being replaced by non-destructive testing technology. Non-destructive testing technologies include near-X-ray method, electrical method, infrared spectroscopy, electronic nose method, machine vision method, etc., which can detect the internal quality of fruits through the optical, electrical, odor and dynamic characteristics of fruits without destroying the appearance of fruits and changing the flavor of fruits. Since non-destructive sugar measurement is currently used more in large-scale automated fruit grading machines, personal use has not yet been popularized. In order to solve the above problems, the sweetness of fruits can be measured non-destructively and efficiently anytime and anywhere. The present invention collects fruit characteristic data through a spectrometer, processes the characteristic data, and determines the sweetness value through a machine learning model, thereby proposing a method and device for non-destructive measurement of fruit sweetness. Summary of the invention
[0003] The purpose of the present invention is to provide a method and device for non-destructive determination of fruit sweetness. The problem solved by the present invention is to provide a method and device for non-destructive determination of fruit sweetness that can be used anytime and anywhere to efficiently and accurately measure the sweetness of fruit.
[0004] The present invention discloses a non-destructive fruit sweetness determination device, comprising a spectrometer, an Android terminal, a main processing module, a system memory and a power module, wherein:
[0005] The spectrometer is electrically connected to the Android terminal, and the spectrometer is used to collect fruit spectral characteristic data and transmit all spectral data to the Android terminal for processing;
[0006] The main processing module is electrically connected to the Android terminal through an interface, and is used to store the feature-extracted data in the system memory, and then train the data using a machine learning method, and then process the data to achieve fruit sweetness value prediction;
[0007] The Android terminal module is electrically connected to the main processing module and is used to display the execution status during the signal collection and processing process;
[0008] The power supply module is electrically connected to the main processing module and is used to provide working power for the entire system.
[0009] The present invention further discloses a method for non-destructive determination of fruit sweetness, which uses the above-mentioned non-destructive determination device for fruit sweetness to perform detection, and comprises the following steps:
[0010] Step 1: In order to measure the sweetness of fruits efficiently, accurately and losslessly anytime and anywhere, it is necessary to collect fruit feature training data first. The specific collection method is as follows:
[0011] The training data is obtained by directly collecting the spectral characteristic data of the flesh under the fruit skin using the above-mentioned non-destructive sweetness determination device, and marking each spectral characteristic data of the authoritative sweetness meter with the sweetness value detected by the authoritative blood sweetness meter;
[0012] The more training data of fruits is collected, the more accurate the fruit sweetness model prediction will be.
[0013] The fruit characteristic data is 44-dimensional data, dimensions 1 to 8 are ultraviolet data, dimensions 9-22 are visible light data, and dimensions 23-44 are infrared data.
[0014] Step 2: Use the fruit feature training data collected in step 1 as the input of the nonlinear support vector machine model, train the nonlinear support vector machine regression model and generate a fruit sweetness regression model, and use the model to predict the sweetness value corresponding to the spectral feature data of the fruit to be tested. The specific calculation method is as follows:
[0015] The nonlinear support vector machine model uses a kernel function to map data into a high-dimensional space, transforming points from the original space to a larger space so that the data can be better separated in it.
[0016] Steps to build a nonlinear support vector machine regression model:
[0017] (1) Data preprocessing: Due to the differences between each device in a non-destructive sweetness determination device for fruit, each lighting device cannot be made exactly the same, and the spectral data here has a station error problem. In order to solve the above station error problem, the following single-point correction scheme was developed;
[0018] In the station error, it is manifested as: two devices measure two objects and obtain four spectral data; although there are differences in the data of the same object between the two devices, the spectral data ratio (or other operations) of different objects under the same device is consistent with the ratio of another device.
[0019] Correction material: Lenses
[0020] Correction scheme:
[0021] 1) Each device is shipped from the factory and the lens is collected once as a calibration spectrum
[0022] 2) During use, a single-point calibration solution was selected based on the usage scenario.
[0023] Assume that we have the original spectrum S and lens J
[0024] Single point calibration:
[0025] s=S / J
[0026] 3) Perform subsequent processing steps based on the corrected spectral data.
[0027] Each fruit sweetness non-destructive measurement device collects lens spectral data and uses the lens spectral data to single-point calibrate the original fruit spectral data.
[0028] (2) Select kernel function. Common kernel functions include rbf, sigmoid and polynomial. The kernel function selected for the fruit sweetness regression model is rbf.
[0029] (3) Select the Soft Margin parameter C and kernel function parameters. The Soft Margin parameter C is used to control the model complexity and penalize misclassified samples. For the fruit sweetness regression model, C = 1.00. The kernel function parameters need to be adjusted according to the characteristics of the dataset to improve the model performance. For the fruit sweetness regression model, g = auto.
[0030] (4) Model training and evaluation. The model was trained using the training data set and evaluated using the test data set. The R value of the fruit sweetness regression model for pears, oranges, apples, and tomatoes was at least 0.87.
[0031] The nonlinear support vector machine model has more accurate predictions.
[0032] The trained nonlinear support vector machine model is used to predict the sweetness value of the tested fruit.
[0033] The beneficial effects of the present invention are:
[0034] 1. A non-destructive fruit sweetness measuring device is easy to carry, has low requirements on the fruit sweetness measuring environment, and can measure the fruit sweetness value anytime and anywhere.
[0035] 2. Able to measure the sweetness value of fruits efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0037] Figure 1 A flow chart of a method for non-destructive determination of fruit sweetness.
[0038] Table 1 Original spectral characteristic data of pears and apples.
[0039] Table 2 Spectral feature data model prediction results of pears and apples after single-point calibration. DETAILED DESCRIPTION
[0040] The present invention is further described below in conjunction with a specific implementation process, but the protection scope of the present invention is not limited thereby.
[0041] In order to measure the sweetness value of fruits efficiently and accurately anytime and anywhere, combined with Figure 1 Tables 1 and 2 provide a detailed description of the present invention, and the specific implementation steps are as follows:
[0042] Implementation Example
[0043] Regarding the sweetness measurement of apples and pears, this implementation case is for a single device, that is, a single fruit sweetness non-destructive measurement device.
[0044] The present invention discloses a non-destructive fruit sweetness determination device, comprising a spectrometer, an Android terminal, a main processing module, a system memory and a power module, wherein:
[0045] The spectrometer is electrically connected to the Android terminal, and is used to collect spectral characteristic data of fruits such as apples and pears, and transmit all spectral data to the Android terminal for processing;
[0046] The main processing module is electrically connected to the Android terminal through an interface, and is used to store the feature-extracted data in the system memory, and then train the data using a machine learning method, and then process the data to achieve fruit sweetness value prediction;
[0047] The Android terminal module is electrically connected to the main processing module and is used to display the execution status during the signal collection and processing process;
[0048] The power supply module is electrically connected to the main processing module and is used to provide working power for the entire system.
[0049] The present invention further discloses a method for non-destructive determination of fruit sweetness, which uses the above-mentioned non-destructive determination device for fruit sweetness to perform detection, and comprises the following steps:
[0050] Step 1: In order to measure the sweetness of fruits efficiently, accurately and losslessly anytime and anywhere, it is necessary to collect feature training data of apples and pears. The specific collection method is as follows:
[0051] The training data is obtained by directly collecting the spectral characteristic data of the flesh under the skin of apples and pears using the above-mentioned non-destructive fruit sweetness determination device, and the sweetness value detected by the authoritative blood sweetness meter is marked for each spectral characteristic data of the authoritative sweetness meter, as shown in Table 1.
[0052] Table 1 lists some of the original spectral feature data from dimensions 1 to 6 among the 44 dimensions.
[0053] Table 1 Original spectral characteristic data of pears and apples
[0054]
[0055]
[0056] Step 2: Apply the apple and pear feature training data collected in step 1 as inputs to the nonlinear support vector machine model, train the nonlinear support vector machine regression model and generate an apple sweetness regression model and a pear sweetness regression model. Use the apple sweetness regression model and the pear sweetness regression model to predict the sweetness values corresponding to the spectral feature data of apples and pears, respectively, as shown in the column named model prediction value in Table 2.
[0057] Data preprocessing: A single fruit sweetness non-destructive determination device collects lens spectral data, and the lens spectral data is used to single-point calibrate the original spectral data of apples and pears, as shown in Table 2.
[0058] The lens spectrum data is:
[0059] [32763,43013,44796,55028,159719,210122,198374,249445,557542,607304,550940,601211,300757,351760,557569,608352,610383,660149,548891,599686,539281,590059,5 30157,579921,629690,680470,589062,638830,576586,627725,600244,650007,553948,603753,581521,631758,593640,643724,581480,631245,594351,643684,462826,512570]
[0060] Table 2 Spectral feature data model prediction results of pears and apples after single-point calibration
[0061]
[0062]
[0063]
[0064] From Table 2, it can be concluded that the predicted values of the pear sweetness regression model and the apple sweetness regression model are close to the pear sweetness value and the apple sweetness value measured by the authoritative sweetness meter. The method of the present invention can efficiently and accurately predict the sweetness value of pears and apples.
[0065] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
[0066] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure should be limited by the appended claims.
Claims
1. A method and device for non-destructive determination of fruit sweetness. The present invention relates to the field of food testing, and in particular to a method and device for non-destructive determination of fruit sweetness, which is characterized by: The steps include: The present invention discloses a non-destructive fruit sweetness determination device, comprising a spectrometer, an Android terminal, a main processing module, a system memory and a power module, wherein: The spectrometer is electrically connected to the Android terminal, and the spectrometer is used to collect fruit spectral characteristic data and transmit all spectral data to the Android terminal for processing; The main processing module is electrically connected to the Android terminal through an interface, and is used to store the feature-extracted data in the system memory, and then train the data using a machine learning method, and then process the data to achieve fruit sweetness value prediction; The Android terminal module is electrically connected to the main processing module and is used to display the execution status during the signal collection and processing process; The power supply module is electrically connected to the main processing module and is used to provide working power for the entire system. The present invention further discloses a method for non-destructive determination of fruit sweetness, which uses the above-mentioned non-destructive determination device for fruit sweetness to perform detection, and comprises the following steps: Step 1: In order to measure the sweetness of fruits efficiently, accurately and losslessly anytime and anywhere, it is necessary to collect fruit feature training data first. Step 2: Use the fruit feature training data collected in step 1 as the input of the nonlinear support vector machine model, train the nonlinear support vector machine regression model and generate a fruit sweetness regression model, and use the model to predict the sweetness value corresponding to the spectral feature data of the fruit to be tested. The specific calculation method is as follows: The nonlinear support vector machine model uses a kernel function to map data into a high-dimensional space, transforming points from the original space to a larger space so that the data can be better separated in it. Steps to build a nonlinear support vector machine regression model: (1) Data preprocessing (2) Select kernel function. Common kernel functions include rbf, sigmoid and polynomial. The kernel function selected for the fruit sweetness regression model is rbf. (3) Select the Soft Margin parameter C and kernel function parameters. The Soft Margin parameter C is used to control the model complexity and penalize misclassified samples. For the fruit sweetness regression model, C = 1.
00. The kernel function parameters need to be adjusted according to the characteristics of the dataset to improve the model performance. For the fruit sweetness regression model, g = auto. (4) Model training and evaluation. The model was trained using the training data set and evaluated using the test data set. The R value of the trained fruit sweetness regression model for pears, oranges, apples, and tomatoes was at least 0.87, and the nonlinear support vector machine model was relatively accurate in prediction. The trained nonlinear support vector machine model is used to predict the sweetness value of the tested fruit.
2. A method and device for non-destructive determination of fruit sweetness according to claim 1, characterized in that: The specific collection process in step 1 above is as follows: The training data is obtained by directly collecting the spectral characteristic data of the flesh under the fruit skin using the above-mentioned non-destructive sweetness determination device, and marking each spectral characteristic data of the authoritative sweetness meter with the sweetness value detected by the authoritative blood sweetness meter; The more training data of fruits is collected, the more accurate the fruit sweetness model prediction will be. The fruit characteristic data is 44-dimensional data, dimensions 1 to 8 are ultraviolet data, dimensions 9-22 are visible light data, and dimensions 23-44 are infrared data.
3. A method and device for non-destructive determination of fruit sweetness according to claim 1, characterized in that: The data preprocessing in step 2 includes: Due to the differences between each device in a non-destructive fruit sweetness determination device, each lighting device cannot be made exactly the same, so the spectral data has a station error problem. In order to solve the above station error problem, the following single-point correction scheme was developed; In the station error, it is manifested as: two devices measure two objects and obtain four spectral data; although there are differences in the data of the same object between the two devices, the spectral data ratio (or other operations) of different objects under the same device is consistent with the ratio of another device. Correction material: Lenses Correction scheme: 1) Each device is shipped from the factory and the lens is collected once as a calibration spectrum 2) During use, a single-point calibration solution was selected based on the usage scenario. Assume that we have the original spectrum S and lens J Single point calibration: s=S / J 3) Perform subsequent processing steps based on the corrected spectral data. Each fruit sweetness non-destructive measurement device collects lens spectral data and uses the lens spectral data to single-point calibrate the original fruit spectral data.