American ginseng quality evaluation method based on multi-task deep learning, computer readable storage medium and computer program product

Through a multi-task deep learning method, a multi-task deep neural network for American ginseng quality detection was constructed, which solved the problem of insufficient detection efficiency in damageless origin traceability of American ginseng and ginseng saponin content prediction, and achieved high accuracy and high efficiency quality evaluation.

CN119622520AActive Publication Date: 2025-03-14HENAN UNIVERSITY OF TECHNOLOGY

Patent Information

Application Number
CN202411826516.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-14
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

The prior art has problems of real-time and insufficient detection efficiency in terms of damageless origin traceability of American ginseng and prediction of total ginseng saponin content.

Method used

Using a multi-task deep learning method, the training and application of American ginseng quality detection model is realized by building an improved multi-task deep neural network, combining near-infrared spectral data and label data. The model includes backbone network, classification header and regression header for extracting characteristic information, origin traceability and ginseng saponin content prediction.

Benefits of technology

It improves the detection accuracy and efficiency of American ginseng quality assessment, realizes traceability of damage-free origin and predicts ginseng saponin content, and solves the shortcomings of traditional methods in real-time and non-destructive testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622520A_ABST
    Figure CN119622520A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of American ginseng quality evaluation, and discloses an American ginseng quality evaluation method based on multi-task deep learning, a computer readable storage medium and a computer program product. The method comprises the following steps: collecting near infrared spectrum data of each American ginseng sample; determining the ginsenoside content of each American ginseng sample to obtain label data of each American ginseng sample; according to the collected near infrared spectrum data and the obtained label data, constructing and training an American ginseng quality detection model; according to the constructed American ginseng quality detection model, producing area tracing and ginsenoside content prediction are carried out on American ginseng to be evaluated. According to the method, the improved multi-task deep neural network is constructed, so that the feature extraction capability is improved, nondestructive origin traceability and total ginsenoside content prediction of American ginseng can be realized at the same time, the detection accuracy and efficiency are improved, and the defects of a traditional method in the aspects of real-time performance and nondestructive detection are overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of American ginseng quality assessment, and in particular to an American ginseng quality assessment method based on multi-task deep learning, a computer-readable storage medium, and a computer program product. Background Art

[0002] The quality assessment of American ginseng mainly depends on its origin and ginsenoside content. Traditional methods such as manual inspection and chemical analysis (such as high-performance liquid chromatography) are highly subjective, destructive, and time-consuming, and are not suitable for large-scale real-time detection. For example, spectral technology (such as hyperspectral imaging and Raman spectroscopy) is a non-destructive testing method, but its promotion and application are limited due to its complex processing and insufficient sensitivity; near-infrared spectroscopy (NIR) has the advantages of being non-destructive and fast, but traditional machine learning methods have shortcomings in feature extraction and nonlinear modeling, and the prediction accuracy is limited. Although existing deep learning methods can help improve the accuracy of spectral analysis, their feature extraction capabilities in multi-task learning are still limited, and it is difficult to effectively distinguish the characteristics of different tasks.

[0003] Therefore, based on the shortcomings of traditional methods in real-time and non-destructive testing, how to simultaneously achieve non-destructive origin traceability of American ginseng and prediction of total ginsenoside content, and improve the accuracy and efficiency of testing, has become a technical problem that needs to be urgently solved in this field.

[0004] The above information is presented as background information only to assist with understanding the present disclosure and no determination or admission is made as to whether any of the above may be used as prior art with respect to the present disclosure. Summary of the invention

[0005] The object of the present invention is to provide a method for evaluating American ginseng quality based on multi-task deep learning, a computer-readable storage medium and a computer program product, so as to solve or at least partially solve the technical problems existing in the prior art.

[0006] To achieve this object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for evaluating the quality of American ginseng based on multi-task deep learning, comprising:

[0008] Prepare American ginseng samples from different origins and cut them into slices to obtain multiple American ginseng samples; wherein each American ginseng sample includes several slices of American ginseng from the same origin;

[0009] Collecting near-infrared spectral data of each American ginseng sample; and determining the ginsenoside content of each American ginseng sample to obtain label data of each American ginseng sample; wherein the label data of the American ginseng sample includes the ginsenoside content and origin information of the American ginseng sample;

[0010] Based on the collected near-infrared spectral data and the obtained label data, a quality detection model for American ginseng is constructed and trained;

[0011] Based on the constructed American ginseng quality detection model, feature extraction is performed on the near-infrared spectral data of the American ginseng to be evaluated, and the origin traceability and ginsenoside content are predicted;

[0012] The American ginseng quality detection model includes a backbone network for extracting feature information from near-infrared spectral data of American ginseng, a classification head for tracing the origin of American ginseng, and a regression head for predicting the ginsenoside content of American ginseng.

[0013] Optionally, the backbone network includes three series-connected Res-Attention modules, each of which includes three sub-modules: a residual module, a self-attention module, and a channel attention module;

[0014] Among them, the residual module is used to process the input American ginseng near-infrared spectrum data through convolution layers and activation functions; the self-attention module is used to calculate the correlation between each position in the sequence and other positions, capturing global information and dependencies between bands; the channel attention module is used to assign weights to each channel to highlight important task-related features.

[0015] Optionally, the input American ginseng near-infrared spectrum data is processed through a convolution layer and an activation function, specifically including:

[0016] The input American ginseng near-infrared spectrum data x is processed by the convolution layer and the activation function to generate a residual map F(x)=ReLU(Conv(x)), and then F(x) is added to the input American ginseng near-infrared spectrum data x, and the final output Output=ReLU(F(x)+x) is generated by the activation function;

