Tobacco leaf mildew detection method of support vector machine R-SVM based on radial basis function dual optimization

Through the support vector machine R-SVM based on dual optimization of radial basis function, the near-infrared spectrometer data is used to realize the automated and real-time detection of tobacco leaf mold, and the problem of relying on manual experience and time-consuming detection in the existing technology is solved, and the problem of detection in the existing technology is improved. The inspection accuracy and efficiency are achieved, environmental hazards are reduced, and the production quality of the tobacco industry is improved.

CN119178748APending Publication Date: 2024-12-24CHINA TOBACCO ANHUI IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411344828.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The existing tobacco leaf mold detection methods rely on manual experience, take time or require high-tech equipment, making it difficult to detect internal mold in real time and accurately, and it has potential harm to the environment.

Method used

The support vector machine R-SVM based on dual optimization of radial basis function is adopted to obtain tobacco leaf sample data through a near-infrared spectrometer, and R-SVM model is constructed and trained to realize automated detection, reducing dependence on manual experience, and improving detection accuracy and efficiency.

Benefits of technology

It realizes automated, real-time and accurate mold detection of tobacco leaves, reduces manual intervention and the use of chemical reagents, improves detection rate and accuracy, reduces production costs and environmental hazards, and improves product quality and market competitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_6
    Figure QLYQS_6
  • Figure QLYQS_17
    Figure QLYQS_17
Patent Text Reader

Abstract

The invention discloses a tobacco leaf mildew detection method of a support vector machine R-SVM based on radial basis function dual optimization, which comprises the following steps: 1, collecting spectral data of a tobacco leaf sample through a near infrared spectrometer, 2, extracting key characteristic wavelength data by using a specific data processing technology, and constructing a characteristic wavelength data matrix; and 3, learning and training the feature data by adopting an improved R-SVM model so as to establish a tobacco mildew detection model. The invention aims to improve the accuracy and efficiency of tobacco mildew detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of tobacco leaf detection, in particular to a tobacco leaf mildew detection method based on a radial basis function dual optimized support vector machine R-SVM. Background Art

[0002] In the tobacco industry manufacturing sector, the raw materials for processing are mainly tobacco leaves collected from all over the country. Due to the influence of the external ecological environment and pests and diseases, the stored tobacco leaves are prone to mildew to varying degrees. Often, mildew occurs inside the tobacco leaves and is not easy to be detected.

[0003] When tobacco industry manufacturers process these tobacco leaves in the factory, the quality of the finished tobacco products is often affected by the mildew of the tobacco leaves. The most direct consequence is that it affects the health of consumers and the suction feeling of the filter tip. Therefore, it is necessary to conduct a series of tests on the tobacco leaves before processing, including mildew detection;

[0004] In the tobacco industry, in order to ensure the quality of tobacco leaves, the following methods are usually used for mildew detection. The following are several common methods for tobacco leaf mildew detection:

[0005] 1. Sensory testing:

[0006] This is the most traditional detection method, which relies on the experience of professionals to observe the color, shape, and texture of tobacco leaves, and to determine whether there is mold or other abnormal odors through smell. This method is simple and easy to implement, but it relies on the experience and skills of the inspector, and it is not easy to detect internal mold. Moreover, the real-time requirements cannot be met.

[0007] 2. Microbial culture method:

[0008] By placing tobacco leaf samples on a specific culture medium and culturing them under suitable conditions, we can observe whether mold grows. This method is more accurate, but it takes a long time and requires certain laboratory conditions.

[0009] 3. Chemical reagent testing:

[0010] Using specific chemical reagents to contact tobacco leaf samples, judging whether there is mold based on color changes or reaction products. This method is quick and simple, but attention should be paid to safety and waste disposal during operation.

[0011] 4. Enzyme-linked immunosorbent assay (ELISA):

[0012] The mycotoxins in tobacco leaves are detected by using the specific binding principle of antigen and antibody. This method has high sensitivity, but requires high equipment and technology.

[0013] 5. Molecular biology techniques:

[0014] For example, PCR (polymerase chain reaction) can be used to detect the DNA sequence of specific molds. This method is highly accurate, but the cost is relatively high and requires professional laboratory equipment and technical support.

[0015] 6. Image analysis technology:

[0016] Computer vision technology is used to scan the surface of tobacco leaves and image processing algorithms are used to identify moldy areas. This method can assist sensory detection, but it has the problem of poor accuracy. Summary of the invention

[0017] The present invention aims to solve the deficiencies of the above-mentioned prior art and proposes a tobacco leaf mold detection method based on radial basis function dual optimization support vector machine R-SVM, in order to achieve the purpose of automatically detecting unqualified moldy tobacco leaves in the cigarette production process, thereby improving the tobacco leaf production quality.

[0018] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:

[0019] The tobacco leaf mildew detection method based on radial basis function dual optimization support vector machine R-SVM of the present invention is characterized in that it comprises the following steps:

[0020] Step 1: Construct a tobacco leaf data sample set:

[0021] Step 1.1: Use a near-infrared spectrometer to scan the selected tobacco leaf samples, obtain the near-infrared spectral wavelength feature data set of the tobacco leaf samples within the preset wavelength range, and preprocess them to obtain the near-infrared spectral wavelength feature data set X = {X1, X2, …, X i ,…X n}; where X i represents the near-infrared spectral wavelength characteristic data of the i-th tobacco leaf sample after preprocessing, 1≤i≤n, and X i ={X i1 ,X i2 ,…,X ij ,…X im}, 1≤j≤m, X ij represents the jth near-infrared spectrum wavelength characteristic value of the i-th tobacco leaf sample after pretreatment; n is the total number of tobacco leaf samples;

[0022] Get the mildew state Y = {Y1, Y2, ..., Y i ,…Y n}, where Y i Indicates the mildew state of the i-th tobacco leaf sample;

[0023] Step 1.2: Define and randomly initialize X ij The initial wavelength weight is M ij , thus obtaining X i The initial wavelength weight M i , and then the initial wavelength weight matrix M of the tobacco leaf sample is obtained;

[0024] Step 1.3: Use equation (1) to construct the objective function L of tobacco leaf mildew and solve it to obtain the optimal wavelength weight matrix M'={M'1,M'2,…,M' i ,…M' n}, where M' i Represents X i The optimal wavelength weight of:

[0025] (1)

[0026] In formula (1), Yes X i The mean of , λ is the regularization parameter, and Regularizer is the regularization term;

[0027] Step 1.4: According to the optimal wavelength weight, i The near infrared spectrum wavelength characteristic values ​​in are sorted in descending order, and the first m' wavelength characteristic values ​​are selected as the optimal near infrared spectrum wavelength characteristic data X' of the i-th tobacco leaf sample i , thereby obtaining the optimal near-infrared spectral wavelength characteristic data of all tobacco leaf samples and forming the optimal near-infrared spectral wavelength characteristic data set X' ;in, represents the j'th optimal near-infrared spectrum wavelength characteristic value of the i-th tobacco leaf sample;

[0028] Step 2: Construct a support vector machine R-SVM based on radial basis function dual optimization and determine the parameters of R-SVM;

[0029] Step 2.1: Use formula (3) to construct the dual optimized objective function L2 of R-SVM for tobacco leaf mildew, and solve it to obtain the optimal Lagrange multiplier for the i-th tobacco leaf sample: :

[0030] (3)

[0031]

[0032] In formula (3), yes The Lagrange multiplier of represents the Lagrange multiplier matrix; is a kernel function based on the radial basis function. represents the optimal near-infrared spectral wavelength characteristic data of the sth tobacco leaf sample; yes The Lagrange multiplier of ; express The moldy state;

[0033] Step 2.2: Calculate the optimized bias term d using equation (4);

[0034] (4)

[0035] In formula (4), express The optimal Lagrange multiplier of ;

[0036] Step 3: Gene X', train the R-SVM to obtain the trained tobacco leaf mildew detection model, so as to The trained tobacco leaf mold detection model is input for processing, and the new sample is obtained using formula (5) The predicted class label of :

[0037] (5)

[0038] In formula (5), Represents a symbolic function.

