Strawberry sugar degree efficient nondestructive testing method based on intelligent algorithm

By combining a hyperspectral imager and a near-infrared spectrometer with intelligent algorithms to process strawberry spectral data, and constructing and optimizing the SVM model, the destructive and inefficient problems of traditional strawberry sugar content detection were solved, and rapid, non-destructive and accurate detection of strawberry sugar content was achieved, promoting the intelligent development of strawberry detection technology.

CN120703080AActive Publication Date: 2025-09-26SOUTH CHINA UNIV OF TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510797369.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-26
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

Traditional strawberry sugar content detection methods are destructive, inefficient, and easily interfered with by human factors, making it difficult to meet the strawberry industry's needs for rapid, non-destructive, and accurate detection.

Method used

A hyperspectral imager and near-infrared spectrometer are used to obtain strawberry spectral data. Intelligent algorithms are used for wavelet denoising and polynomial baseline correction to extract key characteristic wavelengths. The SVM model is constructed and optimized to achieve non-destructive, rapid and accurate detection of strawberry sugar content.

Benefits of technology

It realizes the rapid, non-destructive and accurate detection of strawberry sugar content, reduces human errors, improves detection efficiency and accuracy, promotes the development of strawberry detection technology towards intelligence, and has wide applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120703080A_ABST
    Figure CN120703080A_ABST
Patent Text Reader

Abstract

The invention discloses a strawberry sugar degree efficient nondestructive testing method based on an intelligent algorithm, which comprises the following steps: acquiring a plurality of strawberry spectral data and a sugar degree reference value, and dividing the strawberry spectral data into a training set, a verification set and a test set; performing wavelet denoising and polynomial baseline correction on the spectral data to obtain preprocessed data; key characteristic wavelengths are extracted from the preprocessed data, and an initial SVM model is constructed based on the key characteristic wavelengths; the training set is adopted to optimize the initial SVM model, and an optimized SVM model is obtained; and obtaining target strawberry spectral data, and inputting the target strawberry spectral data into the optimized SVM model to obtain a detection result. According to the invention, rapid, lossless and accurate detection of the strawberry sugar degree is realized, and technical support is provided for intelligent development of the strawberry industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of nondestructive testing, and in particular relates to a high-efficiency nondestructive testing method for the sugar content of strawberries based on an intelligent algorithm. Background Art

[0002] The sugar content of strawberries is a key indicator of their quality and requires precise testing. Strawberry sugar content testing is of great significance in the strawberry planting, picking, sorting, and sales processes. Traditional destructive testing methods, such as handheld refractometers, can provide relatively accurate sugar content values, but they have many drawbacks: first, destructive sampling of strawberries is required, affecting their integrity and commercial value; second, the testing efficiency is low and cannot meet the needs of large-scale strawberry quality testing; third, it is easily interfered with by subjective factors such as human operation and environmental factors, resulting in unstable measurement results. With the scale and sophistication of the strawberry industry, traditional testing methods have been unable to meet market demand.

[0003] In recent years, spectral technology has garnered widespread attention in agricultural product quality testing due to its rapid, non-destructive, and information-rich characteristics. Hyperspectral imagers and near-infrared spectrometers can acquire spectral data of strawberries within a wavelength range of 400 to 1000 nanometers. This spectral data contains rich information about the chemical composition and physical structure of strawberries, and is closely related to quality indicators such as sugar content. However, spectral data often exhibits high dimensionality, strong noise, and complex nonlinear relationships, making direct use of raw spectral data for sugar content prediction often ineffective. Therefore, it is necessary to combine intelligent algorithms to process and analyze spectral data, extract key features related to sugar content, and establish accurate prediction models.

[0004] Intelligent algorithms and artificial intelligence technologies have been widely used in agriculture and food testing in recent years. By introducing intelligent algorithms, complex spectral data can be effectively processed, key features can be extracted, and prediction models can be optimized, improving detection accuracy and efficiency. This approach not only overcomes the limitations of traditional detection methods but also enables rapid and non-destructive testing of strawberry sugar content, representing a key trend in driving the development of intelligent and efficient strawberry quality testing. Summary of the Invention

