Fritillaria geographic source judgment method and system based on terahertz spectrum and machine learning algorithm

By using terahertz spectroscopy and the PSO-SVM algorithm to quickly classify the geographical origin of fritillaria, the problem of long time consumption and high professional knowledge requirements in existing technologies is solved, and the geographical origin of fritillaria is determined with high accuracy.

CN120974293APending Publication Date: 2025-11-18ZHENGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510982398.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing methods for identifying the geographical origin of Fritillaria are time-consuming and require a high level of expertise.

Method used

By employing terahertz spectroscopy combined with particle swarm optimization support vector machine (PSO-SVM) algorithm, the Fritillaria cirrhosa samples were ball-milled, mixed, and pressed into sheet-like samples. Spectral data were acquired using a TAS7400TS terahertz time-domain spectroscopy system, and principal component analysis and feature input were performed to achieve rapid classification of the geographical origin of Fritillaria cirrhosa.

Benefits of technology

It enables rapid and simple classification of the geographical origin of Fritillaria cirrhosa, with an average overall accuracy rate of 95.04%, without requiring complex professional knowledge, and ensures the consistency of efficacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120974293A_ABST
    Figure CN120974293A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fritillaria recognition, and discloses a fritillaria geographic source judgment method and system based on a terahertz spectrum and a machine learning algorithm, and the method comprises the following steps: respectively crushing fritillaria by using a ball mill, respectively mixing each crushed fritillaria with polyethylene according to a mass ratio of 1: 4, pressing the mixed powder into a flaky sample, and carrying out ultrasonic treatment on the flaky sample to obtain the fritillaria geographic source. Preparing a plurality of pieces for each kind of fritillary bulb sample; a terahertz time-domain spectroscopy system is used for collecting spectrums of the sheet-shaped samples; randomly dividing a plurality of groups of spectral data into a training set and a test set according to a proportion of 3: 1, and inputting the training set and the test set into a particle swarm optimization support vector machine model for iterative operation for 100 times; and carrying out principal component analysis on the spectral data, carrying out dimensionality reduction on high-dimensional spectral data, selecting the first 12 principal components as feature input of a particle swarm optimization support vector machine model, and outputting the feature input as classification labels of the fritillaria. The method has the advantages of simplicity and convenience in operation, high analysis speed and no need of complicated professional knowledge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fritillary bulb identification technology, and more specifically, to a method and system for determining the geographical origin of fritillary bulbs based on terahertz spectroscopy and machine learning algorithms. Background Technology

[0002] Fritillaria has been used medicinally in China for thousands of years. It includes several species from different geographical origins, such as *Fritillaria cirrhosa* D. Don (FC), *Fritillaria ussuriensis* Maxim (FU), *Fritillaria pallidiflora* Schrenk (FP), and *Fritillaria thunbergii* Miq (FT). These four species are distributed in different regions of China and are widely used in traditional Chinese medicine. Due to differences in their growing environments (such as climate and soil conditions), their chemical compositions vary, resulting in specific medicinal effects. *Fritillaria cirrhosa* mainly acts on the lung and heart meridians, having the effect of clearing heat and moistening the lungs. *Fritillaria ussuriensis* has antihypertensive and significant anti-inflammatory effects. *Fritillaria pallidiflora* has long been used as an antitussive, antiasthmatic, and expectorant. *Fritillaria thunbergii*, in addition to treating cough and bronchitis, has also shown anti-cancer potential. Classifying fritillaria according to geographical origin is of great significance for achieving precise treatment of subtle symptoms. Fritillaria cirrhosa is considered one of the most valuable species due to its excellent medicinal effects and complex cultivation techniques. However, its limited production cannot meet clinical needs, leading to frequent adulteration. Therefore, distinguishing the geographical origin of Fritillaria cirrhosa is crucial for ensuring medicinal quality and promoting precise clinical application.

[0003] Currently, various techniques are employed for fritillary bulb classification, such as Fourier transform infrared spectroscopy (FT-IR), two-dimensional infrared spectroscopy (2D-IR), gas chromatography (GC), and high-performance liquid chromatography combined with evaporative light scattering detection (HPLC-ELSD). While these methods are effective for species identification, they are time-consuming and require a high level of expertise. Therefore, a suitable identification technique is needed to classify the geographical origin of fritillary bulbs.

