Terahertz BIC metamaterial enhancement-based aflatoxin B1, B2, G1 and G2 qualitative detection method

By combining a terahertz BIC metamaterial sensor with THz-TDS technology, the problem of qualitative detection of aflatoxin B1, B2, G1, and G2 has been solved, achieving high-sensitivity qualitative identification and meeting the needs of food safety supervision.

CN121899069APending Publication Date: 2026-04-21EAST CHINA JIAOTONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511966445.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The lack of effective methods in the current technology for the qualitative detection of aflatoxins B1, B2, G1, and G2 makes food safety supervision difficult, poses high health risks, and makes it difficult to achieve global limits.

Method used

A qualitative analysis model for aflatoxin was established by using a terahertz-based BIC metamaterial sensor combined with THz-TDS technology. By preparing aflatoxin solutions of different concentrations, a qualitative analysis model was established using spectral characteristic variable extraction and chemometric methods to achieve qualitative detection of aflatoxin.

Benefits of technology

It achieves highly sensitive qualitative identification of trace aflatoxins B1, B2, G1, and G2, with a prediction accuracy of 95%, providing a new approach for the qualitative detection of aflatoxins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121899069A_ABST
    Figure CN121899069A_ABST
Patent Text Reader

Abstract

The invention discloses an aflatoxin B1, B2, G1 and G2 qualitative detection method based on terahertz BIC metamaterial enhancement, a new terahertz BIC metamaterial sensor is designed, terahertz spectrum information of aflatoxin B1, B2, G1 and G2 solutions with different concentrations is collected based on an absorber, the difference between terahertz transmission spectrums of different types of aflatoxins is analyzed, and the aflatoxin B1, B2, G1 and G2 qualitative detection method based on terahertz BIC metamaterial enhancement is obtained. A chemometrics method is adopted to carry out modeling analysis on terahertz transmission spectrums of aflatoxin B1, B2, G1 and G2 solutions. Through comparative analysis of different models, it is obtained that the prediction accuracy of the PSO-SPA-SVM model is the highest, the training set precision reaches 100%, the prediction correct number in 40 prediction samples reaches 39, and the prediction correct rate is 95%, and therefore qualitative identification of trace aflatoxin B1, B2, G1 and G2 solutions is achieved, and a new way is provided for qualitative detection of aflatoxin.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of chemical detection technology, and in particular to a qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement. Background Technology

[0002] Aflatoxins (AFs), highly toxic secondary metabolites produced by Aspergillus flavus, are difuran ring toxins produced by certain strains of Aspergillus flavus and Aspergillus parasiticus. More than 20 derivatives exist, the most common being aflatoxin B1 (AFB1), aflatoxin B2 (AFB2), aflatoxin G1 (AFG1), and aflatoxin G2 (AFG2). Aflatoxins pose a serious threat to food safety and public health. These toxins commonly contaminate staple foods such as corn, peanuts, and grains, as well as dairy products and aquatic products. Their high stability makes them difficult to break down through conventional cooking, leading to widespread contamination and significant challenges in prevention and control. Acute poisoning can cause liver necrosis and even death, while long-term low-dose exposure can lead to cirrhosis and liver cancer. The International Agency for Research on Cancer (IARC) classifies them as Group 1 human carcinogens. Children are particularly vulnerable, potentially experiencing growth retardation and immunosuppression. The toxins can also accumulate through the food chain, contaminating water bodies and feed, and further spreading to livestock products, creating multiple exposure risks. Every year, aflatoxin causes enormous food losses globally, threatening not only health but also exacerbating food security issues. This cross-border food safety challenge requires a multi-dimensional approach, including rigorous testing, cold chain management, and biological control.

[0003] Aflatoxin contamination is a major regulatory concern in the international food safety field. This potent carcinogen, produced by fungi, enters the human body through contaminated crops (such as corn, peanuts, and nuts) and the food processing chain, causing cellular DNA damage and significantly increasing the risk of diseases such as liver cancer. Given its health hazards, major economies worldwide have established strict limits. The United States stipulates that aflatoxin levels in animal feed cannot exceed 300 µg / kg, and the U.S. Food and Drug Administration (FDA) has set an action level of 20 µg / kg for corn, peanut products, and other animal feed used for immature animals, dairy cows, and other animal species. Brazil nuts, peanuts and peanut derivatives, as well as pistachios and other foods, are limited to aflatoxin levels not exceeding 20 µg / kg. The European Commission has established strict limits to protect humans and animals, setting a maximum limit of 2 µg / kg for AFB1 and 4 µg / kg for total aflatoxin in all cereals and cereal-derived products, with the exception of corn, whose limits are slightly higher at 5 µg / kg for AFB1 and 10 µg / kg for total aflatoxin. Chinese legislation sets maximum limits for aflatoxin in food and feed, specifying a limit of 20 µg / kg for AFB1 in corn, corn flour, peanuts and their products, and corn oil; a limit of 5 µg / kg for cereals, cooked nuts and seeds, soy sauce and condiments (such as vinegar and fermented sauce); and a limit of 0.5 µg / kg for foods intended for special dietary purposes (such as infant formula and complementary foods for infants).