[0039] The electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the tobacco leaf mildew detection method of the support vector machine R-SVM, and the processor is configured to execute the program stored in the memory.

[0040] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the tobacco leaf mildew detection method using the support vector machine R-SVM when the computer program is executed by a processor.

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

[0042] 1. The method of the present invention automatically identifies moldy tobacco leaves through a machine learning algorithm, reducing dependence on manual experience, making the detection process more objective and consistent, and the automated detection can work continuously with a high degree of automation, reducing manual intervention, and is not limited by time and manpower, thereby greatly improving the detection speed and efficiency.

[0043] 2. The R-SVM model in the present invention can use the radial basis function (RBF) kernel to map data to a high-dimensional space, thereby capturing the complex characteristics of tobacco leaf mold, improving the classification accuracy, and greatly improving the detection accuracy.

[0044] 3. Even when faced with different types of mildew, the present invention can maintain good classification performance through the extraction of multi-dimensional features, has good generalization ability for different batches of tobacco leaves, and improves the robustness of the model.

[0045] 4. The method of the present invention can implement real-time monitoring on the production line. Once moldy tobacco leaves are detected, measures can be taken immediately to prevent unqualified products from entering subsequent processes, thereby achieving the effect of real-time online detection and immediate feedback.

[0046] 5. Compared with traditional off-line laboratory testing, the method of the present invention can detect problems more quickly through real-time testing, reduce hysteresis effects, shorten response time, and avoid damage to batch product quality.

[0047] 6. The R-SVM model in the method of the present invention is easy to integrate and expand with the production management system of the existing system, achieving seamless connection, and as data accumulates, the model can be further optimized through retraining to adapt to new detection requirements and improve the flexibility and scalability of the system.

[0048] 7. The present invention can efficiently detect moldy tobacco leaves, reduce rework and scrap rates caused by quality problems, thereby saving production costs and ensuring that only qualified tobacco leaves enter the next production process, ultimately improving the quality of finished products and enhancing market competitiveness.

[0049] 8. Compared with the traditional chemical detection method, the detection based on R-SVM reduces the use of chemical reagents, thereby reducing the potential harm to the environment.

[0050] In summary, the tobacco leaf mold detection method based on radial basis function dual optimization support vector machine (R-SVM) of the present invention shows significant advantages in terms of degree of automation, detection accuracy, real-time performance, integration, economic benefits and environmental protection, and is of great significance for improving tobacco leaf production and quality management of tobacco industry manufacturing enterprises. DETAILED DESCRIPTION

[0051] In this embodiment, a tobacco leaf mold detection method based on radial basis function dual optimization support vector machine R-SVM includes the following steps:

[0052] Step 1: Construct a tobacco leaf data sample set:

[0053] Step 1.1: Use a near-infrared spectrometer to scan the selected tobacco leaf samples, obtain the near-infrared spectrum wavelength feature data set of the tobacco leaf samples within the preset wavelength range, and perform preprocessing, including noise removal, smoothing, etc., to obtain the near-infrared spectrum wavelength feature data set X = {X1, X2, …, X i ,…X n}; where X i represents the near-infrared spectral wavelength characteristic data of the i-th tobacco leaf sample after preprocessing, 1≤i≤n, and X i ={X i1 ,X i2 ,…,X ij ,…X im}, 1≤j≤m, X ij represents the jth near-infrared spectrum wavelength characteristic value of the i-th tobacco leaf sample after pretreatment; n is the total number of tobacco leaf samples;

[0054] Get the mildew state Y = {Y1, Y2, ..., Y i ,…Y n}, where Y i Indicates the mildew state of the i-th tobacco leaf sample;

[0055] This step involves non-destructive testing of tobacco leaf samples using near-infrared spectroscopy, a technique that can quickly obtain information on the chemical composition of tobacco leaves without the need for chemical reagents.

[0056] The purpose of preprocessing is to improve data quality. For example, assuming that 100 tobacco leaves are selected as samples in this embodiment, each tobacco leaf is scanned within a wavelength range of 1000 to 2500 nanometers, and data is recorded every 10 nanometers, then each sample will have about 150 feature values.