[0004] Therefore, it is necessary to provide a method and system for determining the geographical origin of Fritillaria based on terahertz spectroscopy and machine learning algorithms to solve the problems of long operation time and high professional knowledge required in existing Fritillaria identification methods. Summary of the Invention

[0005] In view of this, the present invention proposes a method and system for determining the geographical origin of Fritillaria based on terahertz spectroscopy and machine learning algorithms, aiming to solve the problems of long operation time and high professional knowledge required in existing Fritillaria identification methods.

[0006] On the one hand, this invention proposes a method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms, including:

[0007] Multiple fritillaria samples were selected and pulverized using a ball mill. Each pulverized fritillaria was then mixed with polyethylene at a mass ratio of 1:4 to obtain mixed powder. The mixed powder was then pressed into sheet samples, and several sheets were prepared for each fritillaria sample.

[0008] The TAS7400TS terahertz time-domain spectroscopy system was used to acquire the spectra of sheet-like samples. Each sample was measured several times to obtain several sets of spectral data.

[0009] Several sets of spectral data were randomly divided into training and test sets at a ratio of 3:1 and input into a particle swarm optimization support vector machine model for 100 iterations; during each iteration, the training and test sets were randomly re-divided.

[0010] Principal component analysis was performed on the spectral data to reduce the dimensionality of the high-dimensional spectral data. The first 12 principal components were selected as the feature inputs of the particle swarm optimization support vector machine model, and the output was the classification label of fritillaria.

[0011] Furthermore, the process involves separately pulverizing the fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain a mixed powder, and pressing the mixed powder into sheet-like samples. When preparing several sheets of each type of fritillaria sample, the process includes:

[0012] The fritillaria samples were pulverized using a ball mill for at least 30 minutes each.

[0013] Furthermore, the process of separately pulverizing the fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain a mixed powder, and pressing the mixed powder into sheet-like samples, with several sheets prepared for each type of fritillaria sample, also includes:

[0014] The mixed powder was pressed into sheet-like samples under a pressure of 10 MPa, with 20 sheets prepared for each type of fritillaria sample, each sheet having a diameter of 13 mm and a thickness of 1 mm.

[0015] Furthermore, the process involves separately pulverizing the fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain a mixed powder, and pressing the mixed powder into sheet-like samples. When preparing several sheets of each type of fritillaria sample, the process includes:

[0016] When preparing the sheet-like sample, the humidity was kept below 1.0% and the room temperature was maintained at 293K.

[0017] Furthermore, when using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the process includes:

[0018] The frequency range of the spectrum of the sheet-like sample is 0.5-4.5 THz, the frequency resolution is 7.6 GHz, and the spot diameter is 5 mm.

[0019] Furthermore, when using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the method further includes:

[0020] Each sample was measured 6 times, resulting in a total of 480 sets of spectral data.

[0021] Furthermore, before performing principal component analysis on the spectral data, the following steps are included:

[0022] The spectral data is preprocessed;

[0023] The methods for preprocessing the spectral data include Savitzky-Golay smoothing, unit variance scaling, or standard normal variables.

[0024] Furthermore, when using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the method further includes:

[0025] Each spectrum is obtained through 1024 consecutive scans.

[0026] Compared with existing technologies, the advantages of this invention lie in classifying the geographical origin of Fritillaria cirrhosa using terahertz spectroscopy and machine learning algorithms. In the origin classification model, the unpreprocessed PSO-SVM model exhibits excellent performance, with an average overall accuracy of 95.04% and a standard deviation of 0.74%. Generally, the unpreprocessed model shows better classification performance than models preprocessed using SG, UV, or SNV, which is attributed to the loss of key feature information during preprocessing. Therefore, the combination of terahertz spectroscopy and machine learning algorithms has proven effective in classifying the geographical origin of Fritillaria cirrhosa. This invention provides a novel analytical strategy to ensure consistency of efficacy and expand the application scope of terahertz spectroscopy. In summary, this invention offers advantages such as ease of operation, fast analysis speed, and no need for complex professional knowledge.