[0004] In recent years, metamaterial-based sensing technologies have provided new solutions for improving the performance of terahertz spectroscopy in trace substance detection, showing broad application prospects in qualitative and quantitative analysis of substances. These artificially designed composite structure devices typically employ metals or dielectric materials (such as graphene) to construct special micro / nano structural layers, capable of responding significantly to changes in the dielectric properties of the sample. Therefore, they can identify subtle changes in substances and have great potential for detecting cells and molecules. Researchers have proposed various metamaterial structures and successfully combined them with terahertz technology to achieve highly sensitive detection of bacterial proteins, sugars, and pesticide residues.

[0005] However, there are currently no studies on the qualitative detection of aflatoxin B1, B2, G1, and G2 using metamaterials. Summary of the Invention

[0006] In view of the above, the purpose of this invention is to provide a qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement. This method uses a BIC metamaterial sensor combined with THz-TDS technology to qualitatively identify trace amounts of aflatoxins B1, B2, G1, and G2 in solutions, providing a new approach for the qualitative detection of aflatoxins.

[0007] A qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement includes the following steps: (1) Prepare multiple standard solutions of aflatoxin B1, B2, G1, and G2 with different concentrations, and drop the standard solutions of aflatoxin B1, B2, G1, and G2 onto the terahertz BIC metamaterial sensor respectively, and dry them in a drying oven. The terahertz BIC metamaterial sensor is composed of multiple periodic structural units. The periodic structural unit is a square structure. The width p of the periodic structural unit is 48 μm. The periodic structural unit has a rectangular non-gold plated area. The width w of the rectangular non-gold plated area is 4.5 μm. The rectangular non-gold plated area satisfies the condition: I = α*p, where α is the influence factor and I is the length of the rectangular non-gold plated area. (2) The dried terahertz BIC metamaterial sensor was placed into the terahertz system and measured using the transmission mode to collect the terahertz spectral information of the corresponding sample. (3) Use a spectral feature variable extraction algorithm to extract features from terahertz spectral information; (4) Based on the characteristics of the extraction, a qualitative analysis model for the terahertz transmission spectra of aflatoxin B1, B2, G1 and G2 solutions was established using chemometric methods; (5) Obtain the terahertz spectral information of the sample containing aflatoxin to be tested and input it into each qualitative analysis model to obtain the type of aflatoxin in the sample to be tested.

[0008] This invention provides a qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement. A novel terahertz BIC metamaterial sensor is designed based on electromagnetic theory and the finite-difference time-domain method (FDTD). The absorber consists of multiple periodic structural units, each a square structure with a width p of 48 μm. Each periodic structural unit has a rectangular non-gold-plated region with a width w of 4.5 μm, satisfying the condition I = α*p. Based on this absorber, terahertz spectral information of aflatoxin B1, B2, G1, and G2 solutions of different concentrations is collected. The differences in terahertz transmission spectra between different types of aflatoxins are analyzed. Chemometric methods are used to model and analyze the terahertz transmission spectra of aflatoxin B1, B2, G1, and G2 solutions. Through comparative analysis of different models, it was found that the PSO-SPA-SVM model had the highest prediction accuracy, with a training set accuracy of 100% and 39 correct predictions out of 40 predicted samples, resulting in a prediction accuracy of 95%. Therefore, this invention enables the qualitative identification of trace aflatoxin B1, B2, G1, and G2 solutions, providing a new approach for the qualitative detection of aflatoxin.

