Transgenic cottonseed oil identification method based on terahertz spectrum technology
Through terahertz spectroscopy technology and the improved black-winged kite algorithm optimization model, the time-consuming, low efficiency and environmental pollution of GM cottonseed oil detection are solved, and rapid and accurate identification of GM cottonseed oil is achieved.
Patent Information
- Application Number
- CN202510570042.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-07-18
AI Technical Summary
The existing GM cottonseed oil detection technology has problems such as long time, low efficiency, high cost, cumbersome operation and may lead to environmental pollution, making it difficult to achieve lossless, green and efficient identification.
The transmissive terahertz time domain spectroscopy system was used to collect terahertz time domain spectroscopy data of cottonseed oil, combined with the improved black-winged kite algorithm to optimize the extreme gradient enhancement algorithm, build a genetically modified cottonseed oil identification model, and use the dual-objective fitness function optimization strategy, reverse learning initialization population strategy, Rayleigh distribution function control strategy and Lévy flight strategy to improve the algorithm performance.
It realizes rapid, non-destructive and accurate identification of genetically modified cottonseed oil, which is simple and safe to operate, and will not cause pollution to the environment, improving the identification accuracy and generalization ability of the model.
Smart Images

Figure CN120334163A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of terahertz spectroscopy detection, and particularly relates to a method for identifying genetically modified cottonseed oil based on terahertz spectroscopy technology. Background Art
[0002] Cotton is one of the genetically modified crops with the widest planting area globally, and its by-product cottonseed oil occupies a crucial position in the national economy and daily life. Cottonseed oil is rich in various nutrients such as unsaturated fatty acids, vitamin E, and phospholipids, and has the functions of reducing cholesterol, protecting cardiovascular health, and providing essential nutrients for the human body.
[0003] Currently, common genetically modified detection technologies can be mainly divided into two categories based on nucleic acids (such as exogenous inserted gene sequences) and proteins (such as exogenous expressed proteins). Although these two types of methods are highly accurate, sensitive, and widely used, the nucleic acid-based methods usually take a long time and have low efficiency, while the protein-based methods are mainly applicable to raw material detection and may cause environmental pollution problems. In addition, traditional methods for identifying agricultural products and foods often face challenges such as high cost, low efficiency, cumbersome operation, and difficulty for non-professional personnel to handle. Therefore, there is an urgent need for a non-destructive, green, and efficient detection method to solve the above technical problems. Summary of the Invention
[0004] The purpose of the present invention is to provide a non-destructive, green, and efficient method for detecting genetically modified cottonseed oil, making up for the deficiencies of the existing technology to achieve rapid and non-destructive identification of genetically modified cottonseed oil.
[0005] To achieve the above purpose, a method for identifying genetically modified cottonseed oil based on terahertz spectroscopy technology adopted by the present invention includes the following steps:
[0006] S1: Sample preparation: Select genetically modified cottonseed oil and non-genetically modified cottonseed oil as experimental samples. For the experimental sample holder, choose a detachable liquid cell with a window material of polytetrafluoroethylene film, and prepare experimental samples of each type of cottonseed oil.
[0007] S2: Data acquisition: Use a transmission terahertz time-domain spectroscopy system to collect the time-domain spectral data of the samples, convert it to a frequency-domain spectrum through fast Fourier transformation (FFT), calculate the absorbance, and construct an absorption spectral dataset of genetically modified and non-genetically modified cottonseed oil.
[0008] S3: Model construction: Construct a model for identifying genetically modified cottonseed oil.
[0009] S4: Model training: Input the absorption spectral dataset of genetically modified and non-genetically modified cottonseed oil into the identification model for training.
[0010] S5: Parameter optimization: Use the improved Black Kite algorithm to optimize the parameters of the discrimination model and determine the optimal parameter combination;
[0011] S6: Result output: Input the absorption spectrum dataset of the cottonseed oil to be tested into the optimized discrimination model and output the discrimination result.
[0012] Specifically, during the process of preparing the experimental samples, a genetically modified cottonseed oil and a non-genetically modified cottonseed oil were selected as experimental samples. The experimental sample holder selected a detachable liquid cell with a window material of polytetrafluoroethylene film. The thickness of the window was 0.5 mm, and the center of the window was an elliptical hole with an area of 270 mm 2 Each time of sample preparation, a pipette was used to aspirate 2 mL of the oil sample and slowly fill the liquid cell along the wall of the liquid cell to avoid the generation of bubbles.
[0013] Specifically, during the process of data acquisition, a transmission terahertz time-domain spectroscopy system was used to detect the genetically modified and non-genetically modified cottonseed oil samples to obtain their terahertz time-domain spectroscopy datasets; the obtained terahertz time-domain spectroscopy datasets were converted into frequency-domain spectra by using the fast Fourier transform (FFT). The frequency-domain spectra were used to calculate the absorbance of the spectral characteristics of the genetically modified and non-genetically modified cottonseed oil samples, and then the absorption spectrum datasets of the genetically modified and non-genetically modified cottonseed oil were obtained.
[0014] Specifically, during the process of constructing the discrimination model, 4 / 5 of the data were randomly selected from the absorption spectrum datasets of the genetically modified and non-genetically modified cottonseed oil as the training set for the construction of the discrimination model, and the remaining 1 / 5 of the data were used as the test set for testing the discrimination model.
[0015] Specifically, the discrimination model is an application model of the Extreme Gradient Boosting (XGBoost) algorithm in classification problems.
[0016] Specifically, the improved Black Kite algorithm is specifically improved as follows: In the Black Kite Algorithm (BKA), a double-objective fitness function optimization strategy, a reverse learning initialization population strategy, a Rayleigh distribution function control strategy, and a Lévy flight strategy are introduced to improve the Black Kite algorithm.
[0017] Specifically, during the process of inputting the absorption spectrum datasets of the genetically modified and non-genetically modified cottonseed oil into the discrimination model for training and optimization, the improved Black Kite algorithm is used to optimize the parameters of the Extreme Gradient Boosting (XGBoost) algorithm. After completing the parameter optimization, the discrimination result is finally output.
[0018] The advantages of the present invention are as follows:
[0019] (1) Terahertz time-domain spectroscopy technology has advantages such as non-destructiveness, fingerprint characteristics, and low energy. Using a transmission terahertz spectroscopy system to detect genetically modified and non-genetically modified cottonseed oil will not damage the sample, and the detection process is rapid, simple, accurate, and efficient.
[0020] (2) For the black-winged kite algorithm, by introducing a dual-objective fitness function optimization strategy, an opposition-based learning initialization population strategy, a Rayleigh distribution function control strategy, and a Lévy flight strategy, the algorithm performance is improved in multiple dimensions. The dual-objective fitness function optimization strategy takes the classification error rate and the AUC (Area Under the Receiver Operating Characteristic Curve) value as the core optimization objectives to achieve precise screening of model parameter combinations, enhancing the discrimination accuracy of the model while improving its generalization ability; an opposition-based learning initialization population strategy is introduced in the algorithm initialization stage to effectively improve the initial quality of the population; during the algorithm optimization, the Rayleigh distribution function control strategy and the Lévy flight strategy cooperate to search, enhancing the search randomness and global exploration ability of the algorithm, and the dynamic balance between the two improves the ability of the algorithm to jump out of the local optimum. These improvements significantly enhance the optimization ability of the black-winged kite algorithm, ensuring the acquisition of the optimal solution and thus improving the discrimination accuracy. The improved black-winged kite algorithm is deeply integrated with the extreme gradient boosting algorithm model, enabling high-accuracy and high-reliability discrimination of genetically modified and non-genetically modified cottonseed oil.
[0021] (3) The transmission terahertz time-domain spectroscopy system used in the present invention is easy to operate, the device is safe to use, there is no radiation hazard, and it will not cause environmental pollution. Description of the Drawings
[0022] Figure 1 is a schematic flow chart of a method for identifying genetically modified cottonseed oil based on terahertz spectroscopy technology of the present invention.
[0023] Figure 2 is the original absorption spectra of two cottonseed oil samples of the present invention in the characteristic band of 0.3 - 1.8 THz.
[0024] Figure 3 is the system schematic diagram of the transmission terahertz time-domain spectroscopy system used in the present invention.
[0025] Figure 4 is the test set classification confusion matrix of the genetically modified cottonseed oil discrimination model of the present invention. Detailed Embodiments
[0026] The following further describes in detail the specific embodiments of the present invention with reference to the drawings, so that those skilled in the art can better understand the present invention.
[0027] Please refer to Figure 1 , the method for identifying genetically modified cottonseed oil based on terahertz spectroscopy of the present invention has the following specific implementation steps:
[0028] S1: Sample preparation: Select a genetically modified cottonseed oil and a non-genetically modified cottonseed oil as experimental samples. The experimental sample holder selects a detachable liquid cell with a window material of polytetrafluoroethylene film, and prepare experimental samples of each cottonseed oil;
[0029] S2: Data acquisition: Use a transmission terahertz time-domain spectroscopy system to detect the genetically modified and non-genetically modified cottonseed oil samples to obtain their terahertz time-domain spectroscopy datasets; Use the fast Fourier transform (FFT) to convert the obtained terahertz time-domain spectra into frequency-domain spectra. The frequency-domain spectra are used to calculate the absorbance of the spectral characteristics of the genetically modified and non-genetically modified cottonseed oil samples, and then obtain the absorption spectroscopy datasets of the genetically modified and non-genetically modified cottonseed oils; Then preprocess the terahertz absorption spectra;
[0030] S3: Model construction: Construct a model for identifying genetically modified cottonseed oil;
[0031] S4: Model training: Input the absorption spectroscopy datasets of the genetically modified and non-genetically modified cottonseed oils into the identification model for training;
[0032] S5: Parameter optimization: Use an improved black-winged kite algorithm to optimize the parameters of the identification model and determine the optimal parameters;
[0033] S6: Result output: Select the absorption spectroscopy datasets of the genetically modified and non-genetically modified cottonseed oils to be identified and input them into the optimized identification model to output the identification results.
[0034] Specifically, in step S1, a genetically modified cottonseed oil and a non-genetically modified cottonseed oil are selected as experimental samples. To avoid the deterioration and oxidation of the oil samples, all samples are stored in a dark environment at room temperature before preparation. Due to the low absorption characteristics of polytetrafluoroethylene in the terahertz band, the experimental sample holder selects a detachable liquid cell with a window material of polytetrafluoroethylene film. The thickness of the window is 0.5 mm, and the center of the window is an elliptical hole with an area of 270 mm 2 . Each time a sample is prepared, a pipette is used to suck 2 mL of the oil sample and slowly fill the liquid cell along the wall of the liquid cell to avoid the generation of bubbles.
[0035] Specifically, for the spectral acquisition in step S2, the terahertz time-domain spectroscopy acquisition uses a spectral acquisition system composed of Huaxun Ark CCT-1800 terahertz spectrometer (Huaxun Ark Technology, China) and a control computer. The detection range is 0.1 - 4.5 THz, the resolution reaches 6 GHz, and the signal-to-noise ratio in the low-frequency band can reach 75 dB. The experimental environment is at room temperature. The sample chamber is filled with nitrogen. After the real-time spectral signal is stable, a reference signal is obtained. Subsequently, the sample is placed on the rack, and after the signal is stable, the terahertz spectral signal of the sample is obtained. The dataset of 2 kinds of cottonseed oil samples is divided into a training set and a test set at a ratio of 4:1. Each kind of cottonseed oil uses 180 groups of data as the training set and 45 groups of data as the test set. The total training set is 360 groups of data, and the test set is 90 groups.
[0036] Specifically, for the method of calculating the terahertz absorption spectrum in step S2, all samples are detected by a terahertz time-domain spectroscopy system for the prepared cottonseed oil samples to obtain the terahertz time-domain spectroscopy reference signal E ref (t) and the sample signal E sam (t). Using the fast Fourier transform (FFT), they are converted into the frequency-domain reference signal E ref (ω) and the sample signal E sam (ω), and the absorbance of the sample is calculated according to the frequency-domain signal using the following formula:
[0037]
[0038] Furthermore, the Gaussian smoothing method is used to preprocess the terahertz absorption spectrum. Through the preprocessed spectrum, interference noise is removed, greatly reducing the impact on the sample analysis results and making the data information more effective.
[0039] As Figure 2 shown, the terahertz absorption spectra of 450 samples of 2 kinds of cottonseed oil in the frequency band of 0.3 - 1.8 THz are presented. The absorption spectra of all cottonseed oil samples show similar waveforms and similar amplitudes, with no significant differences. This indicates that the terahertz spectral differences between genetically modified and non-genetically modified cottonseed oil are very small, and it is difficult to identify them using the direct observation method. Therefore, it is necessary to combine the identification model to achieve the rapid and effective identification of genetically modified and non-genetically modified cottonseed oil.
[0040] Specifically, the identification model in step S3 is an application model of the extreme gradient boosting algorithm (XGBoost) in classification problems. The calculation formula of the identification model constructed by the extreme gradient boosting algorithm is as follows:
[0041]
[0042] In the formula, X represents the feature vector of the sample input to the model, that is, the terahertz absorption spectrum data of cottonseed oil,
[0043] is the discrimination result of the model output, and N is the number of decision trees in the model; is the output result of the k-th decision tree.
[0044] Specifically, in step S5, the dual-objective fitness function optimization strategy is used as the optimization index. By applying the improved black-winged kite algorithm, three key parameters of the extreme gradient boosting algorithm (XGBoost) are optimized. These three parameters are the maximum depth of the tree (max_depth), the learning rate (learning_rate), and the number of base classifiers (n_estimators). Through the systematic optimization of the above parameters by the improved black-winged kite algorithm, the parameter combination that makes the model performance reach the optimal is finally determined.
[0045] Furthermore, the following uses English names to refer to the corresponding terms. The black-winged kite algorithm (BKA) and the extreme gradient boosting algorithm (XGBoost). The black-winged kite algorithm (BKA) and the improved black-winged kite algorithm (DLBKA) are combined with the extreme gradient boosting algorithm (XGBoost) respectively to construct the genetically modified cottonseed oil discrimination model optimized by the black-winged kite algorithm (BKA-XGBoost) and the genetically modified cottonseed oil discrimination model optimized by the improved black-winged kite algorithm (DLBKA-XGBoost). The improved black-winged kite algorithm (DLBKA) includes the above-mentioned dual-objective fitness function optimization strategy, reverse learning to initialize the population strategy, Rayleigh distribution function control strategy, and Lévy flight strategy.
[0046] Furthermore, to scientifically and comprehensively verify the performance improvement effect of the identification model optimized by the improved black-winged kite algorithm, the present invention adopts a comparative experiment method: First, use the absorption spectrum datasets of genetically modified and non-genetically modified cottonseed oil to build a model for the BKA-XGBoost model and record the classification results, and then conduct a comparative analysis with the results obtained from building the DLBKA-XGBoost model. When building the model, randomly select 4 / 5 of the data from each cottonseed oil data as the training set for model construction, and the remaining 1 / 5 as the test set for testing the model.
[0047] Specifically, the attack behavior model of the black-winged kite algorithm is:
[0048]
[0049] where t and t + 1 represent the iteration times, X i (t) is the i-th solution at the t-th iteration, X i (t + 1) is the i-th solution at the (t + 1)-th iteration, r is a random number in [0, 1], p is a constant with a size of 0.9, and T represents the total of all iterations;
[0050] Specifically, the migration behavior model of the black-winged kite algorithm is as follows:
[0051]
[0052] Among them, Conforms to the Cauchy distribution, X i (t) is the i-th solution at the t-th iteration, X i (t + 1) is the i-th solution at the (t + 1)-th iteration, L(t) is the optimal solution of the population after the t-th iteration, and r is a random number in [0, 1]. F t is the fitness of the current solution, and F ri is the fitness of a random solution within the current population.
[0053] Furthermore, the present invention improves the problem that the black-winged kite algorithm is prone to falling into local optimum, and proposes an improved black-winged kite algorithm. The specific algorithm improvements are as follows:
[0054] (1) The present invention introduces a dual-objective fitness function optimization strategy in the black-winged kite algorithm. By using the dual-objective fitness function, the classification error rate is preferentially optimized and the AUC value is synchronously optimized; the parameter corresponding to the minimum error rate is preferentially selected as the current optimal model parameter. When there are multiple model parameters corresponding to the minimum error rate, the parameter corresponding to the model with the largest AUC value among them is selected as the current optimal model parameter, and the fitness of this model parameter is the best.
[0055] (2) The present invention uses a reverse learning initialization population strategy in the black-winged kite algorithm. For a black-winged kite population with an initial population size of N, first randomly initialize and generate an initial population with an individual number of N, and then use the reverse learning strategy to generate a reverse learning population with an individual number of N based on this initial population. Among them, the specific formula of the reverse learning strategy is expressed as:
[0056]
[0057] In the formula, represents the reverse solution of X i , and Lb and Ub represent the upper and lower bounds of the optimization parameters;
[0058] Finally, according to the dual-objective fitness function optimization strategy, the top N individuals with the best fitness are selected from the set composed of the initial population and the reverse learning population to complete the population initialization.
[0059] (3) In the migration behavior of the Black-winged Kite algorithm, the present invention introduces the Lévy flight search strategy and the Rayleigh distribution function control strategy. The Rayleigh distribution function control strategy plays a key regulatory role, which can accurately adjust the perturbation degree of the Lévy flight search strategy on the algorithm iteration process. In the early stage of algorithm iteration, the Rayleigh distribution function control strategy promotes an increase in the perturbation degree, which helps the algorithm break free from the bondage of local optimal solutions and explore in a broader solution space; while in the middle and late stages of iteration, the strategy will appropriately reduce the perturbation, enabling the algorithm to steadily converge towards the global optimal solution. Through the synergistic effect of the Lévy flight search strategy and the Rayleigh distribution function control strategy, the algorithm convergence speed is accelerated, enabling the algorithm to quickly jump out of local optimal solutions, thereby effectively improving the overall optimization ability of the population. The specific formula for the migration behavior of the improved Black-winged Kite algorithm is as follows:
[0060]
[0061] In the formula, levy(γ) conforms to the Lévy distribution, conforms to the Cauchy distribution, r(t) is the Rayleigh distribution function, σ is the scale parameter of the Rayleigh distribution function, defaulting to 1, X i (t) is the i-th solution at the t-th iteration, X i (t + 1) is the i-th solution at the (t + 1)-th iteration, F t is the fitness of the current solution, F ri is the fitness of a randomly selected solution within the current population, L(t) is the optimal solution after the population completes the t-th iteration, and r is a random number in [0, 1].
[0062] Specifically, the AUC value is calculated through the following steps:
[0063] (1) Sort the predicted probabilities output by the model in descending order;
[0064] (2) Calculate the TPR and FPR at each threshold:
[0065]
[0066] where the definitions of TP, FP, TN, and FN are as follows:
[0067] True positive (TP): The number of samples of genetically modified oil samples correctly identified as genetically modified;
[0068] False positive (FP): The number of samples of non-genetically modified oil samples misjudged as genetically modified;
[0069] True negative (TN): The number of samples of non-genetically modified oil samples correctly identified;
[0070] False negative (FN): The number of samples of genetically modified oil samples misjudged as non-genetically modified;
[0071] (3) Calculate the area using the trapezoidal integration method:
[0072]
[0073] where FPR0 = TRP0 = 0, FPR n = TPR n = 1.
[0074] Specifically, the error rate is defined as the proportion of samples mispredicted by the model, and the calculation formula is:
[0075]
[0076] Specifically, the accuracy rate is defined as the proportion of samples correctly predicted by the model, which is the complement of the error rate, and the calculation formula is:
[0077]
[0078] Please refer to Figure 1 , Figure 2 , Figure 3 and Figure 4 , the present invention provides a specific embodiment:
[0079] (1) Sample preparation
[0080] Select a genetically modified cottonseed oil and a non-genetically modified cottonseed oil as experimental samples, which are purchased from Jin Yu Biotechnology Co., Ltd. in Ji'an City and Shanghai Aladdin Biochemical Technology Co., Ltd. respectively. To avoid sample deterioration and oxidation, all samples are stored in a dark environment at room temperature before preparation. Due to the low absorption characteristics of polytetrafluoroethylene in the terahertz band, the experimental sample holder selects a detachable liquid cell with a window material of polytetrafluoroethylene film. The thickness of the window is 0.5 mm, and the center of the window is an elliptical hole with an area of 270 mm 2 . Each time of sample preparation, use a pipette to suck 2 mL of the oil sample and slowly fill the liquid cell along the cell wall to avoid the generation of bubbles. 225 samples are made for each cottonseed oil, and a total of 450 samples are made. For each cottonseed oil, 180 samples are used as the training set and 45 samples are used as the test set.
[0081] (2) Spectrum acquisition
[0082] Perform spectrum acquisition on all samples using a transmission terahertz time-domain spectroscopy system. Terahertz time-domain spectroscopy needs to be first converted into a frequency-domain spectrum through fast Fourier transform (FFT), and then the frequency-domain spectrum is calculated as an absorption spectrum through the absorbance formula, and then the absorption spectrum datasets of genetically modified and non-genetically modified cottonseed oils are obtained. See the original absorption spectrum diagram in Figure 2 , and see the system schematic diagram of the transmission terahertz time-domain spectroscopy system inFigure 3 。
[0083] (3) Model construction and optimization
[0084] First, the Black-winged Kite Algorithm (BKA) is used to optimize the parameters and build a model for the Extreme Gradient Boosting algorithm model (XGBoost) to construct the BKA-XGBoost model. A classification task is performed on the test data set, and the classification results are recorded in detail. Subsequently, using the improved Black-winged Kite Algorithm (DLBKA), the parameters of the Extreme Gradient Boosting algorithm (XGBoost) model are also optimized and modeled to construct the DLBKA-XGBoost model. A classification task is carried out under the same test data set and evaluation criteria, and the classification results are recorded in detail. The classification task refers to the identification of genetically modified and non-genetically modified cottonseed oil.
[0085] (4) Model evaluation
[0086] As shown in Table 1, the classification accuracy of the BKA-XGBoost model on the training set reaches 100%. Although this value is the same as that of the DLBKA-XGBoost model, in terms of the test set performance, the classification accuracy of the BKA-XGBoost model is only 93.33%, while that of the DLBKA-XGBoost model is as high as 97.78%, and the gap between the two is significant. This experimental result proves that compared with using the original Black-winged Kite Algorithm to optimize the parameters of the Extreme Gradient Boosting algorithm, the improved Black-winged Kite Algorithm using the integrated double-objective fitness function optimization strategy, reverse learning to initialize the population strategy, Rayleigh distribution function control strategy, and Lévy flight strategy can significantly improve the classification and identification accuracy of the model and enhance the generalization ability and reliability of the model in actual application scenarios.
[0087] Table 1 Comparison of the results of the identification models
[0088]
[0089] The above is only a representative embodiment of the present invention and cannot limit the scope of the rights of the present invention to this example. Those of ordinary skill in the art should be well aware that only modifying or equivalently replacing the technical solution of the present invention, but not departing from the purpose and scope of the technical solution of the present invention, still belongs to the scope covered by the present invention.
Claims
1. A method for identifying genetically modified cottonseed oil based on terahertz spectroscopy technology, characterized in that, It includes the following steps: S1: Sample preparation: Select genetically modified cottonseed oil and non-genetically modified cottonseed oil as experimental samples, and use a detachable liquid cell with a window material of polytetrafluoroethylene film as the sample holder to prepare test samples of the two cottonseed oils; S2: Data acquisition: Use a transmission terahertz time-domain spectroscopy system to collect the time-domain spectral data of the samples, convert it into a frequency-domain spectrum through fast Fourier transform, calculate the absorbance, and construct an absorption spectral dataset of genetically modified and non-genetically modified cottonseed oils; S3: Model construction: Based on the absorption spectral dataset, construct a discrimination model for genetically modified cottonseed oil; S4: Model training: Input the absorption spectral dataset into the discrimination model for training; S5: Parameter optimization: Use an improved black-winged kite algorithm to optimize the parameters of the discrimination model and determine the optimal parameter combination; S6: Result output: Input the absorption spectral data of the cottonseed oil to be tested into the optimized discrimination model and output the discrimination result of genetically modified or non-genetically modified; 2. The method for identifying genetically modified cottonseed oil based on terahertz spectroscopy according to claim 1 is characterized in that, During the sample preparation in step S1, genetically modified cottonseed oil and non-genetically modified cottonseed oil are selected as experimental samples. The experimental sample rack selects a detachable liquid cell with a window material of polytetrafluoroethylene film. The thickness of the window is 0.5 mm, and the center of the window is an elliptical hole with an area of 270 mm 2 . Each time of sample preparation, a pipette is used to aspirate 2 mL of oil sample and slowly fill the liquid cell along the wall of the liquid cell to avoid the generation of bubbles.
3. The method for identifying genetically modified cottonseed oil based on terahertz spectroscopy according to claim 1, wherein, In the step S2, a prepared cottonseed oil sample is detected by a transmission terahertz time-domain spectroscopy system to obtain a terahertz time-domain spectroscopy reference signal E ref (t) and a sample signal E sam (t), which are converted into a frequency-domain reference signal E ref (ω) and a sample signal E sam (ω) by using fast Fourier transform (FFT), and the absorbance of the sample is calculated according to the frequency-domain signals by the formula:
4. The discriminant method of genetically modified cottonseed oil based on terahertz spectroscopy according to claim 1 is characterized in that, During the process of model construction in step S3, randomly select 4 / 5 of the data from the absorption spectral datasets of genetically modified and non-genetically modified cottonseed oils as the training set for the construction of the discrimination model, and the remaining 1 / 5 of the data as the test set for testing the discrimination model.
5. The method for identifying genetically modified cottonseed oil based on terahertz spectroscopy according to claim 1, wherein The discrimination model is a classification model of the extreme gradient boosting algorithm (XGBoost).
6. The method for identifying genetically modified cottonseed oil based on terahertz spectroscopy according to claim 1, wherein The improved black-winged kite algorithm adopted in step S5 includes the following improvements: (1) Introduce a dual-objective fitness function optimization strategy in the black-winged kite algorithm. Use a dual-objective fitness function to preferentially optimize the classification error rate and synchronously optimize the AUC value; preferentially select the parameters corresponding to the minimum error rate as the current optimal model parameters. When there are multiple model parameters corresponding to the minimum error rate, select the parameters corresponding to the model with the largest AUC value among them as the current optimal model parameters, and the fitness of this model parameter is the best. (2) Use the reverse learning initialization population strategy in the black-winged kite algorithm. For a black-winged kite population with an initial population size of N, first randomly initialize to generate an initial population with an individual size of N, and then use the reverse learning strategy to generate a reverse learning population with an individual size of N based on this initial population. Among them, the specific formula of the reverse learning strategy is expressed as: In the formula, represents the inverse solution of X i , and Lb and Ub represent the upper and lower bounds of the optimization parameters; Finally, according to the dual-objective fitness function optimization strategy, select the top N individuals with the best fitness from the set composed of the initial population and the reverse learning population to complete the population initialization. (3) Introduce a Rayleigh distribution function control strategy and a Lévy flight strategy in the black-winged kite algorithm. Through the synergistic effect of the Lévy flight strategy and the Rayleigh distribution function control strategy, conduct optimization. The specific formula is as follows: In the above formula, levy(γ) conforms to the Lévy distribution function, conforms to the Cauchy distribution, r(t) is the Rayleigh distribution function, X i (t) is the i-th solution of the t-th iteration, X i (t + 1) is the i-th solution of the (t + 1)-th iteration, F t is the fitness of the current solution, F ri is the fitness of a randomly selected solution within the current population, L(t) is the optimal solution of the population after the t-th iteration, σ is the scale parameter of the Rayleigh distribution function, with a default value of 1, and r is a random number in the range [0, 1].
7. The method for identifying genetically modified cottonseed oil based on terahertz spectroscopy according to claim 1, characterized in that In step S5, use the improved black-winged kite algorithm to optimize the parameters of the discrimination model.