[0057] Compared with traditional chemical analysis methods, the near-infrared spectrometer technology of the present invention can greatly save time and cost.

[0058] Step 1.2: Define and randomly initialize X ij The initial wavelength weight is M ij , thus obtaining X i The initial wavelength weight M i , and then the initial wavelength weight matrix M of the tobacco leaf sample is obtained; this step is the process of assigning an initial weight to each wavelength feature, and the weight reflects the importance of each feature.

[0059] For example, if each sample has 150 features, a 150-dimensional vector is initialized, and each element represents the initial weight of the corresponding feature. By setting the initial weight, the present invention can provide a starting point for the subsequent optimization process and help find the optimal solution.

[0060] Step 1.3: Use equation (1) to construct the objective function L of tobacco leaf mildew and solve it to obtain the optimal wavelength weight matrix M'={M'1,M'2,…,M' i ,…M' n}, where M' i Represents X i The optimal wavelength weight of:

[0061] (1)

[0062] In formula (1), Yes X i , λ is the regularization parameter, Regularizer is the regularization term, and this regularization helps to improve the generalization ability of the model;

[0063] The objective function L in this step aims to minimize the error while controlling the complexity of the weight matrix through the regularization term to avoid overfitting. Assuming λ is 0.01, it means that the model of the present invention is expected to be both accurate and concise.

[0064] Step 1.4: According to the optimal wavelength weight, i The near infrared spectrum wavelength characteristic values ​​in are sorted in descending order, and the first m' wavelength characteristic values ​​are selected as the optimal near infrared spectrum wavelength characteristic data X' of the i-th tobacco leaf sample i , thereby obtaining the optimal near-infrared spectral wavelength characteristic data of all tobacco leaf samples and forming the optimal near-infrared spectral wavelength characteristic data set X' ;in, represents the j'th optimal near-infrared spectral wavelength feature value of the i-th tobacco leaf sample; by sorting and selecting important features, the data dimension is reduced and the model is simplified. For example, if the first 30 features of each sample are finally selected, then m'= 30. Dimensionality reduction can accelerate model training and reduce the demand for computing resources.

[0065] Step 2: Construct a support vector machine R-SVM based on radial basis function dual optimization and determine the parameters of R-SVM;

[0066] Step 2.1: Use formula (2) to construct the objective function L1 of the support vector machine SVM for tobacco leaf mildew. This is a standard support vector machine optimization problem, and the goal is to minimize the error on the decision boundary:

[0067] (2)

[0068]

[0069] In formula (2), ω represents the normal vector of the hyperplane; b represents the bias term of the hyperplane, represents the slack variable matrix; represents the slack variable of the i-th tobacco leaf sample; C is the regularization parameter; It is a mapping operation from the original feature space to the high-dimensional feature space. In this embodiment, C = 10 is set, indicating that the present invention hopes to strike a balance between classification errors and model complexity. By adjusting the C value, the fault tolerance of the model can be controlled.

[0070] Step 2.2: By introducing Lagrange multipliers, the optimization process is simplified by converting it into a dual problem. Dual optimization can handle nonlinear problems and is easier to converge.

[0071] Formula (3) is used to construct the dual optimized objective function L2 of R-SVM for tobacco leaf mildew, and then the optimal Lagrange multiplier for the i-th tobacco leaf sample is obtained. :

[0072] (3)

[0073]

[0074] In formula (3), yes The Lagrange multiplier of represents the Lagrange multiplier matrix; is a kernel function based on the radial basis function. represents the optimal near-infrared spectral wavelength characteristic data of the sth tobacco leaf sample; yes The Lagrange multiplier of ; express Mildew state.

[0075] Step 2.3: Use equation (4) to calculate the optimized bias term d to ensure that the decision boundary is correct;

[0076] (4)

[0077] In formula (4), express The optimal Lagrange multiplier of ; in this embodiment, the bias term finally calculated is 0.5, which adjusts the initial position of the decision boundary.