[0009] Furthermore, the qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement provided by the present invention also has the following technical features: Furthermore, the terahertz BIC metamaterial sensor is prepared by the following method: 1) Coating: 5nm chromium and 100nm gold are deposited on the silicon substrate surface; 2) After metal deposition, pretreatment is performed using an HMDS oven at 120°C for 10 minutes; 3) Spin coating: Photoresist AZ6112 is dropped onto the silicon substrate surface and spread using a spin coater at 600 rpm, followed by spin coating at 4000 rpm. 4) Pre-baking: The temperature and time of pre-baking are set to 100℃ and 120 seconds, respectively; 5) Development: Manual development is performed using 3038 developer; 6) Coating: The power of the coating machine is set to 200W and the time is 3min; 7) Hardening: The photoresist mask is baked on a hot plate at 110℃ for 120 seconds; 8) Etching: IBE etching is used, that is, the sample surface is bombarded with an ion beam of a certain concentration to achieve the purpose of etching; 9) Stripping: After etching, the photoresist mask is removed by ultrasonic extraction with acetone for 1 hour. After stripping, the photoresist mask is observed under a microscope to see if it is completely removed. If it is not completely removed, it needs to be placed in the acetone solution for ultrasonic treatment until the photoresist mask is completely removed.

[0010] Furthermore, the transmission spectrum of the terahertz BIC metamaterial sensor exhibits a transmission peak at 1.5 THz.

[0011] Furthermore, in step (1), multiple standard solutions of aflatoxins B1, B2, G1, and G2 at different concentrations are prepared, specifically including: Prepare standard solutions of aflatoxin B1, B2, G1, and G2. According to the preset mixing ratio, the standard solutions of the required concentration gradient were prepared by stepwise dilution using a precision pipette. All diluted samples were stored in 25 ml volumetric flasks. To ensure the homogeneity of the solution, all samples were shaken thoroughly on a vortex mixer for 3 minutes. Multiple dilution operations were performed during the experiment.

[0012] Furthermore, step (2) specifically includes: The spectral detection range of the terahertz system is 0.1-5.0 THz. Before the experiment, the system was preheated using an air compressor with an air dryer, and dry air was continuously filled into the optical cavity. The humidity was monitored by a hygrometer to keep it below 10%, and the temperature was kept constant at 25±0.5℃. During the experiment, after each sample was placed in, wait for 2 minutes for the system to stabilize before starting the measurement. Then, 10 μL of sample solution was pipetted onto the metamaterial sheet in order of increasing sample concentration using a pipette. After each sample test, the metamaterial sheet was placed in a beaker and shaken to clean it. Before acquiring the sample spectrum, the metamaterial sheet with the sample was placed in a drying oven for 15 minutes at a temperature of 50℃. Finally, the metamaterial sheet with the sample was placed in the terahertz system and measured using transmission mode. Four points were taken for each sample, and 10 measurements were performed at each point, resulting in 40 spectra for each sample, for a total of 160 spectra. Each spectrum was the average of 64 repeated detections.

[0013] Furthermore, the spectral feature variable extraction algorithm is one of the following: competitive adaptive reweighted sampling algorithm, non-information variable elimination algorithm, and continuous projection algorithm.

[0014] Furthermore, the qualitative analysis model established in step (4) is one of the following: K-nearest neighbor classification algorithm model, random forest model, support vector machine model, or support vector machine model optimized by particle swarm optimization algorithm.

[0015] Furthermore, after obtaining the spectral data in step (2), the Kennard-Stone algorithm is used to divide the samples into a calibration set and a prediction set in a 3:1 ratio for subsequent model building.

[0016] Furthermore, in step (4), the established qualitative analysis is evaluated using prediction accuracy, misjudgment rate, and confusion matrix. Attached Figure Description

[0017] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a schematic diagram of the periodic structural unit in a terahertz BIC metamaterial sensor. Figure 2 Simulation results of a terahertz BIC metamaterial sensor under different influence factors; Figure 3 Simulated waveform of the terahertz transmission spectrum of the BIC metamaterial when α is 0.7; Figure 4 Transmission spectra of aflatoxin B1, B2, G1, and G2 solutions at partial concentrations on the surface of the metamaterial absorber; Figure 5 This is a confusion matrix diagram based on the KNN model; Figure 6 This is a confusion matrix diagram based on the RF model; Figure 7 This is a confusion matrix diagram based on the SVM model; Figure 8 This is a confusion matrix diagram based on the PSO-SPA-SVM model. Detailed Implementation

[0018] To make the objectives, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the present invention will be thorough and complete.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0020] One embodiment of the present invention provides a terahertz BIC metamaterial sensor, which optimizes the structural parameters of the metamaterial sensor based on the finite-difference time-domain (FDTD) method. Considering that the metamaterial is composed of periodic structural units, the transmission or reflection properties of a single periodic structural unit of the metamaterial can represent the spectral properties of the entire metamaterial. Therefore, in the simulation process, simulating a single periodic structural unit of the metamaterial can improve the simulation speed.