[0005] To solve the above technical problems, the present invention proposes an efficient and nondestructive detection method for the sugar content of strawberries based on an intelligent algorithm, which can realize rapid, nondestructive and accurate detection of the sugar content of strawberries, and provide technical support for the intelligent development of the strawberry industry.

[0006] To achieve the above objectives, the present invention provides an efficient and non-destructive strawberry sugar content detection method based on an intelligent algorithm, comprising:

[0007] Acquire a plurality of strawberry spectral data and sugar content reference values, and divide the strawberry spectral data into a training set, a validation set, and a test set;

[0008] performing wavelet denoising and polynomial baseline correction on the spectral data to obtain preprocessed data;

[0009] Extracting key characteristic wavelengths from the preprocessed data, and constructing an initial SVM model based on the key characteristic wavelengths;

[0010] Optimizing the initial SVM model using the training set to obtain an optimized SVM model;

[0011] Obtain the target strawberry spectral data and input it into the optimized SVM model to obtain the detection results.

[0012] Optionally, obtaining the sugar content reference value includes:

[0013]

[0014] Where T represents the sugar content reference value, H represents the scale reading of the refractometer, and n represents the number of measurements.

[0015] Optionally, performing wavelet denoising on the spectral data includes:

[0016]

[0017] Where cj(k) represents the approximation coefficient of the j-th scale, dj(k) is the detail coefficient of the j-th scale, sj-1(m) is the signal of the j-1-th scale, h(m) and g(m) are the coefficients of the low-pass and high-pass filters, respectively.

[0018] Optionally, performing polynomial baseline correction on the spectral data includes:

[0019] I=a·λ 2 +b·λ+c;

[0020] Where I corresponds to the spectral intensity, λ represents the wavelength, and a, b, and c are the polynomial coefficients.

[0021] Optionally, an initial SVM model is constructed based on the key characteristic wavelength using an RBF kernel function, and initial parameters are determined by cross-validation to establish a nonlinear mapping relationship between the sugar content of strawberries and the characteristic wavelength. Considering the influence of individual fitness on the crossover probability, an adaptive crossover probability formula is designed as follows:

[0022]

[0023] Among them, P c is the crossover probability of an individual, are the maximum and minimum crossover probabilities, respectively, f i represents individual fitness, f avg , fmax are the population average and maximum fitness, respectively.

[0024] Optionally, when constructing the initial SVM model, it is necessary to consider the impact of individual fitness on the mutation probability. The adaptive mutation probability formula is designed as follows:

[0025]

[0026] Among them, P m represents the individual's mutation probability, and k is the coefficient that controls the rate of change of the mutation probability.

[0027] Optionally, a fitness function is designed in the process of extracting key characteristic wavelengths from the pre-processed data, and the fitness function is selected as R 2 The prediction effect of the characteristic wavelength combination is quantitatively evaluated from the two perspectives of goodness of fit and error size using RMSE as key evaluation indicators. The calculation formula is as follows:

[0028]

[0029] Among them, f represents the fitness value of the individual; α and β are weight coefficients used to balance R 2 The relative importance of RMSE in fitness calculation, and satisfying α+β=1; RMSE max is the RMSE value of the initial model established using the full wavelength range on the training set, which is used to normalize the RMSE to make it consistent with R 2 have similar dimensions and value ranges.

[0030] Optionally, when optimizing the initial SVM model using the training set, it is necessary to consider the impact of the inertia weight on the global and local search capabilities, and the dynamic inertia weight adjustment formula is designed as follows:

[0031]

[0032] Among them, w represents the inertia weight of the current iteration, w start , w end are the initial and final inertia weights, respectively; t and tmax are the current and maximum number of iterations, respectively.

[0033] Optionally, in the process of optimizing the initial SVM model using the training set, it is also necessary to consider the escape mechanism of particles when they fall into a local optimum, and the position update formula is designed as follows:

[0034] x i =x i +Δx·rand;

