Wheat stinking smut infection degree detector and method based on array type gas sensor and deep learning
By using array gas sensors and deep learning technology, a portable wheat bunt detection instrument was constructed, which solved the problems of low efficiency and high cost of wheat bunt detection and achieved fast, convenient and accurate disease detection.
Patent Information
- Application Number
- CN202510642730.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-09-19
AI Technical Summary
Existing technologies make it difficult to achieve rapid, convenient and accurate detection of wheat bunt. Traditional methods are inefficient and costly, and cannot meet real-time detection needs.
A portable detection instrument was constructed by combining array gas sensors with deep learning technology. The gas sensors collected volatile gas characteristics and used deep learning models to classify disease levels. The sample pretreatment steps were simplified, and the trimethylamine content was determined by combining the HS-SPME-GC-MS method to construct a grading model for the degree of wheat bunt infection.
It achieves rapid, convenient and accurate detection of the infection degree of wheat bunt, reduces the detection cost and the technical requirements for operators, and is suitable for rapid field screening and large-scale disease monitoring.
Smart Images

Figure CN120668728A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of grain storage and quality detection, and specifically relates to an instrument and method for detecting the infection degree of wheat bunt based on an array gas sensor and deep learning. Background Art
[0002] Wheat, a key crop in China, is widely cultivated nationwide. Wheat bunt is a common disease affecting wheat cultivation. This fungal disease, caused by the fungus Tinderella, produces an odor similar to rotting fish, significantly impacting wheat quality and yield, with severe yield reductions reaching 50%. The pathogen can cause cross-contamination during storage and processing, impacting the quality and safety of flour and related foods. Therefore, establishing efficient and accurate detection methods during wheat procurement, storage, and processing is crucial for rapid screening, quality grading, market regulation, and food security for bunt-infected wheat.
[0003] Traditional wheat detection methods, which rely on experienced experts to identify the type and severity of wheat disease, are inefficient and prone to misclassifying mildly diseased kernels from healthy kernels. They are also unsuitable for accurate diagnosis of the disease. Furthermore, trimethylamine released by bunt-infected kernels can cause acute poisoning if inhaled. Consequently, modern research focuses on detecting bunt-infected wheat kernels using molecular biology techniques, such as PCR and ELISA. However, these methods are primarily limited to laboratory-based scientific analysis and, due to their complex operational procedures, are difficult to implement in the field. Furthermore, these methods require expensive instrumentation and equipment, which limits the ability to generate large amounts of test data. Consequently, current methods for detecting bunt in wheat have certain limitations.
[0004] In recent years, researchers have used headspace solid phase microextraction (HS-SPME) combined with gas chromatography-mass spectrometry (GC-MS) technology to detect the trimethylamine content (TMA) in wheat grains to assess the condition. However, the instruments used in gas chromatography-mass spectrometry are large and expensive, require professional technicians to operate, and the detection time is long, which cannot achieve the effect of real-time detection. With the continuous development of sensor technology, array gas sensors have shown significant advantages in the field of large-scale food quality testing due to their low cost and simplified operating procedures. After obtaining gas information, researchers usually use machine learning algorithms to analyze the data. For example, Chinese patent CN202411179933.1 discloses a grain grain mold detector based on a gas sensor array. Its method mainly uses LDA (linear discriminant analysis) to classify the mold grade. This method is based on the extraction and analysis of linear features, and detects marker volatile gases produced by mold growth during grain storage. The present invention aims to characterize the volatile gases released by wheat bunt-infected kernels during storage and processing. By introducing a deep learning framework and combining it with nonlinear spatiotemporal feature extraction, an adaptive, high-precision, fast and efficient detection instrument and method are proposed. Combined with the design of an array gas sensor, efficient feature extraction of complex gas response signals and accurate classification of bunt infection levels are achieved. Summary of the Invention
[0005] The purpose of this invention is to use array gas sensor technology to build a portable wheat bunt infection degree detection instrument, use deep learning technology to detect bunt disease in a batch of wheat grains in a cost-effective manner, and based on this, establish a wheat bunt infection degree grading model so that non-professionals can quickly understand the test results and take corresponding measures.
[0006] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] On the one hand, the present invention provides a wheat bunt infection degree detector based on an array gas sensor, which includes a box body, a sample collection mechanism is installed on the top of the box body, and a sensor mechanism, a control mechanism, a drive mechanism and a power supply mechanism are arranged inside the box body;
[0008] The sample collection mechanism includes a sample heating platform and a sample collection chamber;
[0009] The sensor mechanism includes a vacuum air pump, a sensor air chamber, an activated carbon filter, a gas flow controller, and an array gas sensor. The array gas sensor is disposed in the sensor air chamber. An activated carbon filter and a gas flow controller are installed on one side of the sensor air chamber and connected to the vacuum air pump via an inserted trachea. A trachea insertion hole is provided on the other side of the sensor air chamber. The trachea insertion hole enables gas flow between the sample collection chamber and the array gas sensor by inserting a trachea.
[0010] The control mechanism includes a core processing unit, and the core processing unit is connected to the array gas sensor through a GPIO interface;
[0011] The driving mechanism includes a motor drive, which is used to control the working state of the vacuum air pump.
[0012] Furthermore, the sample heating table adopts a temperature-controlled and adjustable heating plate, the external insulation material is silicone rubber coated glass fiber cloth, the internal heating element is nickel-chromium alloy, and it is equipped with an OLED digital display to transmit temperature information and is connected to the control mechanism through a relay to obtain electrical energy.
[0013] Furthermore, four legs are installed at the bottom of the box, and a half-open door is provided on one side of the box to facilitate the configuration of the hardware and layout inside the box. A trachea insertion hole is provided on the other side, which is connected to the tube hole on the sample collection chamber by inserting a PU trachea.
[0014] Furthermore, the sensor chamber is provided with an array gas sensor formed by 8 metal oxide sensors for collecting volatile gases from wheat bunt grains with different disease levels. The names of the sensors are: MQ-135, MQ-3, MQ-131, MQ-2, MQ-141, MQ-138, MQ-140, MQ-136; the array gas sensor communicates with the control mechanism through the analog-to-digital conversion module ADS1256.
[0015] Furthermore, the control mechanism is provided with a main power switch, a drive mechanism switch and an array gas sensor switch, which are used to flexibly control the power supply of each module. At the same time, the control mechanism uses the STM32F103RCT6 chip as the core processing unit, and is equipped with a network communication device ESP-01S, a Bluetooth communication device HC-05 and an OLED display device. The network communication device and the Bluetooth communication device are used to send the data collected by the sensor to the host computer unit for data communication in different occasions. After receiving the prediction results or instructions from the host computer, the information is displayed to the operator through the OLED display device.
[0016] Furthermore, the driving structure adopts an L298N motor driving module, whose power line is connected to the vacuum air pump via DC12V, and is connected to the control mechanism via a relay to obtain electrical energy.
[0017] Furthermore, the power supply mechanism adopts a 12V battery, and its power line is connected to the control mechanism through an XT30 interface to supply power to the entire instrument.
[0018] On the other hand, the present invention also provides a method for detecting the infection degree of wheat bunt based on deep learning, which comprises the following steps:
[0019] S1. using the apparatus of claim 1 to collect sensor response data of wheat samples with different infection levels;
[0020] S2. Determine the trimethylamine (TMA) content of wheat samples using headspace solid phase microextraction-gas chromatography-mass spectrometry (HS-SPME-GC-MS) and use the measured TMA concentration as a reference for disease severity.
[0021] S3. Based on the distribution of TMA content, wheat samples were divided into three categories: healthy, mildly infected, and severely infected. The sensor response signal was used as the model input, and the disease level corresponding to the TMA measurement value was used as the model label to construct a data set.
[0022] S4. Establish a wheat bunt infection degree grading model based on a deep learning framework;
[0023] S5: Collect the gas sensor response data of the wheat sample to be tested and input it into the trained prediction model. The model automatically determines the severity of the disease and outputs the classification result (healthy, mildly infected, severely infected).
[0024] Furthermore, the instrument collection step in step S1 includes:
[0025] S11. Sample pretreatment: Before gas collection, wheat samples must be pretreated as necessary. Specifically, dust, impurities, and debris on the wheat surface must be removed to prevent external contaminants from affecting sensor measurements. Samples must be picked with sterile tweezers to avoid secondary contamination from hand contact. The treated wheat samples must then be placed in a sealed testing environment and maintained at an appropriate temperature to promote the release of volatile gases and provide a stable gas environment for subsequent sensor collection.
[0026] S12. Sensor baseline calibration: Before formally collecting gas response signals, perform baseline calibration and environmental cleaning on the array gas sensor; clean the sensor chamber with an activated carbon filter or clean air to remove any residual background gas; set the zero time to ensure that the sensor is in a stable initial state to improve the accuracy and repeatability of signal acquisition;
[0027] S13. Gas signal acquisition: Array-type gas sensors are used to monitor volatile gases released from wheat samples in real time and record the sensor response signals. During the sampling process, sensor data is continuously collected and the dynamic changes of gas signals are analyzed, including parameters such as response time, signal amplitude, and stability, to ensure that effective gas characteristic information is obtained.
[0028] S14. Data storage: After data collection is completed, the original signal recorded by the sensor is stored and the data format is converted for subsequent modeling and analysis; at the same time, the sensor air chamber is cleaned using a filter device or clean air to remove residual gas and ensure that the detection environment is restored to its initial state, providing stable reference conditions for the next measurement.
[0029] Furthermore, the headspace solid phase microextraction-gas chromatography-mass spectrometry method in step S2 specifically includes:
[0030] S21. Sample preparation: Take an appropriate amount of the sample to be tested and place it in a sealed headspace bottle, ensuring a good seal to reduce the loss of volatile compounds;
[0031] S22, headspace extraction: Under constant temperature conditions, use an appropriate type of solid phase microextraction (SPME) fiber inserted into the headspace vial and exposed to sample volatiles for a certain period of time to allow the target compound to adsorb to the extraction fiber;
[0032] S23, thermal desorption: insert the extracted SPME fiber into the gas chromatography (GC) inlet and perform thermal desorption at high temperature to allow the target compound to enter the gas chromatography column for separation;
[0033] S24, gas chromatography separation: using a suitable chromatographic column and setting a temperature program to achieve separation of the target compound;
[0034] S25. Mass spectrometry detection: Detection was performed using a mass spectrometer (MSD) in electron impact (EI) mode, and compound identification was performed using a database or standards.
[0035] S26. Data analysis: Perform peak area integration on the data obtained by GC-MS, quantitatively analyze the content of target compounds based on the standard curve, and perform compound matching and identification.
[0036] Furthermore, the wheat bunt infection degree grading model established in step S4 includes:
[0037] S41, data input layer: standardizes the raw data collected by the gas sensor, including baseline correction, normalization and denoising operations to ensure data consistency and reduce noise interference;
[0038] S42. Multi-scale convolutional feature extraction layer: This layer employs a multi-scale convolutional fusion strategy, using one-dimensional convolution kernels of different sizes (1×1, 3×1, and 5×1) to extract local and global features of the gas sensor signal. The convolution outputs of the three different scales are concatenated to form a multi-scale gas feature representation.
[0039] S43, Feature Attention Layer: To enhance the expressiveness of key features, the model introduces three feature attention mechanisms: Peak Feature Attention Mechanism (PFAM), Integral Feature Attention Mechanism (IFAM), and Fixed Average Feature Attention Mechanism (AFAM). Finally, the Sigmoid activation function is used to adjust the attention weights and perform weighted processing on the original multi-scale gas features.
[0040] S44: Output layer: The weighted features are subjected to global average pooling to reduce the feature dimension while retaining key information; then, they are flattened and input into the fully connected layer (FC) to establish a nonlinear mapping relationship between the features and the degree of infection; finally, the output layer uses the Softmax activation function to achieve classification prediction of wheat bunt, including three categories: healthy, mildly infected, and severely infected.
[0041] In summary, the present invention provides a portable nondestructive wheat bunt detection instrument and detection method based on gas sensors and deep learning. It can use deep learning and gas sensing technology to quickly, conveniently, and accurately detect the infection level of wheat bunt. This method can analyze the volatile gas characteristics of wheat in real time without destroying the wheat sample, and output the disease assessment results in combination with an intelligent analysis model. The overall system structure is compact, the detection equipment is portable, and it is suitable for rapid field screening and large-scale disease monitoring, providing efficient technical support for early warning and prevention and control of wheat diseases.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] (1) No need for complex pretreatment: Traditional sample pretreatment steps such as grinding and filtering are omitted in the present invention. The wheat grains only need to be placed in a sealed air chamber to start the test. No chemical reagents or complex physical treatment are required, which speeds up the entire detection process and reduces the risk of possible contamination.
[0044] (2) Cost-effectiveness and practicality: The design of this instrument takes cost-effectiveness and practicality into consideration. The components used in the instrument are all low-priced and easily available conventional products, ensuring the economy of procurement. At the same time, the portable design makes the instrument easy to use in the field, and the simplified operating process reduces the technical requirements for operators and reduces training costs.
[0045] (3) Efficient feature extraction and lightweight computation: To address the limitations of traditional machine learning methods in processing high-dimensional nonlinear data, this paper uses deep learning technology to adaptively extract key gas features related to wheat bunt through multi-scale convolution and attention mechanisms, effectively enhancing feature representation capabilities and reducing interference from irrelevant information. Compared to traditional methods, the algorithm used in this paper not only improves detection accuracy but also reduces computational costs through a lightweight network architecture, enabling efficient operation on portable devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic structural diagram of the main components of the instrument of the present invention;
[0047] Figure 2 This is one of the schematic diagrams of the three-dimensional structure of the instrument of the present invention;
[0048] Figure 3 This is the second schematic diagram of the three-dimensional structure of the instrument of the present invention;
[0049] Figure 4 It is a working principle diagram of the instrument system of the present invention;
[0050] Figure 5 Schematic diagram of the process of the wheat bunt kernel detection method based on deep learning of the present invention;
[0051] Figure 6 Schematic diagram of the structure of the wheat bunt kernel detection model based on deep learning of the present invention;
[0052] Figure 7 Schematic diagram of the structures of the PFAM, IFAM, and AFAM modules of the invented deep learning-based wheat bunt kernel detection method;
[0053] Explanation of the accompanying drawings: 1-trachea insertion hole, 2-sensor air chamber, 3-OLED display device, 4-main power switch, 5-array gas sensor power switch, 6-driving mechanism power switch, 7-motor drive, 8-battery, 9-gas flow controller, 10-activated carbon filter, 11-support foot, 12-vacuum air pump, 13-air inlet, 14-air outlet, 15-array gas sensor, 16-sample collection chamber, 17-sample heating table, 18-box, 19-half-open door. DETAILED DESCRIPTION
[0054] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Example 1
[0056] See Figures 1 to 4 A wheat bunt infection degree detector based on array gas sensors and deep learning includes a box body, a sample collection chamber above the box body, a half-open door device on the side of the box body, and a control mechanism, a drive mechanism, a power supply mechanism, and a sensor mechanism inside the box body, wherein:
[0057] (1) Control mechanism
[0058] The control mechanism is located on the left side of the interior of the box. It uses an STM32F103RCT6 chip as its core processing unit and is connected to an array gas sensor 15 via a GPIO interface. The sensor's operating state is switched via an array gas sensor power switch 5. The array gas sensor 15 absorbs volatile gases from wheat grains and acquires data through an analog-to-digital converter (ADS1256) connected to the STM32F103RCT6 chip. The collected data is uploaded to the host computer unit for analysis via an internal network communication device ESP-01S, enabling data transmission between the host computer and the system. A Bluetooth communication device HC-05 is also included to enable remote application-side device control of the system. An OLED display device 3 is also included to display analysis results returned by the cloud server in real time. The control mechanism also features a main power switch 4 and a drive mechanism power switch 6, providing centralized control and management of the entire system's power supply, allowing operators to quickly start or shut down the device.
[0059] (2) Cabinet
[0060] The enclosure 18 features a trapezoidal design, which provides a larger interior space and improved stability, while also facilitating easy operation of the control mechanisms. A semi-opening door 19 on one side of the enclosure allows for easy access to the interior for hardware installation, adjustment, and maintenance, significantly enhancing the instrument's user-friendliness and maintenance efficiency. Four supports 11 are installed at the bottom of the enclosure, ensuring stability on uneven surfaces, whether in the laboratory or in the field, preventing vibration and movement caused by operation or environmental factors, thereby ensuring accuracy and repeatability during testing.
[0061] (3) Power supply mechanism
[0062] The power supply mechanism is located on the right side inside the box, close to the half-open door device 19, and uses a 12V battery to provide power for the device in different scenarios. This structural design allows the battery to be charged without removing it, thereby effectively protecting the safety of the internal circuits of the device. The battery 8 is connected to the control mechanism through the XT30 interface, ensuring a stable supply of power and a quick response. In addition, the design of the interface also takes user safety into consideration to prevent the risk of incorrect plugging and unplugging and short circuits. In order to facilitate battery charging, the battery 8 is equipped with a DC12V power input, and the user can directly charge the battery through the equipped DC female plug. This charging method increases the convenience of charging and improves the applicability and flexibility of the device in outdoor environments.
[0063] (4) Driving mechanism
[0064] The control mechanism houses the drive mechanism, which uses an L298N motor driver module (i.e., motor driver 7). The power cord is connected to the vacuum pump 12 via a DC12V power supply to control its operation. The drive mechanism receives power from the control mechanism via a relay, ensuring a stable and secure power supply.
[0065] (5) Sensor mechanism
[0066] The sensor mechanism includes a vacuum air pump 12, a sensor air chamber 2, an activated carbon filter 10, a gas flow controller 9, and an array gas sensor 15. An air inlet 13 and an air outlet 14 are located at the top of the vacuum air pump 12. The air inlet is responsible for introducing ambient air into the sealed sensor air chamber 2, while the air outlet is responsible for discharging volatile gases from the sensor air chamber 2 to the outside environment, making this structural design suitable for a variety of applications. The sensor air chamber is closely attached to the inner wall of the housing 18, providing protection for the housing. Its data cable is connected to the GPIO port of the control chip through a reserved threading hole at the bottom of the sensor air chamber. This layout enables the array gas sensor 15 to effectively measure parameters. The spacing between adjacent sensors is 5mm, ensuring uniform distribution among the array gas sensors. This layout helps improve the sensor's sampling efficiency and response speed for wheat volatile gases, thereby enhancing the accuracy and reliability of data acquisition. A gas flow controller 9 is installed on the right side of the sensor air chamber to adjust the collection or cleaning speed of the vacuum air pump 12, achieving extraction of sample volatile gases and cleaning of the sensor air chamber. In addition, an activated carbon filter 10 is installed on the outside of the gas flow controller 9. Inserting the access PU air pipe into the activated carbon filter 10 and connecting it to the air outlet 14 of the vacuum air pump 12 can provide a hardware basis for cleaning the sensor air chamber 2 before measurement; inserting the access PU air pipe into the activated carbon filter 10 and connecting it to the air inlet 13 of the vacuum air pump 12 can provide a hardware basis for the detection data acquisition process.
[0067] (6) Sample collection agency
[0068] The sample collection mechanism includes a sample collection chamber 16 and a sample heating platform 17, wherein the top of the sample collection chamber 16 can be connected to the air pipe insertion hole 1 on the side of the box by inserting a PU air pipe, thereby realizing the connection between the sample to be tested and the sensor air chamber 2, ensuring the sealing of the sample gas and avoiding environmental interference. The heating surface of the sample heating platform 17 is an ultra-thin planar heating element with a conventional thickness of 1.5mm to 2mm. The external insulation material is silicone rubber coated glass fiber cloth, the internal heating element is nickel-chromium alloy, and it is equipped with an OLED digital display device to realize a temperature-controlled and adjustable heating function. The heating area is 36 square centimeters, the heating power does not exceed 15W, and the power cord is connected to the control mechanism through a relay to obtain basic power.
[0069] Example 2
[0070] Based on the same inventive concept, the present invention also provides a method for detecting the infection degree of wheat bunt based on deep learning. The method flow is shown in Figure 5 , the method comprising:
[0071] S1. Use the instrument to collect sensor response data of wheat samples with different infection levels;
[0072] S2. Determine the trimethylamine (TMA) content of wheat samples using headspace solid phase microextraction-gas chromatography-mass spectrometry (HS-SPME-GC-MS) and use the measured TMA concentration as a reference for disease severity.
[0073] S3. Based on the distribution of TMA content, wheat samples were classified into three categories: healthy, mildly infected, and severely infected. A dataset was constructed using the sensor response signal as the model input and the disease level corresponding to the TMA measurement value as the model label.
[0074] S4. Based on the deep learning framework, a wheat bunt infection degree grading model is established, where the input is the gas sensor response signal and the output is the disease level. In this embodiment, the establishment of the wheat bunt infection degree grading model specifically includes the following sub-steps:
[0075] S41: The original gas is calculated using convolution kernels of different scales (1×1, 3×1, 5×1), and the generated characteristic information structure is represented as X i ∈Y i C×T×S , where C is the dimension of the gas information channel, S is the number of sensors, and i represents the scale of the convolution kernel. The feature information generated after the three scale convolutions is then concatenated. F represents the multi-scale gas feature information generated after concatenation. Its calculation formula is:
[0076] F=Concatenate(Y1,Y3,Y5)
[0077] S42: Extract key points from the generated feature information F based on the feature attention module. The extracted key features can be expressed as F peak , F integral , F average Each sensor channel is processed using depthwise convolution (with a kernel size of 1×S), and the output results are denoted as F′. peak , F′ integral , F′ average One-dimensional convolution (convolution kernel size is 3) and linear activation function are used to fuse cross-channel information, and the output results are expressed as W peak , W integral , W average The calculation results are added element-wise, the channel weights are updated using the Sigmoid activation function, and the updated weight parameters are multiplied element-wise with the original multi-scale gas features. The calculation formula is as follows:
[0078] W′=δ(W peak +W integral +W average )×F
[0079] S43: The final weight parameter W′ is subjected to one-dimensional global average pooling. The pooled result is then flattened to form a one-dimensional data structure. Finally, a fully connected layer (FC) with 128 neurons is used to establish a complex nonlinear mapping relationship between the feature space and the label, thus constructing a prediction model.
[0080] The calculation formulas of the three different attention mechanisms in the feature attention module in this embodiment are as follows:
[0081]
[0082] Where x(t) represents the sensor response value at time t, W represents the sliding window length of the peak feature extraction algorithm. To ensure that significant peaks can be captured in a dynamically changing environment, this paper selects a window length of 3 seconds. Peak features are screened by comparing the response value at the current time t with the response values within 1 second before and after it. T represents the total duration of the gas sample used for subsequent training tasks, and t′ represents the starting time for calculating the mean of the stable moment.
[0083] S5: During the detection phase, the gas sensor response data of the wheat sample to be tested is collected and input into the trained prediction model. The model automatically determines the severity of the disease and outputs the classification result (healthy, mildly infected, severely infected).
[0084] For ease of understanding, the specific testing process will be explained using the example of testing the infection level of bunt kernels in a group of wheat samples:
[0085] The wheat grain samples used in this embodiment were all from the Nanjing Product Quality Supervision and Inspection Institute. The variety was Yangmai 16, and the grain infection pathogen was Tilletia tritici. They were collected in Zhangjiagang City, Jiangsu Province in June 2022. A total of 900 wheat samples were collected, each weighing 10 g.
[0086] The above-mentioned instrument is used to collect gas response signal data for the wheat sample to be tested: the experiment is carried out at room temperature (25°C), the main power switch 4 is turned on, the air outlet 14 of the vacuum air pump is connected to the activated carbon filter 10, the drive mechanism switch 6 is turned on, the sensor self-cleaning time is 100 seconds, and the zeroing time is 10 seconds to ensure the purity of the gas inside the sensor chamber 2 before detection and prevent external contamination from affecting the detection results. After the sensor self-cleaning is completed, the drive mechanism switch 6 is turned off. The wheat sample is placed, the sample heating table 17 is turned on, the temperature control is set to 40 degrees Celsius, and the sample collection chamber is connected to the air pipe insertion hole 1 on the outside of the box using a PU air tube. The sample heating preparation time is 10 seconds. Turn on the array gas sensor power switch 5, and at the same time connect the air inlet 13 of the vacuum air pump to the activated carbon filter 10, turn on the drive mechanism switch 6 to control the vacuum air pump to inhale, the injection flow rate is 300mL / min, and the analysis sampling time is 120 seconds. After the test is completed, the operator turns off the array gas sensor power switch 5, the drive mechanism power switch 6, and the main power switch 4 in sequence to ensure that the equipment is completely powered off. In this experiment, a total of 900 sets of gas response signal data for wheat volatile gas samples were collected.
[0087] Trimethylamine content was determined using headspace solid-phase microextraction-gas chromatography-mass spectrometry (HS-SPME-GC-MS). Each wheat sample infected with wheat bunt was pulverized and mixed, and approximately 5 g (±0.001 g) of grain powder was weighed, sealed in a polyethylene plastic bag, and stored frozen in a -18°C freezer. A total of 900 wheat grain powder samples were prepared. During sample pretreatment, 5 g of wheat grain powder was placed in a 50 mL plastic centrifuge tube, 20 mL of 5% trichloroacetic acid solution was added, and vortex mixing was performed for 2 minutes. The sample was then ultrasonically extracted in an ice-water bath for 10 minutes, followed by centrifugation at 6000 rpm for 5 minutes. The supernatant was transferred to a 50 mL volumetric flask. The residue was extracted twice with 15 mL and 10 mL of 5% trichloroacetic acid solution, respectively. The supernatants were combined and the volume was adjusted to 50 mL to prepare the extract. Add 5.0 mL of 50% sodium hydroxide solution and 2 mL of the extract to a headspace vial, seal, and shake thoroughly until ready for use. To prepare the quantitative calibration standard curve, weigh 0.0162 g of trimethylamine hydrochloride, dissolve it in 5% trichloroacetic acid solution, and dilute to 100 mL to prepare a 100 μg / mL trimethylamine standard stock solution. Store at 4°C. Prepare trimethylamine standard solutions at concentrations of 0.01 μg / mL, 0.02 μg / mL, 0.05 μg / mL, 0.1 μg / mL, 0.2 μg / mL, and 0.4 μg / mL by serial dilution with 5% trichloroacetic acid solution. For headspace solid-phase microextraction coupled with gas chromatography-mass spectrometry analysis, set the gas chromatography conditions to high-purity helium as the carrier gas at a flow rate of 1.00 mL / min, and the injector and transfer line temperatures to 220°C and 230°C, respectively. The heating program is: keep at 40 ° C for 3 minutes, then heat to 220 ° C at 30 ° C / min, and keep for 20 minutes. The mass spectrometry conditions are set to electron energy 70eV, ion source temperature 230 ° C, mass scan range 35-1000m / z, and full scan mode (Scan). After the sample is equilibrated at 40 ° C for 40 minutes, the volatile substances are absorbed by the solid phase microextraction fiber head for 2.5 minutes, and then inserted into the injection port for analysis. It is desorbed at 220 ° C for 2 minutes and kept at 250 ° C for 5 minutes. The ion monitoring (SIM) mode is used for quantitative determination. The content of trimethylamine is calculated by the external standard method. The standard curve is drawn, and the peak area of trimethylamine in the standard solution is used as the horizontal coordinate and the concentration as the vertical coordinate. The concentration of trimethylamine in the sample is calculated using the calibration curve. Finally, the content of trimethylamine in the sample is calculated according to the following formula:
[0088]
[0089] X1: TMA content in the sample, in milligrams per kilogram (mg / kg), obtained for 900 wheat samples; c represents the TMA concentration obtained from the calibration curve, in milligrams per milliliter (μg / mL); V represents the volume of the sample solution, in milliliters (mL); m represents the mass of the sample, in grams (g).
[0090] Based on the TMA content determination results, wheat samples were divided into three categories: healthy (TMA content ≤ 2800 ng / g), mildly infected (TMA content 2800–5800 ng / g), and severely infected (TMA content ≥ 5800 ng / g).
[0091] according to Figure 6 A deep learning network model was constructed. During the training process of this embodiment, the training set, validation set, and test set were divided into a ratio of 6:2:2. The ratio of the three types of wheat samples in the data set, namely healthy, mildly infected, and severely infected, was 1:1:1, ensuring that the number of samples in each category exceeded 100 groups. During the model training phase, the number of epochs was set to 300, the batch size was set to 40, and the initial learning rate was set to 0.001. Before model training, data normalization was performed to ensure the consistency of the convolution parameter distribution. In addition, to reduce the risk of overfitting, this embodiment adopted an L2 regularization strategy, in which the L2 regularization penalty coefficient was set to 0.01 and the Adam optimizer was selected for weight update and parameter optimization.
[0092] After the model training is completed, the gas sensor response data of the wheat sample to be tested can be input into the deep learning model. The model will analyze the characteristics of the sensor response signal and combine the gas response patterns of samples with different infection levels learned during the training process to directly predict the disease level of wheat bunt (healthy, mildly infected, severely infected), thereby realizing real-time, non-destructive, and high-precision automatic detection of wheat bunt disease levels.
[0093] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the scope of protection of the present invention in any form. All technical solutions obtained by equivalent substitution, etc., fall within the scope of protection of the present invention. Parts not covered by the present invention are the same as the existing technology or can be implemented using existing technology.
Claims
1. A wheat bunt infection degree detector based on an array gas sensor, characterized in that: It includes a box body, a sample collection mechanism is installed on the top of the box body, and a sensor mechanism, a control mechanism, a drive mechanism and a power supply mechanism are arranged inside the box body; The sample collection mechanism includes a sample heating platform and a sample collection chamber; The sensor mechanism includes a vacuum air pump, a sensor air chamber, an activated carbon filter, a gas flow controller, and an array gas sensor. The array gas sensor is disposed in the sensor air chamber. An activated carbon filter and a gas flow controller are installed on one side of the sensor air chamber and connected to the vacuum air pump via an inserted trachea. A trachea insertion hole is provided on the other side of the sensor air chamber. The trachea insertion hole enables gas flow between the sample collection chamber and the array gas sensor by inserting a trachea. The control mechanism includes a core processing unit, and the core processing unit is connected to the array gas sensor through a GPIO interface; The driving mechanism includes a motor drive, which is used to control the working state of the vacuum air pump.
2. The wheat bunt infection degree detector based on an array gas sensor according to claim 1, characterized in that: The sample heating table adopts a temperature-controlled and adjustable heating plate. The external insulation material is silicone rubber coated with glass fiber cloth, the internal heating element is nickel-chromium alloy, and it is equipped with an OLED digital display to transmit temperature information and obtain electrical energy through a relay connected to the control mechanism.
3. The wheat bunt infection degree detector based on array gas sensor according to claim 1, characterized in that: Four legs are installed at the bottom of the box, and a half-open door is provided on one side of the box to facilitate the configuration of the hardware and layout inside the box. A trachea insertion hole is provided on the other side, which is connected to the tube hole on the sample collection chamber by inserting a PU trachea.
4. The wheat bunt infection degree detector based on an array gas sensor according to claim 1, characterized in that: The sensor chamber is provided with an array gas sensor formed by 8 metal oxide sensors for collecting volatile gases from wheat bunt grains with different disease levels. The sensor names are: MQ-135, MQ-3, MQ-131, MQ-2, MQ-141, MQ-138, MQ-140, MQ-136; the array gas sensor communicates with the control mechanism through the analog-to-digital conversion module ADS1256.
5. The wheat bunt infection degree detector based on array gas sensor according to claim 1, characterized in that: The control mechanism is equipped with a main power switch, a drive mechanism switch and an array gas sensor switch for flexibly controlling the power supply of each module. At the same time, the control mechanism uses the STM32F103RCT6 chip as the core processing unit, and is equipped with a network communication device ESP-01S, a Bluetooth communication device HC-05 and an OLED display device. The network communication device and the Bluetooth communication device are used to send the data collected by the sensor to the host computer unit for data communication in different occasions. When the prediction results or instructions from the host computer are received, the information is displayed to the operator through the OLED display device.
6. The wheat bunt infection degree detector based on array gas sensor according to claim 1, characterized in that: The driving structure adopts the L298N motor driving module, whose power line is connected to the vacuum air pump via DC12V, and is connected to the control mechanism through a relay to obtain electrical energy; the power supply mechanism adopts a 12V battery, and its power line is connected to the control mechanism through an XT30 interface to supply electrical energy to the entire instrument.
7. A method for detecting wheat bunt infection degree based on deep learning, characterized in that: The steps include: S1. using the apparatus of claim 1 to collect sensor response data of wheat samples with different infection levels; S2. Use headspace solid phase microextraction-gas chromatography-mass spectrometry to determine the trimethylamine content of wheat samples, and use the measured TMA concentration as a reference for the severity of the disease; S3. Based on the distribution of TMA content, wheat samples were divided into three categories: healthy, mildly infected, and severely infected. The sensor response signal was used as the model input, and the disease level corresponding to the TMA measurement value was used as the model label to construct a data set. S4. Establish a wheat bunt infection degree grading model based on a deep learning framework; S5: Collect the gas sensor response data of the wheat sample to be tested and input it into the trained prediction model. The model automatically determines the severity of the disease and outputs the classification result.
8. The method for detecting the infection degree of wheat bunt based on deep learning according to claim 7, characterized in that: The acquisition step of the instrument in step S1 includes: S11. Sample pretreatment: Before gas collection, wheat samples must be pretreated as necessary. Specifically, dust, impurities, and debris on the wheat surface must be removed to prevent external contaminants from affecting sensor measurements. Samples must be picked with sterile tweezers to avoid secondary contamination from hand contact. The treated wheat samples must then be placed in a sealed testing environment and maintained at an appropriate temperature to promote the release of volatile gases and provide a stable gas environment for subsequent sensor collection. S12. Sensor baseline calibration: Before formally collecting gas response signals, perform baseline calibration and environmental cleaning on the array gas sensor; clean the sensor chamber with an activated carbon filter or clean air to remove any residual background gas; set the zero time to ensure that the sensor is in a stable initial state to improve the accuracy and repeatability of signal acquisition; S13. Gas signal acquisition: Array-type gas sensors are used to monitor volatile gases released from wheat samples in real time and record the sensor response signals. During the sampling process, sensor data is continuously collected and the dynamic changes of gas signals are analyzed, including parameters such as response time, signal amplitude, and stability, to ensure that effective gas characteristic information is obtained. S14. Data storage: After data collection is completed, the original signal recorded by the sensor is stored and the data format is converted for subsequent modeling and analysis; at the same time, the sensor air chamber is cleaned using a filter device or clean air to remove residual gas and ensure that the detection environment is restored to its initial state, providing stable reference conditions for the next measurement.
9. The method for detecting the infection degree of wheat bunt based on deep learning according to claim 7, characterized in that: The headspace solid phase microextraction-gas chromatography-mass spectrometry method in step S2 specifically includes: S21. Sample preparation: Take an appropriate amount of the sample to be tested and place it in a sealed headspace bottle, ensuring a good seal to reduce the loss of volatile compounds; S22, headspace extraction: Under constant temperature conditions, use an appropriate type of solid phase microextraction fiber to insert into the headspace vial and expose it to sample volatiles for a certain period of time to allow the target compound to adsorb to the extraction fiber; S23, thermal desorption: insert the extracted SPME fiber into the gas chromatography inlet and perform thermal desorption at high temperature to allow the target compound to enter the gas chromatography column for separation; S24, gas chromatography separation: using a suitable chromatographic column and setting a temperature program to achieve separation of the target compound; S25. Mass spectrometry: Detection is performed using a mass spectrometer in electron impact mode, and compound identification is performed using a database or standards. S26. Data analysis: Perform peak area integration on the data obtained by GC-MS, quantitatively analyze the content of target compounds based on the standard curve, and perform compound matching and identification.
10. The method for detecting wheat bunt infection degree based on deep learning according to claim 7, characterized in that: The wheat bunt infection degree grading model established in step S4 includes: S41, data input layer: standardizes the raw data collected by the gas sensor, including baseline correction, normalization and denoising operations to ensure data consistency and reduce noise interference; S42. Multi-scale convolutional feature extraction layer: This layer employs a multi-scale convolutional fusion strategy, using one-dimensional convolution kernels of different sizes (1×1, 3×1, and 5×1) to extract local and global features of the gas sensor signal. The convolution outputs of the three different scales are concatenated to form a multi-scale gas feature representation. S43, Feature Attention Layer: To enhance the expressiveness of key features, the model introduces three feature attention mechanisms: peak feature attention mechanism, integral feature attention mechanism, and stable mean feature attention mechanism. Finally, the Sigmoid activation function is used to adjust the attention weights and perform weighted processing on the original multi-scale gas features. S44: Output layer: The weighted features are globally averaged and pooled to reduce the feature dimension while retaining key information. Subsequently, the features are flattened and input into the fully connected layer to establish a nonlinear mapping relationship between the features and the degree of infection. Finally, the output layer uses the Softmax activation function to achieve classification prediction of wheat bunt, including healthy, mildly infected, and severely infected categories.
Citation Information
Patent Citations
Grain grain mildew detector based on gas sensor array
CN119224143A