[0021] Continuum-bound states (BICs) are resonances occurring within the radiation continuum frequency range and completely localized, possessing extremely high quality factors (Q values). They exhibit strong interactions between light and matter, a phenomenon crucial for the development of novel functional devices. Introducing the BIC mechanism into terahertz metasurfaces provides a new approach for customizing high-Q resonances. The project plans to use polarized terahertz light as incident light, introducing a perturbation factor. By adjusting this perturbation factor, the aim is to achieve BIC resonance that enhances the strong interaction between the terahertz spectrum and matter.

[0022] The structural parameters of the BIC metamaterial were designed using the finite-difference time-domain (FDTD) method. Considering that the metamaterial is composed of periodic structural units, the transmission or reflection properties of a single periodic structural unit can represent the spectral properties of the entire metamaterial. Therefore, in the simulation process, simulating a single periodic structural unit of the metamaterial can improve the simulation speed. The terahertz BIC metamaterial sensor consists of multiple periodic structural units; please refer to [link / reference]. Figure 1 The periodic structural unit is a square structure with a width p of 48 μm. The periodic structural unit has a rectangular non-gold-plated region with a width w of 4.5 μm. The rectangular non-gold-plated region satisfies the condition: I = α * p, where α is an influence factor and I is the length of the rectangular non-gold-plated region. Different values ​​of I can be obtained by taking different values ​​of α. The structure uses a silicon substrate (refractive index 3.335) with a gold-plated film on the surface.

[0023] The metamaterial wafer is fabricated from a four-inch double-polished silicon wafer. The entire processing includes cleaning, coating, pretreatment, spin coating, pre-baking, exposure, development, adhesive application, hardening, etching, and stripping. The specific steps are as follows: 1) Coating: 5nm chromium and 100nm gold are deposited on the silicon substrate to enhance adhesion between the gold and the silicon substrate. 2) Pretreatment: After metal deposition, pretreatment is performed using an HMDS oven at 120°C for 10 minutes. The main purpose of pretreatment is to increase the adhesion between the photoresist and the silicon substrate. 3) Spin Coating: Photoresist AZ6112 is dropped onto the silicon substrate surface and spread using a spin coater at 600 rpm. Then, it is uniformly coated at 4000 rpm to achieve a thickness of 1-2 μm. 4) Pre-baking: The pre-baking temperature and time are set to 100°C and 120 seconds, respectively. 5) Development: Manual development is performed for 35 seconds using a 2.38% 3038 developer solution. 6) Coating: The coating machine is set to 200W for 3 minutes to remove residual photoresist from the surface, ensuring a good etching effect later. 7) Hardening: The photoresist mask is baked on a hot plate at 110℃ for 120 seconds to increase its etch resistance, facilitating subsequent etching. 8) Etching: IBE etching is used, where the sample surface is bombarded with an ion beam of a certain concentration to achieve etching. 9) Stripping: After etching, the photoresist mask is removed by ultrasonic extraction with acetone for 1 hour. After stripping, the photoresist mask is observed under a microscope to ensure complete removal. If not completely removed, it is continued in an acetone solution for ultrasonic treatment until the photoresist mask is completely removed.

[0024] Simulation graphs of different influencing factors, as shown Figure 2 As shown, when α is taken as 0.3, 0.4, 0.5, 0.6, and 0.7 respectively, the resulting I values ​​are 14.4, 19.2, 24, 28.8, and 33.2 μm. Figure 3 The simulated waveform of the terahertz transmission spectrum of the BIC metamaterial is given when α is 0.7, with the transmission peak located at 1.86 THz.

[0025] Based on the aforementioned sensor, another embodiment of the present invention provides a qualitative detection method for aflatoxins B1, B2, G1, and G2 reinforced by terahertz BIC metamaterials, comprising the following steps (1) to (5): Step (1): Prepare multiple standard solutions of aflatoxin B1, B2, G1, and G2 with different concentrations, and drop the standard solutions of aflatoxin B1, B2, G1, and G2 onto the terahertz BIC metamaterial sensor and dry them in a drying oven.

[0026] Aflatoxin B1, B2, G1, and G2 standard solutions were purchased from Pruibon Biotechnology, with an initial concentration of 25 μg / ml. To meet the requirements for trace detection, the standard solutions were serially diluted using ultrapure deionized water (18.2 MΩ·cm, Merck Millipore, USA). The specific procedures were as follows: First, standard solutions of the required concentration gradient were prepared stepwise using a precision pipette according to the preset preparation ratio. All diluted samples were stored in 25 ml volumetric flasks. To ensure solution homogeneity, all samples were thoroughly shaken on a vortex mixer for 3 minutes. Multiple dilution operations were performed during the experiment, and the final concentration of the four aflatoxin solutions was 9.6 × 10⁻⁶. -7 μg / ml. The entire dilution process strictly followed the operating procedures for trace analysis to ensure the reliability of the experimental data.