[0035] Among them, x iIndicates the position of the particle, △x is the jump step, and rand is a random number.

[0036] Technical effects of the present invention:

[0037] (1) Nondestructive testing: Traditional destructive testing methods, such as handheld refractometers, require destructive sampling of strawberries, affecting their integrity and marketability. However, this invention utilizes a hyperspectral imager and near-infrared spectrometer to obtain spectral data without destroying the strawberries, preserving their integrity. This method aligns with current trends in nondestructive testing and provides a guarantee of higher-quality raw materials for the subsequent sale and processing of strawberries.

[0038] (2) High efficiency: Facing the demand for large-scale strawberry quality detection, traditional methods are inefficient. The intelligent algorithm of the present invention can quickly process high-dimensional spectral data, accurately extract key characteristic wavelengths, and significantly shorten the detection time. For example, in the data preprocessing stage, wavelet denoising and polynomial baseline correction can effectively remove noise and correct the baseline, improving data quality. During feature extraction, the improved intelligent algorithm can quickly lock the characteristic wavelength that is highly correlated with sugar content, providing effective data support for model construction and meeting the timeliness requirements of large-scale detection.

[0039] (3) High accuracy: Spectral data is complex and contains a lot of noise and interference information, so direct prediction of sugar content is not effective. The present invention combines intelligent algorithms and optimization models to deeply explore the intrinsic relationship between spectral data and sugar content. By taking the average value of multiple measurements as the sugar content reference value, random errors are reduced. Noise is removed and baselines are corrected during data preprocessing to improve data accuracy. Key characteristic wavelengths are accurately identified in the feature extraction stage to reduce interference from irrelevant information. Finally, the optimized prediction model can accurately map the relationship between sugar content and characteristic wavelengths, significantly improving prediction accuracy and providing reliable data support for strawberry quality grading and picking decisions.

[0040] (4) Intelligence: Integrate intelligent algorithms and artificial intelligence technologies to achieve automated and intelligent detection, reduce the need for manual operation, reduce human errors, and enhance the stability and reliability of detection results. From data collection, preprocessing, feature extraction to model construction and optimization, each step is integrated into the intelligent operation process. For example, the intelligent algorithm automatically extracts characteristic wavelengths to avoid the subjectivity and limitations of manual screening. At the same time, the model has the ability to self-learn and optimize, and can continuously improve the prediction performance based on new data, adapt to the detection of strawberries of different varieties and maturity, promote the development of strawberry detection technology towards intelligence, and enhance the intelligence level of the entire industry.

[0041] (5) Wide applicability: This invention is aimed at strawberry sugar content detection, but its technical framework has wide applicability. Hyperspectral imaging and near-infrared spectroscopy technology combined with intelligent algorithms can be expanded to other agricultural product quality detection fields, such as detecting apple sugar content, citrus acidity, tomato hardness, etc., by simply adjusting the data acquisition parameters and model structure according to the specific agricultural products. The preprocessing methods such as wavelet denoising and polynomial baseline correction used in the scheme, as well as the feature extraction and model optimization ideas, are of reference significance to related fields of spectral data processing. In addition, the scheme can be integrated with online detection equipment to realize real-time detection on the production line, improve production efficiency and product quality, provide a universal and flexible technical template for the field of agricultural product quality detection, and help the intelligent upgrade of the agricultural industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0043] Figure 1 The figure is a flow chart of a method for efficient and nondestructive detection of sugar content in strawberries based on an intelligent algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0045] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0046] like Figure 1 As shown, this embodiment provides an efficient and non-destructive strawberry sugar content detection method based on an intelligent algorithm, comprising:

[0047] Acquire a plurality of strawberry spectral data and sugar content reference values, and divide the strawberry spectral data into a training set, a validation set, and a test set;

[0048] performing wavelet denoising and polynomial baseline correction on the spectral data to obtain preprocessed data;

[0049] Extracting key characteristic wavelengths from the preprocessed data, and constructing an initial SVM model based on the key characteristic wavelengths;

