Method for simultaneous detection of ethanol and microplastics in brewing process combined with machine learning
Patent Information
- Application Number
- CN202611361325.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]本申请主要解决现有酿酒检测技术无法对乙醇含量与微塑料污染进行同步、快速、高灵敏检测的技术问题,具体包括:常规近红外光谱下乙醇指纹信号弱且谱带拥挤、微塑料缺乏同一体系下的同步检测手段、现有方法需复杂前处理难以一体化集成
[0019]本申请的有益效果包括:第一,本申请通过支持表面晶格共振的超表面增强待测样品的近红外指纹特征,能够放大乙醇与微塑料的弱信号,提高检测灵敏度;不同尺度微塑料的透过率光谱在近红外区表现出可区分的特征,有利于实现对微塑料尺度的识别。第二,本申请以卷积神经网络与Transformer混合模型分别提取光谱的局部特征与长程依赖,并通过门控融合实现两类特征的联合利用,能够从单一光谱中同步输出乙醇浓度与微塑料信息,省去多次前处理与多次检测,有利于提高酿酒检测的集成度与效率。第三,本申请将检测系统部署于嵌入式边缘计算设备,能够实现在线同步检测,有利于酿酒过程的实时品质监控与污染预警。下面通过附图和实施例,对本发明的技术方法做进一步的详细描述。
Smart Images

