Daqu grade classification and type identification method, device, equipment, medium and program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANXI XINGHUACUN FENJIU WINE FACTORY
- Filing Date
- 2026-04-24
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]然而,传统人工判别方式高度依赖操作人员经验,主观性强、一致性差、检测效率低,无法适配大规模工业化生产需求;光谱、电子鼻等设备成本高昂、样本预处理苛刻、易受环境干扰,模型泛化能力弱;传统机器视觉方法特征提取繁琐、识别精度与鲁棒性不足,难以实现大曲种类与等级的精准、智能、标准化判别
[0039] The Daqu grade classification and type discrimination scheme provided in this application can construct a dataset by collecting Daqu sample images, establish a Daqu grade classification model and a Daqu type discrimination model that integrates convolutional block attention modules, and realize Daqu grade classification and type discrimination respectively, replacing the traditional manual sensory evaluation method, realizing the intelligent and standardized Daqu discrimination, improving discrimination efficiency and result consistency, and adapting to the quality control needs of Baijiu industrial production.
Smart Images

Figure CN122530653A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of liquor testing technology, and in particular to a method, apparatus, equipment, medium, and program product for classifying and identifying the grade and type of Daqu (a type of Chinese liquor). Background Technology
[0002] With the development of industrialization and intelligent technology in baijiu brewing, the quality control and standardized testing technology of baijiu production have been gradually upgraded. As the core saccharification and fermentation agent in the brewing of light-aroma baijiu, the type and grade of Daqu directly determine the flavor and quality of baijiu. The accurate classification and identification of Daqu has become a key technology for the quality control of baijiu production.
[0003] Traditional methods for classifying and identifying the types of Daqu (a type of starter culture) primarily rely on human sensory evaluation. This involves observing the appearance, cross-sectional shape, color, and odor of the Daqu, combined with human experience, to differentiate and grade the Daqu. Some existing technologies employ spectral detection, electronic nose detection, or traditional machine vision processing to assist in the identification process, using equipment to collect physicochemical or image information of the Daqu for classification.
[0004] However, traditional manual discrimination methods rely heavily on operator experience, are highly subjective, have poor consistency, and low detection efficiency, making them unsuitable for large-scale industrial production needs. Equipment such as spectrometers and electronic noses are expensive, require demanding sample preprocessing, are susceptible to environmental interference, and have weak model generalization capabilities. Traditional machine vision methods involve cumbersome feature extraction, insufficient recognition accuracy and robustness, making it difficult to achieve accurate, intelligent, and standardized discrimination of different types and grades of large-batch liquor. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, device, equipment, medium, and program product for classifying and identifying the grade and type of Daqu (a type of Chinese liquor) in a precise, intelligent, and standardized manner to address the aforementioned technical problems.
[0006] Firstly, this application provides a method for classifying and identifying the grade and type of Daqu (a type of Chinese liquor). The method includes:
[0007] Acquire various large-batch sample images and classify them into different levels; construct a dataset based on the large-batch sample images and their corresponding levels.
[0008] A large curve level classification model and a large curve category discrimination model are established respectively, with the large curve level classification model configured as a stacked convolutional kernel deep convolutional neural network model and the large curve category discrimination model configured as a multi-scale parallel feature fusion deep convolutional neural network model.
[0009] The dataset is used to train the Daqu grade classification model and the Daqu type discrimination model respectively, resulting in the trained Daqu grade classification model and the trained Daqu type discrimination model.
[0010] Based on the trained Daqu grade classification model and the trained Daqu type discrimination model, the input Daqu image to be detected will output the Daqu grade classification result and the Daqu type discrimination result respectively.
[0011] In some embodiments of the method, the large-scale classification model includes a visual geometric group feature extraction module and a convolutional block attention module;
[0012] The visual geometry group feature extraction module is configured as the feature extraction backbone of the large curve level classification model. The convolutional block attention module is connected to each convolutional feature output node of the feature extraction backbone. The convolutional block attention module is used to perform enhanced extraction of key features for large curve level classification.
[0013] In some embodiments of the method, the visual geometric group feature extraction module includes multiple convolutional feature blocks, and the output of each convolutional feature block is connected to a convolutional block attention module with a number of output channels matching the output channel number.
[0014] The convolutional block attention module includes a channel attention branch and a spatial attention branch. The channel attention branch is used to learn feature channel weights through adaptive average pooling and convolutional layers to enhance the channel response of the Daqu level classification features. The spatial attention branch is used to fuse the mean and maximum features of the feature map to locate key spatial regions of the Daqu image and complete spatial dimension weighting.
[0015] In some embodiments of the method, the large-scale curve type discrimination model includes a multi-scale parallel feature fusion module and a convolutional block attention module;
[0016] The multi-scale parallel feature fusion module is configured as the feature extraction backbone. The multi-scale parallel feature fusion module performs feature fusion through multi-scale convolution and pooling branches. The convolutional block attention module is integrated into the feature fusion node. The convolutional block attention module is used to enhance the large curve type discrimination features.
[0017] In some embodiments of the method, the multi-scale parallel feature fusion module includes multiple multi-scale feature units, each of which has multiple parallel convolutional branches and pooling branches of different scales, and the outputs of all branches are spliced and fused in the channel dimension; the convolutional block attention module is integrated into each multi-scale feature unit.
[0018] In some embodiments of the method, the multi-scale feature unit is provided with a 1×1 convolution branch, a 3×3 convolution branch, a 5×5 convolution branch, and a 3×3 max pooling branch; the front end of the 3×3 convolution branch is provided with a 1×1 convolution for dimensionality reduction, the front end of the 5×5 convolution branch is provided with a 1×1 convolution for dimensionality reduction, and the back end of the 3×3 max pooling branch is provided with a 1×1 convolution for dimensionality reduction. The outputs of each branch after dimensionality reduction are spliced and fused in the channel dimension.
[0019] According to a second aspect of the present disclosure, a device for classifying and identifying the grade and type of Daqu (a type of Chinese liquor) is provided. The device includes:
[0020] The dataset construction module is used to acquire various Daqu sample images and classify Daqu grades, and construct a dataset based on the Daqu sample images and the corresponding Daqu grades.
[0021] The model building module is used to build a large curve level classification model and a large curve category discrimination model respectively, which are fused with convolutional block attention modules. The large curve level classification model is configured as a stacked convolutional kernel deep convolutional neural network model, and the large curve category discrimination model is configured as a multi-scale parallel feature fusion deep convolutional neural network model.
[0022] The model training module is used to train the Daqu grade classification model and the Daqu type discrimination model using the dataset respectively, so as to obtain the trained Daqu grade classification model and the trained Daqu type discrimination model.
[0023] The output module is used to take the Daqu image to be detected as input, based on the trained Daqu level classification model and the trained Daqu type discrimination model, and output the Daqu level classification result and the Daqu type discrimination result respectively.
[0024] According to a third aspect of the present disclosure, a computer device is provided. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:
[0025] Acquire various large-batch sample images and classify them into different levels; construct a dataset based on the large-batch sample images and their corresponding levels.
[0026] A large curve level classification model and a large curve category discrimination model are established respectively, with the large curve level classification model configured as a stacked convolutional kernel deep convolutional neural network model and the large curve category discrimination model configured as a multi-scale parallel feature fusion deep convolutional neural network model.
[0027] The dataset is used to train the Daqu grade classification model and the Daqu type discrimination model respectively, resulting in the trained Daqu grade classification model and the trained Daqu type discrimination model.
[0028] Based on the trained Daqu grade classification model and the trained Daqu type discrimination model, the input Daqu image to be detected will output the Daqu grade classification result and the Daqu type discrimination result respectively.
[0029] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0030] Acquire various large-batch sample images and classify them into different levels; construct a dataset based on the large-batch sample images and their corresponding levels.
[0031] A large curve level classification model and a large curve category discrimination model are established respectively, with the large curve level classification model configured as a stacked convolutional kernel deep convolutional neural network model and the large curve category discrimination model configured as a multi-scale parallel feature fusion deep convolutional neural network model.
[0032] The dataset is used to train the Daqu grade classification model and the Daqu type discrimination model respectively, resulting in the trained Daqu grade classification model and the trained Daqu type discrimination model.
[0033] Based on the trained Daqu grade classification model and the trained Daqu type discrimination model, the input Daqu image to be detected will output the Daqu grade classification result and the Daqu type discrimination result respectively.
[0034] According to a fifth aspect of the present disclosure, a computer program product is provided. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0035] Acquire various large-batch sample images and classify them into different levels; construct a dataset based on the large-batch sample images and their corresponding levels.
[0036] A large curve level classification model and a large curve category discrimination model are established respectively, with the large curve level classification model configured as a stacked convolutional kernel deep convolutional neural network model and the large curve category discrimination model configured as a multi-scale parallel feature fusion deep convolutional neural network model.
[0037] The dataset is used to train the Daqu grade classification model and the Daqu type discrimination model respectively, resulting in the trained Daqu grade classification model and the trained Daqu type discrimination model.
[0038] Based on the trained Daqu grade classification model and the trained Daqu type discrimination model, the input Daqu image to be detected will output the Daqu grade classification result and the Daqu type discrimination result respectively.
[0039] The Daqu grade classification and type discrimination scheme provided in this application can construct a dataset by collecting Daqu sample images, establish a Daqu grade classification model and a Daqu type discrimination model that integrates convolutional block attention modules, and realize Daqu grade classification and type discrimination respectively, replacing the traditional manual sensory evaluation method, realizing the intelligent and standardized Daqu discrimination, improving discrimination efficiency and result consistency, and adapting to the quality control needs of Baijiu industrial production.
[0040] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0042] Figure 1 This is a flowchart illustrating a method for classifying and identifying the grade of Daqu liquor according to an exemplary embodiment;
[0043] Figure 2 This is a schematic diagram illustrating the structure of a Daqu (a type of Chinese liquor) grade classification model and a Daqu type differentiation model according to an exemplary embodiment;
[0044] Figure 3 This is a structural block diagram of a device for classifying and determining the grade of Daqu liquor according to an exemplary embodiment;
[0045] Figure 4 This is a diagram illustrating the internal structure of a computer device according to an exemplary embodiment. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0047] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure. The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded. For example, the use of terms such as "first," "second," etc., to denote names does not indicate any specific order.
[0048] In some embodiments provided in this disclosure, the execution of the Daqu (a type of Chinese liquor) grading and category identification methods can be controlled by a unified controller or by multiple controllers. These controllers may include controllers on local terminals or controllers on remote servers. In some embodiments, the controllers on local terminals and the controllers on servers may work together to complete the Daqu grading and category identification control processing. The local terminal mentioned in this disclosure may include, but is not limited to, various robotic devices, vehicle-mounted devices, personal computers, laptops, smartphones, tablets, wearable devices, medical devices, VR (Virtual Reality) devices, etc. The server may also be a server, server cluster, distributed subsystem, cloud processing platform, server containing blockchain nodes, or a combination thereof. The controllers described in this disclosure may include various control units capable of implementing logic processing functions, including but not limited to CPU (Central Processing Unit), PLC (Programmable Logic Controller), ECU (Electronic Control Unit), MCU (Microcontroller Unit), FPGA (Field Programmable Gate Array), and CPLD (Complex Programmable Logic Device), as well as controllers composed of one or more logic function units, chips, etc.
[0049] In some embodiments of this disclosure, a method for classifying and identifying the grade and type of Daqu (a type of Chinese liquor) is provided, such as... Figure 1 and Figure 2 As shown, it includes the following steps:
[0050] S20. Obtain various Daqu sample images and classify Daqu into different levels. Construct a dataset based on the Daqu sample images and the corresponding Daqu levels.
[0051] Daqu is the core saccharification and fermentation agent in Baijiu brewing. It is made from wheat, barley and peas as the main raw materials. After being crushed, mixed with water and pressed into brick-shaped koji blanks, microbial communities are cultivated in an artificially controlled temperature and humidity environment. The koji contains complex colonies of molds, yeasts and bacteria, which can secrete amylase and saccharifying enzymes to realize the saccharification of cereal starch and the conversion of ethanol, while metabolizing and producing flavor substances such as esters and acids.
[0052] A sample image of Daqu (a type of starter culture) usually refers to a cross-sectional image obtained by vertically splitting the Daqu used for brewing. The sample image of Daqu can fully present the appearance characteristics of Daqu, such as the thickness of the skin, the cross-sectional shape, the color, and the state of mycelial growth.
[0053] The grade of Daqu (a type of starter culture) usually refers to the quality level divided according to the thickness of the Daqu skin, the cross-sectional shape and the color difference, combined with the brewing quality and the use value. The grade of Daqu can be used to distinguish the quality of Daqu and its brewing suitability.
[0054] A dataset typically refers to a collection of large-scale sample images of Daqu (a type of Chinese liquor) with labeled grade and category information. A dataset can include a training set, a validation set, and a test set. These sets can be used for building, training, and validating the performance of deep neural network models, respectively.
[0055] S22. Establish a large curve level classification model and a large curve type discrimination model respectively, with the large curve level classification model configured as a stacked convolutional kernel deep convolutional neural network model, and the large curve type discrimination model configured as a multi-scale parallel feature fusion deep convolutional neural network model.
[0056] Convolutional block attention modules typically refer to feature enhancement modules integrated into deep convolutional neural networks. They can focus more on key features and / or key regions required for large curve classification and / or category discrimination, while weakening the interference of irrelevant background and / or redundant information.
[0057] The Daqu grade classification model usually refers to a deep convolutional neural network model with stacked convolutional kernels that integrates convolutional block attention modules. It can be used to identify the appearance features of Daqu and determine the quality grade to which Daqu belongs.
[0058] The Daqu type discrimination model usually refers to a multi-scale parallel feature fusion deep convolutional neural network model that integrates convolutional block attention modules. It can be used to distinguish different types of Daqu and identify the unique appearance features of each type of Daqu.
[0059] S24. The dataset is used to train the Daqu grade classification model and the Daqu type discrimination model respectively, to obtain the trained Daqu grade classification model and the trained Daqu type discrimination model.
[0060] In some implementations, the dataset may include a training set, which can be used to train the Daqu grade classification model and the Daqu type discrimination model respectively, to obtain the trained Daqu grade classification model and the trained Daqu type discrimination model.
[0061] In some examples, the large-scale sample images can be resized to a standard size of 224×224 pixels for data preprocessing, and the training set images can be randomly cropped, flipped, rotated, and color-dithered to enhance data diversity.
[0062] S26. Based on the trained Daqu grade classification model and the trained Daqu type discrimination model, input the Daqu image to be detected, and output the Daqu grade classification result and the Daqu type discrimination result respectively.
[0063] The classification result of Daqu (a type of Chinese liquor) usually refers to the quality grade of the Daqu corresponding to the input Daqu image after the Daqu classification model performs classification analysis. It can intuitively reflect the quality of the Daqu to be detected.
[0064] The Daqu type discrimination result usually refers to the category result of the Daqu corresponding to the Daqu image after the Daqu type discrimination model performs type discrimination analysis on the input Daqu image to be detected, which can determine the specific type of Daqu.
[0065] In some embodiments of this disclosure, a dataset can be constructed by collecting Daqu sample images, and a Daqu grade classification model and a Daqu type discrimination model fused with convolutional block attention modules can be established to realize Daqu grade classification and type discrimination respectively, replacing the traditional manual sensory evaluation method, realizing the intelligent and standardized Daqu discrimination, improving discrimination efficiency and result consistency, and adapting to the quality control needs of Baijiu industrial production.
[0066] In some implementations, different types of Daqu samples can be collected, classified into corresponding grades based on their appearance characteristics, and the cross-sections of the Daqu can be photographed to form sample images. For example, samples of three types of Daqu—Qingchaqu, Hongxinqu, and Houhuoqu—can be randomly collected, and classified into three categories—high-quality, first-grade, and second-grade—based on differences in bark thickness, cross-sectional shape, and color. The cross-sections of each Daqu piece are photographed after vertical segmentation to serve as sample images. All sample images can be randomly allocated into three independent sets: a training set, a validation set, and a test set, with 70%, 15%, and 15% allocated to each set, respectively. The training set is used for learning and updating model parameters; the validation set monitors model performance during training and serves as a basis for hyperparameter adjustment; and the test set is used to finally evaluate the model's generalization performance on unknown data. A strategy combining edge detection and morphological dilation can be employed, using morphological thresholding to extract the main image of the Daqu and remove background interference to ensure feature integrity.
[0067] The validation set is used to tune hyperparameters and evaluate model performance, while the test set is used to finally evaluate the model's generalization ability. Accuracy, precision, F1 score, ROC (Receiver Operating Character Curve), AUC (Area Under Curve), and confusion matrix are selected as evaluation metrics to assess model stability and reliability. The F1 score, a metric used in statistics and machine learning to evaluate the performance of classification models, is the harmonic mean of precision and recall.
[0068] In some embodiments of this disclosure, the large-scale classification model includes a visual geometric group feature extraction module and a convolutional block attention module; the visual geometric group feature extraction module is configured as the feature extraction backbone of the large-scale classification model, and the convolutional block attention module is connected to each convolutional feature output node of the feature extraction backbone; the convolutional block attention module is used to perform enhanced extraction of key features for large-scale classification.
[0069] In some implementations, the large-scale classification model may include a visual geometry group feature extraction module and a convolutional block attention module. The visual geometry group feature extraction module may include a VGG (Visual Geometry Group) network model, such as the VGG16 model; the convolutional block attention module (CBAM) can be integrated into the deep convolutional neural network architecture VGG16, forming a VGG16-CBAM fusion model architecture. The network architecture of the visual geometry group feature extraction module uses repeatedly stacked small 3×3 convolutional kernels as its core feature, containing five convolutional blocks. Each convolutional block performs 2, 2, 3, 3, 3 different layers of 3×3 convolution operations. After each convolution, a ReLU activation function is used, and spatial downsampling with 2×2 max pooling is performed to progressively expand the receptive field of the feature map and reduce the spatial dimension. Finally, three fully connected layers containing 4096, 4096, and 1000 neurons are connected to output the model's prediction results.
[0070] In some embodiments of this disclosure, the visual geometry group feature extraction module is used as the feature extraction backbone of the Daqu level classification model. The convolutional block attention module is connected to each convolutional feature output node of the backbone, which can accurately extract the key features of Daqu level classification, enhance the feature representation capability, reduce the interference of irrelevant features on the discrimination result, and effectively improve the accuracy of Daqu level classification.
[0071] In some embodiments of this disclosure, the visual geometry group feature extraction module includes multiple convolutional feature blocks, and the output of each convolutional feature block is connected to a convolutional block attention module with a matching number of output channels. The convolutional block attention module includes a channel attention branch and a spatial attention branch. The channel attention branch is used to learn feature channel weights through adaptive average pooling and convolutional layers to enhance the channel response of the large curvature level classification features. The spatial attention branch is used to fuse the mean and maximum features of the feature map to locate key spatial regions of the large curvature image and complete spatial dimension weighting.
[0072] In some implementations, the convolutional block attention module may include channel attention branches and spatial attention branches, enabling the network to adaptively focus on key regions of the large curvature image in both channel and spatial dimensions, suppressing irrelevant background interference. The channel and spatial attention modules used in the CBAM module dynamically calibrate and reweight the convolutional features from the two dimensions of feature and spatial location, respectively, to extract more comprehensive and refined features of different large curvatures. The model decision-making process can be interpreted through Grad-CAM visualization technology.
[0073] In some examples, the CBAM module includes a channel attention branch and a spatial attention branch. The channel attention branch enhances the response of the discriminative feature channels by analyzing global statistics of different feature channels; the spatial attention branch locates key spatial regions in the feature map by aggregating cross-channel information. The Convolutional Block Attention (CBAM) module can be integrated into the visual geometry group feature extraction module, as follows:
[0074] The channel attention branch performs global average pooling and global max pooling operations on the input feature map to obtain the aggregated representation of the two channel features, and then obtains the normalized channel attention map, which can be referred to in the following formula (1):
[0075]
[0076] In Equation (1), AvgPool(F) and MaxPool(F) represent global average pooling and global max pooling operations on the input feature map F, respectively. MLP represents a shared multilayer perceptron network, σ represents the Sigmoid activation function, and Mc(F) represents the channel attention map of the final output normalized.
[0077] The feature map after channel attention weighting is input into the spatial attention branch, where average pooling and max pooling are performed to generate two spatial feature descriptors. The two descriptors are then concatenated and passed through a convolutional layer to generate the spatial dimension importance weights, as shown in equation (2) below:
[0078]
[0079] In equation (2), AvgPool(F') and MaxPool(F') represent the average pooling and max pooling operations along the channel dimension, respectively; f represents the feature concatenation operation along the channel dimension; 7×7 represents the convolution operation with a kernel size of 7×7; and σ represents the Sigmoid activation function. Finally, a normalized spatial attention map Ms(F') can be output.
[0080] In some examples, the VGG16-CBAM model takes a large curve sample image of size 224×224×3 as input and extracts features using five convolutional feature blocks from the VGG16 pre-trained backbone network. Each feature block consists of stacked convolutional layers with 2 layers of 64 channels, 2 layers of 128 channels, 3 layers of 256 channels, 3 layers of 512 channels, and 3 layers of 512 channels, respectively. After feature extraction, the output is classified by three fully connected layers. The output of each convolutional feature block is connected to a CBAM attention module matching the number of channels to enhance feature representation. The CBAM module first constructs a channel attention branch through adaptive average pooling and convolutional layers to learn channel weights, and then fuses the mean and maximum features of the feature map to construct a spatial attention branch to complete spatial dimension weighting, thereby achieving feature selection in both channel and spatial dimensions. In the feature extraction stage, a hierarchical parameter freezing strategy can be adopted. The CBAM-enhanced network can freeze the parameters of the first three convolutional layers, and only unfreeze the parameters of the later convolutional layers and the attention module to participate in gradient updates. After the high-dimensional feature map enhanced by the attention mechanism is flattened, it is connected to a fully connected classifier with a differentiated structure to achieve feature mapping and category discrimination. The feature extraction capability of the entire network at the convolutional level, combined with the feature enhancement characteristics of the attention mechanism, ultimately achieves accurate classification of large curve sample images.
[0081] In some embodiments of this disclosure, at the output end of each convolutional feature block of the visual geometry group feature extraction module, a convolutional block attention module with the corresponding number of output channels is matched. The channel attention branch learns the feature channel weights to enhance the channel response of effective features. The spatial attention branch locates the key spatial regions of the large curve image and completes spatial weighting. The dual-dimensional feature optimization further improves the reliability and stability of the hierarchical classification.
[0082] In some embodiments of this disclosure, the large-scale cursive type discrimination model includes a multi-scale parallel feature fusion module and a convolutional block attention module; the multi-scale parallel feature fusion module is configured as the feature extraction backbone, and the multi-scale parallel feature fusion module performs feature fusion through multi-scale convolution and pooling branches; the convolutional block attention module is integrated into the feature fusion node, and the convolutional block attention module is used to enhance the large-scale cursive type discrimination features.
[0083] In some implementations, the Convolutional Block Attention (CBAM) module can be integrated into a multi-scale parallel feature fusion module to construct a multi-scale parallel feature fusion deep convolutional neural network model that incorporates the CBAM module, with the multi-scale parallel feature fusion module serving as the backbone for feature extraction. The CBAM module is used to enhance the features for identifying different types of Daqu (a type of Chinese liquor), thereby improving the accuracy of Daqu category identification.
[0084] In some embodiments of this disclosure, a multi-scale parallel feature fusion module is used as the feature extraction backbone of the Daqu type discrimination model. By fusing features through multi-scale convolution and pooling branches, and integrating a convolutional block attention module at the feature fusion node, various features required for Daqu type discrimination can be comprehensively extracted, while strengthening the core discrimination features and improving the accuracy of Daqu type discrimination.
[0085] In some embodiments of this disclosure, the multi-scale parallel feature fusion module includes multiple multi-scale feature units, each of which is provided with multiple parallel convolutional branches and pooling branches of different scales, and the outputs of all branches are spliced and fused in the channel dimension; the convolutional block attention module is integrated into each multi-scale feature unit.
[0086] In some implementations, the multi-scale parallel feature fusion module can be composed of multiple multi-scale feature units combined sequentially to extract appearance and texture features at different scales from the Daqu sample image. Each multi-scale feature unit contains multiple parallel branches, employing convolutional and pooling structures of different scales for feature extraction, enabling the model to simultaneously capture both fine local features and overall contour features in the Daqu image. After each branch completes feature extraction, the output features are merged along the channel dimension to achieve comprehensive fusion of multi-scale information. A convolutional block attention module is integrated within each multi-scale feature unit to enhance key features after feature fusion, further improving the accuracy and stability of Daqu type discrimination.
[0087] In some embodiments of this disclosure, multiple multi-scale feature units are set in the multi-scale parallel feature fusion module. Each unit extracts features in parallel through multiple convolution and pooling branches of different scales, and completes feature splicing and fusion in the channel dimension. Furthermore, a convolutional block attention module is integrated in each unit to balance the multi-scale nature and accuracy of feature extraction, thereby reducing the computational load of the model while improving the overall discrimination performance.
[0088] In some embodiments of this disclosure, the multi-scale feature unit is provided with a 1×1 convolution branch, a 3×3 convolution branch, a 5×5 convolution branch, and a 3×3 max pooling branch; the front end of the 3×3 convolution branch is provided with a 1×1 convolution for dimensionality reduction, the front end of the 5×5 convolution branch is provided with a 1×1 convolution for dimensionality reduction, and the back end of the 3×3 max pooling branch is provided with a 1×1 convolution for dimensionality reduction. The outputs of each branch after dimensionality reduction are spliced and fused in the channel dimension.
[0089] In some implementations, the multi-scale parallel feature fusion module can enhance representation capabilities through parallel multi-scale feature fusion. It can use 1×1 convolutions for dimensionality reduction to reduce computation. The input image is 224×224×3. It is processed by a Stem structure consisting of 7×7 convolution and max pooling, 1×1 convolution for dimensionality reduction, and 3×3 convolution and max pooling. Then, nine Inception modules are stacked. In each Inception module, the four outputs of 1×1 convolution, 3×3 convolution, 5×5 convolution and 3×3 max pooling are concatenated in the channel dimension. Finally, global average pooling is used to replace the fully connected layer, linking Dropout, a linear classification layer regarded as a 1×1 convolution, and the Softmax output.
[0090] In some examples, the multi-scale parallel feature fusion module can include the GoogLeNet model, where the Inception module employs parallel multi-scale convolution and pooling operations. It uses 1x1 convolutions to transform feature dimensions, reducing computational complexity while enhancing the non-linear combination of local features. Unlike traditional convolutional neural networks, GoogLeNet introduces multiple convolutional filter sizes in the same layer, improving representational power while maintaining computational efficiency. The 3×3 convolutional branch uses a 1×1 convolution for dimensionality reduction at its front end, the 5×5 convolutional branch uses a 1×1 convolution for dimensionality reduction at its front end, and the 3×3 max-pooling branch uses a 1×1 convolution for dimensionality reduction at its back end. The model achieves multi-scale information fusion by concatenating channel dimensions. In some examples, the Convolutional Block Attention (CBAM) module can be integrated into the deep convolutional neural network architecture GoogLeNet. This allows the network to automatically focus on core feature regions related to the major curve type after completing multi-scale feature fusion, suppressing interference from background and irrelevant textures, and further improving the specificity and discriminative ability of feature representation. After each multi-scale feature unit completes branch splicing and feature fusion, a convolutional block attention module is connected. First, the channel dimension weights of the fused features are learned to strengthen the feature channels that play a key role in distinguishing Daqu types. Then, the feature map is spatially weighted and located to accurately lock the key regions that determine the type attributes, such as Daqu cross-section, color, and texture. This allows the network to stably extract effective information under complex appearance changes, thereby improving the accuracy and robustness of Daqu type discrimination.
[0091] In some embodiments of this disclosure, a deep convolutional neural network model with stacked convolutional kernels and an integrated convolutional block attention module is used as the classification model for Daqu (a type of Chinese glutinous rice). This enables the network to adaptively focus on key regions of the Daqu image, such as the skin of Daqu, the fire ring and two eyebrows of Houhuoqu, and the red heart of Hongxinqu, in both channel and spatial dimensions, thereby suppressing irrelevant background interference. The channel and spatial attention modules used in the CBAM module can dynamically calibrate and reweight the convolutional features from both feature and spatial location dimensions, thereby achieving a more comprehensive and refined extraction of different Daqu features. The accuracy rates of Hongxinqu, Qingchaqu, and Houhuoqu in the Daqu classification model are 97.82%, 94.89%, and 94.66%, respectively. Furthermore, the model's decision-making process can be interpreted using Grad-CAM visualization technology, revealing that its focused area highly matches the sensory feature points determined by industry experts, greatly enhancing the model's interpretability and credibility.
[0092] In some embodiments of this disclosure, a multi-scale parallel feature fusion deep convolutional neural network model incorporating convolutional block attention modules is used as the large curve category discrimination model. Compared with traditional models, its accuracy is improved from 92.41% to 94.30%, and its F1 score is increased from 0.92 to 0.94. Moreover, the recognition accuracy for secondary curves can reach 100%, demonstrating excellent category discrimination ability.
[0093] In some embodiments of this disclosure, convolution and pooling branches of various scales are set in the multi-scale feature unit. Dimensionality reduction of each branch is completed through convolution operation, balancing the computational efficiency of the model and the feature extraction effect. After the multi-branch features are stitched together, they can completely cover various appearance features of the large curve image, improve the adaptability of the category discrimination model to different morphologies of large curves, and make the discrimination results more stable and reliable.
[0094] The methods for classifying and identifying the grade and type of Daqu (a type of Chinese liquor) disclosed herein can construct a dataset by collecting Daqu sample images, establish a Daqu grade classification model and a Daqu type identification model that integrates convolutional block attention modules, and respectively realize Daqu grade classification and type identification, replacing the traditional manual sensory evaluation method, realizing the intelligent and standardized identification of Daqu, improving the identification efficiency and result consistency, and adapting to the quality control needs of industrialized production of Baijiu (Chinese liquor).
[0095] It is understood that the various embodiments of the methods described in this specification are presented in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. Related details can be found in the descriptions of other method embodiments.
[0096] It should be understood that although the steps in the flowcharts shown in the accompanying drawings are displayed sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the accompanying drawings may include multiple steps or stages, which are not necessarily completed at the same time, but may be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least a portion of the steps or stages of other steps.
[0097] Based on the description of the above-described embodiments of the method for classifying and identifying the grade and type of Daqu liquor, this disclosure also provides a device for implementing the above-described method for classifying and identifying the grade and type of Daqu liquor. The device may include a system (including a distributed system), software (application), module, component, controller, server, terminal, etc., using the method described in the embodiments of this specification, combined with necessary hardware implementation. Based on the same innovative concept, the devices in one or more embodiments provided in this disclosure are as described in the following embodiments. Since the implementation schemes and methods for solving the problem by the device are similar, the implementation of the specific device in the embodiments of this specification can refer to the implementation of the aforementioned method, and repeated details will not be repeated. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0098] Figure 3 This is a schematic block diagram illustrating a device for classifying and identifying the grade of Daqu liquor according to an exemplary embodiment. The device can be the aforementioned terminal, a server, or a module, component, device, control unit, etc., integrated into the terminal. For details, please refer to... Figure 3The device 100 may include: a dataset construction module 120, a model building module 140, a model training module 160, and an output module 180. The dataset construction module 120 is used to acquire various large-bone sample images and classify them into different levels, constructing a dataset based on the sample images and their corresponding levels. The model building module 140 is used to build a large-bone level classification model and a large-bone type discrimination model, respectively, by fusing convolutional block attention modules. The large-bone level classification model is configured as a stacked convolutional kernel deep convolutional neural network model, and the large-bone type discrimination model is configured as a multi-scale parallel feature fusion deep convolutional neural network model. The model training module 160 is used to train the large-bone level classification model and the large-bone type discrimination model using the dataset, respectively, to obtain trained large-bone level classification models and trained large-bone type discrimination models. The output module 180 is used to input a large-bone image to be detected based on the trained large-bone level classification model and the trained large-bone type discrimination model, and output the large-bone level classification result and the large-bone type discrimination result, respectively.
[0099] Each module in the aforementioned classification and type identification device for large-grain liquor can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0100] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for classifying and determining the grade of a type of liquor.
[0101] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0102] Based on the foregoing description of the relevant methods and apparatus embodiments, this disclosure also provides a computer device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the method for classifying and identifying the grade of Daqu (a type of Chinese liquor) as described in any embodiment of this specification.
[0103] Based on the foregoing description of the relevant methods and apparatus embodiments, this disclosure also provides a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by the processor of a computer device, enables the computer device to implement the method for classifying and identifying the grade of Daqu liquor as described in any embodiment of this disclosure.
[0104] Based on the foregoing description of the relevant methods and apparatus embodiments, this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the method for classifying and identifying the grade of Daqu liquor as described in any embodiment of this specification.
[0105] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, hardware + program embodiments are relatively simple in description because they are fundamentally similar to method embodiments; relevant parts can be referred to the descriptions in the method embodiments.
[0106] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0107] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0108] It should be noted that the apparatus, computer equipment, storage medium, and computer program products described above may also include other implementation methods according to the description of the method embodiments. Specific implementation methods can be found in the description of the relevant method embodiments. Furthermore, new embodiments formed by combinations of features from various methods, apparatuses, devices, and server embodiments still fall within the scope of this disclosure and will not be elaborated upon here.
[0109] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in the same or different software and / or hardware, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling and communication connections between the devices or units shown or described can be implemented through direct and / or indirect coupling / connection, through standard or custom interfaces or protocols, and can be implemented electrically, mechanically, or in other forms.
[0110] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0111] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for classifying and identifying the grade and type of Daqu (a type of Chinese liquor), characterized in that, The method includes: Acquire various large-batch sample images and classify them into different levels; construct a dataset based on the large-batch sample images and their corresponding levels. A large curve level classification model and a large curve category discrimination model are established respectively, with the large curve level classification model configured as a stacked convolutional kernel deep convolutional neural network model and the large curve category discrimination model configured as a multi-scale parallel feature fusion deep convolutional neural network model. The dataset is used to train the Daqu grade classification model and the Daqu type discrimination model respectively, resulting in the trained Daqu grade classification model and the trained Daqu type discrimination model. Based on the trained Daqu grade classification model and the trained Daqu type discrimination model, the input Daqu image to be detected will output the Daqu grade classification result and the Daqu type discrimination result respectively.
2. The method according to claim 1, characterized in that, The large-scale classification model includes a visual geometric group feature extraction module and a convolutional block attention module; The visual geometry group feature extraction module is configured as the feature extraction backbone of the large curve level classification model. The convolutional block attention module is connected to each convolutional feature output node of the feature extraction backbone. The convolutional block attention module is used to perform enhanced extraction of key features for large curve level classification.
3. The method according to claim 2, characterized in that, The visual geometry group feature extraction module includes multiple convolutional feature blocks, and the output of each convolutional feature block is connected to a convolutional block attention module that matches the number of output channels. The convolutional block attention module includes a channel attention branch and a spatial attention branch. The channel attention branch is used to enhance the channel response of the large curve level classification features by learning feature channel weights through adaptive average pooling and convolutional layers. The spatial attention branch is used to fuse the mean and maximum features of the feature map, locate key spatial regions of the large curve image, and complete spatial dimension weighting.
4. The method according to claim 1, characterized in that, The large-scale cursive type discrimination model includes a multi-scale parallel feature fusion module and a convolutional block attention module; The multi-scale parallel feature fusion module is configured as the feature extraction backbone. The multi-scale parallel feature fusion module performs feature fusion through multi-scale convolution and pooling branches. The convolutional block attention module is integrated into the feature fusion node. The convolutional block attention module is used to enhance the large curve type discrimination features.
5. The method according to claim 4, characterized in that, The multi-scale parallel feature fusion module includes multiple multi-scale feature units, each of which has multiple parallel convolutional branches and pooling branches of different scales. The outputs of all branches are spliced and fused in the channel dimension. The convolutional block attention module is integrated into each multi-scale feature unit.
6. The method according to claim 5, characterized in that, The multi-scale feature unit is equipped with a 1×1 convolution branch, a 3×3 convolution branch, a 5×5 convolution branch, and a 3×3 max pooling branch; The 3×3 convolutional branch is dimensionality reduced by setting a 1×1 convolution at the front end, the 5×5 convolutional branch is dimensionality reduced by setting a 1×1 convolution at the front end, and the 3×3 max pooling branch is dimensionality reduced by setting a 1×1 convolution at the back end. The outputs of each branch after dimensionality reduction are spliced and merged in the channel dimension.
7. A device for classifying and identifying the grade and type of Daqu (a type of Chinese liquor), characterized in that, The device includes: The dataset construction module is used to acquire various Daqu sample images and classify Daqu grades, and construct a dataset based on the Daqu sample images and the corresponding Daqu grades. The model building module is used to build a large curve level classification model and a large curve category discrimination model respectively, which are fused with convolutional block attention modules. The large curve level classification model is configured as a stacked convolutional kernel deep convolutional neural network model, and the large curve category discrimination model is configured as a multi-scale parallel feature fusion deep convolutional neural network model. The model training module is used to train the Daqu grade classification model and the Daqu type discrimination model using the dataset respectively, so as to obtain the trained Daqu grade classification model and the trained Daqu type discrimination model. The output module is used to take the Daqu image to be detected as input, based on the trained Daqu level classification model and the trained Daqu type discrimination model, and output the Daqu level classification result and the Daqu type discrimination result respectively.
8. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, It stores a computer program thereon, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.