[0027] Step (2): Place the dried terahertz BIC metamaterial sensor into the terahertz system and use the transmission mode to measure and collect the terahertz spectral information of the corresponding sample.

[0028] Terahertz transmission spectroscopy of aflatoxin solutions was measured using a TAS7500 terahertz time-domain spectrometer from Advantest, Japan. The system has a spectral range of 0.1–5.0 THz and a resolution of 7.6 GHz. To avoid environmental interference and obtain stable sample information, the system was preheated using an air compressor with an air dryer before the experiment, and dry air was continuously filled into the optical cavity. The humidity was maintained below 10% and the temperature was kept constant at 25 ± 0.5 °C using a hygrometer. During the experiment, a 2-minute waiting period was observed after each sample placement to allow the system to stabilize before measurement. To minimize the influence of residual concentration on the metamaterial sheet, 10 μL of sample solution was pipetted onto the metamaterial sheet in ascending order of concentration. After each sample test, the metamaterial sheet was cleaned by shaking in a beaker. Because water strongly absorbs terahertz waves, to ensure the solution on the metamaterial sheet is thoroughly dried before collecting sample spectra, the metamaterial sheet containing the sample was placed in a drying oven at 50°C for 15 minutes. Finally, the metamaterial sheet containing the sample was placed in the terahertz system and measured using transmission mode. To reduce the impact of random errors on the experimental results, four points were taken for each sample, and ten measurements were performed at each point, resulting in 40 spectra per sample, for a total of 160 spectra. Each spectrum was the average of 64 repeated measurements. All collected terahertz spectra were divided into a calibration set and a prediction set at approximately a 3:1 ratio using the Kennard-Stone (KS) algorithm for subsequent model building.

[0029] Figure 4The transmission spectra of aflatoxin B1, B2, G1, and G2 solutions at partial concentrations on the surface of the metamaterial absorber are shown. Considering the large amount of noise interference in the frequency bands below 1 THz and above 3 THz, the transmission spectra in the 1-3 THz frequency band are selected to ensure the accuracy of the measurement. The 263 spectral data in this frequency band are used for subsequent modeling. Figure 4 The mid-transmission peaks primarily reveal the transmission characteristics of the metamaterial itself, showing transmission peaks around 1.5 THz. The magnified portion of the figure is a locally enlarged view of the transmission spectrum of aflatoxin B1 solution at a certain concentration at 1.5 THz. Although the content of aflatoxin B1 on the surface of the BIC metamaterial is extremely low, after signal enhancement sensing, the transmission peaks around 1.5 THz exhibit significant amplitude and frequency shift response patterns. That is, the amplitude of the transmission peaks around 1.5 THz varies significantly with the type of aflatoxin solution, resulting in substantial differences in peak intensity. This provides a theoretical basis for further analysis of the response relationship between the metamaterial's transmission peak characteristics and the type of aflatoxin solution.

[0030] Step (3) uses a spectral feature variable extraction algorithm to extract features from terahertz spectral information.

[0031] The algorithm for extracting spectral feature variables can be one of the following: competitive adaptive reweighted sampling algorithm, non-information variable elimination algorithm, or continuous projection algorithm.

[0032] Among them, the Competitive Adaptive Reweighted Sampling (CARS) algorithm is a feature variable selection method that combines Monte Carlo sampling with adaptive reweighting. This algorithm simulates a "survival of the fittest" competition mechanism, dynamically selecting information variables with significant spectral characteristics during the iterative process. The core process of the CARS algorithm includes two key stages: first, it gradually reduces the number of candidate variables based on the exponentially decreasing function (EDF); then, it retains important variables with larger absolute regression coefficients through adaptive reweighted sampling (ARS). In each Monte Carlo sampling iteration, the algorithm calculates the regression coefficients of each variable and competitively selects variables based on the magnitude of the absolute values ​​of the coefficients, ultimately obtaining the optimal subset of variables.

[0033] Uninformative Variable Elimination (UVE) is a statistical analysis-based variable selection method that eliminates redundant or uninformative spectral variables by evaluating the contribution of each variable to the model, thereby improving the predictive performance and robustness of the model. Stability is calculated using the mean vector and the standard deviation of the coefficient matrix.