[0017] The calculation sequence is performed to calculate the correlation between each position and other positions, capturing global information and dependencies between bands, specifically including:

[0018] The output of the residual module is converted into a query vector Q, a key vector K and a value vector V through the convolution layer. The similarity between the query vector Q and the key vector K is calculated by dot product to obtain the correlation score energy = Q K T ;

[0019] Use the softmax function to normalize the correlation score and obtain the weighted feature F(x)′=softmax(enengy)·V;

[0020] The influence of the self-attention mechanism is adjusted through the learnable parameter γ before output, that is, Output′=γ·F(x)′+x;

[0021] The weights are assigned to each channel to highlight important features related to the task, including:

[0022] The output of the self-attention module is subjected to global average pooling to obtain the global feature F of each channel. avg (x), expressed as:

[0023] Among them, x c is the data input to the channel attention module, c is the number of channels, and L is the feature length on each channel;

[0024] Global feature F avg (x) Generate channel weights through two 1x1 convolutional layers and sigmoid function:

[0025]

[0026] The output after channel weighting is: Output″=W·x.

[0027] Optionally, the final loss function of the American ginseng quality detection model is designed as a weighted sum of the classification task loss and the regression task loss:

[0028] Loss total =α×Loss classfiatinon +β×Loss regression ;

[0029] Among them, α and β are the loss weights of classification and regression tasks, respectively, and are both set to 0.5.

[0030] Optionally, the collecting of near infrared spectral data of each American ginseng sample specifically includes:

[0031] The near-infrared spectral data of each American ginseng sample were collected in the range of 950 to 1650 nm with a resolution of 0.5 nm, and the collected raw spectral data were reduced from 1401 dimensions to 280 dimensions using a sliding window technique;

[0032] After collecting the near infrared spectrum data of each American ginseng sample, the method further includes: preprocessing the near infrared spectrum data, which is specifically implemented as follows:

[0033] The 280-dimensional near-infrared spectral data were preprocessed by Savitsky-Golay smoothing and differentiation, standard normal transformation (SNV), and Z-score normalization.

[0034] Optionally, the method further includes: extracting features from the near-infrared spectral data of the American ginseng to be evaluated based on the constructed American ginseng quality detection model, and before tracing the origin and predicting the ginsenoside content, the method further includes:

[0035] Dividing all American ginseng samples into a training set for training the American ginseng quality detection model, a validation set for verifying the training effect after each round of model training, and a test set for testing the trained American ginseng quality detection model according to a predetermined ratio; and

[0036] The constructed American ginseng quality detection model was evaluated using the test set.

[0037] Optionally, the evaluation of the constructed American ginseng quality detection model through a test set specifically includes:

[0038] The collected near-infrared spectral data of the test set were input into the trained American ginseng quality detection model to evaluate the performance of the American ginseng quality detection model in the origin tracing of American ginseng and the prediction of ginsenoside content. The specific evaluation parameters involved include the parameters in the origin tracing task, the parameters in the ginsenoside content prediction task, and the parameters in the ginsenoside content prediction task:

[0039] The parameters in the origin tracing task include:

[0040] The overall accuracy is used to indicate the proportion of samples correctly classified in the test set, namely:

[0041] Among them, TP i is the number of samples correctly classified as the i-th category, c is the number of classification categories, and N is the number of samples in the test set;

[0042] Precision is used to measure the proportion of samples correctly predicted as positive among all samples predicted as positive, that is:

[0043] Among them, FP i is the number of samples misclassified as class i;

[0044] Recall is used to measure the proportion of correctly predicted positive samples in all true positive samples, that is:

[0045] Among them, FN i is the number of samples that actually belong to the i-th category but are misclassified:

[0046] The parameters in the task of predicting ginsenoside content include:

[0047] The coefficient of determination is used to measure the fit between the predicted value and the true value, namely:

[0048]

[0049] The root mean square error is used to measure the error between the predicted value and the true value, that is:

[0050]

[0051] The residual prediction bias is used to indicate the stability of the model prediction, namely:

[0052]

[0053] In the above formula, N is the total number of test samples, y i and are the true value and predicted value of the i-th sample, y m and is the mean of the true value and predicted value of the test sample;

[0054] The method of constructing and training a quality detection model for American ginseng based on the collected near-infrared spectral data and the obtained label data is specifically implemented as follows:

[0055] Based on the near-infrared spectral data and label data of the training set, a American ginseng quality detection model is constructed and trained.

[0056] Optionally, the dividing of the plurality of American ginseng samples into a training set for training the American ginseng quality detection model, a verification set for verifying the training effect after each round of model training, and a test set for testing the trained American ginseng quality detection model according to a predetermined ratio specifically includes:

[0057] All American ginseng samples were divided into training set, validation set and test set in a ratio of 5:1:4;

[0058] The Kennard-Stone method is used to ensure uniform distribution of samples, and the number of training set samples is expanded through unsupervised spectral data augmentation.

[0059] Optionally, the preparation of American ginseng samples from different origins and cutting into slices to obtain multiple American ginseng samples specifically includes

[0060] American ginseng samples from four geographical regions, Weihai, Shandong, Baishan, Jilin, Montreal, Canada, and Wisconsin, USA, were selected and cut into slices of uniform size. 5-8 slices of American ginseng from the same origin constituted one American ginseng sample, and a total of 150 groups of samples were obtained.

[0061] The 150 groups of samples were stored in a refrigerated environment at 2°C.