[0027] On the other hand, this application also provides a system for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms, including:

[0028] The data acquisition module is configured to use the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data.

[0029] The model building module is configured to randomly divide several sets of spectral data into training and test sets at a ratio of 3:1, and input them into the particle swarm optimization support vector machine model for 100 iterations; in each iteration, the training and test sets are randomly re-divided.

[0030] The output module is configured to perform principal component analysis on the spectral data, reduce the dimensionality of the high-dimensional spectral data, select the first 12 principal components as feature inputs for the particle swarm optimization support vector machine model, and output the classification label of fritillaria.

[0031] It is understood that the method and system for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms provided in this application have the same beneficial effects, and will not be elaborated further here. Attached Figure Description

[0032] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0033] Figure 1 A flowchart of a method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms provided in an embodiment of the present invention;

[0034] Figure 2 Morphological feature diagrams of four types of fritillaria and their powder forms provided in embodiments of the present invention;

[0035] Figure 3 Absorption coefficient spectra of various fritillaria bulbs in the frequency range of 1.0-3.5 THz provided for embodiments of the present invention;

[0036] Figure 4 Principal component variance contribution plot of the original spectrum provided in the embodiments of the present invention;

[0037] Figure 5 The iterative performance diagrams for four models under four preprocessing methods provided in the embodiments of the present invention are shown.

[0038] Figure 6 This is a functional block diagram of a fritillary bulb geographic origin determination system based on terahertz spectroscopy and machine learning algorithms, provided in an embodiment of the present invention. Detailed Implementation

[0039] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0040] Terahertz spectroscopy is a promising technique characterized by rapid analysis and ease of operation. With a frequency range of 0.1–10 THz, terahertz waves possess biocompatibility, non-ionization, high resolution, and strong penetrating power, making them widely applicable in biomedicine, security inspection, food safety, agriculture, and pharmaceuticals. Its spectral fingerprint primarily stems from its sensitivity to collective vibrations. The complex bioactive components in traditional Chinese medicine cover spectral fingerprint features, making direct identification of Fritillaria cirrhosa challenging. However, by combining terahertz spectroscopy with machine learning algorithms, it can be applied to the classification of complex samples.

[0041] Principal component analysis (PCA) combined with machine learning algorithms can be used to extract key spectral features and facilitate classification. PCA simplifies the data fusion process through dimensionality reduction, while machine learning algorithms effectively extract useful information from multi-source data, significantly improving the robustness and accuracy of the results. These analytical methods lay a solid foundation for the effective differentiation of fritillaria sources.

[0042] In some embodiments of this application, see Figure 1 As shown, this embodiment provides a method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms, including the following steps:

[0043] S100. Select various fritillaria samples and pulverize them using a ball mill. Mix each pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain mixed powder. Press the mixed powder into sheet samples and prepare several sheets for each fritillaria sample.

[0044] S200: Use the TAS7400TS terahertz time-domain spectroscopy system to collect the spectrum of sheet-like samples. Measure each sample several times to obtain several sets of spectral data.

[0045] S300. Randomly divide several sets of spectral data into training and test sets at a ratio of 3:1, and input them into the particle swarm optimization support vector machine model for 100 iterations; in each iteration, the training and test sets are randomly re-divided.

[0046] S400. Perform principal component analysis on the spectral data to reduce the dimensionality of the high-dimensional spectral data. Select the first 12 principal components as the feature input of the particle swarm optimization support vector machine model, and output the classification label of fritillaria.

[0047] In some embodiments of this application, the step of separately pulverizing the fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain a mixed powder, and pressing the mixed powder into sheet-like samples, wherein several sheets of each type of fritillaria sample are prepared, includes:

[0048] The fritillaria samples were pulverized using a ball mill for at least 30 minutes each.

[0049] In some embodiments of this application, the step of separately pulverizing the fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain a mixed powder, and pressing the mixed powder into sheet-like samples, and preparing several sheets of each type of fritillaria sample, further includes:

[0050] The mixed powder was pressed into sheet-like samples under a pressure of 10 MPa, with 20 sheets prepared for each type of fritillaria sample, each sheet having a diameter of 13 mm and a thickness of 1 mm.

