Hyperspectral prediction method and device for soluble solid content of winter jujube and storage medium

By establishing a hyperspectral prediction model for soluble solids content (SSC) of winter jujube using hyperspectral technology and LSTM-Transformer network, the low efficiency and destructive nature of existing technologies for detecting soluble solids content in winter jujube have been solved, enabling rapid and accurate quality detection and promoting the intelligent and automated development of agriculture.

CN119475272AInactive Publication Date: 2025-02-18HEBEI NORMAL UNIV +1

Patent Information

Application Number
CN202510044974.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Current technology lacks an efficient, rapid, and non-destructive method for quality testing of agricultural products, especially for detecting the soluble solids content of winter jujubes.

Method used

By combining hyperspectral technology with an LSTM-Transformer network, a hyperspectral prediction model for SSC of jujube was established by acquiring spectral data and soluble solids content data of jujube samples, performing data preprocessing, constructing input and output sample sets, training the LSTM-Transformer network, and establishing the model.

Benefits of technology

This method enables rapid and accurate prediction of the soluble solids content of winter jujubes, avoiding the destructive nature of traditional testing, improving testing efficiency, reducing production costs, and ensuring the consistency and stability of product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475272A_ABST
    Figure CN119475272A_ABST
Patent Text Reader

Abstract

The invention discloses a hyperspectral prediction method and device for the soluble solid content of winter jujubes and a storage medium, and belongs to the field of material testing and analys.The method comprises the steps that firstly, a winter jujube sample is obtained, and spectral data and soluble solid content data of the winter jujube sample are measured; preprocessing the spectral data by using a preset data preprocessing method to obtain enhanced spectral data, constructing an input sample set through the obtained enhanced spectral data, and constructing an output sample set through the measured soluble solid content data; then, the input sample set and the output sample set are used for training a pre-configured LSTM-Transformer network, and the pre-configured LSTM-Transformer network is used for training the pre-configured LSTM-Transformer network; and finally, deploying the trained LSTM-Transform network as a winter jujube SSC hyperspectral prediction model so as to predict the soluble solid content of the winter jujube. Through the steps, the soluble solid content of the winter jujube sample can be quickly and non-destructively predicted with high precision, so that the consistency and the stability of the product quality are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of material testing and analysis, and in particular to a hyperspectral prediction method, device and storage medium for soluble solid content of winter jujube. Background Art

[0002] In the early days, the quality of agricultural products such as fruits and vegetables was mainly identified manually. However, manual testing is highly dependent on experience, easily affected by subjective factors, and the results lack accuracy. With the development of science and technology, in order to improve the accuracy of agricultural product quality testing, people began to use soluble solids content (SSC) as a key indicator for evaluating quality, and tested the SSC of agricultural products (such as winter jujube) through physical and chemical analysis (such as refractometer determination).

[0003] However, although this detection method improves the accuracy of the detection results to a certain extent, this detection is destructive to the samples of the products and has low efficiency. At present, there is a lack of a method that can efficiently, quickly and non-destructively detect the quality of agricultural products. Summary of the invention

[0004] The present invention provides a hyperspectral prediction method, device and storage medium for soluble solid content of winter jujube, which are used to solve the defect of the prior art that there is a lack of a method for quality detection of agricultural products in an efficient, rapid and non-destructive manner.

[0005] On the one hand, the present invention provides a hyperspectral prediction method for the soluble solid content of winter jujube, comprising: obtaining a winter jujube sample, and measuring the spectral data and soluble solid content data of the winter jujube sample according to the obtained winter jujube sample; using a preset data preprocessing method to preprocess the spectral data to obtain enhanced spectral data; constructing an input sample set through the obtained enhanced spectral data, and constructing an output sample set through the measured soluble solid content data; using the input sample set and the output sample set to train a preconfigured LSTM-Transformer network; deploying the trained LSTM-Transformer network as a winter jujube SSC hyperspectral prediction model to predict the soluble solid content of winter jujube.

[0006] Optionally, the step of obtaining a winter jujube sample and measuring the spectral data and soluble solid content data of the winter jujube sample based on the obtained winter jujube sample includes: washing the winter jujube samples and putting them into fresh-keeping bags for storage, using a hyperspectral camera and based on preset parameters to collect corresponding spectral data of the winter jujube; using a digital saccharimeter to collect corresponding soluble solid content data of the winter jujube samples for which spectral data has been collected.