[0034] The Successive Projections Algorithm (SPA) is a forward iterative feature selection method primarily used to address multicollinearity in spectral analysis. This algorithm effectively extracts the most representative spectral features by progressively constructing an optimal subset of variables.

[0035] Step (4): Based on the extracted characteristics, a qualitative analysis model for the terahertz transmission spectra of aflatoxin B1, B2, G1, and G2 solutions was established using chemometric methods.

[0036] The qualitative analysis model can be one of the following: K-nearest neighbor classification algorithm model, random forest model, support vector machine model, or support vector machine model optimized by particle swarm optimization algorithm.

[0037] In this embodiment, prediction accuracy and misclassification rate can be used to evaluate the qualitative analysis model. In addition to accuracy and misclassification rate, confusion matrix is ​​another important tool for evaluating qualitative discrimination models. Confusion matrix can compare the actual categories with the model's predicted classification results in detail.

[0038] K-Nearest Neighbors (KNN) is an instance-based machine learning algorithm that performs classification or regression tasks by calculating the similarity between samples. The core idea is to assume that similar data points are close to each other in the feature space and use a distance metric (such as Euclidean distance) to find the K nearest neighbors of the sample to be predicted in the training set. For classification tasks, the algorithm determines the prediction result through majority voting based on the class labels of these K nearest neighbors; for regression tasks, the average of the output values ​​of the K nearest neighbors is taken as the final prediction. In specific modeling, the number of nearest neighbors (K value) and the distance metric are two key hyperparameters of the algorithm. Through repeated validation and optimization (such as selecting the optimal K value through cross-validation, and choosing the distance metric based on data characteristics), the smoothness and sensitivity of the model can be effectively balanced, improving its generalization ability and prediction accuracy. Figure 5Table 1 shows the confusion matrix based on the KNN model. It also shows the identification results of the KNN qualitative model using terahertz spectroscopy combined with feature extraction algorithm for aflatoxin. It can be seen that the original spectral data after CARS feature processing has the best effect, with a prediction accuracy of 80%. Two aflatoxin B1 samples were misclassified as aflatoxin G2, three aflatoxin G1 samples were misclassified as aflatoxin B2, and three aflatoxin G2 samples were misclassified as one aflatoxin G1 sample and two aflatoxin B1 samples, respectively.

[0039] Table 1. Identification results of aflatoxin using the KNN qualitative model based on terahertz spectroscopy combined with feature extraction algorithm.

[0040] Random Forest (RF) is an ensemble learning algorithm that constructs multiple decision trees and combines their predictions to perform classification or regression tasks. The core idea is to use bootstrap sampling to generate multiple subsets of samples from the original training set, and then train each decision tree on randomly selected features (usually the square root of the total number of features rounded down), introducing randomness. Finally, the results of all trees are combined through collective voting (classification) or averaging (regression) to form the model's final prediction. In specific modeling, the number of decision trees (Ntree) and the number of features randomly selected by each tree (Mtry) are its two key hyperparameters. Through repeated validation and optimization (e.g., setting Ntree to a large fixed value and setting Mtry according to empirical rules), the model's generalization ability and prediction accuracy can be effectively improved. Figure 6 Table 2 shows the confusion matrix based on the RF model. It also shows the identification results of the RF qualitative model using terahertz spectroscopy combined with feature extraction algorithm for aflatoxin. It can be seen that the original spectral data without feature processing has the best effect, with a prediction accuracy of 85%. Two aflatoxin B1 samples were misclassified as aflatoxin G1, two aflatoxin B1 samples were misclassified as aflatoxin G2, one aflatoxin G1 sample was misclassified as aflatoxin B2, and one aflatoxin G1 sample was misclassified as aflatoxin G2.

[0041] Table 2. Identification results of aflatoxin using the RF qualitative model based on terahertz spectroscopy combined with feature extraction algorithm.

[0042] Support Vector Machine (SVM) is a classic supervised learning algorithm based on statistical learning theory, primarily used to solve classification and regression problems involving high-dimensional data. It works by finding an optimal hyperplane in the feature space that effectively separates samples into different classes while maximizing the margin between itself and its nearest neighbors (i.e., support vectors), thus constructing a decision boundary with strong generalization ability. When dealing with linearly inseparable problems, SVM uses kernel function techniques to implicitly map the original data to a higher-dimensional feature space, achieving linear separation of samples in the higher-dimensional space. The type of kernel function and its related parameters, such as the penalty coefficient and kernel parameters, are crucial to model performance. Figure 7 Table 3 shows the confusion matrix diagram based on the SVM model. It also shows the identification results of the SVM qualitative model using terahertz spectroscopy combined with feature extraction algorithm for aflatoxin. It can be seen that the traditional SVM model performs poorly, while the data processed by SPA-SVM performs the best, with a prediction accuracy of 60%. However, there are many misclassifications, resulting in a low prediction accuracy.