[0050] Optimizing the initial SVM model using the training set to obtain an optimized SVM model;

[0051] Obtain the target strawberry spectral data and input it into the optimized SVM model to obtain the detection results.

[0052] Furthermore, a hyperspectral imager was used to scan strawberries, acquiring spectral data within the 400-1000nm wavelength range, while a handheld refractometer was used to measure the sugar content. 100 samples were collected, covering different varieties and maturity levels. The sugar content reference values ​​were obtained by:

[0053]

[0054] Where T represents the sugar content reference value, H represents the refractometer scale reading, and n represents the number of measurements. This formula effectively reduces random errors and improves the accuracy of measurement results by averaging multiple measurements. Data acquisition is the foundation of the entire solution. The hyperspectral imager captures rich spectral information, while the handheld refractometer provides accurate sugar content reference values. By averaging multiple measurements, random errors are effectively reduced and the accuracy of measurement results is improved. This combined destructive and nondestructive testing method provides a high-quality data foundation for subsequent model training.

[0055] Furthermore, performing wavelet denoising on the spectral data includes:

[0056]

[0057] Where cj(k) represents the approximation coefficient at the jth scale, dj(k) represents the detail coefficient at the jth scale, sj-1(m) represents the signal at the j-1th scale, and h(m) and g(m) represent the coefficients of the low-pass and high-pass filters, respectively. The db4 wavelet basis function is selected, with a decomposition scale of 3, to remove high-frequency noise while retaining the useful information in the signal.

[0058] Furthermore, performing polynomial baseline correction on the spectral data includes:

[0059] I=a·λ 2 +b·λ+c;

[0060] Where I corresponds to spectral intensity, λ represents wavelength, and a, b, and c are polynomial coefficients. Baseline correction using a quadratic polynomial fit eliminates slowly varying trends in spectral data, improving the consistency and comparability of spectral data. Spectral data are susceptible to noise and baseline drift during acquisition. Wavelet denoising effectively removes high-frequency noise while preserving useful information in the signal. Polynomial baseline correction eliminates slowly varying trends in spectral data, improving its consistency and comparability. This two-step preprocessing significantly improves data quality, laying a solid foundation for subsequent feature extraction and model building.

[0061] Furthermore, an improved genetic algorithm was used to extract the characteristic wavelengths from the strawberry spectral data. Initialization parameters: population size 50, chromosome length 121, crossover probability 0.8, mutation probability 0.1. The fitness function is based on R 2 The RMSE (Real Value Sequence) was used to evaluate the accuracy of the characteristic wavelength combination in predicting strawberry sugar content. Adaptive crossover and mutation probability, along with an elite retention strategy, were used to evolve the optimal characteristic wavelength combination for 100 generations. An initial SVM model was constructed based on the key characteristic wavelengths using the RBF kernel function. Initial parameters were determined through cross-validation to establish a nonlinear mapping relationship between strawberry sugar content and characteristic wavelengths. Considering the impact of individual fitness on crossover probability, the adaptive crossover probability formula was designed as follows:

[0062]

[0063] Among them, P c is the crossover probability of an individual, are the maximum and minimum crossover probabilities, respectively, f i represents individual fitness, f avg , f max are the average and maximum fitness of the population, respectively. Individuals with low fitness have a higher crossover probability, which increases population diversity and prevents premature convergence.

[0064] Furthermore, in the process of constructing the initial SVM model, it is necessary to consider the impact of individual fitness on the mutation probability, and the adaptive mutation probability formula is designed as follows:

[0065]

[0066] Among them, P m represents the probability of individual mutation, and k is the coefficient that controls the rate of change of the mutation probability. Individuals with low fitness have a higher probability of mutation, further enhancing population diversity.

[0067] Furthermore, in the feature extraction process based on the genetic algorithm, a fitness function was carefully designed to ensure that the algorithm can evolve in the direction of improving the accuracy of strawberry sugar content prediction. The fitness function was designed in the process of extracting key characteristic wavelengths from the pre-processed data. The fitness function selected R 2 The prediction effect of the characteristic wavelength combination is quantitatively evaluated from the two perspectives of goodness of fit and error size using RMSE as key evaluation indicators. The calculation formula is as follows:

[0068]

[0069] Among them, f represents the fitness value of the individual; α and β are weight coefficients used to balance R 2 The relative importance of RMSE in fitness calculation, and satisfying α+β=1; RMSEmax is the RMSE value of the initial model established using the full wavelength range on the training set, which is used to normalize the RMSE to make it consistent with R 2 This fitness function design enables the genetic algorithm to comprehensively consider the model's goodness of fit and prediction error during the search for characteristic wavelength combinations, thereby more accurately screening the characteristic wavelength combinations that are most valuable for predicting strawberry sugar content.

[0070] Feature extraction is a critical step in strawberry sugar content detection. An improved genetic algorithm automatically searches for the most critical characteristic wavelength combinations for sugar content prediction. This improved genetic algorithm improves search efficiency and convergence speed by adaptively adjusting crossover and mutation probabilities and introducing an elite retention strategy. The SVM model constructs a prediction model using selected characteristic wavelengths. The RBF kernel function effectively handles nonlinear relationships and establishes a mapping between strawberry sugar content and spectral features, providing a good starting point for subsequent model optimization.

[0071] Furthermore, the collected strawberry spectral data set was divided into a training set, a validation set, and a test set according to a ratio of 7:1:2. The SVM parameters were optimized using the improved PSO on the training set. PSO parameter initialization: particle size 30, maximum iteration 100, inertia weight initially 0.9 decreasing to 0.4. The inertia weight was dynamically adjusted and the jump mechanism was introduced to optimize the SVM kernel function parameter σ and the penalty parameter C to improve the accuracy and generalization ability of the strawberry sugar content prediction model. In the process of optimizing the initial SVM model using the training set, it is necessary to consider the impact of the inertia weight on the global and local search capabilities, and the dynamic inertia weight adjustment formula is designed as follows:

[0072]

[0073] Among them, w represents the inertia weight of the current iteration, w start , w end are the initial and final inertia weights, respectively; t and tmax are the current and maximum number of iterations, respectively.

[0074] Furthermore, the inertia weight gradually decreases with the number of iterations, balancing the global and local search capabilities. When optimizing the initial SVM model using the training set, it is also necessary to consider the escape mechanism when the particle falls into the local optimum. The position update formula is designed as follows:

[0075] x i =x i +Δx·rand;

[0076] Among them, x i Indicates the position of the particle, △x is the jump step, and rand is a random number.

[0077] When the particle fails to update the individual extreme value for L consecutive iterations, it will be updated with probability P. jump Randomly adjust its position to help the population escape from the local optimum and continue searching for the global optimal solution.

[0078] Model training and optimization are key components of strawberry sugar content detection. By rationally partitioning the dataset, we ensure the scientific and effective nature of the model during training, validation, and testing. The improved PSO algorithm, through dynamic adjustment of inertia weights and the introduction of a local optimal solution escape mechanism, enables more precise optimization of SVM model parameters, improving the model's prediction accuracy and generalization capabilities. This optimization process not only accelerates model convergence but also enhances the model's adaptability to diverse strawberry sample data conditions, ensuring the model's ability to accurately predict strawberry sugar content.

[0079] Use the test set to evaluate the optimized SVM model. Calculate R 2 , RMSE and MAE and other indicators. If R 2 If the RMSE is ≥0.8 and small, the model is integrated into the detection equipment. During actual detection, the strawberry spectral data is preprocessed and the characteristic wavelengths are extracted, and then input into the model to predict the sugar content.

[0080] Model testing and application are the final steps in the solution. Evaluation on an independent test set verifies the model's predictive performance and generalization capabilities. These metrics comprehensively reflect the model's predictive effectiveness and provide a scientific basis for its practical application. In practical applications, the optimized model can quickly and accurately predict the sugar content of strawberries, providing strong support for strawberry quality grading and harvesting decisions, and promoting the intelligent development of the strawberry industry.