[0007] Optionally, before preprocessing the spectral data using a preset data preprocessing method, the hyperspectral prediction method for soluble solids content of winter jujube also includes: selecting spectral data corresponding to some samples of the winter jujube sample; preprocessing the spectral data corresponding to some samples using different data preprocessing methods; and selecting the optimal data preprocessing method as the preset data preprocessing method by calculating indicators of preprocessed results corresponding to different data preprocessing methods.

[0008] Optionally, the spectral data is preprocessed using a preset data preprocessing method to obtain enhanced spectral data, including: using a multivariate scattering correction method to correct the spectral data to obtain corrected spectral data to eliminate spectral noise and redundant information; smoothing the corrected spectral data to obtain smoothed spectral data, thereby achieving denoising; performing a first-order differential transformation on the smoothed spectral data to enhance the correlation between the spectral data of the winter jujube sample and the soluble solids content data of the winter jujube sample to obtain the enhanced spectral data.

[0009] Optionally, the preconfigured LSTM-Transformer network is trained using the input sample set and the output sample set, including: combining the LSTM network and multiple Transformer encoder layers to construct a regression model, and based on the constructed regression model, processing the input sample set and performing a regression task; based on the performed regression task, obtaining a regression prediction result output by the regression model.

[0010] Optionally, preconfiguring the LSTM-Transformer network includes: configuring the LSTM part in the LSTM-Transformer network to perform preliminary processing on the input sample set to capture long-term dependencies in the input sample set, wherein the long sequence data in the input sample set is processed through the gating mechanism of the LSTM part.

[0011] Optionally, the gating mechanism includes: configuring an input gate, a forget gate and an output gate, wherein the input gate determines whether the information in the input sample set needs to be retained through a configured sigmoid function; the forget gate determines whether the information in the input sample set needs to be forgotten through a configured sigmoid function; and the output gate determines whether the information in the input sample set needs to be output through a configured sigmoid function.

[0012] Optionally, preconfiguring the LSTM-Transformer network includes: inputting the output information of the LSTM part in the LSTM-Transformer network into all Transformer encoder layers, extracting the features of the last encoder layer of the output after being processed by all Transformer encoder layers, and passing it into the fully connected layer for mapping to obtain the final regression prediction result.

[0013] On the other hand, the present invention also provides a control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the hyperspectral prediction method for the soluble solids content of winter jujube.

[0014] On the other hand, the present invention also provides a machine-readable storage medium having instructions stored thereon, the instructions enabling the machine to execute the hyperspectral prediction method for the soluble solids content of winter jujube.