[0043] Table 3. Identification results of aflatoxin using SVM qualitative model based on terahertz spectroscopy combined with feature extraction algorithm.

[0044] Particle Swarm Optimization (PSO) is a classic metaheuristic algorithm inspired by the cooperative behavior of flocks of birds or schools of fish during foraging. This algorithm approximates the optimal solution by simulating the movement and information sharing of individual particles in the solution space.

[0045] The core idea of ​​Particle Swarm Optimization (PSO) is that each particle adjusts its velocity and position based on its own historical best position and the swarm's historical best position, thereby achieving a balance between global search and local exploration. In PSO, the swarm consists of multiple particles, each representing a candidate solution in the solution space, and its search direction and step size are determined by its velocity vector. The particle's position update depends on two key parameters: an individual cognitive component (reflecting the particle's own experience) and a social cognitive component (reflecting the group's collaborative experience). This mechanism allows particles to dynamically explore the solution space and gradually converge to the optimal region during the iteration process.

[0046] Compared to traditional optimization algorithms (such as gradient descent), particle swarm optimization (PSO) possesses stronger global search capabilities, is less prone to getting trapped in local optima, and converges faster. However, its performance is highly dependent on parameter settings (such as inertia weights and learning factors), and improper adjustments can lead to premature convergence or decreased search efficiency. To address these issues, researchers have proposed various improvement strategies, such as adaptive parameter tuning, hybrid algorithm design, and topology optimization, to enhance the algorithm's stability and solution accuracy.

[0047] Table 4 shows the prediction results based on the SVM model and the optimized model. Compared with the traditional SVM and RF models, the performance of the SVM model optimized by the PSO algorithm is significantly improved. This shows that the PSO algorithm, after adjusting the hyperparameter combination, can help the model find the optimal decision boundary in complex data spaces. After optimization, the PSO-SPA-SVM model has the highest accuracy, reaching 95%, indicating that the PSO algorithm can adjust the hyperparameter combination according to the specific situation of the feature space, resulting in the best model performance. Figure 8 The confusion matrix diagram based on the PSO-SPA-SVM model shows that only one aflatoxin B1 was identified as aflatoxin G2, and one aflatoxin G1 was identified as aflatoxin B1, resulting in an overall false positive rate of 5%.

[0048] Step (5): Obtain the terahertz spectral information of the sample containing aflatoxin to be tested, and input it into each qualitative analysis model to obtain the type of aflatoxin in the sample to be tested.

[0049] In summary, the qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement provided by this invention designs a novel terahertz BIC metamaterial sensor based on electromagnetic theory and the finite-difference time-domain method (FDTD). This absorber consists of multiple periodic structural units, each a square structure with a width p of 48 μm. Each periodic structural unit has a rectangular non-gold-plated region with a width w of 4.5 μm, satisfying the condition I = α*p. Based on this absorber, terahertz spectral information of aflatoxin B1, B2, G1, and G2 solutions of different concentrations is collected. The differences between the terahertz transmission spectra of different types of aflatoxins are analyzed, and chemometric methods are used to model and analyze the terahertz transmission spectra of aflatoxin B1, B2, G1, and G2 solutions. Through comparative analysis of different models, it was found that the PSO-SPA-SVM model had the highest prediction accuracy, with a training set accuracy of 100% and 39 correct predictions out of 40 predicted samples, resulting in a prediction accuracy of 95%. Therefore, this invention enables the qualitative identification of trace aflatoxin B1, B2, G1, and G2 solutions, providing a new approach for the qualitative detection of aflatoxin.

[0050] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement, characterized in that, The detection method includes the following steps: (1) Prepare multiple standard solutions of aflatoxin B1, B2, G1, and G2 with different concentrations, and drop the standard solutions of aflatoxin B1, B2, G1, and G2 onto the terahertz BIC metamaterial sensor respectively, and dry them in a drying oven. The terahertz BIC metamaterial sensor is composed of multiple periodic structural units. The periodic structural unit is a square structure. The width p of the periodic structural unit is 48 μm. The periodic structural unit has a rectangular non-gold plated area. The width w of the rectangular non-gold plated area is 4.5 μm. The rectangular non-gold plated area satisfies the condition: I = α*p, where α is the influence factor and I is the length of the rectangular non-gold plated area. (2) The dried terahertz BIC metamaterial sensor was placed into the terahertz system and measured using the transmission mode to collect the terahertz spectral information of the corresponding sample. (3) Use a spectral feature variable extraction algorithm to extract features from terahertz spectral information; (4) Based on the characteristics of the extraction, a qualitative analysis model for the terahertz transmission spectra of aflatoxin B1, B2, G1 and G2 solutions was established using chemometric methods; (5) Obtain the terahertz spectral information of the sample containing aflatoxin to be tested and input it into each qualitative analysis model to obtain the type of aflatoxin in the sample to be tested.