[0081] A specific application example of the present invention:

[0082] First, data collection was performed. Each strawberry sample was scanned using a hyperspectral imager, acquiring spectral data within the 400-1000nm wavelength range. Simultaneously, the Brix content of each sample was measured three times using a handheld refractometer, and the average value was calculated as the final Brix reference value. The 100 samples collected encompassed a variety of strawberry varieties and maturity levels to ensure data diversity and representativeness.

[0083] The sugar content reference value results of the data collection are as follows, see Table 1.

[0084] Table 1

[0085]

[0086] The collected spectral data were subjected to wavelet denoising and polynomial baseline correction. Specifically, the db4 wavelet basis function was selected, with a decomposition scale of 3, and wavelet denoising was performed on the spectral data, effectively removing high-frequency noise from the data. Subsequently, a quadratic polynomial fitting was used to perform baseline correction on the denoised spectral data, eliminating the effects of baseline drift and improving data consistency and comparability.

[0087] The spectral data results after data preprocessing are as follows, see Table 2.

[0088] Table 2

[0089]

[0090] An improved genetic algorithm was used to extract features from the preprocessed spectral data, identifying 10 characteristic wavelengths most strongly correlated with strawberry sugar content. Based on this, a support vector machine (SVM) model was constructed, using RBF as the kernel function. Cross-validation was used to determine the initial model parameters, providing a foundation for subsequent model optimization. The extracted characteristic wavelengths are shown in Table 3.

[0091] Table 3

[0092]

[0093] The collected strawberry spectral dataset was divided into training, validation, and test sets in a ratio of 7:1:2, respectively. Then, an improved PSO algorithm was used on the training set to optimize the parameters of the Support Vector Machine (SVM) model. The PSO algorithm parameters were set as follows: a particle size of 30, a maximum number of iterations of 100, and a linear decrease in the inertia weight from 0.9 to 0.4. By dynamically adjusting the inertia weight and introducing a local optimal solution escape mechanism, the kernel function parameter σ and penalty parameter C of the SVM model were successfully optimized, significantly improving the model's prediction accuracy and generalization ability. The results of the model training and optimization are shown in Table 4.

[0094] Table 4

[0095]

[0096] The optimized SVM model was evaluated using the test set. The test results showed that the model had an R 2 The model achieved a value of 0.91, an RMSE of 0.85, and a MAE of 0.68, demonstrating good predictive and generalization capabilities. Therefore, it was decided to integrate this model into a strawberry sugar content detection device. In practice, simply preprocessing and feature extraction of strawberry spectral data is required, and then inputting the extracted characteristic wavelengths into the model to quickly and accurately predict the sugar content of the strawberry. The model's test metrics are listed in Table 5, and the results of the model testing are listed in Table 6.

[0097] Table 5

[0098]

[0099] Table 6

[0100]

[0101] This practical example demonstrates the complete implementation and results of a strawberry sugar content determination solution using a support vector machine (SVM) algorithm based on an improved genetic algorithm and particle swarm optimization. This method effectively combines multiple intelligent algorithms to achieve efficient, nondestructive strawberry sugar content testing, with excellent prediction accuracy and generalization capabilities, providing a reliable technical approach for strawberry quality testing.

[0102] The above are merely preferred embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. An efficient and non-destructive strawberry sugar content detection method based on an intelligent algorithm, characterized in that: include: Acquire a plurality of strawberry spectral data and sugar content reference values, and divide the strawberry spectral data into a training set, a validation set, and a test set; performing wavelet denoising and polynomial baseline correction on the spectral data to obtain preprocessed data; Extracting key characteristic wavelengths from the preprocessed data, and constructing an initial SVM model based on the key characteristic wavelengths; Optimizing the initial SVM model using the training set to obtain an optimized SVM model; Obtain the target strawberry spectral data and input it into the optimized SVM model to obtain the detection results.

2. The method for efficiently and non-destructively detecting the sugar content of strawberries based on an intelligent algorithm according to claim 1, wherein: Obtaining sugar content reference values ​​includes: Where T represents the sugar content reference value, H represents the scale reading of the refractometer, and n represents the number of measurements.