[0015] The invention provides a hyperspectral prediction method for the soluble solid content of winter jujube, which obtains winter jujube samples, measures the spectral data and soluble solid content data of the winter jujube samples; uses a preset data preprocessing method to preprocess the spectral data to obtain enhanced spectral data, and constructs an input sample set through the obtained enhanced spectral data, and constructs an output sample set through the measured soluble solid content data; then uses the input sample set and the output sample set to train the preconfigured LSTM-Transformer network; finally, the trained LSTM-Transformer network is deployed as a winter jujube SSC hyperspectral prediction model to predict the soluble solid content of winter jujube. The method solves the defect of the prior art that there is a lack of a method that can efficiently, quickly and non-destructively perform quality detection on agricultural products; it can quickly and non-destructively predict the soluble solid content of winter jujube samples with high precision, thereby improving the efficiency of detection, reducing production costs and labor costs, and better ensuring the consistency and stability of product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1It is a schematic flow chart of a hyperspectral prediction method for soluble solid content of winter jujube provided by one embodiment of the present invention; Figure 2 is a schematic flow chart of a hyperspectral prediction method for soluble solid content of winter jujube provided by another embodiment of the present invention; Figure 3 It is a partial sample example diagram of the present invention; Figure 4 It is one of the schematic diagrams of the spectrum measurement equipment used in the present invention; Figure 5 This is the second schematic diagram of the spectrum measurement device used in the present invention; Figure 6 It is a spectrum data graph obtained from the raw data of the present invention; Figure 7 It is a spectrum data diagram obtained by the VN preprocessing method of the present invention; Figure 8 It is a spectrum data diagram obtained by the MSC pretreatment method of the present invention; Fig. 9 This is a spectrum data diagram obtained by the VN+SG+FD pretreatment method of the present invention; Fig.10 This is a spectrum data diagram obtained by the VN+SG+SD preprocessing method of the present invention; Fig.11 This is a spectrum data diagram obtained by the MSC+SG+FD pretreatment method of the present invention; Fig.12 This is a spectrum data diagram obtained by the MSC+SG+SD pretreatment method of the present invention; Fig.13 It is the PLSR modeling result obtained by the present invention after MSC+SG+FD pretreatment; Fig.14 It is the SVR modeling result obtained by the present invention after MSC+SG+FD pretreatment; Fig.15 It is the VGG16 modeling result obtained by the present invention after MSC+SG+FD preprocessing; Fig.16 It is the ResNet18 modeling result obtained by the present invention after MSC+SG+FD preprocessing; Fig.17 It is the LSTM modeling result obtained after the MSC+SG+FD preprocessing in the present invention; Fig.18 It is the LSTM-Transformer modeling result obtained by the present invention after MSC+SG+FD preprocessing; Fig.19It is the LSTM-Transformer loss function change curve of the present invention; Fig. 20 It is the LSTM-Transformer determination coefficient change curve of the present invention; Fig.21 It is a flow chart provided by an example of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] As mentioned above, soluble solids content (SSC) is one of the key indicators for evaluating the quality of winter jujube. Therefore, by measuring the SSC content of winter jujube, the quality of winter jujube can be quickly determined, which can guide accurate picking, ensure the uniformity of quality, and determine its applicability in the processing stage. In addition, during the storage process, the SSC content of winter jujube can also provide assistance for formulating effective storage strategies. In terms of market sales, SSC content has become an important basis for tiered pricing, which helps to meet the expectations and needs of consumers.

[0020] However, the existing technology mostly determines the SSC content of winter jujube through physical and chemical analysis (such as refractometer determination method, etc.). Although this method improves the accuracy of the test results to a certain extent compared with manual judgment, this test is destructive to the samples submitted for inspection and has low efficiency.

[0021] In view of this, the present invention proposes a hyperspectral prediction method for the soluble solid content of winter jujube (the application process of which is referred to Fig.21 ) Using hyperspectral technology to accurately capture the spectral characteristics of fruits, a prediction model is established to achieve rapid and accurate prediction of SSC content. This technology not only avoids the destructiveness of traditional detection methods, but also greatly improves detection efficiency, providing strong support for fruit quality assessment. At the same time, the multi-dimensional information fusion characteristics of hyperspectral technology make detection more comprehensive, which helps to realize the intelligence and automation of the fruit industry and promote the sustainable development of agriculture.

[0022] The present invention is achieved by the following methods. Figures 1 to 21 The present invention is described in detail.

[0023] Figure 1It is a schematic flow chart of a hyperspectral prediction method for soluble solid content of winter jujube provided by an embodiment of the present invention.

[0024] like Figure 1 As shown, a hyperspectral prediction method for soluble solid content of winter jujube provided by an embodiment of the present invention, the execution subject may be a controller, and the method described in the present invention may include the following steps: S100, obtaining a winter jujube sample, and measuring spectrum data and soluble solid content data of the winter jujube sample according to the obtained winter jujube sample.

[0025] Preferably, the S100 may include: S110, washing the winter jujube samples and putting them into fresh-keeping bags for storage, using a hyperspectral camera and based on preset parameters to collect corresponding winter jujube spectral data; S120, using a digital saccharimeter to collect corresponding soluble solid content data of the winter jujube samples for which spectral data has been collected.

[0026] For example, the winter jujube samples can come from a warm temperate monsoon climate. For example, the average temperature in the region can be 12°C, the average annual precipitation can be 575.5 mm, the soil is fertile, the water source is sufficient, and the pH value is appropriate. The sample collection time is from September to October each year, for example: from September 2024 to October 2024, the winter jujube samples are collected, for example: a total of 900 winter jujube samples are collected. Among them, some examples of winter jujube samples are as follows Figure 3 As shown, the winter jujube samples can be pest-free winter jujubes at different maturity stages.