[0062] Optionally, the ginsenoside content of the American ginseng sample is detected by HPLC high performance liquid chromatography;

[0063] Among them, the ginsenoside content of American ginseng samples includes the contents of six main ginsenosides: Rg1, Re, Rb1, Rc, Rb2 and Rd.

[0064] In a second aspect, the present invention provides a quality assessment system for American ginseng based on multi-task deep learning, comprising:

[0065] A slicing device, used for cutting the prepared American ginseng samples from different origins into slices to obtain a plurality of American ginseng samples; wherein each American ginseng sample includes a plurality of slices of American ginseng from the same origin;

[0066] A near-infrared spectrometer, used to collect near-infrared spectral data of each American ginseng sample;

[0067] HPLC high performance liquid chromatograph, used to determine the ginsenoside content of each American ginseng sample, and obtain label data of each American ginseng sample; wherein the label data of the American ginseng sample includes the ginsenoside content and origin information of the American ginseng sample;

[0068] A deep learning module is used to build and train a quality detection model for American ginseng based on the collected near-infrared spectral data and the obtained label data;

[0069] The quality assessment module is used to extract features from the near-infrared spectral data of the American ginseng to be assessed, trace its origin and predict the ginsenoside content based on the constructed American ginseng quality detection model;

[0070] The American ginseng quality detection model includes a backbone network for extracting feature information from near-infrared spectral data of American ginseng, a classification head for tracing the origin of American ginseng, and a regression head for predicting the ginsenoside content of American ginseng.

[0071] Optionally, the backbone network includes three series-connected Res-Attention modules, each of which includes three sub-modules: a residual module, a self-attention module, and a channel attention module;

[0072] Among them, the residual module is used to process the input American ginseng near-infrared spectrum data through convolution layers and activation functions; the self-attention module is used to calculate the correlation between each position in the sequence and other positions, capturing global information and dependencies between bands; the channel attention module is used to assign weights to each channel to highlight important task-related features.

[0073] Optionally, the input American ginseng near-infrared spectrum data is processed through a convolution layer and an activation function, specifically including:

[0074] The input American ginseng near-infrared spectrum data x is processed by the convolution layer and the activation function to generate a residual map F(x)=ReLU(Conv(x)), and then F(x) is added to the input American ginseng near-infrared spectrum data x, and the final output Output=ReLU(F(x)+x) is generated by the activation function;

[0075] The calculation sequence is performed to calculate the correlation between each position and other positions, capturing global information and dependencies between bands, specifically including:

[0076] The output of the residual module is converted into a query vector Q, a key vector K and a value vector V through the convolution layer. The similarity between the query vector Q and the key vector K is calculated by dot product to obtain the correlation score energy = Q K T ;

[0077] Use the softmax function to normalize the correlation score and obtain the weighted feature F(x)′=softmax(enengy)·V;

[0078] The influence of the self-attention mechanism is adjusted through the learnable parameter γ before output, that is, Output′=γ·F(x)′+x;

[0079] The weights are assigned to each channel to highlight important features related to the task, including:

[0080] The output of the self-attention module is subjected to global average pooling to obtain the global feature F of each channel. avg (x), expressed as:

[0081] Among them, x c is the data input to the channel attention module, c is the number of channels, and L is the feature length on each channel;

[0082] Global feature F avg (x) Generate channel weights through two 1x1 convolutional layers and sigmoid function:

[0083]

[0084] The output after channel weighting is: Output″=W·x.

[0085] Optionally, the final loss function of the American ginseng quality detection model is designed as a weighted sum of the classification task loss and the regression task loss:

[0086] Loss total =α×Loss classfiatinon +β×Loss regression ;

[0087] Among them, α and β are the loss weights of classification and regression tasks, respectively, and are both set to 0.5.

[0088] Optionally, the collecting of near infrared spectral data of each American ginseng sample specifically includes:

[0089] The near-infrared spectral data of each American ginseng sample were collected in the range of 950 to 1650 nm with a resolution of 0.5 nm, and the collected raw spectral data were reduced from 1401 dimensions to 280 dimensions using a sliding window technique;

[0090] After collecting the near infrared spectrum data of each American ginseng sample, the method further includes: preprocessing the near infrared spectrum data, which is specifically implemented as follows:

[0091] The 280-dimensional near-infrared spectral data were preprocessed by Savitsky-Golay smoothing and differentiation, standard normal transformation (SNV), and Z-score normalization.

[0092] Optionally, the American ginseng samples include a training set divided according to a predetermined ratio for training the American ginseng quality detection model, a verification set for verifying the training effect after each round of model training, and a test set for testing the trained American ginseng quality detection model;

[0093] The deep learning module is specifically used to evaluate the constructed American ginseng quality detection model through a test set.

[0094] Optionally, the evaluation of the constructed American ginseng quality detection model through a test set specifically includes:

[0095] The collected near-infrared spectral data of the test set were input into the trained American ginseng quality detection model to evaluate the performance of the American ginseng quality detection model in the origin tracing of American ginseng and the prediction of ginsenoside content. The specific evaluation parameters involved include the parameters in the origin tracing task, the parameters in the ginsenoside content prediction task, and the parameters in the ginsenoside content prediction task:

[0096] The parameters in the origin tracing task include:

[0097] The overall accuracy is used to indicate the proportion of samples correctly classified in the test set, namely:

[0098] Among them, TP i is the number of samples correctly classified as the i-th category, c is the number of classification categories, and N is the number of samples in the test set;