3. The method for efficiently and non-destructively detecting the sugar content of strawberries based on an intelligent algorithm according to claim 1, wherein: Performing wavelet denoising on the spectral data includes: Where cj(k) represents the approximation coefficient of the j-th scale, dj(k) is the detail coefficient of the j-th scale, sj-1(m) is the signal of the j-1-th scale, h(m) and g(m) are the coefficients of the low-pass and high-pass filters, respectively.

4. The method for efficiently and non-destructively detecting the sugar content of strawberries based on an intelligent algorithm according to claim 1, wherein: Performing a polynomial baseline correction on the spectral data includes: I=a·λ 2 +b·λ+c; Where I corresponds to the spectral intensity, λ represents the wavelength, and a, b, and c are the polynomial coefficients.

5. The method for efficiently and non-destructively detecting the sugar content of strawberries based on an intelligent algorithm according to claim 1, wherein: The initial SVM model was constructed based on the key characteristic wavelength using the RBF kernel function. The initial parameters were determined through cross-validation to establish a nonlinear mapping relationship between the sugar content of strawberries and the characteristic wavelength. Considering the influence of individual fitness on the crossover probability, the adaptive crossover probability formula was designed as follows: Among them, P c is the crossover probability of an individual, are the maximum and minimum crossover probabilities, respectively, f i represents individual fitness, f avg , f max are the population average and maximum fitness, respectively.

6. The method for efficiently and non-destructively detecting the sugar content of strawberries based on an intelligent algorithm according to claim 5, wherein: When constructing the initial SVM model, it is necessary to consider the impact of individual fitness on the mutation probability. The adaptive mutation probability formula is designed as follows: Among them, P m represents the individual's mutation probability, and k is the coefficient that controls the rate of change of the mutation probability.

7. The method for efficiently and non-destructively detecting the sugar content of strawberries based on an intelligent algorithm according to claim 1, wherein: The fitness function is designed in the process of extracting key characteristic wavelengths from the pre-processed data, and the fitness function is selected as R 2 The prediction effect of the characteristic wavelength combination is quantitatively evaluated from the two perspectives of goodness of fit and error size using RMSE as key evaluation indicators. The calculation formula is as follows: Among them, f represents the fitness value of the individual; α and β are weight coefficients used to balance R 2 The relative importance of RMSE in fitness calculation, and satisfying α+β=1; RMSE max is the RMSE value of the initial model established using the full wavelength range on the training set, which is used to normalize the RMSE to make it consistent with R 2 have similar dimensions and value ranges.

8. The method for efficiently and non-destructively detecting the sugar content of strawberries based on an intelligent algorithm according to claim 1, wherein: When optimizing the initial SVM model using the training set, the influence of the inertia weight on the global and local search capabilities needs to be considered. The dynamic inertia weight adjustment formula is designed as follows: Among them, w represents the inertia weight of the current iteration, w start , w end are the initial and final inertia weights, respectively; t and tmax are the current and maximum number of iterations, respectively.

9. The method for efficiently and non-destructively detecting the sugar content of strawberries based on an intelligent algorithm according to claim 8, wherein: When optimizing the initial SVM model using the training set, it is also necessary to consider the escape mechanism of particles when they fall into local optimality. The position update formula is designed as follows: x i =x i +Δx·r and ; Among them, x i Indicates the position of the particle, △x is the jump step, and rand is a random number.

Citation Information

Patent Citations

  • Porphyrin organic small molecular photovoltaic material as well as preparation method and application thereof

    CN107344948A

  • Multi-model fusion battery charge state prediction method and system based on GA-PSO optimization

    CN115219906A

  • Crispy pear candy precision detection method and device, cloud equipment and computer device

    CN117805024A

  • Near infrared spectrum selection method and system in bagasse cellulose content prediction and medium

    CN117825325A

  • Fruit and vegetable sugar degree detection model construction and sugar degree detection method based on hyperspectral imaging

    CN119274698A