[0027] After washing the samples, put them into fresh-keeping bags and store them in a refrigerator (for example, the storage condition can be 0~5℃). After washing the samples, put them into fresh-keeping bags and store them in a refrigerator (0~5℃). The FIGSPEC FS-13 hyperspectral camera can be used to collect the spectral data of the samples. The device structure is as follows: Figures 4 and 5As shown, its wavelength range can be 400~1000nm, and the sampling interval can be 2nm. The camera can be vertical to 20cm above the sample, and 4 halogen lamps can be placed on both sides of the dark box provided by the equipment as the only light source, which can be at a 45° angle to the sample. Eliminate the influence of light on the experiment. The instrument is preheated for 5min and calibrated with a white board to ensure the accuracy of the experiment. The winter jujube sample is placed on the stage for spectral data collection. To ensure the stability of the experiment, 5 sampling points can be selected near the middle waistline of each winter jujube, and the spectrum is collected in turn. The experimental data of each sample can be recorded by the supporting spectral data acquisition software FigSpec provided by FIGSPEC, and the spectral arithmetic average of the 5 sampling points is taken as the spectral data of each winter jujube sample. Then, the spectral data of all samples are removed from the head and tail bands with large noise (for example, 380~400nm and 980~1000nm).

[0028] A digital sugar meter (e.g., a fruit-specific PAL-1 digital sugar meter) is used for determination, and the SSC of the winter jujube sample after the spectral data is collected is determined. Specifically, the SSC of the winter jujube sample can be determined using the Japanese ATAGO PAL-1 digital sugar meter refractometer, with a range of Brix 0.0~53.0% and an accuracy of Brix±0.2%. The instrument can be used in an environment of 10~40 degrees Celsius. The sampling volume can be above 0.3ml, and the measurement time can be 3 seconds. Before the determination, the refractometer is zeroed and calibrated, and the juice of the winter jujube pulp is obtained using a portable stainless steel manual juicer. After filtering, 3ml is sucked with a scaled pipette and titrated on the prism surface of the refractometer. To ensure the accuracy of the determination, the reading is read after 3 seconds of rest. Each sample can be read 3 times to calculate the average value to ensure the stability of the experimental data. The measured sample SSC is shown in Table 1.

[0029] Table 1 SSC data statistics of winter jujube samples

[0030] S200: Preprocess the spectral data using a preset data preprocessing method to obtain enhanced spectral data.

[0031] Preferably, before S200, the method may further include: S130, selecting spectral data corresponding to some samples in the winter jujube sample. S140, preprocessing the spectral data corresponding to the some samples using different data preprocessing methods. S150, selecting the optimal data preprocessing method as the preset data preprocessing method by calculating the indices of the preprocessed results corresponding to different data preprocessing methods.

[0032] To illustrate with an example, and following the above example, we can select the data preprocessing methods of Vector Normalization (VN), Multiplicative Scatter Correction (MSC), Vector Normalization—Savitzky Golay—First Derivative (VN+SG+FD), Vector Normalization—Savitzky Golay—Second Derivative (VN+SG+SD), Multiplicative Scatter Correction—Savitzky Golay—First Derivative (MSC+SG+FD) and Multiplicative Scatter Correction—Savitzky Golay—Second Derivative (MSC+SG+SD) to preprocess the original spectral data respectively (such as Figures 6 to 12 as shown).

[0033] The partial least squares regression (PLSR) method can be used to select the best preprocessing method. For example, the coefficient of determination ( ), Root mean square error ( ) as the evaluation index of different prediction models. , the bigger, The smaller (where represents the result of the training set, Represents the result of the test set) indicates that the prediction effect of the model is better. The calculation formula is as follows:

[0034]

[0035] in, is the number of samples, For the The actual value of the samples, For the The predicted value of samples, is the average of all sample actual values.

[0036] The modeling results are shown in Table 2: Table 2 Processing results of different preprocessing methods

[0037] According to the modeling results, the preprocessing method of MSC+SG+FD is more effective in the PLSR model. =0.8173, =2.4428, compared to the original spectrum Improved by 0.0099, It was reduced by 0.0652, and MSC+SG+FD was selected as the optimal preprocessing method.