[0099] Precision is used to measure the proportion of samples correctly predicted as positive among all samples predicted as positive, that is:

[0100] Among them, FP i is the number of samples misclassified as class i;

[0101] Recall is used to measure the proportion of correctly predicted positive samples in all true positive samples, that is:

[0102] Among them, FN i is the number of samples that actually belong to the i-th category but are misclassified:

[0103] The parameters in the task of predicting ginsenoside content include:

[0104] The coefficient of determination is used to measure the fit between the predicted value and the true value, namely:

[0105]

[0106] The root mean square error is used to measure the error between the predicted value and the true value, that is:

[0107]

[0108] The residual prediction bias is used to indicate the stability of the model prediction, namely:

[0109]

[0110] In the above formula, N is the total number of test samples, y i and are the true value and predicted value of the i-th sample, y m and is the mean of the true value and predicted value of the test sample;

[0111] The method of constructing and training a quality detection model for American ginseng based on the collected near-infrared spectral data and the obtained label data is specifically implemented as follows:

[0112] Based on the near-infrared spectral data and label data of the training set, a American ginseng quality detection model is constructed and trained.

[0113] Optionally, the American ginseng samples are divided into a training set, a validation set and a test set in a ratio of 5:1:4;

[0114] The Kennard-Stone method is used to ensure uniform distribution of samples, and the number of training set samples is expanded through unsupervised spectral data augmentation.

[0115] Optionally, the prepared American ginseng samples from different origins specifically include American ginseng samples from four geographical regions: Weihai, Shandong, Baishan, Jilin, Montreal, Canada, and Wisconsin, USA; all American ginseng samples are cut into American ginseng slices of uniform size, 5-8 American ginseng slices from the same origin constitute one American ginseng sample, and a total of 150 groups of samples are obtained;

[0116] The 150 groups of samples were stored in a refrigerated environment at 2°C.

[0117] Optionally, the ginsenoside content of the American ginseng sample is detected by HPLC high performance liquid chromatography;

[0118] Among them, the ginsenoside content of American ginseng samples includes the contents of six main ginsenosides: Rg1, Re, Rb1, Rc, Rb2 and Rd.

[0119] In a third aspect, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the American ginseng quality assessment method based on multi-task deep learning as described above.

[0120] In a fourth aspect, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the American ginseng quality assessment method based on multi-task deep learning as described above.

[0121] Compared with the prior art, the present invention has the following beneficial effects:

[0122] The present invention provides a multi-task detection method based on near-infrared spectroscopy and deep learning. By constructing an improved multi-task deep neural network, the feature extraction capability is improved, and the non-destructive origin traceability of American ginseng and the prediction of the total ginsenoside content of American ginseng can be achieved simultaneously, thereby improving the accuracy and efficiency of detection and solving the shortcomings of traditional methods in real-time and non-destructive detection.

[0123] The present invention has other features and advantages, which will be apparent from or will be described in detail in the accompanying drawings and the following detailed description incorporated herein, which together serve to explain the specific principles of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0125] Figure 1 This is a flow chart of a method for evaluating American ginseng quality based on multi-task deep learning provided by an embodiment of the present invention.

[0126] Figure 2 Schematic diagram of the American ginseng sample provided in the embodiment of the present invention.

[0127] Figure 3 This is a near-infrared spectrum data diagram of the collected American ginseng samples provided in an embodiment of the present invention.

[0128] Figure 4 It is a working principle diagram of a American ginseng quality detection model provided in an embodiment of the present invention.

[0129] Figure 5 2 is a working principle diagram of three Res-Attention modules provided in an embodiment of the present invention.

[0130] Figure 6 This is a schematic diagram of the architecture of a ginseng quality assessment system based on multi-task deep learning provided by an embodiment of the present invention.

[0131] In the figure: 10, slicing device; 20, detection device; 21, near-infrared spectrometer; 22, HPLC high-performance liquid chromatography; 30, deep learning module; 40, quality assessment module. DETAILED DESCRIPTION

[0132] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0133] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.

[0134] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.

[0135] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.

[0136] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.

[0137] Without further limitations, in this application, the words "include", "comprises", "has" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.

[0138] Similar to the understanding in the Examination Guidelines, in this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.

[0139] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.

[0140] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms such as "install", "connect", "connect", "fix", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For technicians in the technical field to which the present application belongs, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0141] Embodiment 1:

[0142] See also Figure 1 , Figure 1 : is a flow chart of a method for evaluating the quality of American ginseng based on multi-task deep learning provided by an embodiment of the present invention, the method comprising:

[0143] Step 110: Prepare American ginseng samples from different origins and cut them into slices to obtain multiple American ginseng samples.

[0144] For example, Figure 2 As shown, Figure 2 Schematic diagram of American ginseng samples provided in an embodiment of the present invention. In this embodiment, American ginseng samples are selected from four geographical regions: Weihai, Shandong, Baishan, Jilin, Montreal, Canada, and Wisconsin, USA;

[0145] All American ginseng samples were cut into slices of uniform size, and 5-8 slices of American ginseng from the same origin were divided into one American ginseng sample, resulting in 150 groups of samples, including: 40 from Shandong, 40 from Jilin, 35 from Canada and 35 from the United States; and the 150 groups of samples were stored in a refrigerated environment at 2°C to ensure data consistency during near-infrared spectroscopy analysis.

[0146] Step 121: Collect near-infrared spectrum data of each American ginseng sample.

