Method for detecting soluble solids of seedless and seeded watermelons based on spectrum pretreatment

By preprocessing the watermelon spectral data and constructing detection models, the problem of poor detection accuracy of seedless and seed-seeded watermelons is solved, and high-precision detection of soluble solids is achieved.

CN120253766APending Publication Date: 2025-07-04ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510587462.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The prior art is difficult to establish a general soluble solid detection model in seedless and seed watermelons, resulting in poor detection accuracy and inability to meet online detection requirements.

Method used

The watermelon spectral data was collected by a transmission spectrum acquisition device, and spectral pretreatment was carried out to construct a soluble solid substance detection model based on spectral pretreatment. Competitive adaptive weighted sampling combined with partial least squares regression model were used for training to eliminate interference with watermelon species and improve detection accuracy.

Benefits of technology

Through the combination of spectral pretreatment and machine learning model, the detection accuracy of soluble solid content of seedless and seed watermelons is improved, and rapid non-destructive detection is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120253766A_ABST
    Figure CN120253766A_ABST
Patent Text Reader

Abstract

The invention discloses a method for detecting soluble solids of seedless and seeded watermelons based on spectrum pretreatment. The method comprises the following steps: firstly, respectively acquiring spectral data and soluble solid content by using a transmission spectrum acquisition device and a soluble solid content detector, then performing spectrum pretreatment on the spectral data, and forming sample data by using the treated spectral data and soluble solid content of the same watermelon; the sample data of all watermelons are summarized to obtain a watermelon data set, the watermelon data set is input into the constructed soluble solid detection model for training, finally, the transmission spectrum of the watermelons to be detected is collected and preprocessed, and then the transmission spectrum is input into the trained soluble solid detection model to obtain the soluble solid content of the watermelons to be detected. According to the method, spectrum pretreatment is performed on the original spectrum data, so that the influence of watermelon variety interference on spectrum modeling is eliminated, and the detection precision of the soluble solid content of seedless and seeded watermelons is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of rapid detection of fruit quality, and in particular relates to a method for detecting soluble solids of seedless and seeded watermelons based on spectral preprocessing. Background Art

[0002] Watermelon is rich in water, minerals, vitamins, etc. It is a popular fruit all over the world. Currently, there are two types of watermelons on the market: seedless watermelons and seeded watermelons. There is no significant difference in the nutritional content and health and safety of the two types of watermelons. The soluble solids content is an important indicator for determining the development stage of watermelon, and it is also an important factor in determining internal quality and consumer acceptance. Accurate detection of soluble solids content is crucial in the watermelon production process, such as harvesting, post-harvest storage, transportation, and sales. Transmission spectroscopy technology has the advantages of rapid and non-destructive detection, and is currently widely used in online fruit detection. In addition, this technology reflects the comprehensive information of hydrogen-containing groups in organic molecules inside the fruit, and is particularly suitable for internal quality information detection of large-sized fruits.

[0003] At present, some scholars have explored the detection method of soluble solids in watermelon based on transmission spectroscopy technology. However, most of the current studies are based on models established for a single variety of watermelon. The large differences in texture and composition between seedless and seeded watermelons lead to differences in transmission spectra, which in turn limits the robustness of the model. A single model has high detection accuracy for a specific variety, but has limited universality for other varieties. Therefore, it is usually necessary to develop different models to detect the soluble solids content of different varieties. This inevitably increases the workload and cannot meet the needs of online detection. Summary of the invention

[0004] In order to solve the defects and shortcomings in the background technology, the present invention provides a method for detecting soluble solids in seedless and seeded watermelons based on spectral preprocessing.

[0005] The technical solution adopted by the detection method of the present invention is as follows:

[0006] S1. Use a transmission spectrum acquisition device to collect spectral data of a number of seedless and seeded watermelons; use a soluble solid content detector to detect the soluble solid content of each watermelon.

[0007] The soluble solid content detector is a saccharimeter, and the soluble solid content is saccharimeter.

[0008] S2. Preprocess the spectral data of each watermelon to obtain corresponding processed spectral data.

[0009] S3. The processed spectral data and soluble solid content of the same watermelon are used to form a sample data set, and the sample data of all watermelons are aggregated to obtain a watermelon data set.

[0010] S4. Construct a soluble solids detection model, use the processed spectral data as input, and the corresponding soluble solids content as the label. Input the watermelon dataset into the soluble solids detection model for training to obtain a trained soluble solids detection model.