[0038] Preferably, the S200 may include: S210, using a multivariate scattering correction method to correct the spectral data to obtain corrected spectral data to eliminate spectral noise and redundant information. S22, smoothing the corrected spectral data to obtain smoothed spectral data, thereby achieving denoising. S230, performing a first-order differential transformation on the smoothed spectral data to enhance the correlation between the spectral data of the winter jujube sample and the soluble solids content data of the winter jujube sample to obtain the enhanced spectral data.

[0039] Taking an example to illustrate, and continuing the above example, MSC+SG+FD is selected as the optimal preprocessing method, and its processing steps may include: Find the average spectrum:

[0040] Find the baseline shift and offset between each spectrum and the average spectrum:

[0041] Subtract the obtained baseline shift and offset from each spectrum to obtain the corrected spectrum:

[0042] in, is the spectral data, is the sample size, It represents the average spectrum obtained by averaging the spectra of all samples at each wavelength point. and Represents the spectra of each sample and The relative offset coefficient and translation obtained after performing univariate linear regression. is the spectral data after correction.

[0043] The process of processing the winter jujube spectrum data by first-order differential transformation is as follows:

[0044] in, For the The first-order differential value at each band. For the The reflectivity at each wavelength. For the The reflectivity at each wavelength. is a parameter used to control the smoothness of the differential processing. After the above processing, the enhanced spectral data of the winter jujube sample was obtained.

[0045] S300: construct an input sample set using the obtained enhanced spectrum data, and construct an output sample set using the measured soluble solid content data.

[0046] S400: Train a preconfigured LSTM-Transformer network using the input sample set and the output sample set.

[0047] To illustrate, and continuing with the above example, before using the input sample set and the output sample set to train the preconfigured LSTM-Transformer network, it is also necessary to verify the LSTM-Transformer network and other different neural networks to ensure their feasibility and advantages. Partial Least Squares Regression (PLSR), Support Vector Regression (SVR), Visual Geometry Group 16-layer net (VGG16), Residual Network 18-layer (ResNet18), Long Short-Term Memory (LSTM) and Long Short-Term Memory-Transformer encoder layer (LSTM-Transformer) neural networks can be selected to verify the most feasible and advantageous networks.

[0048] The verification results are shown in Table 3 and Figure 13-18 As shown: Table 3 Verification results of different modeling methods

[0049] The results show that: =0.9502, higher than other networks, =0.9374 is also higher than other networks. And the generalization ability of this network is also excellent. and They are 1.3060 and 1.5824 respectively, which is a significant decrease compared with other networks. This shows that the prediction error of the network has also been significantly improved. Therefore, the LSTM-Transformer network is selected to build the regression model.

[0050] Preferably, the S400 may include: S410, combining the LSTM network and multiple Transformer encoder layers to construct a regression model, and based on the constructed regression model, processing the input sample set and performing a regression task. S420, based on the performed regression task, obtaining a regression prediction result output by the regression model.

[0051] Preferably, the S400 may also include: S430, configuring the LSTM part in the LSTM-Transformer network to perform preliminary processing on the input sample set to capture the long-term dependencies in the input sample set, wherein the long sequence data in the input sample set is processed through the gating mechanism of the LSTM part.

[0052] For example, and continuing with the above example, the LSTM part in the LSTM-Transformer network is configured to perform preliminary processing on the input sample set as follows: Initialize the initial hidden state h0 and initial cell state c0 of the LSTM layer, and set them both to all-zero tensors. Then, the input data (i.e., the input sample set) is passed to the LSTM layer for processing to obtain the output (i.e., the output sample set) and the corresponding hidden state information. The LSTM layer will gradually update its hidden state according to the input sequence to capture the long-term dependencies in the sequence.

[0053] Preferably, S430 may include: S431, configuring an input gate, a forget gate and an output gate, wherein the input gate determines whether the information in the input sample set needs to be retained through a configured sigmoid function; the forget gate determines whether the information in the input sample set needs to be forgotten through a configured sigmoid function; and the output gate determines whether the information in the input sample set needs to be output through a configured sigmoid function.

[0054] To illustrate, and continuing with the above example, the working process of the gating mechanism can be as follows: Input gate: It uses a sigmoid function to determine which information needs to be retained. At each time step t, the calculation formula of the input gate is as follows:

[0055] LSTM calculates candidate cell states , which indicates how much influence the new input at the current time step can have on the cell state. The calculation formula for the candidate cell state is as follows:

[0056] in, represents the output of the input gate, represents the candidate cell state, , is the weight matrix of the input gate and candidate cell state, , is the bias term, is the input of the current time step, is the hidden state at the previous time step. is the sigmoid function and tanh is the hyperbolic tangent function.

[0057] Forget gate: It uses a sigmoid function to determine which information needs to be forgotten. At each time step t, the calculation formula of the forget gate is as follows:

[0058] in, represents the output of the forget gate, is the weight matrix of the forget gate, is the bias term, is the input of the current time step, is the hidden state at the previous time step. is the sigmoid function.

[0059] Output gate: It uses a sigmoid function to determine which information needs to be output. At each time step t, the calculation formula of the output gate is as follows:

[0060] in, Represents the output of the sigmoid function of the output gate, is the weight matrix of the output gate, is the bias term, is the input of the current time step, is the hidden state at the previous time step. is the sigmoid function.

[0061] Preferably, the S410 may also include S412, inputting the output information of the LSTM part in the LSTM-Transformer network into all Transformer encoder layers, extracting the features of the last encoder layer of the output after being processed by all Transformer encoder layers, and passing it into the fully connected layer for mapping to obtain the final regression prediction result.

[0062] For example, and continuing the above example, the Transformer part in the LSTM-Transformer network, after the output is processed by LSTM, is passed to each Transformer encoder layer for further processing. By looping through each layer in the transformer_encoder list, the output is extracted and transformed multiple times to further mine the information in the sequence. Transformer uses a multi-head attention mechanism to capture the correlation between different positions in the sequence, and thus has a better grasp of the global information of the sequence.

[0063] LSTM-Transformer network LSTM first performs preliminary feature extraction and captures long-term dependencies on the input sequence. Then, each Transformer encoder layer further transforms and mines the features on this basis, gradually extracting more advanced and abstract features to better improve the model's understanding and prediction capabilities of the data. Finally, the features of the last time step of the output after processing by all Transformer encoder layers are taken and passed to the fully connected layer for mapping to obtain the final regression prediction result.

[0064] S500. Deploy the trained LSTM-Transformer network as the winter jujube SSC hyperspectral prediction model to predict the soluble solids content of winter jujube.

[0065] Accordingly, the hyperspectral prediction method for the soluble solid content of winter jujube provided by the present invention and its embodiments obtains winter jujube samples, measures the spectral data and soluble solid content data of the winter jujube samples; uses a preset data preprocessing method to preprocess the spectral data to obtain enhanced spectral data, and constructs an input sample set through the obtained enhanced spectral data, and constructs an output sample set through the measured soluble solid content data; then uses the input sample set and the output sample set to train the preconfigured LSTM-Transformer network; finally, the trained LSTM-Transformer network is deployed as a winter jujube SSC hyperspectral prediction model. Based on the established SSC prediction model, the prediction of the SSC content of winter jujube is provided with theoretical and technical support, which provides important reference and guidance for helping to screen high-quality individuals, cultivate new varieties, and promote the high-quality development of the winter jujube industry. It can quickly and non-destructively predict the soluble solid content of winter jujube samples with high precision, and has broad application prospects, especially in the fields of agricultural quality monitoring, fruit grading and quality control, which can improve production efficiency, reduce labor costs, and ensure the consistency and stability of product quality.

[0066] Based on the same general inventive concept, the present invention also protects a control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the hyperspectral prediction method for the soluble solids content of winter jujube.

[0067] Based on the same general inventive concept, the present invention also protects a machine-readable storage medium, on which instructions are stored, and the instructions enable the machine to execute the hyperspectral prediction method for the soluble solid content of winter jujube.

[0068] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0069] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A hyperspectral prediction method for soluble solid content of winter jujube, characterized in that: include: Obtaining a winter jujube sample, and measuring spectral data and soluble solid content data of the winter jujube sample based on the obtained winter jujube sample; Preprocessing the spectral data using a preset data preprocessing method to obtain enhanced spectral data; constructing an input sample set through the obtained enhanced spectral data, and constructing an output sample set through the measured soluble solid content data; Training a preconfigured LSTM-Transformer network using the input sample set and the output sample set; The trained LSTM-Transformer network was deployed as the winter jujube SSC hyperspectral prediction model to predict the soluble solids content of winter jujube.