[0147] As an optional implementation, in this embodiment, the NIR (Near Infrared) spectral data of each sample is collected by a DA 7250NIR (Near Infrared) analyzer from Sweden Botong in the range of 950 to 1650nm with a resolution of 0.5nm. Figure 3 As shown, Figure 3 is a near-infrared spectrum data diagram of the collected American ginseng sample provided by an embodiment of the present invention;

[0148] The instrument has a built-in tungsten halogen light source. After 30 minutes of warm-up, the spectral data is collected and the sliding window technique is used to reduce the original spectrum from 1401 dimensions to 280 dimensions to reduce redundant information. The dimension calculation formula is (1650-950) divided by 0.5.

[0149] It can be understood that the sliding window technology is a conventional technical means, so its specific practical operation process and principle are not described in detail in this embodiment.

[0150] Step 122: Determine the ginsenoside content of each American ginseng sample to obtain label data of each American ginseng sample.

[0151] It should be noted that in step 122, the label data of the American ginseng sample includes the ginsenoside content and origin information of the American ginseng sample;

[0152] As an optional implementation, in this embodiment, the concentration of ginsenosides in the sample can be detected by a high performance liquid chromatograph from Shimadzu of Japan; specifically, in this embodiment, a total of 6 main ginsenosides (Rg1, Re, Rb1, Rc, Rb2, Rd) were analyzed, and the specific content of each sample was determined to provide a reference for subsequent modeling.

[0153] Step 130: pre-process the near infrared spectrum data.

[0154] The original NIR spectral data were preprocessed by Savitsky-Golay smoothing and differentiation (SGS&D), standard normal transformation (SNV) and Z-score normalization (Z_score); SGS&D removed high-frequency noise, SNV corrected the slope difference of spectral data, and Z-score normalization further improved the spectral discrimination and the quality of model input data;

[0155] It is understandable that the above three preprocessing methods are also conventional technical means, so their specific formulas or principles are not described in detail in this embodiment.

[0156] Step 140: Construct and train a quality detection model for American ginseng based on the collected near-infrared spectral data and the obtained label data.

[0157] Please refer to Figure 4 and Figure 5 , Figure 4 is a working principle diagram of a quality detection model of American ginseng provided by an embodiment of the present invention, Figure 5 is a working principle diagram of three Res-Attention modules provided in an embodiment of the present invention;

[0158] The hybrid multi-task multi-module deep learning network (MMTDL) of this embodiment integrates the residual module, the self-attention module and the channel attention module to perform efficient feature extraction on the near-infrared spectral data of American ginseng to achieve the tasks of origin traceability and total ginsenoside content prediction.

[0159] The backbone network of the American ginseng quality detection model is used to extract shared features from the 280-band near-infrared spectral data x of American ginseng. The backbone of the model consists of three series-connected Res-Attention modules, where the Res-Attention module is a network structure that combines ResNet and the attention mechanism and can be used for image processing tasks; Figure 4 As shown, Figure 4 (a) is the overall structure of MMTDL, (b), (c) and (d) are three Res-Attention modules respectively;

[0160] Specifically, each Res-Attention module contains three sub-modules, namely the residual module, the self-attention module, and the channel attention module;

[0161] First, for the residual module, corresponding to Figure 5 (e) in Fig. 1 introduces shortcut connections to alleviate the gradient vanishing and gradient exploding problems while retaining the integrity of feature information:

[0162] The input American ginseng near-infrared spectrum data x is processed by the convolution layer and activation function to generate a residual map F(x)=ReLU(Conv(x));

[0163] Then add F(x) to the input American ginseng near-infrared spectrum data x, and generate the final output Output=ReLU(F(x)+x) through the activation function;

[0164] Furthermore, for the self-attention module, corresponding to Figure 5 (f) in , which captures global information and dependencies between bands by calculating the correlation between each position in the sequence and other positions:

[0165] The output of the residual module is converted into a query vector Q, a key vector K, and a value vector V through the convolution layer. The similarity between the query vector Q and the key vector K is calculated by dot product to obtain the relevance score energy = Q K T ;

[0166] Use the softmax function to normalize the correlation score and obtain the weighted feature F(x)′=softmax(enengy)·V;

[0167] The influence of the self-attention mechanism is adjusted through the learnable parameter γ before output, that is, Output′=γ·F(x)′+x;

[0168] Finally, for the channel attention module, corresponding to Figure 5 (g) in , which highlights the important features related to the task by assigning weights to each channel:

[0169] The output of the self-attention module is subjected to global average pooling to obtain the global feature F of each channel. avg (x), expressed as:

[0170] Among them, x c is the data input to the channel attention module, c is the number of channels, and L is the feature length on each channel;

[0171] Global feature F avg (x) Generate channel weights through two 1x1 convolutional layers and sigmoid function:

[0172]

[0173] The output after channel weighting is: Output″=W·x.

[0174] In the above formula, Output corresponds to Figure 4 Output 1 in , Output′ corresponds to output 2, and Output″ corresponds to output 3.

[0175] It should be noted that the input data x is passed through three series-connected Res-Attention modules to extract deep shared features. Subsequently, the features are flattened into one-dimensional vectors and passed through a fully connected layer for feature dimensionality reduction and further extraction. The final output is passed to the prediction heads of the classification task and regression task respectively.

[0176] Specifically, the American ginseng quality detection model includes:

[0177] The classification head is used for label classification of origin traceability. The network contains four neurons, uses the softmax function to generate category probability distribution, and uses the cross entropy loss function to calculate the difference between the output and the true label;

[0178] The regression head is used to predict the continuous value of total ginsenoside content and output a single regression value. The mean square error (MSE) is used as the loss function to measure the difference between the predicted value and the true value.