[0011] S5. Collect the spectral data of the watermelon to be measured, preprocess the spectral data of the watermelon to be measured in the same method as in step S2 to obtain the corresponding processed spectral data, and input the processed transmission spectrum into the trained soluble solids detection model to obtain the soluble solids content of the watermelon to be measured.

[0012] The specific steps of step S2 are as follows:

[0013] S21. Construct a watermelon classification model in the computer. The watermelon classification model includes a sequentially connected feature extraction module and a probability output module.

[0014] S22. Input the spectral data of a single watermelon into the feature extraction module and the probability output module of the watermelon classification model for processing in sequence. Perform weight processing and processing through a rectified linear unit on the results processed by the feature extraction module and the probability output module in sequence to obtain a rectified linear weight curve.

[0015] S23. Process the spectral data of each watermelon in the same method as in step S22 to obtain the rectified linear weight curves of the spectral data of all watermelons. Then, perform average processing, calibration processing, and point-by-point multiplication processing on the rectified linear weight curves of the spectral data of all watermelons in sequence to obtain the processed spectral data of each watermelon.

[0016] The feature extraction module in step S21 is four one-dimensional convolutional modules connected in series; each one-dimensional convolutional module includes a sequentially connected one-dimensional convolutional layer and a batch normalization layer; the input end of the one-dimensional convolutional layer of the first one-dimensional convolutional module is used as the input end of the feature extraction module, and the output end of the batch normalization layer of the last one-dimensional convolutional module is used as the output end of the feature extraction module.

[0017] The number of channels of the four one-dimensional convolutional layers is 2, 4, 8, and 16 in sequence.

[0018] Each one-dimensional convolutional layer uses a rectified linear unit (ReLU) as the non-linear activation function.

[0019] The probability output module in step S21 is a sequentially connected flattening layer and two fully connected layers; the input end of the flattening layer is used as the input end of the probability output module, and the output end of the last fully connected layer is used as the output end of the probability output module.

[0020] The output end of the batch normalization layer of the last one-dimensional convolutional module is connected to the input end of the flattening layer.

[0021] Specifically, the step S22 is as follows:

[0022] S221. Input the spectral data of a single watermelon into the feature extraction module for processing to obtain a watermelon feature map, and then input the watermelon feature map into the probability output module to obtain the probability value of the watermelon category.

[0023] S222. Perform weight processing on the probability value of the watermelon category and the watermelon feature map to obtain a classification weight.

[0024] S223. Process the classification weight through a rectified linear unit to obtain a rectified linear weight curve.

[0025] The classification weight is processed according to the following formula to obtain a rectified linear weight curve:

[0026] L c = ReLU(A')

[0027] where L c represents the rectified linear weight curve, ReLU() represents the rectified linear unit, and A' represents the classification weight.

[0028] The weight processing in the step S222 is set according to the following formula:

[0029]

[0030] where A' represents the classification weight, both i and j represent indices, represents the weight of the j-th watermelon feature map, A j represents the j-th watermelon feature map, c represents the watermelon category, c = 0 indicates that the watermelon is seedless, c = 1 indicates that the watermelon is seeded, Z represents the length of the watermelon feature map, y c represents the probability value that the watermelon category is of class c, represents the i-th value in the j-th watermelon feature map, represents y c For the partial derivative.

[0031] Specifically, the step S23 is as follows:

[0032] S231. Use the same method as in step S22 to process the spectral data of each watermelon to obtain the rectified linear weight curves of the spectral data of all watermelons.

[0033] S232. Perform an averaging process on the rectified linear weight curves of the spectral data of all watermelons to obtain an average rectified linear weight curve.

[0034] S233. After performing correction processing on the average linear rectification weight curve, a corrected weight curve is obtained.

[0035] S234. Multiply the spectral data of each watermelon point by point with the corrected weight curve to obtain the processed spectral data of the corresponding watermelon.

[0036] In the step S222, the averaging process of the linear rectification weight curves of the spectral data of all watermelons is set according to the following formula:

[0037]

[0038] where, L y represents the average linear rectification weight curve, n represents the total number of linear rectification weight curves, j' represents the index, represents the j'-th linear rectification weight curve.

[0039] In the correction processing in the step S233, the ordinate value of each point in the average linear rectification weight curve is set according to the following formula:

[0040] Value correction = Value Max / Value

[0041] where, Value correction represents the ordinate value after correction processing of the ordinate value corresponding to the point in the average linear rectification weight curve, Value Max represents the maximum value of the ordinate values corresponding to all points in the average linear rectification weight curve, and Value represents the ordinate value corresponding to the point in the average linear rectification weight curve.

[0042] In the point-by-point multiplication processing in the step S234, the ordinate value corresponding to each abscissa in the spectral data of the watermelon is multiplied by the ordinate value corresponding to the same abscissa in the corrected weight curve, and the multiplication result is used as the new ordinate value of the spectral data of the watermelon.

[0043] In the step S4, the soluble solid content detection model specifically adopts a competitive adaptive weighted sampling combined with a partial least squares regression model (CARS-PLSR).

[0044] The beneficial effects of the present invention are as follows:

[0045] 1. The present invention uses a spectral preprocessing method to process the spectral data of original seedless and seeded watermelons, which can eliminate the influence of watermelon variety interference on spectral modeling, and the method of the present invention has the advantages of fast and non-destructive detection.

[0046] 2. The present invention improves the detection accuracy of the soluble solid content of seedless and seeded watermelons based on the processed transmission spectrum combined with a machine learning model. Description of the Drawings

[0047] Figure 1 It is a schematic diagram of the process of spectral preprocessing of the watermelon spectrum in the present invention;

[0048] Figure 2 It is the average rectified linear unit weight curve and calibration weight curve diagram obtained in the embodiment of the present invention;

[0049] Figure 3 It is the result diagram of the soluble solid detection based on the spectral data after spectral preprocessing;

[0050] Figure 4 It is the result diagram of the soluble solid detection based on the original spectral data of seedless and seeded watermelons. Detailed Embodiment

[0051] The method proposed by the present invention will be further described below in conjunction with the specification drawings and embodiments given by the inventor.

[0052] The method proposed by the present invention uses spectral preprocessing to process the original spectral data, which can eliminate the influence of watermelon variety interference on spectral modeling, and thus improve the detection accuracy of the soluble solid content of seedless and seeded watermelons.

[0053] The specific embodiments of the present invention are as follows:

[0054] Experimental Preparation: 163 seedless and 103 seeded Kirin watermelons used in the study were all purchased from a fruit wholesale market in a certain place. These watermelons come from different provinces, which is conducive to establishing a more robust and general soluble solid detection model. After the watermelons were transported to the laboratory, they were stored for at least 10 hours to return to room temperature of 25 °C to eliminate the influence of watermelon temperature difference on their transmission spectrum.

[0055] S1. Use a transmission spectrum acquisition device to collect spectral data of a number of seedless and seeded watermelons for each watermelon, and use a soluble solid content detector to detect the soluble solid content of each watermelon.

[0056] In this embodiment, the soluble solid content detector is a refractometer, and the soluble solid content is the sugar degree. Specifically, a total of 10 halogen tungsten lamps of 150 W are symmetrically arranged on both sides of the conveyor belt, and no damage to the watermelons caused by light was found during the experiment. The spectral information was collected and recorded by a spectrometer through an optical fiber collimator and an optical fiber. The transmission spectrum acquisition range is 630 - 1000 nm, and the integration time is 500 ms.

[0057] As Figure 1As shown, in S2, the spectral data of each watermelon is preprocessed to obtain the corresponding processed spectral data.

[0058] S21. Construct a watermelon classification model in a computer. The watermelon classification model includes a sequentially connected feature extraction module and a probability output module.

[0059] The feature extraction module is four one-dimensional convolutional modules connected in series; each one-dimensional convolutional module includes a sequentially connected one-dimensional convolutional layer and a batch normalization layer; the input end of the one-dimensional convolutional layer of the first one-dimensional convolutional module is used as the input end of the feature extraction module, and the output end of the batch normalization layer of the last one-dimensional convolutional module is used as the output end of the feature extraction module.

[0060] The number of channels of the four one-dimensional convolutional layers is 2, 4, 8, and 16 in sequence. Each one-dimensional convolutional layer uses a rectified linear unit (ReLU) as the non-linear activation function. The four one-dimensional convolutional modules are the first one-dimensional convolutional module, the second one-dimensional convolutional module, the third one-dimensional convolutional module, and the fourth one-dimensional convolutional module in sequence.

[0061] The probability output module in step S21 is a sequentially connected flattening layer and two fully connected layers; the input end of the flattening layer is used as the input end of the probability output module, and the output end of the last fully connected layer is used as the output end of the probability output module; the output end of the batch normalization layer of the last one-dimensional convolutional module is connected to the input end of the flattening layer. The two fully connected layers are the first fully connected layer and the second fully connected layer in sequence.

[0062] S22. Input the spectral data of a single watermelon into the feature extraction module and the probability output module of the watermelon classification model for processing, and perform weight processing and processing through a rectified linear unit on the results of the feature extraction module and the probability output module in sequence to obtain a rectified linear weight curve.

[0063] S221. Input the spectral data of a single watermelon into the feature extraction module for processing to obtain a watermelon feature map, and then input the watermelon feature map into the probability output module to obtain the probability value of the watermelon category.

[0064] In specific implementation, as Figure 1 shown, the spectral data of the watermelon is input into the input end of the one-dimensional convolutional layer of the first one-dimensional convolutional module for processing, and then processed through the first batch normalization layer, the second one-dimensional convolutional layer, the second batch normalization layer, the third one-dimensional convolutional layer, the third batch normalization layer, the fourth one-dimensional convolutional layer, and the fourth batch normalization layer in sequence to obtain a watermelon feature map. The watermelon feature map is input into the input end of the flattening layer for processing, and then processed through two fully connected layers to obtain the probability value of the watermelon category.

[0065] S222. Perform weight processing on the probability value of the watermelon category and the watermelon feature map to obtain a classification weight;

[0066] The weight processing is set according to the following formula:

[0067]

[0068] Among them, A' represents the classification weight, and both i and j represent indices. represents the weight of the j-th watermelon feature map, and A j represents the j-th watermelon feature map, c represents the watermelon category, c = 0 means the watermelon is seedless, c = 1 means the watermelon is seeded, Z represents the length of the watermelon feature map, and the dimension of each watermelon feature map is 1×Z, y c represents the probability value that the watermelon category is of class c. represents the i-th value in the j-th watermelon feature map. represents y c For the partial derivative.

[0069] S223. Process the classification weight through a rectified linear unit to obtain a rectified linear weight curve.

[0070] The classification weight is processed according to the following formula to obtain a rectified linear weight curve:

[0071] L c = ReLU(A')

[0072] Among them, L c represents the rectified linear weight curve, ReLU() represents the rectified linear unit, and A' represents the classification weight.

[0073] S23. Use the same method as in step S22 to process the spectral data of each watermelon to obtain the rectified linear weight curves of the spectral data of all watermelons, and then perform average processing, calibration processing, and point-by-point multiplication processing on the rectified linear weight curves of the spectral data of all watermelons in sequence to obtain the processed spectral data of each watermelon.

[0074] S231. Use the same method as in step S22 to process the spectral data of each watermelon to obtain the rectified linear weight curves of the spectral data of all watermelons.

[0075] S232. Perform average processing on the rectified linear weight curves of the spectral data of all watermelons to obtain an average rectified linear weight curve.

[0076] The average processing of the rectified linear weight curves of the spectral data of all watermelons is set according to the following formula:

[0077]

[0078] Among them, L yIt represents the average rectified linear unit (ReLU) weight curve, n represents the total number of ReLU weight curves, which is also the total number of spectral data of watermelons, j' represents the index, and represents the j'-th ReLU weight curve.

[0079] As Figure 2 shown, in S233, after performing correction processing on the average ReLU weight curve, a corrected weight curve is obtained.

[0080] The correction processing is to set the ordinate value of each point in the average ReLU weight curve according to the following formula:

[0081] Value correction = Value Max / Value

[0082] where, Value correction represents the ordinate value after correction processing of the ordinate value corresponding to the point in the average ReLU weight curve, Value Max represents the maximum value among the ordinate values corresponding to all points in the average ReLU weight curve, and Value represents the ordinate value corresponding to the point in the average ReLU weight curve.

[0083] In S234, perform point-by-point multiplication on the spectral data of each watermelon and the corrected weight curve to obtain the processed spectral data of the corresponding watermelon.

[0084] The point-by-point multiplication is to multiply the ordinate value corresponding to each abscissa in the spectral data of the watermelon by the ordinate value corresponding to the same abscissa in the corrected weight curve, and the multiplication result is used as the new ordinate value of the spectral data of the watermelon.

[0085] The spectral data of the watermelon is represented as a curve of abscissa wavelength and ordinate light intensity value; since the corrected weight curve is obtained based on the spectral data, the corrected weight curve is also a curve about the abscissa wavelength, and the length of the abscissa wavelength of the corrected weight curve is equal to that of the spectral data. Therefore, the point-by-point multiplication is to multiply the ordinates corresponding to each point on the abscissa wavelength.

[0086] In S3, the processed spectral data of the same watermelon and the soluble solid content form a sample data, and the sample data of all watermelons are aggregated to obtain a watermelon data set.

[0087] In S4, construct a soluble solid content detection model, use the processed spectral data as the input, use the corresponding soluble solid content as the label, input the watermelon data set into the soluble solid content detection model for training, and obtain a trained soluble solid content detection model. The soluble solid content detection model specifically uses the competitive adaptive reweighted sampling combined with partial least squares regression model (CARS-PLSR).

[0088] S5. Collect the spectral data of the watermelon to be measured, preprocess the spectral data of the watermelon to be measured in the same way as in step S2 to obtain the corresponding processed spectral data, and input the processed transmission spectrum into the trained soluble solid content detection model to obtain the soluble solid content of the watermelon to be measured.

[0089] To present the beneficial effects of the method of the present invention, the following experiments were also carried out in this embodiment:

[0090] After obtaining the watermelon data set in step S3, use the SPXY method to divide the watermelon data set into a calibration set and a validation set at a ratio of 3:1.

[0091] Retrain the CARS-PLSR model based on the divided watermelon data set. Use the determination coefficient (R 2 )), root mean square error (RMSE), and residual predictive deviation (RPD) of the calibration set (c) and validation set (v) of the CARS-PLSR model to evaluate the soluble solid content detection model. The closer the determination coefficient R 2 value is to 1, the smaller the root mean square error RMSE value, and the larger the RPD value, indicating that the detection performance of the established soluble solid content detection model is better.

[0092] Train the CARS-PLSR model based on the watermelon data set obtained from the spectral data after spectral preprocessing. Figure 3 As shown in the result diagram of the soluble solid content (refractometer sugar) detection based on the spectral data after spectral preprocessing, Figure 3 the Rv 2 (determination coefficient of the validation set), RMSEV (root mean square error of the validation set), and RPDv (residual predictive deviation of the validation set) of the final model are 0.70, 0.54 °Brix, and 1.84, respectively.

[0093] In addition, the CARS-PLSR model was retrained below by constructing an original watermelon data set based on the original spectral data of each watermelon and the corresponding soluble solid content, so as to form a comparison to highlight the advantages of the method of the present invention. The SPXY method was used to divide the original watermelon data set into a calibration set and a validation set at a ratio of 3:1 for training the CARS-PLSR model.

[0094] Figure 4 Train the CARS-PLSR model based on the original watermelon data set obtained from the spectral data of original seedless and seeded watermelons. Figure 4 As shown in the result diagram of the soluble solid content (refractometer sugar) detection based on the spectral data of original seedless and seeded watermelons, Figure 4 the Rv 2(Coefficient of determination of the validation set), RMSEV (root mean square error of the validation set), and RPDv (residual prediction deviation of the validation set) were 0.54, 0.67 °Brix, and 1.48, respectively. It can be seen that the RPDv obtained based on the original spectral data of seedless and seeded watermelons is significantly smaller than that obtained based on the spectral data after spectral preprocessing. Therefore, after spectral preprocessing, the influence of watermelon variety interference on spectral modeling can be eliminated, thereby improving the detection accuracy of the soluble solid content of seedless and seeded watermelons.

[0095] It should be noted that the above content is only used to illustrate a technical solution of the present invention, rather than a limitation on the protection scope of the present invention. Simple modifications or equivalent replacements made by those skilled in the art to the technical solution of the present invention do not exceed the scope of the present invention.

Claims

1. A detection method for soluble solids of seedless and seeded watermelons based on spectral preprocessing, characterized in that, It includes the following steps: S1. Use a transmission spectrum acquisition device to collect spectral data of several seedless and seeded watermelons; use a soluble solid content detector to detect the soluble solid content of each watermelon; S2. Preprocess the spectral data of each watermelon to obtain the corresponding processed spectral data; S3. The processed spectral data and the soluble solid content of the same watermelon form a sample data, and the sample data of all watermelons are aggregated to obtain a watermelon data set; S4. Build a soluble solid detection model, use the processed spectral data as input, and the corresponding soluble solid content as the label. Input the watermelon data set into the soluble solid detection model for training to obtain a trained soluble solid detection model; S5. Collect the spectral data of the watermelon to be measured, preprocess the spectral data of the watermelon to be measured in the same way as in step S2 to obtain the corresponding processed spectral data, and input the processed transmission spectrum into the trained soluble solid detection model to obtain the soluble solid content of the watermelon to be measured.

2. The detection method of soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 1, characterized in that, The specific steps of step S2 are as follows: S21. Build a watermelon classification model, which includes a sequentially connected feature extraction module and a probability output module; S22. Input the spectral data of a single watermelon into the feature extraction module and the probability output module of the watermelon classification model for processing, and perform weight processing and processing through a rectified linear unit on the results processed by the feature extraction module and the probability output module in sequence to obtain a rectified linear weight curve; S23. Process the spectral data of each watermelon in the same way as in step S22 to obtain the rectified linear weight curves of the spectral data of all watermelons, and then perform average processing, correction processing, and point-by-point multiplication processing on the rectified linear weight curves of the spectral data of all watermelons in sequence to obtain the processed spectral data of each watermelon.

3. The detection method for soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 2, characterized in that: The feature extraction module in step S21 is four one-dimensional convolution modules connected in series; each one-dimensional convolution module includes a sequentially connected one-dimensional convolution layer and a batch normalization layer; the input end of the one-dimensional convolution layer of the first one-dimensional convolution module is used as the input end of the feature extraction module, and the output end of the batch normalization layer of the last one-dimensional convolution module is used as the output end of the feature extraction module; The probability output module in step S21 is a sequentially connected flattening layer and two fully connected layers; the input end of the flattening layer is used as the input end of the probability output module, and the output end of the last fully connected layer is used as the output end of the probability output module; The output end of the batch normalization layer of the last one-dimensional convolution module is connected to the input end of the flattening layer.

4. A method for detecting soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 2, characterized in that, The specific steps of step S22 are as follows: S221. Input the spectral data of a single watermelon into the feature extraction module for processing to obtain a watermelon feature map, and then input the watermelon feature map into the probability output module to obtain the probability value of the watermelon category; S222. Perform weight processing on the probability value of the watermelon category and the watermelon feature map to obtain a classification weight; S223. Process the classification weights through a rectified linear unit to obtain a rectified linear weight curve; The classification weights are processed according to the following formula to obtain a rectified linear weight curve: L c = ReLU(A') Among them, L c represents the rectified linear weight curve, ReLU() represents the rectified linear unit, and A' represents the classification weight.

5. A method for detecting soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 3, characterized in that: The weight processing in step S222 is set according to the following formula: Among them, A' represents the classification weight, and both i and j represent indices. represents the weight of the j-th watermelon feature map, A j represents the j-th watermelon feature map, c represents the watermelon category, Z represents the length of the watermelon feature map, y c represents the probability value that the watermelon category is c, represents the i-th value in the j-th watermelon feature map, represents y c For partial derivative of.

6. The detection method of soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 2, wherein, The specific step S23 is as follows: S231. Use the same method as in step S22 to process the spectral data of each watermelon to obtain the rectified linear weight curves of the spectral data of all watermelons; S232. Perform an averaging process on the rectified linear weight curves of the spectral data of all watermelons to obtain an average rectified linear weight curve; S233. Perform a correction process on the average rectified linear weight curve to obtain a corrected weight curve; S234. Perform a point-by-point multiplication process on the spectral data of each watermelon and the corrected weight curve to obtain the processed spectral data of the corresponding watermelon.

7. A method for detecting soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 6, characterized in that: The averaging process on the rectified linear weight curves of the spectral data of all watermelons in step S222 is set according to the following formula: Among them, L y represents the average rectified linear weight curve, n represents the total number of rectified linear weight curves, j' represents the index, represents the j'-th rectified linear weight curve.

8. A method for detecting soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 6, characterized in that: The correction process in step S233 is that the ordinate value of each point in the average rectified linear weight curve is set according to the following formula: Value correction = Value Max / Value Among them, Value correction represents the ordinate value after calibration processing of the ordinate value corresponding to the midpoint of the average rectified linear weight curve, and Value Max represents the maximum value among the ordinate values corresponding to all points in the average rectified linear weight curve. Value represents the ordinate value corresponding to the midpoint of the average rectified linear weight curve.

9. A method for detecting soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 6, characterized in that: The point-by-point multiplication process in step S234 is to multiply the ordinate value corresponding to each abscissa in the spectral data of the watermelon by the ordinate value corresponding to the same abscissa in the corrected weight curve, and the result of the multiplication is used as the new ordinate value of the spectral data of the watermelon.

10. A method for detecting soluble solids of seedless and seeded watermelons based on spectral preprocessing according to claim 1, characterized in that: In step S4, the soluble solids detection model specifically uses competitive adaptive weighted sampling combined with a partial least squares regression model.