Figure CN122982979A_ABST
Abstract
Description
[0001] Technical Field This invention relates to the field of winemaking detection technology, and more particularly to a method for simultaneous detection of ethanol and microplastics during the winemaking process that incorporates machine learning. Background Technology
[0002] Precise control of ethanol content during the brewing process is crucial for the quality and safety of the final product. Ethanol content affects not only the flavor and taste of the wine but also product compliance and consumer safety. Meanwhile, plastic components in brewing raw materials, processing containers, and pipelines may release microplastic particles during use. These microplastics enter the wine during washing, fermentation, aging, and bottling, and their residue is increasingly concerning. Simultaneous monitoring of ethanol content and microplastic contamination during the brewing process is a vital prerequisite for quality control and food safety assurance.
[0003] Existing ethanol detection methods can be broadly categorized into three types: chemical, electronic, and optical. Chemical-based methods, including electrochemical sensing, chromatography, and mass spectrometry, offer high sensitivity and accuracy, but typically require complex sample pretreatment and specialized data interpretation, making them unsuitable for rapid online detection. Electronic sensing platforms are convenient to operate and easy to integrate, but their sensitivity and accuracy are limited. Spectroscopic detection techniques, such as Raman, fluorescence, and absorption spectroscopy, offer advantages such as label-free and real-time detection; however, conventional spectral signal intensity is insufficient, their adaptability to low-concentration components is limited, and ethanol exhibits crowded fingerprint bands in the near-infrared region, significant multicollinearity among spectral variables, and weak signals are easily masked by background absorption and noise.
[0004] For microplastics, current detection methods mostly rely on microscopic observation, thermal analysis, or offline spectroscopic identification, which require sampling and pretreatment, and cannot achieve simultaneous detection with ethanol content in the same measurement system. Near-infrared spectroscopy instruments are compatible with aqueous systems, have lower costs, and are easy to integrate, but conventional near-infrared detection has difficulty directly distinguishing components with severely overlapping spectral bands, and its response to low concentrations of microplastics is also weak.
[0005] In recent years, the combination of metamaterial-enhanced spectroscopy and AI-driven data analysis has demonstrated excellent performance in the field of sensing. Metasurfaces that support surface lattice resonance can localize electromagnetic fields at the nanoscale, enhancing the interaction between analytes and light, thereby amplifying weak molecular fingerprint signals. Deep learning, as an effective data processing method, has shown outstanding performance in spectral recognition and quantification. However, the application of combining metasurface-enhanced near-infrared spectroscopy with deep learning for the simultaneous detection of ethanol and microplastics in the brewing process remains a gap in research.
[0006] In summary, existing technologies are insufficient for the simultaneous, rapid, and highly sensitive detection of ethanol content and microplastic contamination during the brewing process within the same measurement system. There is an urgent need to develop an integrated intelligent detection technology that is adapted to brewing scenarios. Summary of the Invention
[0007] This application primarily addresses the technical problems of existing brewing detection technologies being unable to simultaneously, rapidly, and with high sensitivity detect ethanol content and microplastic contamination. Specifically, these problems include: weak and crowded ethanol fingerprint signals under conventional near-infrared spectroscopy; lack of simultaneous detection methods for microplastics within the same system; and the difficulty in integrating existing methods with complex preprocessing.
[0008] On the one hand, this application proposes a method for the simultaneous detection of ethanol and microplastics in the brewing process that combines machine learning: First, a metal nanopore array metasurface supporting surface lattice resonance is prepared and placed in a sample cell to form an enhanced spectral acquisition channel; then, the sample cell is irradiated with a near-infrared light source, and the transmittance spectrum of the empty sample cell is collected as a reference spectrum. The transmittance spectrum of the sample is collected and normalized with the reference spectrum to obtain a normalized near-infrared spectrum; then, samples with different ethanol concentrations and microplastics of different sizes are prepared, and each sample is labeled with an ethanol concentration label and a microplastic information label to construct a spectral sample set with dual labels; then, a hybrid detection model of convolutional neural network and Transformer is constructed. The convolutional neural network branch extracts local features of the spectrum, and the Transformer branch models the long-range dependence of the spectrum. The features of the two branches are gated and fused, and the ethanol concentration and microplastic information are output through a multilayer perceptron. The training is supervised by the spectral sample set with dual labels; finally, the normalized near-infrared spectrum of the sample to be tested during the brewing process is input into the trained model, and the ethanol concentration and microplastic information are output simultaneously.
[0009] In one embodiment, the microplastic information includes at least one of the presence, size, and content of microplastics.
[0010] In one embodiment, the metal nanopore array metasurface is a silver nanopore array metasurface with a lattice constant of 1100 nm, a pore size of 250 nm, and a silver film thickness of 100 nm. It is prepared by nanosphere photolithography and can generate a surface lattice resonance mode to enhance the fingerprint features of the sample under test in the near-infrared band.
[0011] In one implementation, the transmittance spectrum of the metasurface in air is used as a reference spectrum for normalization to eliminate the influence of light source fluctuations and background absorption.
[0012] In one embodiment, the convolutional neural network branch includes cascaded convolutional layers and pooling layers, with a squeezing excitation module following each convolutional layer; the Transformer branch includes a multi-head attention sub-layer and a feedforward network sub-layer, with residual connections and layer normalization between the sub-layers.
[0013] In one implementation, the gated fusion maps the feature vectors output by the two branches to gate weight coefficients through activation functions, and then weights and sums the feature vectors of the two branches according to the normalization ratio of the two gate weight coefficients to obtain the fused feature vector.
[0014] In one embodiment, the sample to be tested in the brewing process is the fermentation liquid, mash, or finished wine sample from the brewing process.
[0015] In one embodiment, an early warning step is also included: when the output microplastic content or ethanol concentration exceeds a preset threshold, an early warning signal is issued.
[0016] On the other hand, this application proposes a synchronous detection system for ethanol and microplastics in the brewing process that combines machine learning, comprising: a metasurface enhanced spectral acquisition unit, including a sample cell, a metal nanopore array metasurface disposed in the sample cell, a near-infrared light source and a near-infrared spectrometer, for acquiring the normalized near-infrared spectrum of the sample to be tested; a data processing unit, which incorporates a hybrid detection model including convolutional neural network branches and Transformer branches, for receiving the normalized near-infrared spectrum and simultaneously outputting ethanol concentration and microplastic information; and an output display unit for displaying ethanol concentration and microplastic information.
[0017] In one embodiment, the near-infrared spectrometer operates in the wavelength range of 900 nm to 1700 nm and employs an InGaAs array detector; the near-infrared light source is a broadband light source; and a polydimethylsiloxane framework is provided in the sample cell, with a metasurface embedded in the framework.
[0018] In one implementation, the hybrid detection model is deployed in an embedded edge computing device after quantization and compression to achieve online synchronous detection of the brewing process.
[0019] The beneficial effects of this application include: First, by enhancing the near-infrared fingerprint features of the sample through metasurfaces that support surface lattice resonance, this application can amplify the weak signals of ethanol and microplastics, thereby improving detection sensitivity; the transmittance spectra of microplastics at different scales exhibit distinguishable characteristics in the near-infrared region, which is beneficial for identifying the scale of microplastics. Second, this application uses a hybrid model of convolutional neural networks and Transformers to extract local features and long-range dependencies of the spectrum, respectively, and achieves joint utilization of the two types of features through gated fusion. This allows for the simultaneous output of ethanol concentration and microplastic information from a single spectrum, eliminating multiple preprocessing and detection steps, and improving the integration and efficiency of brewing detection. Third, this application deploys the detection system on an embedded edge computing device, enabling online synchronous detection, which is beneficial for real-time quality monitoring and pollution early warning in the brewing process. The technical method of this invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0020] All accompanying figures are provided with this document. Figure 3 , Figure 4 The measured spectral data provided to the applicant Figure 1 , Figure 2 , Figure 5 , Figure 6 This is a schematic diagram drawn based on the contents of the instruction manual.
[0021] Figure 1 This is a flowchart of the synchronous detection method of the present invention; Figure 2 A schematic diagram of the silver nanopore array metasurface structure and surface lattice resonance enhancement; Figure 3 Near-infrared transmittance spectra of microplastic samples at different scales; Figure 4 Experimental and simulation comparisons of metasurface transmittance and spectra of parameters at different scales are presented. Figure 5 This is a schematic diagram of the hybrid detection model structure; Figure 6 This is a schematic diagram of a synchronous detection system.
[0022] Labeling description: 1-Sample cell, 2-Silver nanopore array metasurface, 3-Near-infrared light source, 4-Near-infrared spectrometer, 5-Data processing unit, 6-Output display unit. Detailed Implementation
[0023] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specifically stated, the relative arrangement and numerical values of the components and steps described in the embodiments do not limit the scope of protection of this application. Example
[0024] This embodiment provides a method for the simultaneous detection of ethanol and microplastics during the brewing process, incorporating machine learning. For example... Figure 1 As shown, the method includes the following steps: S1. Construct a metasurface-enhanced near-infrared spectroscopy acquisition system. For example... Figure 2 As shown, a silver nanoporous array metasurface 2 was prepared using nanosphere photolithography: a suspension of 1100 nm diameter polystyrene spheres was injected into a U-shaped capillary channel defined by the gap between two glass substrates. After solvent evaporation, the polystyrene spheres self-assembled into a hexagonal close-packed monolayer. The diameter of the polystyrene spheres was reduced by reactive ion etching, followed by deposition of a 100 nm thick silver film. Finally, the polystyrene spheres were removed by alternating ultrasonic treatment in tetrahydrofuran and ethanol, yielding a silver nanoporous array metasurface 2 with a lattice constant of 1100 nm and a pore size of 250 nm. The silver nanoporous array metasurface 2 was placed in sample cell 1 to form an enhanced spectral acquisition channel.
[0025] S2. Acquire and normalize the near-infrared spectrum. Irradiate sample cell 1 with near-infrared light source 3. First, acquire the transmittance spectrum of the empty sample cell as a reference spectrum. Then, acquire the transmittance spectrum of the sample cell containing the sample to be tested. Normalize the sample transmittance spectrum using the transmittance spectrum of the metasurface in air as a reference to obtain the normalized near-infrared spectrum. Spectral acquisition is performed using a custom fiber optic spectrometer 4 with a working wavelength range of 900nm to 1700nm, a step size of 1nm, an InGaAs array detector, a signal-to-noise ratio of 6000:1, and a fixed optical path of 10mm.
[0026] S3. Construct a dual-labeled spectral sample set. Prepare samples with different ethanol concentrations and microplastics of different sizes. Collect normalized near-infrared spectra of each sample, and label each sample with an ethanol concentration label and a microplastic information label to construct a dual-labeled spectral sample set. Collect multiple spectra for each concentration combination to reduce instrument noise.
[0027] S4. Construct and train a hybrid detection model. For example... Figure 5 As shown, the hybrid detection model comprises a convolutional neural network (CNN) branch and a Transformer branch. The CNN branch extracts local spectral features through two cascaded convolutional layers: the first layer uses a 5×1 convolutional kernel with 32 channels, followed by a 2×1 pooling layer; the second layer uses a 3×1 convolutional kernel with 64 channels, followed by a 2×1 pooling layer. Each convolutional layer is followed by a compression excitation module to adaptively redistribute channel feature responses. The features are flattened and projected onto a fully connected layer to form a 256-dimensional feature vector. The Transformer branch first increases the spectral dimension through a one-dimensional convolutional layer, then models long-range spectral dependencies through a multi-head attention sublayer and a feedforward network sublayer. Residual connections and layer normalization are set between sublayers, and the output is reduced to a 256-dimensional feature vector through a fully connected layer. The features from both branches are adaptively weighted through a gating fusion mechanism to obtain a fused feature vector, which is then processed by a multilayer perceptron to output ethanol concentration and microplastic information. During gated fusion, the feature vectors output from the convolutional neural network branch and the Transformer branch are mapped to their respective gate weight coefficients via activation functions. The feature vectors from both branches are then weighted and summed using a normalized ratio of these two gate weight coefficients to obtain the fused feature vector. The activation functions and the learnable parameter matrices corresponding to the two branches are iteratively updated during model training. Supervised training of the model is performed using a dual-labeled spectral sample set. Five-fold cross-validation is employed to evaluate model robustness. The training and validation sets are divided according to sample formulations to avoid spectra of the same concentration combination appearing simultaneously in both training and validation subsets.
[0028] S5. Synchronously output detection results. The normalized near-infrared spectrum of the sample to be tested during the brewing process (such as fermentation broth, mash, or finished wine sample) is collected, input into the trained mixed detection model, and ethanol concentration and microplastic information are output simultaneously. When the output microplastic content or ethanol concentration exceeds the preset threshold, an alarm signal is issued by the output display unit 6. Example
[0029] This embodiment illustrates the metasurface structure and its enhancement properties. For example... Figure 2 As shown, the silver nanopore array metasurface 2 consists of a silver film and periodic nanopores penetrating the silver film, with a lattice constant of 1100 nm, a pore size of 250 nm, and a silver film thickness of 100 nm. Numerical simulations were performed using commercial simulation software, and the structural parameters are consistent with the measured structure. Figure 4 As shown, (a) is the experimental and simulated transmittance comparison spectrum of the metasurface, both exhibiting similar trends near the characteristic wavelength; (b) is the simulated transmittance spectrum under different scale parameters, with each curve showing fluctuations in the 1100 nm–1300 nm range. The metasurface generates a surface lattice resonance mode at a specific wavelength, localizing the electromagnetic field near the interface between the nanopores and the sample, thereby enhancing the interaction between ethanol and microplastics with near-infrared light and amplifying their fingerprint characteristics. Example
[0030] This embodiment illustrates the near-infrared transmittance characteristics of microplastics at different scales. For example... Figure 3 As shown, the transmittance spectra of pure water and microplastic samples of different sizes were measured in the wavelength range of 800 nm to 1800 nm. The overall trend of the transmittance spectra of microplastic samples of different sizes is similar: a trough appears around 1000 nm, a peak appears around 1100 nm, and then the transmittance decreases with increasing wavelength, approaching zero after 1400 nm. There are differences in the transmittance values of samples of different sizes; for example, samples with a size of 300 generally have higher transmittance, while samples with a size of 1300 generally have lower transmittance. This indicates that microplastics of different sizes have distinguishable transmittance characteristics in this near-infrared band, which can be used to determine the presence and size of microplastics. Example
[0031] This embodiment describes the configuration of the synchronous detection system. For example... Figure 6As shown, the synchronous detection system includes: a metasurface-enhanced spectral acquisition unit, comprising a sample cell 1, a silver nanopore array metasurface 2 disposed within the sample cell, a near-infrared light source 3, and a near-infrared spectrometer 4. A polydimethylsiloxane framework is provided within the sample cell, and the metasurface is embedded within this framework to increase the interaction length between light and the sample; a data processing unit 5, which incorporates a hybrid detection model combining convolutional neural networks and Transformers, receives normalized near-infrared spectra and simultaneously outputs ethanol concentration and microplastic information; and an output display unit 6, used to display ethanol concentration and microplastic information. The hybrid detection model, after quantization and compression, is deployed in an embedded edge computing device, enabling online synchronous detection and early warning of the brewing process without the need for a host computer.
[0032] Comparative Example 1 Using only conventional near-infrared spectroscopy without metasurface enhancement, low-concentration ethanol and microplastic samples were directly detected. Due to the lack of surface lattice resonance enhancement, the intensity of the ethanol fingerprint signal and the microplastic scattering signal was insufficient, and the weak signals were easily masked by background absorption and noise, making it difficult to distinguish low-concentration samples.
[0033] Comparative Example 2 This study uses only a single convolutional neural network model without Transformer branches or gated fusion. Due to the lack of modeling for long-range spectral dependencies, the model struggles to utilize global correlations between spectral bands, limiting its ability to distinguish and quantify near-infrared spectra with significant band overlap.
[0034] All implementation methods that employ metasurface-enhanced near-infrared spectroscopy acquisition, construction of dual-labeled spectral sample sets, and simultaneous output of ethanol concentration and microplastic information using a hybrid model of convolutional neural networks and Transformers should fall within the scope of protection of this application.
Claims
1. A method for simultaneous detection of ethanol and microplastics in the brewing process combining machine learning, characterized in that, Includes the following steps: S1. Constructing a metasurface-enhanced near-infrared spectroscopy acquisition system: Prepare a metal nanopore array metasurface that supports surface lattice resonance, and place the metasurface in a sample cell to form an enhanced spectral acquisition channel; S2. Irradiate the sample cell with a near-infrared light source, collect the transmittance spectrum of the empty sample cell as a reference spectrum, and then collect the transmittance spectrum of the sample cell containing the sample to be tested. Normalize the sample transmittance spectrum based on the reference spectrum to obtain a normalized near-infrared spectrum. S3. Prepare samples with different ethanol concentrations and microplastics of different sizes, collect the normalized near-infrared spectrum of each sample, and label each sample with an ethanol concentration label and a microplastic information label to construct a spectral sample set with dual labels. S4. Construct a hybrid detection model: The model includes a convolutional neural network branch and a Transformer branch. The convolutional neural network branch extracts local features of the spectrum, and the Transformer branch models the long-range dependence of the spectrum. The features of the two branches are gated and fused, and then output ethanol concentration and microplastic information through a multilayer perceptron. The model is trained under supervision using a set of spectral samples with dual labels; S5. Collect the normalized near-infrared spectrum of the sample to be tested during the brewing process, input it into the trained hybrid detection model, and simultaneously output the ethanol concentration and microplastic information in the sample to be tested.
2. The method for simultaneous detection of ethanol and microplastics in the brewing process combined with machine learning as described in claim 1, characterized in that, The microplastic information includes at least one of the following: the presence, size, and content of microplastics.
3. The method for simultaneous detection of ethanol and microplastics in the brewing process combined with machine learning as described in claim 1, characterized in that, The metal nanopore array metasurface is a silver nanopore array metasurface with a lattice constant of 1100 nm, a pore size of 250 nm, and a silver film thickness of 100 nm. The metasurface is prepared by nanosphere photolithography and can generate a surface lattice resonance mode to enhance the fingerprint features of the sample under test in the near-infrared band.
4. The method for simultaneous detection of ethanol and microplastics in the brewing process combined with machine learning as described in claim 1, characterized in that, In step S2, the transmittance spectrum of the metasurface in air is used as a reference spectrum for normalization to eliminate the influence of light source fluctuations and background absorption.
5. The method for simultaneous detection of ethanol and microplastics in the brewing process combined with machine learning as described in claim 1, characterized in that, The convolutional neural network branch includes cascaded convolutional layers and pooling layers, with a squeeze excitation module after each convolutional layer for adaptively redistributing the response weights of the spectral feature channels; the Transformer branch includes a multi-head attention sub-layer and a feedforward network sub-layer, with residual connections and layer normalization between the sub-layers.
6. The method for simultaneous detection of ethanol and microplastics in the brewing process combined with machine learning as described in claim 1, characterized in that, In step S4, the gating fusion maps the feature vectors output by the convolutional neural network branch and the feature vectors output by the Transformer branch to their respective gating weight coefficients through activation functions. Then, the feature vectors of the two branches are weighted and summed using the normalized ratio of the two gating weight coefficients to obtain the fused feature vector.
7. The method for simultaneous detection of ethanol and microplastics in the brewing process combined with machine learning as described in claim 1, characterized in that, The samples to be tested in the brewing process are fermentation liquid, mash, or finished wine samples from the brewing process.
8. The method for simultaneous detection of ethanol and microplastics in the brewing process combined with machine learning according to claim 1, characterized in that, It also includes an early warning step: when the output microplastic content or ethanol concentration exceeds a preset threshold, an early warning signal is issued.
9. A simultaneous detection system for ethanol and microplastics in the brewing process combining machine learning, characterized in that, include: Metasurface-enhanced spectral acquisition unit: includes a sample cell, a metal nanopore array metasurface disposed within the sample cell, a near-infrared light source, and a near-infrared spectrometer, used to acquire the normalized near-infrared spectrum of the sample to be tested; Data processing unit: has a built-in hybrid detection model, which includes a convolutional neural network branch and a Transformer branch, the model being trained according to any one of claims 1 to 8, used to receive the normalized near-infrared spectrum and simultaneously output ethanol concentration and microplastic information; Output display unit: used to display ethanol concentration and microplastic information.
10. The simultaneous detection system for ethanol and microplastics in the brewing process combining machine learning as described in claim 9, characterized in that, The near-infrared spectrometer operates in the wavelength range of 900nm to 1700nm and uses an InGaAs array detector. The near-infrared light source is a broadband light source. A polydimethylsiloxane framework is provided in the sample cell, and the metasurface is embedded in the framework. The hybrid detection model is deployed in an embedded edge computing device after quantization and compression to realize online synchronous detection of the brewing process.