[0179] Furthermore, in order to balance the training of multiple tasks, the model construction of this embodiment also involves the design of loss function, specifically:

[0180] The final loss function is the weighted sum of the classification task loss and the regression task loss:

[0181] Loss total =α×Loss classfiatinon +β×Loss regression ;

[0182] α and β are the loss weights for classification and regression tasks, respectively, and are both set to 0.5 to achieve better model performance in multi-task learning.

[0183] After the model is built, it is still necessary to conduct training and testing. In order to ensure the training effect, this embodiment will verify the model effect after each round of training set training. Therefore, this embodiment pre-divides all American ginseng samples into a training set for training the American ginseng quality detection model, a verification set for verifying the training effect after each round of model training, and a test set for testing the trained American ginseng quality detection model according to a predetermined ratio. Exemplarily, this embodiment is specifically implemented as follows:

[0184] All American ginseng samples were divided into training set, validation set and test set in a ratio of 5:1:4;

[0185] The Kennard-Stone method is used to ensure uniform distribution of samples, and the number of training set samples is expanded through unsupervised spectral data enhancement;

[0186] The Kennard-Stone method is a public technology, so its principle will not be described in detail in this embodiment.

[0187] Based on the above data set, this method was also compared with three traditional machine learning models (support vector machine SVM, random forest RF, partial least squares discriminant analysis PLS-DA) and a deep learning model (1DCNN, one-dimensional convolutional neural network). The final experimental results took the average value of 10 repeated experiments to verify the effectiveness of the MMTDL model proposed in this embodiment. The experimental structure proved that the prediction accuracy of the MMTDL model proposed in this embodiment is significantly higher than that of the existing method.

[0188] Specifically, after the model is constructed and trained, this embodiment also evaluates the constructed American ginseng quality detection model through a test set; specifically including:

[0189] The collected near-infrared spectral data of the test set were input into the trained American ginseng quality detection model to evaluate the performance of the American ginseng quality detection model in the origin tracing of American ginseng and the prediction of ginsenoside content. The specific evaluation parameters involved include the parameters in the origin tracing task, the parameters in the ginsenoside content prediction task, and the parameters in the ginsenoside content prediction task:

[0190] The parameters in the origin tracing task include:

[0191] The overall accuracy is used to indicate the proportion of samples correctly classified in the test set, namely:

[0192] Among them, TP i is the number of samples correctly classified as the i-th category, c is the number of classification categories, and N is the number of samples in the test set;

[0193] Precision is used to measure the proportion of samples correctly predicted as positive among all samples predicted as positive, that is:

[0194] Among them, FP i is the number of samples misclassified as class i;

[0195] Recall is used to measure the proportion of correctly predicted positive samples in all true positive samples, that is:

[0196] Among them, FN i is the number of samples that actually belong to the i-th category but are misclassified:

[0197] The parameters in the task of predicting ginsenoside content include:

[0198] The coefficient of determination is used to measure the fit between the predicted value and the true value, that is,

[0199]

[0200] The root mean square error is used to measure the error between the predicted value and the true value, that is:

[0201]

[0202] The residual prediction bias is used to indicate the stability of the model prediction, namely:

[0203]

[0204] In the above formula, N is the total number of test samples, y i and are the true value and predicted value of the i-th sample, y m and is the mean of the true value and predicted value of the test sample;

[0205] As a supplementary explanation, step 140 is specifically implemented as follows: constructing and training a quality detection model for American ginseng based on the near-infrared spectral data and label data of the training set.

[0206] Step 150: Based on the constructed American ginseng quality detection model, feature extraction is performed on the near-infrared spectral data of the American ginseng to be evaluated, and origin tracing and ginsenoside content prediction are performed.

[0207] For ease of understanding, it should be noted that in this embodiment, the ginsenoside content and origin are both label data, the spectrum is x data, and the label is y data (one column is the origin label, and the other column is the saponin content), which need to be input during training; Figure 4 Task A and task B in correspond to the classification task and regression task respectively.

[0208] It should be noted that, in this embodiment, a verification set is not necessary.

[0209] In summary, the American ginseng quality assessment method based on multi-task deep learning provided in this embodiment realizes real-time non-destructive detection and improves detection efficiency; and the algorithm structure is simple and easy to implement and promote; it can simultaneously realize the origin traceability and total ginsenoside content prediction functions, expanding the application scenarios; and the prediction accuracy is higher than the existing method, and it has higher practicality.

[0210] Embodiment 2:

[0211] Please refer to Figure 6 , Figure 6 : is a schematic diagram of the architecture of a ginseng quality assessment system based on multi-task deep learning provided by an embodiment of the present invention, the system specifically includes:

[0212] The slicing device 10 is used to slice the prepared American ginseng samples from different origins into slices to obtain a plurality of American ginseng samples; wherein each American ginseng sample includes a plurality of slices of American ginseng from the same origin;

[0213] The detection device 20 includes a near-infrared spectrometer 21 and a HPLC high-performance liquid chromatograph 22; the near-infrared spectrometer 21 is used to collect near-infrared spectrum data of each American ginseng sample; the HPLC high-performance liquid chromatograph 22 is used to determine the ginsenoside content of each American ginseng sample to obtain label data of each American ginseng sample; wherein the label data of the American ginseng sample includes the ginsenoside content and origin information of the American ginseng sample;

[0214] A deep learning module 30, for constructing and training a quality detection model for American ginseng based on the collected near-infrared spectral data and the obtained label data;

