Method and device for selecting hyperspectral identification shooting range of cordyceps sinensis
By defining the hyperspectral imaging range and using a logistic regression model, the problem of insufficient identification accuracy caused by incomplete Cordyceps sinensis sample structure was solved, achieving efficient and accurate identification of Cordyceps sinensis, which is suitable for large-scale market supervision.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIBET UNIVERSITY FOR NATIONALITIES
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-12
AI Technical Summary
The lack of clear specifications for hyperspectral imaging range in existing technologies leads to incomplete sample structure and inconsistent data collection in Cordyceps sinensis, affecting the accuracy and reliability of identification models.
Hyperspectral data of Cordyceps sinensis samples were captured and collected using a hyperspectral non-imaging instrument to ensure that the imaging range completely covered the insect body and stroma. An identification model was constructed by combining a logistic regression model, and the identification accuracy was improved through data preprocessing and parameter optimization.
It improves the accuracy of identifying wild and artificially bred Cordyceps sinensis, enhances the accuracy and reliability of the identification model, and avoids sample damage, thus meeting the needs of large-scale market supervision.
Smart Images

Figure CN122016665A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of hyperspectral imaging technology and intelligent identification of traditional Chinese medicine, and particularly to a method and apparatus for selecting the imaging range for hyperspectral identification of Cordyceps sinensis. Background Technology
[0002] Cordyceps sinensis is a precious traditional Chinese medicine with extremely high health and medicinal value, and has been listed as a national second-class protected endangered species. Studies have shown that its metabolite composition is significantly affected by factors such as temperature, soil pressure, and light intensity in the growth environment, resulting in significant differences between wild and artificially bred Cordyceps sinensis in terms of total amino acid, fatty acid, and mineral content. These differences directly affect its market value and medicinal efficacy.
[0003] Due to the scarcity and high price of Cordyceps sinensis, artificially bred Cordyceps sinensis has been sold as wild Cordyceps sinensis in the market, seriously harming consumer rights and negatively impacting its medicinal reputation. Therefore, achieving accurate and efficient identification of Cordyceps sinensis is of significant practical importance. Previous identification methods mainly relied on morphological observation, chemical analysis, or molecular biology techniques. These methods are typically time-consuming, costly, and may damage samples, making them unsuitable for large-scale market supervision.
[0004] Hyperspectral technology, as a non-destructive and rapid method for acquiring spectral information of objects, has been widely used in the identification of agricultural products and medicinal materials. Combined with machine learning algorithms, it can achieve efficient automatic classification. However, in the actual harvesting and circulation of Cordyceps sinensis, uncertainties in manual harvesting and transportation often lead to the separation of the Cordyceps stroma from the insect body. Currently, due to the lack of clear specifications and theoretical guidance on the imaging range, data collection standards are inconsistent, making it difficult to guarantee the completeness of the constructed spectral feature set, which in turn affects the accuracy and reliability of subsequent identification models.
[0005] Therefore, there is an urgent need for a method that can clearly guide the range of hyperspectral imaging to solve the problem of insufficient identification accuracy caused by incomplete sample structure and inconsistent data acquisition. Summary of the Invention
[0006] This disclosure provides a method and apparatus for selecting the imaging range for hyperspectral identification of Cordyceps sinensis.
[0007] Firstly, this disclosure provides a method for selecting the imaging range for hyperspectral identification of Cordyceps sinensis, including:
[0008] Hyperspectral data of a complete Cordyceps sinensis sample was captured and collected using a hyperspectral non-imaging instrument, with the imaging range completely covering the insect body and stroma of the complete Cordyceps sinensis sample.
[0009] The method for selecting the imaging range for hyperspectral identification of Cordyceps sinensis described above can be used for the construction of hyperspectral identification models and the hyperspectral identification of Cordyceps sinensis.
[0010] Secondly, this disclosure provides a device for selecting the imaging range of Cordyceps sinensis using hyperspectral identification, comprising:
[0011] Sample placement unit, used to place and fix complete Cordyceps sinensis samples;
[0012] The non-imaging hyperspectral data acquisition unit is used to capture and acquire hyperspectral data of the complete Cordyceps sinensis sample, and the imaging range completely covers the insect body and stroma of the complete Cordyceps sinensis sample.
[0013] The data processing unit is communicatively connected to the non-imaging hyperspectral data acquisition unit and is used for constructing a hyperspectral identification model for Cordyceps sinensis and for hyperspectral identification of Cordyceps sinensis.
[0014] The content described in this section is not intended to identify key or important features of the embodiments of this disclosure, nor does it constitute a limitation on the scope of this disclosure.
[0015] Other features of this disclosure will be described in detail in the following description to aid understanding. Attached Figure Description
[0016] Figure 1 This is a schematic diagram illustrating a specific implementation scenario of an embodiment of this disclosure;
[0017] Figure 2 This is an example diagram of a complete Cordyceps sinensis sample shown in one embodiment of this disclosure;
[0018] Figure 3 This is a schematic diagram of the hyperspectral imaging range in one embodiment of this disclosure;
[0019] Figure 4 This is a schematic flowchart of a method for constructing a hyperspectral identification model for Cordyceps sinensis according to an embodiment of this disclosure;
[0020] Figure 5 This is a schematic diagram of preprocessed hyperspectral data in one embodiment of this disclosure;
[0021] Figure 6 This is a schematic flowchart of a hyperspectral identification method for Cordyceps sinensis provided in an embodiment of this disclosure;
[0022] Figure 7 This is a schematic block diagram of a device for selecting the imaging range of Cordyceps sinensis in a device embodiment provided in this disclosure. Detailed Implementation
[0023] The present disclosure will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments provided below are merely exemplary. Furthermore, for the sake of brevity and clarity, common knowledge has been omitted from the description of the following embodiments.
[0024] In this document, terms such as "first," "second," and "third" are used only to distinguish identical or similar descriptive objects and are not intended to limit the specific order or sequence of the described objects, nor are they used to limit the importance of the described objects. At the same time, in order to enable those skilled in the art to clearly understand the technical solutions provided in this disclosure, expressions such as "red," "yellow," and "blue" and / or the specific colors in the accompanying drawings are also used only to distinguish identical or similar descriptive objects and do not represent the color attributes possessed by the descriptive objects when this solution is actually deployed.
[0025] Figure 1 The illustration shows a specific implementation scenario of an embodiment of the present disclosure. A non-imaging hyperspectral acquisition device acquires hyperspectral data of a Cordyceps sinensis sample and transmits the hyperspectral data to a computing device via a communication connection. The computing device can use the hyperspectral data to train a model to construct a hyperspectral identification model for Cordyceps sinensis. Furthermore, the trained and accurate hyperspectral identification model for Cordyceps sinensis is used to perform hyperspectral identification on the sample to distinguish whether the sample is wild or artificially bred.
[0026] This disclosure provides an embodiment of a method for selecting the imaging range for hyperspectral identification of Cordyceps sinensis, specifically including:
[0027] Hyperspectral data of complete Cordyceps sinensis samples were captured and collected using a hyperspectral non-imaging instrument, with the imaging range completely covering the insect body and stroma of the complete Cordyceps sinensis samples.
[0028] It should be understood that the aforementioned method for selecting the imaging range for hyperspectral identification of Cordyceps sinensis has two key points:
[0029] First, the Cordyceps sample must be complete, meaning it must contain both the complete insect body and the stroma, and neither part can be missing. Figure 2 An example of a complete Cordyceps sinensis sample is shown.
[0030] Second, the imaging range should completely cover both the insect body and the stroma to ensure the integrity of the hyperspectral information from the data source. Figure 3 Provide an illustrative explanation of the correct shooting range.
[0031] Furthermore, an embodiment of this disclosure provides a method for selecting the imaging range for hyperspectral identification of Cordyceps sinensis, which can be used for the construction of a hyperspectral identification model for Cordyceps sinensis and for the hyperspectral identification of Cordyceps sinensis.
[0032] This disclosure provides an embodiment of a method for constructing a hyperspectral identification model for Cordyceps sinensis, such as... Figure 4 As shown, it specifically includes:
[0033] Step S401: Capture and collect raw hyperspectral data of the Cordyceps sinensis sample set; wherein the sample set consists of two types of Cordyceps sinensis samples known to be wild or artificially bred.
[0034] Step S402: Preprocess the raw hyperspectral data of the sample set; wherein, preprocessing refers to smoothing and denoising, baseline correction and normalization.
[0035] It should be noted that the purpose of preprocessing is to eliminate environmental interference as much as possible and enhance the feature signals, which is beneficial to improving the model's discrimination accuracy.
[0036] In one embodiment of this application, the preprocessed hyperspectral data is as follows: Figure 5 As shown.
[0037] Step S403: Label the preprocessed hyperspectral data of the sample set with wild or artificially bred species labels to construct independent training and validation datasets.
[0038] Step S404: Train a hyperspectral identification model for Cordyceps sinensis using an independent training dataset; wherein, the hyperspectral identification model for Cordyceps sinensis is a logistic regression model; the classification threshold of the logistic regression model is set to 0.5, the positive class is defined as wild products, and the negative class is defined as artificially bred products.
[0039] Step S405: Use an independent validation dataset to evaluate the identification accuracy of the trained Cordyceps sinensis hyperspectral identification model and determine whether its identification accuracy meets the preset accuracy requirements.
[0040] Step S406: If the preset accuracy requirement is not met, adjust the parameters of the trained Cordyceps sinensis hyperspectral identification model and re-evaluate the identification accuracy using the same independent validation dataset; the parameters include regularization parameters, regularization type, optimizer, and maximum number of iterations.
[0041] In one embodiment of this application, the adjustable parameters and ranges of the logistic regression model are shown in Table 1.
[0042] parameter illustrate Parameter adjustment range C Regularization parameters [0.01,0.1,1,10] penalty Regularization type [l2,l1,elasticnet,none] solver Optimizer [liblinear,lbfgs,saga] max_iter Maximum number of iterations [100,200,500]
[0043] Table 1
[0044] Step S407: If the preset accuracy requirement is met, the hyperspectral identification model of Cordyceps sinensis is completed.
[0045] In one embodiment of this application, the preset accuracy requirement is not less than 95%. The trained Cordyceps sinensis hyperspectral identification model is validated 10 times using an independent validation dataset. The accuracy is shown in Table 2, with an average accuracy of 99.27%, which meets the preset accuracy requirement. The model can be used for the hyperspectral identification of Cordyceps sinensis.
[0046] Logistic Regression (%) 1 98.28 2 100 3 99.57 4 98.71 5 99.57 6 98.71 7 100 8 98.71 9 99.57 10 99.57 Average accuracy 99.27
[0047] Table 2
[0048] It should be understood that in the aforementioned method for constructing a hyperspectral identification model for Cordyceps sinensis, the sample should be a complete and undamaged Cordyceps sinensis containing both the insect body and the stroma, and the hyperspectral imaging range should completely cover both the insect body and the stroma of the sample.
[0049] One embodiment of this disclosure provides a hyperspectral identification method for Cordyceps sinensis, specifically including:
[0050] Step S601: Capture and collect the raw hyperspectral data of the Cordyceps sinensis sample to be tested.
[0051] Step S602: Preprocess the raw hyperspectral data of the sample to be tested; wherein the preprocessing is the same as step S402.
[0052] Step S603: Input the preprocessed hyperspectral data of the sample to be tested into the Cordyceps sinensis hyperspectral identification model to complete the identification; wherein, the Cordyceps sinensis hyperspectral identification model is the Cordyceps sinensis hyperspectral identification model in step S407.
[0053] It should be understood that the sample requirements and hyperspectral imaging range requirements of the aforementioned method for constructing the hyperspectral identification model of Cordyceps sinensis are the same as those of the aforementioned method for selecting the hyperspectral identification imaging range of Cordyceps sinensis, and will not be repeated here.
[0054] In one embodiment of this disclosure, 1236 complete Cordyceps sinensis samples were selected, of which 794 were known to be wild Cordyceps sinensis and 442 were known to be artificially bred Cordyceps sinensis. Approximately 80% of the samples were used to construct a training dataset (including wild and artificially bred products), 20% of the samples were used to construct a validation dataset (including wild and artificially bred products), and 20% of the samples were used as test samples (including wild and artificially bred products) for a set of comparative experiments.
[0055] In this comparative experiment, black clay was used to fix the samples on a black leather platform. The purpose of this was to minimize the interference of environmental factors outside the samples on the hyperspectral data during hyperspectral imaging. A FieldSpec4 spectrometer from ASD was used for hyperspectral imaging. The wavelength range of this spectrometer is 350nm-2500nm, and the sampling interval is 1.4nm (350-1000nm) and 2nm (1000-2500nm).
[0056] In the first experiment of this group, the hyperspectral imaging range only covered the insect body portion of the sample for the construction of a hyperspectral identification model and hyperspectral identification of Cordyceps sinensis. In the second experiment, the hyperspectral imaging range covered the entire sample, completely covering both the insect body and the stroma portion, for the construction of a hyperspectral identification model and hyperspectral identification of Cordyceps sinensis. The identification accuracy of the two experiments was compared, as shown in Table 3. It is evident that the method of completely covering both the insect body and stroma portion of Cordyceps sinensis with the hyperspectral imaging range can improve the identification accuracy between wild and artificially bred Cordyceps sinensis.
[0057] First experiment Second experiment accuracy 96.1% 99.6%
[0058] Table 3
[0059] The technical solution provided in this disclosure clearly defines the selection range of hyperspectral imaging in the hyperspectral identification of Cordyceps sinensis, ensuring the integrity of spectral information from the data source. Applying this range selection method to the identification model construction and subsequent identification improves the identification accuracy of wild and artificially bred Cordyceps sinensis.
[0060] Furthermore, the technical solution provided in this disclosure is not the traditional method of identifying wild and artificially bred Cordyceps sinensis based on human experience. It avoids subjective influence and improves identification efficiency. At the same time, the application of this technical solution does not damage the sample, thus ensuring the integrity of the sample.
[0061] This disclosure provides an embodiment of a device for selecting the imaging range for hyperspectral identification of Cordyceps sinensis, such as... Figure 7 As shown, it specifically includes:
[0062] Sample placement unit 71 is used to place and fix complete Cordyceps sinensis samples;
[0063] The non-imaging hyperspectral data acquisition unit 72 is used to capture and acquire hyperspectral data of complete Cordyceps sinensis samples, and the imaging range completely covers the insect body and stroma of the complete Cordyceps sinensis sample.
[0064] The data processing unit 73 is connected in communication with the non-imaging hyperspectral data acquisition unit and is used for the construction of a hyperspectral identification model for Cordyceps sinensis and the hyperspectral identification of Cordyceps sinensis.
[0065] The internal modules of the data processing unit 73, such as Figure 7 As shown, it specifically includes:
[0066] The data acquisition module 7301 is used to acquire the raw hyperspectral data of the Cordyceps sinensis sample set and the Cordyceps sinensis sample to be tested using a communication connection.
[0067] The preprocessing module 7302 is used to preprocess the raw hyperspectral data of the sample set and the sample to be tested; wherein, preprocessing refers to smoothing and denoising, baseline correction and normalization.
[0068] The dataset construction module 7303 is used to label wild or artificially bred species on the preprocessed hyperspectral data of the sample set, and to build independent training and validation datasets.
[0069] Model training module 7304 is used to train a hyperspectral identification model for Cordyceps sinensis using an independent training dataset; the hyperspectral identification model for Cordyceps sinensis is a logistic regression model; the classification threshold of the logistic regression model is set to 0.5, with the positive class defined as wild products and the negative class defined as artificially bred products;
[0070] The accuracy assessment and parameter tuning module 7305 is used to evaluate the identification accuracy of the trained Cordyceps sinensis hyperspectral identification model using an independent validation dataset, and to determine whether its identification accuracy meets the preset accuracy requirements; among which,
[0071] If the preset accuracy requirement is not met, the parameters of the trained Cordyceps sinensis hyperspectral identification model are adjusted, and the identification accuracy is re-evaluated using the same independent validation dataset; the parameters include regularization parameters, regularization type, optimizer, and maximum number of iterations.
[0072] If the preset accuracy requirements are met, the hyperspectral identification model for Cordyceps sinensis is complete.
[0073] The identification module 7306 is used to input the preprocessed hyperspectral data of the sample to be tested into the Cordyceps sinensis hyperspectral identification model to complete the identification.
[0074] Any changes made to the above embodiments by those skilled in the art without departing from the true spirit and scope of this disclosure should be included within the scope of protection covered by the claims. The scope of protection claimed by this invention is limited only by the claims.
Claims
1. A method for selecting the imaging range for hyperspectral identification of Cordyceps sinensis, characterized in that, include: Hyperspectral data of a complete Cordyceps sinensis sample was captured and collected using a hyperspectral non-imaging instrument, with the imaging range completely covering the insect body and stroma of the complete Cordyceps sinensis sample. The method for selecting the imaging range for hyperspectral identification of Cordyceps sinensis described above can be used for the construction of hyperspectral identification models and the hyperspectral identification of Cordyceps sinensis.
2. The method according to claim 1, characterized in that, Construction of a hyperspectral identification model for Cordyceps sinensis, including: The raw hyperspectral data of a Cordyceps sinensis sample set were captured and collected; wherein the sample set consists of two types of Cordyceps sinensis samples, known to be wild or artificially bred. The original hyperspectral data of the sample set are preprocessed; wherein, the preprocessing refers to smoothing and denoising, baseline correction and normalization. Label the preprocessed sample set with wild or artificially bred species tags to construct independent training and validation datasets; The Cordyceps sinensis hyperspectral identification model was trained using the independent training dataset; wherein the Cordyceps sinensis hyperspectral identification model is a logistic regression model; the classification threshold of the logistic regression model is set to 0.5, with the positive class defined as wild products and the negative class defined as artificially bred products; The identification accuracy of the trained Cordyceps sinensis hyperspectral identification model was evaluated using the independent validation dataset, and it was determined whether the identification accuracy met the preset accuracy requirements; wherein, If the preset accuracy requirement is not met, the parameters of the trained Cordyceps sinensis hyperspectral identification model are adjusted, and the identification accuracy is re-evaluated using the independent validation dataset; wherein, the parameters include regularization parameters, regularization type, optimizer, and maximum number of iterations; If the preset accuracy requirement is met, the hyperspectral identification model for Cordyceps sinensis is completed.
3. The method according to claim 2, characterized in that, Hyperspectral identification of Cordyceps sinensis includes: The raw hyperspectral data of the Cordyceps sinensis sample to be tested were captured and collected; The preprocessing is performed on the raw hyperspectral data of the sample to be tested; The preprocessed hyperspectral data of the sample to be tested is input into the Cordyceps sinensis hyperspectral identification model to complete the identification.
4. The method according to claim 3, characterized in that, Hyperspectral data, including: The wavelength range of the hyperspectral data is from 350 nm to 2500 nm.
5. A device for selecting the imaging range of Cordyceps sinensis using hyperspectral identification, characterized in that, include: Sample placement unit, used to place and fix complete Cordyceps sinensis samples; The non-imaging hyperspectral data acquisition unit is used to capture and acquire hyperspectral data of the complete Cordyceps sinensis sample, and the imaging range completely covers the insect body and stroma of the complete Cordyceps sinensis sample. The data processing unit is communicatively connected to the non-imaging hyperspectral data acquisition unit and is used for constructing a hyperspectral identification model for Cordyceps sinensis and for hyperspectral identification of Cordyceps sinensis.
6. The apparatus according to claim 5, characterized in that, The data processing unit also includes: The data acquisition module is used to acquire the raw hyperspectral data of the Cordyceps sinensis sample set and the Cordyceps sinensis sample to be tested using the communication connection. The preprocessing module is used to preprocess the raw hyperspectral data of the sample set and the sample to be tested; wherein, the preprocessing refers to smoothing and denoising, baseline correction and normalization. The dataset construction module is used to label the hyperspectral data of the preprocessed sample set with wild or artificially bred species labels, and to construct independent training and validation datasets. The model training module is used to train the Cordyceps sinensis hyperspectral identification model using the independent training dataset; wherein the Cordyceps sinensis hyperspectral identification model is a logistic regression model; the classification threshold of the logistic regression model is set to 0.5, with the positive class defined as wild products and the negative class defined as artificially bred products; The accuracy assessment and parameter tuning module is used to evaluate the identification accuracy of the trained Cordyceps sinensis hyperspectral identification model using the independent validation dataset, and to determine whether the identification accuracy meets the preset accuracy requirements; wherein, If the preset accuracy requirement is not met, the parameters of the trained Cordyceps sinensis hyperspectral identification model are adjusted, and the identification accuracy is re-evaluated using the independent validation dataset; wherein, the parameters include regularization parameters, regularization type, optimizer, and maximum number of iterations; If the preset accuracy requirement is met, the hyperspectral identification model of Cordyceps sinensis is completed. The identification module is used to input the preprocessed hyperspectral data of the sample to be tested into the Cordyceps sinensis hyperspectral identification model to complete the identification.
7. The apparatus according to claim 6, characterized in that, The non-imaging hyperspectral data acquisition unit further includes a hyperspectral data wavelength range of 350 nm to 2500 nm that can be acquired by the non-imaging hyperspectral data acquisition unit.