[0051] In some embodiments of this application, the step of separately pulverizing the fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain a mixed powder, and pressing the mixed powder into sheet-like samples, wherein several sheets of each type of fritillaria sample are prepared, includes:

[0052] When preparing the sheet-like sample, the humidity was kept below 1.0% and the room temperature was maintained at 293K.

[0053] In some embodiments of this application, when using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectrum of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the process includes:

[0054] The frequency range of the spectrum of the sheet-like sample is 0.5-4.5 THz, the frequency resolution is 7.6 GHz, and the spot diameter is 5 mm.

[0055] In some embodiments of this application, when using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectrum of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the method further includes:

[0056] Each sample was measured 6 times, resulting in a total of 480 sets of spectral data.

[0057] In some embodiments of this application, the step of performing principal component analysis on the spectral data includes:

[0058] The spectral data is preprocessed;

[0059] The methods for preprocessing the spectral data include Savitzky-Golay smoothing, unit variance scaling, or standard normal variables.

[0060] Understandably, terahertz spectra are preprocessed before modeling to remove noise, baseline drift, and scattering effects. Three preprocessing methods were used: Savitzky-Golay (SG) smoothing, unit variance scaling (UV), and standard normal variables (SNV). SG reduces short-term signal fluctuations and noise through polynomial fitting. UV standardizes each feature (variable) to ensure equal variance, balance the data, and enhance stability while reducing interference caused by scale differences. SNV unifies the data by subtracting the mean and dividing by the standard deviation, making the mean zero and the variance unit variance, reducing bias between different samples and eliminating interference caused by sample scattering effects or surface inhomogeneities.

[0061] In some embodiments of this application, when using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectrum of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the method further includes:

[0062] Each spectrum is obtained through 1024 consecutive scans.

[0063] Specifically, this invention selects fritillaria from four geographical origins (FC, FU, FP, FT) and uses terahertz spectroscopy combined with machine learning algorithms including Least Squares Support Vector Machine (LSSVM), Random Forest (RF), Convolutional Neural Network (CNN), and Particle Swarm Optimization Support Vector Machine (PSO-SVM) for classification. First, PCA is used to reduce the dimensionality of the terahertz spectra. Then, the data is randomly divided into training and testing groups, used for training and testing the four classification algorithms respectively. To evaluate classification performance, accuracy and overall accuracy parameters are calculated. To assess model reliability and reduce random errors, each classification algorithm is iterated multiple times, and training and testing datasets are randomly generated. The mean and standard deviation (SD) of the overall accuracy on the test set are calculated. By comparing the parameters, the algorithm with the best performance is selected to classify the geographical origin of the fritillaria.

[0064] Furthermore, four types of Fritillaria samples were provided by the China Academy of Chinese Medical Sciences. To minimize the impact of seasonal variations on chemical composition and terahertz spectral characteristics, all four types of Fritillaria were collected in the same season (summer). Polyethylene (PE) was purchased from Sigma-Aldrich (Shanghai, China). During sample preparation, the Fritillaria were ground for 30 minutes at a frequency of 30 Hz using a ball mill (Retsch MM400, Germany).

[0065] Figure 2The morphological characteristics of four types of fritillaria and their powder forms are described; among them, Figure 1 (a) is Fritillaria cirrhosa, (b) is Fritillaria thunbergii, (c) is Fritillaria yishen, and (d) is Fritillaria thunbergii. According to... Figure 2 It is known that Fritillaria cirrhosa, Fritillaria sylvestris, and Fritillaria thunbergii have similar morphological characteristics, making them more difficult to distinguish in powder form.

[0066] The experiment used a commercial terahertz time-domain spectroscopy system, TAS7400TS (Advantest Corporation, Tokyo, Japan), which operated under normal incidence conditions with a dynamic range of 0.5–4.5 THz, a frequency resolution of 7.6 GHz, and a spot diameter of 5 mm.

[0067] To reduce systematic errors caused by changes in air humidity and temperature, the system was placed in a chamber filled with dry air, maintaining humidity below 1.0% and room temperature at 293K (20℃).

