A Fruit and Vegetable Quality Monitoring System and Method Based on MEMS Gas Sensors
The fruit and vegetable odor prediction model established through the MEMS gas sensor array and the XGBoost algorithm solves the accuracy and speed of the quality of fruit and vegetable deterioration, and realizes real-time and accurate monitoring of fruit and vegetable quality.
Patent Information
- Application Number
- CN202211069641.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-09-02
AI Technical Summary
The prior art is difficult to quickly and accurately monitor whether fruits and vegetables have deteriorated quality during post-harvest. Human eye detection is susceptible to physiological conditions and subjective factors, and the detection results are poorly reliable.
The MEMS gas sensor array is used to collect the characteristic signals of fruit and vegetable odor, and a fruit and vegetable odor prediction model is established in combination with the XGBoost algorithm, and real-time monitoring of fruit and vegetable quality is achieved through feature extraction and model matching.
It realizes dynamic real-time monitoring of fruit and vegetable quality, improves identification accuracy and efficiency, and ensures timely detection and processing of fruit and vegetable quality deterioration.
Smart Images

Figure CN115470817B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of a fruit and vegetable quality monitoring system and method based on MEMS gas sensors, belonging to the fields of MEMS sensors and computer artificial intelligence. Background Art
[0002] MEMS sensors, namely Microelectro Mechanical Systems, are a multi-disciplinary frontier research field developed on the basis of microelectronics technology. After more than forty years of development, it has become one of the major scientific and technological fields attracting worldwide attention. It involves multiple disciplines and technologies such as electronics, mechanics, materials, physics, chemistry, biology, and medicine, and has broad application prospects. As of 2010, there were approximately more than 600 units worldwide engaged in the research and production of MEMS, and hundreds of products have been developed, including micro pressure sensors, acceleration sensors, micro inkjet print heads, digital micromirror displays, etc., among which MEMS sensors account for a quite large proportion. MEMS sensors are new sensors manufactured using microelectronics and micromachining technologies. Compared with traditional sensors, it has the characteristics of small size, light weight, low cost, low power consumption, high reliability, suitable for mass production, easy integration, and easy realization of intelligence. At the same time, the feature size in the micron range enables it to perform some functions that traditional mechanical sensors cannot achieve.
[0003] With the development of MEMS sensors, MEMS gas sensors have gradually been applied in various fields. According to different manufacturing materials, micro gas sensors are divided into silicon-based gas sensors and silicon micro gas sensors. Among them, the former uses silicon as the substrate and the sensitive layer is a non-silicon material, which is the mainstream of current micro gas sensors. Micro gas sensors can meet people's requirements for the integration, intelligence, multi-functionality, etc. of gas sensors. For example, the sensitive performance of many gas sensors is closely related to the operating temperature, so heating elements and temperature detection elements need to be manufactured simultaneously to monitor and control the temperature. MEMS technology can easily manufacture gas-sensitive elements and temperature detection elements together to ensure the excellent performance of gas sensors.
[0004] The Food and Agriculture Organization of the United Nations set 2021 as the "International Year of Fruits and Vegetables" to highlight the important role of fruits and vegetables in human nutrition, food safety, sustainable production, and waste reduction, and called for promoting healthy and sustainable fruit and vegetable production through technological innovation to reduce losses and waste. China has always ranked first in the world in terms of the total area and total output of fruits and vegetables. It is the second and third largest agricultural planting industries after grains, an advantageous agricultural industry with broad domestic and international market prospects and strong international competitiveness, and also one of the highlights of economic development in many regions and the pillar industry for farmers to get rich. The fruit and vegetable industry is an important part of agriculture. Its development can promote the adjustment of the agricultural structure, optimize the diet structure of residents, and increase farmers' income. Providing rich, fresh, nutritious and healthy fruit and vegetable products is the material basis for meeting people's yearning for a better life.
[0005] Surface defects, mechanical damage, microbial infection, diseases, etc. are the main factors leading to the deterioration of the quality of post-harvest fruits and vegetables. Surface defects refer to scars and the like that are caused by external reasons such as strong winds and hailstorms during the growth process of fruits and vegetables, resulting in surface abrasions or knocks and then healing, which greatly affects the economic value of fruits and vegetables. During the harvesting and transportation processes, fruits and vegetables are easily physically damaged, and microorganisms enter the interior of fruits and vegetables through this channel, causing the spoilage and diseases of fruits and vegetables.
[0006] With the development of the economy and the improvement of people's living standards, consumers have higher and higher requirements for the quality and safety of fruits and vegetables. The development of the fruit and vegetable industry urgently needs post-harvest commercialization processing technologies, especially quality deterioration monitoring technologies. China is the largest producer and consumer of fruits and vegetables. The huge product detection demand, domestic industrial demand, and the severe challenges of food safety all urgently require the research of monitoring technologies applicable to the deterioration of fruits and vegetables, so as to ensure the healthy development of the fruit and vegetable industry. Fruits and vegetables belong to fresh foods. Their metabolism still occurs during the harvesting and sales processes. If stored improperly, deterioration will occur, which is generally manifested as changes in the surface color of fruits and vegetables, changes in smell, a decrease in hardness, water loss and wilting, etc. Fruits and vegetables with severely deteriorated quality can be judged by the human eye, but the human eye is easily affected by physiological conditions and subjective factors, with limited detection range and poor reliability of detection results.
[0007] In the field of research on the quality deterioration of fruits and vegetables, researchers have utilized characteristics such as light, sound, and electricity to form a series of emerging sensing and detection technologies such as machine vision, electronic nose, near-infrared spectroscopy, and hyperspectral imaging detection. By obtaining relevant signals and spectra through sensors and performing discriminant analysis, it has the advantages of being fast, easy to operate, and non-destructive to samples. Using multiple technologies in combination to obtain fruit and vegetable quality information in multiple dimensions can improve the stability and accuracy of quality deterioration detection and monitoring. Summary of the Invention
[0008] The purpose of the present invention is to provide a fruit and vegetable quality monitoring system and method that are outstanding in both accuracy and speed.
[0009] To achieve the above object, a technical solution of the present invention is to provide a fruit and vegetable quality monitoring system based on a MEMS gas sensor, which is characterized in that it includes:
[0010] MEMS gas sensor array: used to collect the odor characteristic signals of fruits and vegetables within the time range of T min -T max and convert the odor characteristic signals into digital signals that can be processed by subsequent modules. The digital signal is a characteristic matrix composed of the signals collected by the MEMS gas sensor array. Any special data in the characteristic matrix is the odor characteristic data collected by the MEMS gas sensor at the corresponding position in the MEMS gas sensor array, where: T min is the lower limit threshold of the time range, and T max is the upper limit threshold of the time range;
[0011] Feature extraction module: use a classifier to classify the odor characteristic signals of fruits and vegetables within the time range of T min -T max into containers with a time length of T, so as to create odor characteristic data of an X-dimensional vector. In the formula,
[0012] Model establishment and training module:
[0013] Establish a fruit and vegetable odor prediction model based on the XGBoost algorithm and train the fruit and vegetable odor prediction model. The training data set for training is obtained by the following method:
[0014] Divide the quality of each kind of fruit and vegetable into different states representing the freshness of the fruit and vegetable. For the same kind of fruit tree, use the MEMS gas sensor array to collect the digital signals corresponding to the respective states, and then use the feature extraction module to extract the odor characteristic data of the X-dimensional vector of each digital signal; the state value corresponding to each digital signal is the output label used to train the model. Then, the training data set is composed of all the odor characteristic data of the X-dimensional vector and the corresponding output labels. Each odor characteristic data is a sample in the training data set;
[0015] When training the fruit and vegetable odor prediction model, randomly select N samples from the training data set. For each selected sample, randomly extract M-dimensional vectors from the X-dimensional vector as input data and input them into the fruit and vegetable odor prediction model to train the fruit and vegetable odor prediction model; sum the results of K trees in the fruit and vegetable odor prediction model as the final prediction value;
[0016] Model matching module:
[0017] After obtaining the digital signal of the target fruit and vegetable in real time through the MEMS gas sensor array, the odor feature data of the X-dimensional vector of the digital signal is extracted by the feature extraction module. After the odor feature data is input into the fruit and vegetable odor prediction model, the state prediction value of the target fruit and vegetable is output by the fruit and vegetable odor prediction model.
[0018] Preferably, the odor feature signal within the time range of T min -T max obtained by the i-th sensor in the MEMS gas sensor array is u i , then the feature extraction module classifies u i into a container with a time length of T using the following formula:
[0019]
[0020] In the formula: τ is the time constant, f j , m j represent the first odor measurement standard variable and the second odor measurement standard variable; the subscript j represents the j-th data collected by the i-th sensor within the time range of T min -T max ; is the weight of f j ; is the weight of m j .
[0021] Preferably, when the model establishment and training module trains the fruit and vegetable odor prediction model, the prediction result of the fruit and vegetable odor prediction model for the sample x i is K is the total number of trees in the fruit and vegetable odor prediction model, f k represents the k-th tree;
[0022] Then the loss function of the fruit and vegetable odor prediction model is expressed as the following formula:
[0023]
[0024] In the formula, Obj(θ) is the loss function; is the training error of the sample x i ; Ω(f k ) represents the regularization term of the k-th tree.
[0025] Preferably, the model establishment and training module exports and stores each parameter of the trained fruit and vegetable odor prediction model; the model matching module obtains the fruit and vegetable odor prediction model after loading the parameters stored by the model establishment and training module.
[0026] Another technical solution of the present invention is to provide a method for monitoring the quality of fruits and vegetables based on a MEMS gas sensor, which adopts the above-mentioned fruit and vegetable quality monitoring system, and is characterized by including the following steps:
[0027] Step 1: The MEMS gas sensor array in the fruit and vegetable quality monitoring system periodically collects digital signals of the target fruits and vegetables;
[0028] Step 2: Determine whether new fruits and vegetables are added to the target fruits and vegetables or whether fruits and vegetables are removed from the target fruits and vegetables according to the change of the digital signal. If so, the fruit and vegetable monitoring list is updated in real time. If not, directly proceed to the next step;
[0029] Step 3: The feature extraction module in the fruit and vegetable quality monitoring system extracts the odor feature data of the X-dimensional vector of the digital signal. After inputting the odor feature data into the fruit and vegetable odor prediction model, the fruit and vegetable odor prediction model outputs the state prediction value of the target fruits and vegetables. Determine whether the target fruits and vegetables are deteriorated or rotten according to the state prediction value. If so, issue a warning to remind relevant personnel to process the target fruits and vegetables in time. If not, return to Step 1 and continuously monitor the target fruits and vegetables.
[0030] The present invention discloses a fruit and vegetable quality monitoring system and method based on a MEMS gas sensor, which realizes the purpose of dynamically and real-time monitoring of whether fruits and vegetables are deteriorated based on a gas sensor. During the recognition process, the accuracy and confidence of features are used to improve the recognition accuracy and efficiency, thereby solving the deficiencies of the existing fruit and vegetable deterioration methods. Brief Description of the Drawings
[0031] Figure 1 It is a schematic diagram of the overall structural framework of the system disclosed by the present invention;
[0032] Figure 2 It is a flowchart of the method disclosed by the present invention. Detailed Embodiments
[0033] The following further elaborates the present invention in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of this application.
[0034] As Figure 1 shown, a fruit and vegetable quality monitoring system based on a MEMS gas sensor disclosed by the present invention includes:
[0035] MEMS Gas Sensor Array: It is used to collect the odor characteristic signals of fruits and vegetables within 0 - 200 ms, and convert the odor characteristic signals into digital signals that can be processed by subsequent modules through the analog-to-digital conversion (ADC) process. This digital signal is a feature matrix composed of the signals collected by the MEMS gas sensor array, and any special data in the feature matrix is the odor characteristic data collected by the MEMS gas sensor at the corresponding position in the MEMS gas sensor array.
[0036] Feature Extraction Module: Use a classifier to classify the odor characteristic signals of 0 - 200 ms obtained by the MEMS gas sensor module into containers of 10 ms, thereby creating odor characteristic data of a 20-dimensional vector. Then, the array data u collected by the i-th sensor is classified into the 10-ms container using the following formula (1): i Classify into the 10-ms container:
[0037]
[0038] In formula (1), τ is the time constant, f j and m j represent the first odor measurement criterion and the second odor measurement criterion variables (for example, the humidity of the gas is reflected by the concentrations of dry and wet gases, and the present invention uses two odor standard variables to represent the odor signals collected by the sensor. The subscript j represents the j-th data collected by the i-th sensor within 0 - 200 ms, that is, corresponding to the i-th row and j-th column in the matrix); is the weight of f j In this embodiment, is taken as 3; is the weight of m j In this embodiment,
[0039] Model Establishment and Training Module:
[0040] Based on the XGBoost algorithm, establish a fruit and vegetable odor prediction model and train the fruit and vegetable odor prediction model. The training dataset for training is obtained by the following method:
[0041] For each type of fruit and vegetable, the degree of spoilage and the emitted odor concentration are strictly compared to obtain the output labels for training the model. Specifically, the flavor substances in fruits and vegetables are mixtures composed of different volatile components such as alcohols, aldehydes, and ketones, which can objectively reflect the quality characteristics of fruits and vegetables. The present invention models the corresponding odors for each type of fruit and vegetable. For example, fresh cherries smell obviously sweet, while spoiled cherries smell obviously sour or alcoholic.
[0042] In this embodiment, the quality of each kind of fruit and vegetable is divided into five states: "fresh", "good", "average", "spoiled", and "rotten". For the same kind of fruit tree, after using the MEMS gas sensor array to collect the digital signals corresponding to the five states respectively, the feature extraction module is used to extract the odor feature data of the 20-dimensional vector of each digital signal. The state value corresponding to each digital signal is the output label for training the model. Then, the training data set is composed of the odor feature data of all 20-dimensional vectors and the corresponding output labels, and each odor feature data is a sample in the training data set.
[0043] When training the fruit and vegetable odor prediction model, N samples are randomly selected from the training data set. For each selected sample, M-dimensional vectors are randomly extracted from the 20-dimensional vector as input data and input into the fruit and vegetable odor prediction model for training, so that more effective features can be used for training to a greater extent. The results of K trees in the fruit and vegetable odor prediction model are summed as the final prediction value.
[0044] Let the prediction result of the fruit and vegetable odor prediction model for the sample x i be Then there is the following formula (2)
[0045]
[0046] In formula (2), K is the total number of trees in the fruit and vegetable odor prediction model, and f k represents the kth tree.
[0047] Then the loss function of the fruit and vegetable odor prediction model is expressed as the following formula (3):
[0048]
[0049] In formula (3), Obj(θ) is the loss function; is the training error of the sample x i ; Ω(f k ) represents the regularization term of the kth tree.
[0050] The model establishment and training module exports and stores the various parameters of the trained fruit and vegetable odor prediction model.
[0051] Model matching module:
[0052] It is used to obtain the fruit and vegetable odor prediction model after loading the parameters stored by the model establishment and training module. After obtaining the digital signal of the target fruit and vegetable in real time through the MEMS gas sensor array, the feature extraction module is used to extract the odor feature data of the 20-dimensional vector of the digital signal. After inputting the odor feature data into the fruit and vegetable odor prediction model, the state prediction value of the target fruit and vegetable is output by the fruit and vegetable odor prediction model.
[0053] As Figure 2 shown, this embodiment also discloses a method for monitoring the quality of fruits and vegetables based on a MEMS gas sensor, which adopts the above-mentioned fruit and vegetable quality monitoring system, and includes the following steps:
[0054] Step 1: The MEMS gas sensor array in the fruit and vegetable quality monitoring system periodically collects digital signals of the target fruits and vegetables;
[0055] Step 2: Determine whether new fruits and vegetables are added to the target fruits and vegetables or whether fruits and vegetables are removed from the target fruits and vegetables according to the change of the digital signal. If so, the fruit and vegetable monitoring list is updated in real time. If not, directly proceed to the next step;
[0056] Step 3: The feature extraction module in the fruit and vegetable quality monitoring system extracts the odor feature data of the 20-dimensional vector of the digital signal. After inputting the odor feature data into the fruit and vegetable odor prediction model, the fruit and vegetable odor prediction model outputs the state prediction value of the target fruits and vegetables. According to the state prediction value, determine whether the target fruits and vegetables are spoiled or rotten. If so, issue a warning to remind relevant personnel to process the target fruits and vegetables in time. If not, return to Step 1 and continue to monitor the target fruits and vegetables.
Claims
1. A fruit and vegetable quality monitoring system based on a MEMS gas sensor, characterized in that, Including: MEMS Gas Sensor Array: Used to Collect the T of Fruits and Vegetables min -T max Odor feature signals within the time range and convert the odor feature signals into digital signals that can be processed by subsequent modules. The digital signal is a feature matrix composed of signals collected by the MEMS gas sensor array. Any special data in the feature matrix is the odor feature data collected by the MEMS gas sensor at the corresponding position in the MEMS gas sensor array, where: T min Is the lower limit threshold of the time range, and T max Is the upper limit threshold of the time range; Feature extraction module: Use a classifier to classify the odor feature signals within the time range of T min -T max obtained by the MEMS gas sensor module into containers with a time length of T, thereby creating odor feature data of an X-dimensional vector. Wherein, min -T max time range into containers with a time length of T, thereby creating odor feature data of an X-dimensional vector. Wherein, Model establishment and training module: Based on the XGBoost algorithm, a fruit and vegetable odor prediction model is established and trained. The training dataset for training is obtained by the following method: The quality of each type of fruit and vegetable is divided into different states representing the freshness of the fruit and vegetable. For the same type of fruit tree, after using the MEMS gas sensor array to collect the digital signals corresponding to the respective states, the feature extraction module is used to extract the odor feature data of the X-dimensional vector of each digital signal; the state value corresponding to each digital signal is the output label for training the model. Then, the training dataset is composed of the odor feature data of all X-dimensional vectors and the corresponding output labels. Each odor feature data is a sample in the training dataset; When training the fruit and vegetable odor prediction model, N samples are randomly selected from the training dataset. For each selected sample, M-dimensional vectors are randomly extracted from the X-dimensional vector as input data and input into the fruit and vegetable odor prediction model to train the fruit and vegetable odor prediction model; the results of K trees in the fruit and vegetable odor prediction model are summed as the final prediction value; Model matching module: After the digital signal of the target fruit and vegetable is obtained in real time through the MEMS gas sensor array, the feature extraction module is used to extract the odor feature data of the X-dimensional vector of the digital signal. After the odor feature data is input into the fruit and vegetable odor prediction model, the state prediction value of the target fruit and vegetable is output by the fruit and vegetable odor prediction model.
2. The fruit and vegetable quality monitoring system based on a MEMS gas sensor according to claim 1, wherein The odor characteristic signal obtained by the i-th sensor in the MEMS gas sensor array within the time range of T min -T max is u i , then the feature extraction module classifies u i into a container with a time length of T using the following formula: Where: τ is the time constant, f j and m j represent the first odor measurement standard variable and the second odor measurement standard variable; the subscript j represents the j-th data collected by the i-th sensor within the time range of T min -T max ; is the weight of f j ; is the weight of m j .
3. The fruit and vegetable quality monitoring system based on a MEMS gas sensor according to claim 1, characterized in that, When the model establishment and training module builds the fruit and vegetable odor prediction model, the prediction result of the fruit and vegetable odor prediction model for the sample x i is K is the total number of trees in the fruit and vegetable odor prediction model, and f k represents the k-th tree; Then the loss function of the fruit and vegetable odor prediction model is expressed as the following formula: where Obj(θ) is the loss function; is the training error of sample x i ; Ω(f k ) represents the regularization term of the k-th tree.
4. The fruit and vegetable quality monitoring system based on a MEMS gas sensor according to claim 1, wherein The model establishment and training module exports and stores the various parameters of the trained fruit and vegetable odor prediction model; the model matching module obtains the fruit and vegetable odor prediction model after loading the parameters stored by the model establishment and training module.
5. A method for monitoring the quality of fruits and vegetables based on a MEMS gas sensor, which uses the fruit and vegetable quality monitoring system as described in claim 1, characterized in that, Including the following steps: Step 1: The MEMS gas sensor array in the fruit and vegetable quality monitoring system periodically collects the digital signal of the target fruit and vegetable; Step 2: According to the change of the digital signal, it is judged whether there is a new fruit and vegetable added to the target fruit and vegetable or whether there is a fruit and vegetable removed from the target fruit and vegetable. If so, the fruit and vegetable monitoring list is updated in real time. If not, it directly enters the next step; Step 3: The feature extraction module in the fruit and vegetable quality monitoring system extracts the odor feature data of the X-dimensional vector of the digital signal. After the odor feature data is input into the fruit and vegetable odor prediction model, the state prediction value of the target fruit and vegetable is output by the fruit and vegetable odor prediction model. According to the state prediction value, it is judged whether the target fruit and vegetable has deteriorated and rotted. If so, a warning is issued to remind the relevant personnel to process the target fruit and vegetable in time. If not, it returns to Step 1 to continuously monitor the target fruit and vegetable.
Citation Information
Patent Citations
Wireless electronic nose system and method for monitoring quality of fruits and vegetables in transportation process
CN105606653A
Fruit and vegetable food safety risk prediction method
CN107918837A