2. The qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement according to claim 1, characterized in that, The terahertz BIC metamaterial sensor was prepared by the following method: 1) Coating: 5nm chromium and 100nm gold are deposited on the silicon substrate surface; 2) After metal deposition, pretreatment is performed using an HMDS oven at 120°C for 10 minutes; 3) Spin coating: Photoresist AZ6112 is dropped onto the silicon substrate surface and spread using a spin coater at 600 rpm, followed by spin coating at 4000 rpm. 4) Pre-baking: The temperature and time of pre-baking are set to 100℃ and 120 seconds, respectively; 5) Development: Manual development is performed using 3038 developer; 6) Coating: The power of the coating machine is set to 200W and the time is 3min; 7) Hardening: The photoresist mask is baked on a hot plate at 110℃ for 120 seconds; 8) Etching: IBE etching is used, that is, the sample surface is bombarded with an ion beam of a certain concentration to achieve the purpose of etching; 9) Stripping: After etching, the photoresist mask is removed by ultrasonic extraction with acetone for 1 hour. After stripping, the photoresist mask is observed under a microscope to see if it is completely removed. If it is not completely removed, it needs to be placed in the acetone solution for ultrasonic treatment until the photoresist mask is completely removed.

3. The qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement according to claim 1, characterized in that, The transmission spectrum of the terahertz BIC metamaterial sensor has a transmission peak at 1.5 THz.

4. The qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement according to claim 1, characterized in that, In step (1), multiple standard solutions of aflatoxins B1, B2, G1, and G2 at different concentrations are prepared, specifically including: Prepare standard solutions of aflatoxin B1, B2, G1, and G2. According to the preset mixing ratio, the standard solutions of the required concentration gradient were prepared by stepwise dilution using a precision pipette. All diluted samples were stored in 25 ml volumetric flasks. To ensure the homogeneity of the solution, all samples were shaken thoroughly on a vortex mixer for 3 minutes. Multiple dilution operations were performed during the experiment.

5. The qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement according to claim 1, characterized in that, Step (2) specifically includes: The spectral detection range of the terahertz system is 0.1-5.0 THz. Before the experiment, the system was preheated using an air compressor with an air dryer, and dry air was continuously filled into the optical cavity. The humidity was monitored by a hygrometer to keep it below 10%, and the temperature was kept constant at 25±0.5℃. During the experiment, after each sample was placed in, wait for 2 minutes for the system to stabilize before starting the measurement. Then, 10 μL of sample solution was pipetted onto the metamaterial sheet in order of increasing sample concentration using a pipette. After each sample test, the metamaterial sheet was placed in a beaker and shaken to clean it. Before acquiring the sample spectrum, the metamaterial sheet with the sample was placed in a drying oven for 15 minutes at a temperature of 50℃. Finally, the metamaterial sheet with the sample was placed in the terahertz system and measured using transmission mode. Four points were taken for each sample, and 10 measurements were performed at each point, resulting in 40 spectra for each sample, for a total of 160 spectra. Each spectrum was the average of 64 repeated detections.

6. The qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement according to claim 1, characterized in that, The spectral feature variable extraction algorithm is one of the following: competitive adaptive reweighted sampling algorithm, non-information variable elimination algorithm, and continuous projection algorithm.

7. The qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement according to claim 1, characterized in that, The qualitative analysis model established in step (4) is one of the following: K-nearest neighbor classification algorithm model, random forest model, support vector machine model, or support vector machine model optimized by particle swarm optimization algorithm.

8. The qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement according to claim 1, characterized in that, After obtaining the spectral data in step (2), the Kennard-Stone algorithm is used to divide the samples into a calibration set and a prediction set in a 3:1 ratio for subsequent model building.

9. The qualitative detection method for aflatoxins B1, B2, G1, and G2 based on terahertz BIC metamaterial enhancement according to claim 1, characterized in that, In step (4), the established qualitative analysis is evaluated using prediction accuracy, misjudgment rate, and confusion matrix.