[0068] Fritillaria powder and polyethylene were mixed at a weight ratio of 1:4. After thorough mixing, the mixture was pressed into tablets under a pressure of 10 MPa for 5 minutes. Each tablet had a diameter of 13 mm, a thickness of approximately 1 mm, and a weight of approximately 135 mg. Twenty tablets were prepared for each type of Fritillaria. Each tablet was placed in the optical path of a terahertz time-domain spectroscopy system and measured six times. Each spectrum was averaged through 1024 consecutive scans to reduce random noise and improve signal stability. Therefore, 120 spectral data points were collected for each type of Fritillaria, totaling 480 spectral data points. During model development, the 480 spectral data points were randomly divided into 360 training data points and 120 test data points at a ratio of 3:1.

[0069] Terahertz spectra are preprocessed before modeling. Furthermore, Principal Component Analysis (PCA), an unsupervised learning method, is used to reduce dataset dimensionality and eliminate redundant information. It transforms the raw terahertz data into several uncorrelated principal components with key features. Least Squares Support Vector Machine (LSSVM) is a supervised classification algorithm for binary classification problems, separating the data through an optimal hyperplane defined by support vectors. Random Forest (RF) is an ensemble learning method for classification and regression, consisting of multiple binary decision trees built from bootstrap samples. Each tree is trained on a randomly sampled subset, enhancing robustness to noise and reducing overfitting. Convolutional Neural Networks (CNNs) employ a hierarchical architecture, with neurons connected by weights and biases. The input is progressively transformed through hidden layers including at least one convolutional layer, extracting hierarchical features and generating the final output. Particle Swarm Optimization Support Vector Machine (PSO-SVM) combines particle swarm optimization with support vector machines, where particles represent different combinations of hyperparameters, exploring the search space to optimize the penalty parameter c and the kernel parameter γ.

[0070] The absorption coefficient spectra of various fritillaries in the frequency range of 1.0-3.5 THz are as follows: Figure 3 As shown; where, Figure 3 (a) is Fritillaria cirrhosa, (b) is Fritillaria thunbergii, (c) is Fritillaria yishen, and (d) is Fritillaria thunbergii. Figure 3 It can be seen that the absorption coefficients of the four types of fritillaria increase with increasing frequency. Comparison shows that the absorption spectra of the four types of fritillaria lack obvious characteristic absorption peaks, and their absorption coefficients are similar, making direct differentiation impossible. Therefore, further in-depth analysis using PCA and various machine learning algorithms is needed.

[0071] Principal component variance contributions of the original spectrum, such as Figure 4 As shown in (a), Figure 4 Image (b) shows the 3D score plots of the first three principal components of PCA for the four types of fritillaria. It can be seen that when the number of principal components exceeds four, the variance contribution becomes negligible. Using 12 principal components, the cumulative variance contribution rate reaches 99%, therefore these principal components are selected as the input features for the machine learning algorithm. Figure 4 As shown in (b), the sample points of the four types of fritillaria are quite close, indicating their high similarity. However, there is still a certain distance between them, indicating that they have classification potential after dimensionality reduction by PCA.

[0072] Four algorithm models were trained and tested under different preprocessing methods and principal component selection. The classification results are summarized in Table 1, which shows the classification results of PCA combined with the four algorithm models:

[0073] Table 1

[0074]

[0075]

[0076] As shown in Table 1, the PSO-SVM model exhibits the best classification performance, with an overall accuracy exceeding 90%. Notably, the PSO-SVM model without preprocessing achieves the highest overall accuracy of 95.8%. LSSVM ranks second, also exceeding 90% overall accuracy, but slightly lower than PSO-SVM. RF and CNN models perform second best, with accuracies typically below 90%. For Fritillaria cirrhosa, LSSVM performs best, with an accuracy exceeding 95%. For Fritillaria thunbergii, CNN performs best. For Fritillaria thunbergii, all models generally have low classification performance, but PSO-SVM performs relatively well. For Fritillaria thunbergii, PSO-SVM again shows the best performance.

[0077] Specifically, accuracy is defined as: Accuracy = Number of correctly predicted samples / Total number of samples of that type;

[0078] The number of correctly predicted samples is the number of correctly predicted samples of each type of fritillaria in the test set, and the total number of samples of that type is the total number of samples of that type of fritillaria in the test set.