2. The hyperspectral prediction method for soluble solid content of winter jujube according to claim 1, characterized in that: The step of obtaining the winter jujube sample and measuring the spectral data and soluble solid content data of the winter jujube sample according to the obtained winter jujube sample includes: The winter jujube samples are washed and respectively stored in fresh-keeping bags, and corresponding winter jujube spectral data are collected using a hyperspectral camera based on preset parameters; Using a digital saccharimeter, the corresponding soluble solid content data of the winter jujube samples were collected after the spectral data were collected.

3. The hyperspectral prediction method for soluble solid content of winter jujube according to claim 1, characterized in that: Before the spectral data is preprocessed using a preset data preprocessing method, the hyperspectral prediction method for soluble solid content of winter jujube also includes: Selecting spectral data corresponding to some samples of the winter jujube sample; Preprocessing the spectral data corresponding to the part of the samples using different data preprocessing methods; By calculating the indices of the preprocessing results corresponding to different data preprocessing methods, the optimal data preprocessing method is selected as the preset data preprocessing method.

4. The hyperspectral prediction method for soluble solid content of winter jujube according to claim 1, characterized in that: The method of preprocessing the spectral data using a preset data preprocessing method to obtain enhanced spectral data includes: The spectral data are corrected by using a multivariate scattering correction method to obtain corrected spectral data to eliminate spectral noise and redundant information; Smoothing the corrected spectral data to obtain smoothed spectral data, thereby achieving denoising; The smoothed spectral data is subjected to a first-order differential transformation to enhance the correlation between the spectral data of the winter jujube sample and the soluble solid content data of the winter jujube sample, thereby obtaining the enhanced spectral data.

5. The hyperspectral prediction method for soluble solid content of winter jujube according to claim 1, characterized in that: The step of training a preconfigured LSTM-Transformer network using the input sample set and the output sample set includes: Combining the LSTM network with multiple Transformer encoder layers to construct a regression model, and based on the constructed regression model, processing the input sample set and performing a regression task; Based on the performed regression task, a regression prediction result output by the regression model is obtained.

6. The hyperspectral prediction method for soluble solid content of winter jujube according to claim 1, characterized in that: Pre-configuring the LSTM-Transformer network includes: The LSTM part in the LSTM-Transformer network is configured to perform preliminary processing on the input sample set to capture the long-term dependencies in the input sample set. Among them, the long sequence data in the input sample set is processed through the gating mechanism of the LSTM part.

7. The hyperspectral prediction method for soluble solid content of winter jujube according to claim 6, characterized in that: The gating mechanism includes: Configure the input gate, forget gate, and output gate. The input gate determines whether the information in the input sample set needs to be retained through a configured sigmoid function; The forget gate determines whether the information in the input sample set needs to be forgotten through the configured sigmoid function; The output gate determines whether the information in the input sample set needs to be output through the configured sigmoid function.

8. The hyperspectral prediction method for soluble solid content of winter jujube according to claim 1, characterized in that: Pre-configuring the LSTM-Transformer network includes: The output information of the LSTM part in the LSTM-Transformer network is input into all the Transformer encoder layers, the features of the last encoder layer of the output after being processed by all the Transformer encoder layers are extracted, and passed into the fully connected layer for mapping to obtain the final regression prediction result.

9. A control device, characterized in that: The control device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the hyperspectral prediction method for soluble solid content of winter jujube according to any one of claims 1-8.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions, which enable the machine to execute the hyperspectral prediction method for the soluble solid content of winter jujube according to any one of claims 1-8.

Citation Information

Patent Citations

  • Cottonseed gossypol content non-destructive measurement method based on near-infrared spectrum technology

    CN105486662A

  • Method for detecting internal and external quality of Fengcheng peaches based on hyperspectrum and deep learning

    CN111968080A

  • Image description model training method based on context reasoning and image description method

    CN115578726A

  • Short-term photovoltaic power generation power prediction method based on L-Transform

    CN117034055A

  • Hyperspectral model for rapidly predicting protein content of pepper

    CN117269106A

Cited By

  • Blueberry SSC content prediction method based on Caputo fractional derivative hyperspectral pretreatment

    CN121917497A

  • Method for predicting SSC content of blueberry based on hyperspectral pretreatment of caputo fractional derivative

    CN121917497B