[0078] Step 3: Gene X', train the R-SVM to obtain the trained tobacco leaf mildew detection model, so as to The trained tobacco leaf mold detection model is input for processing, and the new sample is obtained using formula (5) The predicted class label of , so that new tobacco leaf samples can be tested in real time to ensure product quality.

[0079] (5)

[0080] In formula (5), Represents a symbolic function.

[0081] After the new sample X_new is processed by the model, if the prediction result is 1, it means moldy, otherwise, it means normal;

[0082] In order to verify the effectiveness of the model, the accuracy, recall rate, F1 score and other indicators of the model were evaluated by cross-validation. The experimental results show that the accuracy of the model on the test set reaches 96.54%, indicating that the method of the present invention has high accuracy and practicality.

[0083] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0084] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.

Claims

1. A tobacco leaf mildew detection method based on radial basis function dual optimization support vector machine R-SVM, characterized in that: The following steps are involved: Step 1: Construct a tobacco leaf data sample set: Step 1.1: Use a near-infrared spectrometer to scan the selected tobacco leaf samples, obtain the near-infrared spectral wavelength feature data set of the tobacco leaf samples within the preset wavelength range, and preprocess them to obtain the near-infrared spectral wavelength feature data set X = {X1, X2, …, X i ,…X n }; where X i represents the near-infrared spectral wavelength characteristic data of the i-th tobacco leaf sample after preprocessing, 1≤i≤n, and X i ={X i1 ,X i2 ,…,X ij ,…X im }, 1≤j≤m, X ij represents the jth near-infrared spectrum wavelength characteristic value of the i-th tobacco leaf sample after pretreatment; n is the total number of tobacco leaf samples; Get the mildew state Y = {Y1, Y2, ..., Y i ,…Y n }, where Y i Indicates the mildew state of the i-th tobacco leaf sample; Step 1.2: Define and randomly initialize X ij The initial wavelength weight is M ij , thus obtaining X i The initial wavelength weight M i , and then the initial wavelength weight matrix M of the tobacco leaf sample is obtained; Step 1.3: Use equation (1) to construct the objective function L of tobacco leaf mildew and solve it to obtain the optimal wavelength weight matrix M'={M'1,M'2,…,M' i ,…M' n }, where M' i Represents X i The optimal wavelength weight of: (1) In formula (1), Yes X i The mean of , λ is the regularization parameter, and Regularizer is the regularization term; Step 1.4: According to the optimal wavelength weight, i The near infrared spectrum wavelength characteristic values ​​in are sorted in descending order, and the first m' wavelength characteristic values ​​are selected as the optimal near infrared spectrum wavelength characteristic data X' of the i-th tobacco leaf sample i , thereby obtaining the optimal near-infrared spectral wavelength characteristic data of all tobacco leaf samples and forming the optimal near-infrared spectral wavelength characteristic data set X' ;in, represents the j'th optimal near-infrared spectrum wavelength characteristic value of the i-th tobacco leaf sample; Step 2: Construct a support vector machine R-SVM based on radial basis function dual optimization and determine the parameters of R-SVM; Step 2.1: Use formula (3) to construct the dual optimized objective function L2 of R-SVM for tobacco leaf mildew, and solve it to obtain the optimal Lagrange multiplier for the i-th tobacco leaf sample: : (3) In formula (3), yes The Lagrange multiplier of represents the Lagrange multiplier matrix; is a kernel function based on the radial basis function. represents the optimal near-infrared spectral wavelength characteristic data of the sth tobacco leaf sample; yes The Lagrange multiplier of ; express The moldy state; Step 2.2: Calculate the optimized bias term d using equation (4); (4) In formula (4), express The optimal Lagrange multiplier of ; Step 3: Gene X', train the R-SVM to obtain the trained tobacco leaf mildew detection model, so as to The trained tobacco leaf mold detection model is input for processing, and the new sample is obtained using formula (5) The predicted class label of : (5) In formula (5), Represents a symbolic function.

2. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the tobacco leaf mildew detection method using the support vector machine R-SVM according to claim 1, and the processor is configured to execute the program stored in the memory.

3. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the tobacco leaf mildew detection method using the support vector machine R-SVM of claim 1 are executed.