[0079] Overall accuracy is defined as: Overall accuracy = Total number of correctly predicted samples / Total number of samples;

[0080] The total number of all correctly predicted samples is the total number of correctly predicted samples of the four types of fritillaria in the test set, and the total number of all samples is the total number of all fritillaria samples in the test set.

[0081] Model reliability was evaluated by performing 100 iterations on each algorithm, with each iteration involving re-randomization of the training and test sets. The mean and standard deviation of the overall accuracy were obtained after multiple iterations. Model performance is as follows: Figure 5 As shown. Figure 5 The iterative performance of the four models under four preprocessing methods is presented. Figure 5 In the diagram, (a) is without preprocessing, (b) is with SG preprocessing, (c) is with UV preprocessing, and (d) is with SNV preprocessing. Figure 5 As shown, without preprocessing, the average accuracy of LSSVM, PSO-SVM, and CNN models all exceeded 90%, with PSO-SVM achieving the highest accuracy. Furthermore, PSO-SVM exhibited the least fluctuation, consistently maintaining an accuracy between 93% and 96%. After SG preprocessing, only PSO-SVM maintained an average accuracy above 90%. The LSSVM model showed higher variability, occasionally exceeding 90%, but at its lowest point falling below 80%, resulting in a lower average accuracy. Figure 5 (d) shows that after SNV preprocessing, the average accuracy of all four models was unsatisfactory, with the RF and CNN models falling below 80%. Overall, the models built using the original data exhibited higher reliability, less variability, and higher average accuracy. In contrast, the models preprocessed using SNV showed the lowest reliability.

[0082] Figure 5 The parameters are summarized in Table 2, which shows the classification results of the four models after multiple iterations:

[0083] Table 2

[0084]

[0085] As shown in Table 2, PSO-SVM exhibits the highest mean accuracy and the lowest standard deviation, indicating its superior reliability. In particular, the unprocessed PSO-SVM model achieves the highest mean accuracy of 95.04% and the lowest standard deviation of 0.74%, making it the most effective modeling method. The LSSVM model has relatively high accuracy, but its large standard deviation indicates lower stability. The RF model has the lowest reliability, exhibiting the lowest mean accuracy and the highest standard deviation. CNN performs moderately in terms of mean accuracy and standard deviation, indicating poor modeling performance.

[0086] Specifically, the standard deviation (SD) reflects the fluctuation of the overall accuracy of a classification model after multiple iterations, indicating the stability of the model.

[0087]

[0088] In the above formula, A is the mean of the overall accuracy after multiple iterations. i Let represent the overall accuracy for each iteration, and N be the total number of iterations. A smaller standard deviation indicates better model stability.

[0089] The classification performance comparison of different preprocessing methods in Tables 1 and 2 shows that the unpreprocessed model outperforms the preprocessed model. This result contradicts the original intention of preprocessing, which aims to eliminate or reduce the effects of scattering and enhance signals related to physicochemical properties. The unexpected result may stem from the loss of key feature information during preprocessing. Many studies have shown that scattering information is closely related to the physical structure of the samples. Therefore, preprocessing may lead to a decrease in classification performance, especially in multivariate models with large datasets. Thus, the unpreprocessed model may outperform the preprocessed model.

[0090] In summary, terahertz spectroscopy and machine learning algorithms were used to classify the geographical origin of Fritillaria cirrhosa. Among the origin classification models, the unpreprocessed PSO-SVM model exhibited superior performance, with an average overall accuracy of 95.04% and a standard deviation of 0.74%. Generally, the unpreprocessed model showed better classification performance than models using SG, UV, or SNV preprocessing, which is attributed to the loss of key feature information during preprocessing. Therefore, the combination of terahertz spectroscopy and machine learning algorithms has proven effective in classifying the geographical origin of Fritillaria cirrhosa. This approach provides a novel analytical strategy to ensure consistency in efficacy and expand the application scope of terahertz spectroscopy.

[0091] On the other hand, see Figure 6 As shown, this application also provides a system for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms, applied to the aforementioned method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms, including:

[0092] The data acquisition module is configured to use the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data.