[0215] The quality assessment module 40 is used to extract features from the near-infrared spectrum data of the American ginseng to be assessed, trace the origin and predict the ginsenoside content according to the constructed American ginseng quality detection model;

[0216] Among them, the American ginseng quality detection model includes a backbone network for extracting feature information from the near-infrared spectral data of American ginseng, a classification head for tracing the origin of American ginseng, and a regression head for predicting the ginsenoside content of American ginseng.

[0217] Specifically, the backbone network consists of three series-connected Res-Attention modules, each of which contains three sub-modules: residual module, self-attention module, and channel attention module;

[0218] Among them, the residual module is used to process the input American ginseng near-infrared spectrum data through convolution layers and activation functions; the self-attention module is used to calculate the correlation between each position in the sequence and other positions, capturing global information and dependencies between bands; the channel attention module is used to assign weights to each channel to highlight important task-related features.

[0219] Exemplarily, in this embodiment, the near infrared spectrometer 21 adopts the DA 7250 NIR (Near Infrared) analyzer produced by Sweden's Perton, and the HPLC high performance liquid chromatograph 22 adopts the high performance liquid chromatograph produced by Japan's Shimadzu.

[0220] Since the specific data processing process has been described in detail in the first embodiment, it will not be repeated in this embodiment.

[0221] Based on the same concept, an embodiment of the present invention also provides a computer-readable storage medium, which stores at least one instruction, and the instruction is loaded and executed by a processor to implement a method for evaluating American ginseng quality based on multi-task deep learning provided by an embodiment of the present invention.

[0222] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0223] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0224] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0225] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0226] Based on the same concept, an embodiment of the present invention also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, a method for evaluating American ginseng quality based on multi-task deep learning provided by an embodiment of the present invention is implemented.

[0227] The computer program product may be loaded on a computer device, the components of which may include but are not limited to: one or more processors or processing units, a system memory, and a bus connecting different system components (including the system memory and the processing unit).

[0228] Computer devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the computer device, including volatile and non-volatile media, removable and non-removable media.

[0229] The system memory may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The computer device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system may be used to read and write non-removable, non-volatile magnetic media. The computer program product has a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0230] A program / utility having a set (at least one) of program modules may be stored, for example, in a memory, such program modules including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described herein.

[0231] The computer device can also communicate with one or more external devices (such as keyboards, pointing devices, displays, etc.), and can also communicate with one or more devices that enable users to interact with the computer device, and / or communicate with any device (such as a network card, a modem, etc.) that enables the computer device to communicate with one or more other computing devices. This communication can be carried out through an input / output (I / O) interface. In addition, the computer device can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter. As shown in the figure, the network adapter communicates with other modules of the computer device through a bus. It should be understood that other hardware and / or software modules can be used in conjunction with the computer device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0232] The processing unit executes various functional applications and data processing by running programs stored in the system memory, such as implementing a method for evaluating American ginseng quality based on multi-task deep learning provided in an embodiment of the present invention.

[0233] Those skilled in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or by a program to instruct the relevant hardware to complete, and the program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a disk or an optical disk, etc. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0234] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. 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 method for evaluating the quality of American ginseng based on multi-task deep learning, characterized in that: include: Prepare American ginseng samples from different origins and cut them into slices to obtain multiple American ginseng samples; wherein each American ginseng sample includes several slices of American ginseng from the same origin; Collecting near-infrared spectral data of each American ginseng sample; and determining the ginsenoside content of each American ginseng sample to obtain label data of each American ginseng sample; wherein the label data of the American ginseng sample includes the ginsenoside content and origin information of the American ginseng sample; Based on the collected near-infrared spectral data and the obtained label data, a quality detection model for American ginseng is constructed and trained; Based on the constructed American ginseng quality detection model, feature extraction is performed on the near-infrared spectral data of the American ginseng to be evaluated, and the origin traceability and ginsenoside content are predicted; The American ginseng quality detection model includes a backbone network for extracting feature information from near-infrared spectral data of American ginseng, a classification head for tracing the origin of American ginseng, and a regression head for predicting the ginsenoside content of American ginseng.

2. A method for evaluating the quality of American ginseng based on multi-task deep learning according to claim 1, characterized in that: The backbone network includes three series-connected Res-Attention modules, each of which includes three submodules: a residual module, a self-attention module, and a channel attention module; Among them, the residual module is used to process the input American ginseng near-infrared spectrum data through convolution layers and activation functions; the self-attention module is used to calculate the correlation between each position in the sequence and other positions, capturing global information and dependencies between bands; the channel attention module is used to assign weights to each channel to highlight important task-related features.

3. A method for evaluating American ginseng quality based on multi-task deep learning according to claim 2, characterized in that: The input American ginseng near-infrared spectrum data is processed through a convolution layer and an activation function, specifically including: The input American ginseng near-infrared spectrum data x is processed by the convolution layer and the activation function to generate a residual map F(x)=ReLU(Conv(x)), and then F(x) is added to the input American ginseng near-infrared spectrum data x, and the final output Output=ReLU(F(x)+x) is generated by the activation function; The calculation sequence is performed to calculate the correlation between each position and other positions, capturing global information and dependencies between bands, specifically including: The output of the residual module is converted into a query vector Q, a key vector K and a value vector V through the convolution layer. The similarity between the query vector Q and the key vector K is calculated by dot product to obtain the correlation score energy = Q K T ; Use the softmax function to normalize the correlation score and obtain the weighted feature F(x)′=softmax(enengy)·V; The influence of the self-attention mechanism is adjusted through the learnable parameter γ before output, that is, Output′=γ·F(x)′+x; The weights are assigned to each channel to highlight important features related to the task, including: The output of the self-attention module is subjected to global average pooling to obtain the global feature F of each channel. avg (x), expressed as: Among them, x c is the data input to the channel attention module, c is the number of channels, and L is the feature length on each channel; Global feature F avg (x) Generate channel weights through two 1x1 convolutional layers and sigmoid function: W=Sigmoid(Conv(F avg (x))); The output after channel weighting is: Output″=W·x.