[0093] The model building module is configured to randomly divide several sets of spectral data into training and test sets at a ratio of 3:1, and input them into the particle swarm optimization support vector machine model for 100 iterations; in each iteration, the training and test sets are randomly re-divided.

[0094] The output module is configured to perform principal component analysis on the spectral data, reduce the dimensionality of the high-dimensional spectral data, select the first 12 principal components as feature inputs for the particle swarm optimization support vector machine model, and output the classification label of fritillaria.

[0095] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program goods. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program goods embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0096] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program goods according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0097] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0098] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms, characterized in that, include: Multiple fritillaria samples were selected and pulverized using a ball mill. Each pulverized fritillaria was then mixed with polyethylene at a mass ratio of 1:4 to obtain mixed powder. The mixed powder was then pressed into sheet samples, and several sheets were prepared for each fritillaria sample. The TAS7400TS terahertz time-domain spectroscopy system was used to acquire the spectra of sheet-like samples. Each sample was measured several times to obtain several sets of spectral data. Several sets of spectral data were randomly divided into training and test sets at a ratio of 3:1 and input into a particle swarm optimization support vector machine model for 100 iterations; during each iteration, the training and test sets were randomly re-divided. Principal component analysis was performed on the spectral data to reduce the dimensionality of the high-dimensional spectral data. The first 12 principal components were selected as the feature inputs of the particle swarm optimization support vector machine model, and the output was the classification label of fritillaria.

2. The method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms according to claim 1, characterized in that, The process involves separately pulverizing the fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain mixed powder, and pressing the mixed powder into sheet samples. When preparing several sheets of each type of fritillaria sample, the process includes: The fritillaria samples were pulverized using a ball mill for at least 30 minutes each.

3. The method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms according to claim 1, characterized in that, The process of separately pulverizing fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain mixed powder, and pressing the mixed powder into sheet samples, wherein several sheets of each type of fritillaria sample are prepared, further includes: The mixed powder was pressed into sheet-like samples under a pressure of 10 MPa, with 20 sheets prepared for each type of fritillaria sample, each sheet having a diameter of 13 mm and a thickness of 1 mm.

4. The method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms according to claim 1, characterized in that, The process involves separately pulverizing the fritillaria using a ball mill, mixing each type of pulverized fritillaria with polyethylene at a mass ratio of 1:4 to obtain mixed powder, and pressing the mixed powder into sheet samples. When preparing several sheets of each type of fritillaria sample, the process includes: When preparing the sheet-like sample, the humidity was kept below 1.0% and the room temperature was maintained at 293K.

5. The method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms according to claim 1, characterized in that, When using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the following steps are included: The frequency range of the spectrum of the sheet-like sample is 0.5-4.5 THz, the frequency resolution is 7.6 GHz, and the spot diameter is 5 mm.

6. The method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms according to claim 5, characterized in that, When using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the method also includes: Each sample was measured 6 times, resulting in a total of 480 sets of spectral data.

7. The method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms according to claim 1, characterized in that, Before performing principal component analysis on the spectral data, the following steps are included: The spectral data is preprocessed; The methods for preprocessing the spectral data include Savitzky-Golay smoothing, unit variance scaling, or standard normal variables.

8. The method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms according to claim 1, characterized in that, When using the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data, the method also includes: Each spectrum is obtained through 1024 consecutive scans.

9. A system for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms, used to apply the method for determining the geographical origin of fritillaria based on terahertz spectroscopy and machine learning algorithms as described in any one of claims 1-8, characterized in that, include: The data acquisition module is configured to use the TAS7400TS terahertz time-domain spectroscopy system to acquire the spectra of sheet-like samples, measuring each sample several times to obtain several sets of spectral data. The model building module is configured to randomly divide several sets of spectral data into training and test sets at a ratio of 3:1, and input them into the particle swarm optimization support vector machine model for 100 iterations; in each iteration, the training and test sets are randomly re-divided. The output module is configured to perform principal component analysis on the spectral data, reduce the dimensionality of the high-dimensional spectral data, select the first 12 principal components as feature inputs for the particle swarm optimization support vector machine model, and output the classification label of fritillaria.