4. A method for evaluating American ginseng quality based on multi-task deep learning according to claim 3, characterized in that: The final loss function of the American ginseng quality detection model is designed as the weighted sum of the classification task loss and the regression task loss: Loss total =α×Loss classfiatinon +β×Loss regression ; Among them, α and β are the loss weights of classification and regression tasks, respectively, and are both set to 0.

5.

5. The American ginseng quality assessment method based on multi-task deep learning according to claim 1, characterized in that: The collecting of near infrared spectral data of each American ginseng sample specifically includes: The near-infrared spectral data of each American ginseng sample were collected in the range of 950 to 1650 nm with a resolution of 0.5 nm, and the collected raw spectral data were reduced from 1401 dimensions to 280 dimensions using a sliding window technique; After collecting the near infrared spectrum data of each American ginseng sample, the method further includes: preprocessing the near infrared spectrum data, which is specifically implemented as follows: The 280-dimensional near-infrared spectral data were preprocessed by Savitsky-Golay smoothing and differentiation, standard normal transformation (SNV), and Z-score normalization.

6. The American ginseng quality assessment method based on multi-task deep learning according to claim 5, characterized in that: The method further includes: extracting features from the near-infrared spectral data of the American ginseng to be evaluated based on the constructed American ginseng quality detection model, and tracing the origin and predicting the ginsenoside content. Dividing all American ginseng samples into a training set for training the American ginseng quality detection model, a validation set for verifying the training effect after each round of model training, and a test set for testing the trained American ginseng quality detection model according to a predetermined ratio; and The constructed American ginseng quality detection model was evaluated using the test set.

7. The American ginseng quality assessment method based on multi-task deep learning according to claim 6, characterized in that: The evaluation of the constructed American ginseng quality detection model through the test set specifically includes: The collected near-infrared spectral data of the test set were input into the trained American ginseng quality detection model to evaluate the performance of the American ginseng quality detection model in the origin tracing of American ginseng and the prediction of ginsenoside content. The specific evaluation parameters involved include the parameters in the origin tracing task, the parameters in the ginsenoside content prediction task, and the parameters in the ginsenoside content prediction task: The parameters in the origin tracing task include: The overall accuracy is used to indicate the proportion of samples correctly classified in the test set, namely: Among them, TP i is the number of samples correctly classified as the i-th category, c is the number of classification categories, and N is the number of samples in the test set; Precision is used to measure the proportion of samples correctly predicted as positive among all samples predicted as positive, that is: Among them, FP i is the number of samples misclassified as class i; Recall is used to measure the proportion of correctly predicted positive samples in all true positive samples, that is: Among them, FN i is the number of samples that actually belong to the i-th category but are misclassified: The parameters in the task of predicting ginsenoside content include: The coefficient of determination is used to measure the fit between the predicted value and the true value, namely: The root mean square error is used to measure the error between the predicted value and the true value, that is: The residual prediction bias is used to indicate the stability of the model prediction, namely: In the above formula, N is the total number of test samples, y i and are the true value and predicted value of the i-th sample, y m and is the mean of the true value and predicted value of the test sample; The method of constructing and training a quality detection model for American ginseng based on the collected near-infrared spectral data and the obtained label data is specifically implemented as follows: Based on the near-infrared spectral data and label data of the training set, a American ginseng quality detection model is constructed and trained.

8. The American ginseng quality assessment method based on multi-task deep learning according to claim 7, characterized in that: The method of dividing the plurality of American ginseng samples into a training set for training the American ginseng quality detection model, a verification set for verifying the training effect after each round of model training, and a test set for testing the trained American ginseng quality detection model according to a predetermined ratio specifically includes: All American ginseng samples were divided into training set, validation set and test set in a ratio of 5:1:4; The Kennard-Stone method is used to ensure uniform distribution of samples, and the number of training set samples is expanded through unsupervised spectral data augmentation.

9. A computer-readable storage medium, wherein at least one instruction is stored in the storage medium, characterized in that: The instructions are loaded and executed by the processor to implement a method for evaluating American ginseng quality based on multi-task deep learning as described in any one of claims 1 to 8.

10. Computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by the processor, the American ginseng quality assessment method based on multi-task deep learning as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • American ginseng producing area detection method based on terahertz spectrum technology

    CN113916825A

  • Method for tracing origin of American ginseng and application

    CN117783404A

  • Method and system for monitoring a quality of pepper powder

    US20240337574A1

Cited By

  • Pumpkin sugar degree efficient detection method and system for enhancing multitask deep attention network collaborative near infrared spectrum

    CN120385642A

  • Ginseng quality evaluation method and device, equipment and storage medium

    CN121026980A

  • Modeling method suitable for traceability and quality parameter collaborative detection of mineral products

    CN121073511A

  • Modeling method suitable for collaborative detection of traceability and quality parameters of mineral products

    CN121073511B

  • American ginseng quality high-throughput detection method and system based on near infrared spectrum and multi-task deep learning

    CN121601085A