Maotai-flavor liquor geographical indication product identification method, equipment and medium
By extracting the multi-dimensional growth images and infrared spectral image features of sauce-flavored liquor samples and inputting them into the deep learning recognition model, the problems of high detection cost, long cycle and inaccurate identification of sauce-flavored liquor in the prior art are solved, and fast and accurate identification of origin is achieved.
Patent Information
- Application Number
- CN202411558790.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the detection cost of soybean-flavored liquor is high, the cycle is long, and the identification is not accurate enough.
By obtaining the multi-dimensional growth images and infrared spectral images of sauce-flavored liquor samples, the time-sequential growth image feature extraction model and hyperspectral winemaking image feature extraction model extract features, and then fuse them and input them into the deep learning recognition model to output the geographical indication origin information of the sauce-flavored liquor samples.
It realizes the rapid and accurate identification of geographical indication origin of sauce-flavored liquor, reduces the detection cost and cycle, and improves the accuracy of identification.
Smart Images

Figure CN119516536A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of deep learning technology, and specifically relates to a method, device and medium for identifying geographical indication products of Maotai-flavor liquor. Background Art
[0002] Maotai-flavor liquor is a type of liquor brewed from sorghum and wheat. With its unique brewing process and excellent quality, it occupies an important position in the liquor market. Although its output accounts for only a small proportion, its sales revenue and profit account for a relatively high proportion. This is mainly due to the unique taste and quality of Maotai-flavor liquor, as well as the increasing demand of consumers for high-end liquor. In the future, the market growth space for Maotai-flavor liquor is still broad, and its unique brewing process and quality advantages will enable it to maintain its leading position in the liquor market.
[0003] The production process of Maotai-flavor liquor has high requirements for the geographical environment. There are differences in raw materials, brewing processes, climate and environment in Maotai-flavor liquors from different production areas, which lead to differences in the quality and taste of the liquor. For example, Maotai Town in Guizhou has unique climate, soil and water conditions, which provide excellent conditions for brewing high-quality Maotai-flavor liquor. Therefore, incorporating the origin of the origin into the grading and identification system can more accurately evaluate the quality and value of the liquor and provide consumers with clearer purchasing guidance.
[0004] The origin identification technology of Maotai-flavor liquor can more accurately determine the origin information of liquor, thereby protecting geographical indication products, combating counterfeit and shoddy products, safeguarding the legitimate rights and interests of consumers and promoting the sustainable development of the industry. The identification of Maotai-flavor liquor mainly relies on the tasting experience of wine tasters and various mass spectrometers to detect the chemical composition content in the liquor for comprehensive evaluation. However, since the detection of Maotai-flavor liquor requires a large number of samples and the determination of the content of various elements is affected by multiple factors such as the soil, climate, raw materials, and brewing process of the planting area, these methods have the disadvantages of high detection cost and long cycle.
[0005] Therefore, how to overcome the defects in the prior art is a technical problem that those skilled in the art need to consider. Summary of the invention
[0006] In view of the above analysis, the embodiments of the present invention aim to provide a method, device and medium for identifying geographical indication products of Maotai-flavor liquor, so as to solve the defects of existing solutions such as high detection cost, long cycle and inaccurate identification.
[0007] In a first aspect, the present application provides a method for identifying a Maotai-flavor liquor geographical indication product, comprising:
[0008] Obtain multi-dimensional growth images of Maotai-flavor liquor sample raw materials and infrared spectrum images of Maotai-flavor liquor samples;
[0009] Extracting multi-dimensional growth image features of the sample raw material from the multi-dimensional growth image using a time-series growth image feature extraction model;
[0010] Extracting infrared spectral image features of the sample from the infrared spectral image of the Maotai-flavor liquor sample using a hyperspectral brewing image feature extraction model;
[0011] The multi-dimensional growth image features of the sample raw materials and the infrared spectrum image features of the samples are fused to obtain the fusion features of the Maotai-flavor liquor.
[0012] Inputting the fusion features of the Maotai-flavor liquor into the constructed Maotai-flavor liquor deep learning recognition model, and outputting the geographical indication origin information of the Maotai-flavor liquor sample;
[0013] Among them, the deep learning recognition model for Maotai-flavor liquor is a model obtained by multiple iterative training of the deep learning model using a training data set with origin labels.
[0014] Optionally, the step of acquiring the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample comprises:
[0015] The server receives the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample collected and uploaded by the user device;
[0016] Among them, the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample are encrypted on the user device side; and the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample are decrypted on the server side.
[0017] Optionally, the encrypting process of the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample on the user device side includes:
[0018] The multi-dimensional growth images of n Maotai-flavor liquor sample raw materials are scaled by an image scaling algorithm to hide the image information into n pseudo images t; the information of the original image is embedded by adjusting the pixel value of the pseudo image; the adjustment amount of each pixel is determined by the pixel value of the corresponding position of the original image and the preset weight; the kernel function is used to define the distribution of weights to determine the influence range of each original image pixel on the pseudo image pixel value; each pixel point in the pseudo image corresponds to its specific kernel size and weight, which is stored as the first stage key;
[0019] Using the images obtained from the first stage of encryption, select one of them and use the modulation mode K1(x,y) for ghost imaging encryption. The ciphertext C is obtained through the bucket detector. The calculation formula is: B i =∫T(x,y)I i (x,y)dxdy, where T(x,y) is the image to be encrypted, B i is the i-th data collected by the bucket detector; during the encryption process, the two-dimensional image T(x,y) of size n×n is transformed into a one-dimensional column vector (n 2 ×1), I i (x p ,Y q ) is the i-th light intensity distribution function, where i = 1, 2, ... N; p, q = 1, 2, ... n;
[0020] Using the ciphertext as a constraint, the modulation patterns of the ciphertext image are generated. These modulation patterns are used as the second-stage keys of the corresponding images. The calculation formula is:
[0021] FT[H i (x,y)M(x,y)](ε,η)| ε=0 , η=0 =D i
[0022]
[0023] where FT[·] is the Fourier transform, H i (x, y) is a series of modulation modes, M(x, y) is the constraint in the signal domain, that is, given the target image, Di is the generated ciphertext, mh i (ε,η) is the new Fourier spectrum generated;
[0024] The ciphertext C measured by the bucket detector is sent to the server through a public channel; the first-stage key and the second-stage key are sent to the server through a secure channel to complete the encryption;
[0025] The decryption process of the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample on the server side includes:
[0026] The server uses the received ciphertext C, the first-stage key, and the second-stage key to decrypt the fake image;
[0027] After getting the pseudo image, the image is decrypted according to the kernel and weights in the scaling algorithm.
[0028] Optionally, the extracting multi-dimensional growth image features of the sample raw material from the multi-dimensional growth image using the time-series growth image feature extraction model includes:
[0029] Constructing a time-series growing image feature extraction model; the time-series growing image feature extraction model includes a layer space mapping module, an attention module and a cross-channel gating module;
[0030] The layer space mapping module receives the original features obtained by the ResNet50 residual network, performs data enhancement, and uses the image pyramid technology to fuse the features of sample raw materials of different scales;
[0031] The attention module includes three aspects: channel attention, spatial attention and temporal attention. The channel attention mechanism scores the importance of each channel by weighted summation to highlight the features with great contribution. The spatial attention focuses on the important areas in the growth image of the sample raw material, and identifies the key local features of the sample raw material by learning the weight of each pixel in the feature map. The temporal attention focuses on the important areas in the growth image of the sample raw material, and identifies the key local features of the sample raw material by learning the weight of each pixel in the feature map.
[0032] The cross-channel gating module introduces a strategy based on gating mechanism and multi-head attention; the gating mechanism is used to screen out important local target areas, and the multi-head attention explores and extracts discriminative features in local areas from multiple angles; the gated attention features are fused with the original features, and the fitting ability of the model is enhanced through a multi-layer fully connected network.
[0033] Optionally, the extracting the infrared spectrum image features of the sample from the infrared spectrum image of the Maotai-flavor liquor sample using the hyperspectral brewing image feature extraction model includes:
[0034] The hyperspectral winemaking image feature extraction model includes: an LSTM adaptive pruning module, a feature processing module and a dual global context attention module;
[0035] The LSTM adaptive pruning module is used to model the sequence data, and the optimal split point is selected according to the output; the sequence data is divided into multiple subsequences, each of which includes the required key information;
[0036] The feature processing module uses two parallel 2D CNN architectures to process the spectral data and extract time-frequency features;
[0037] The dual global context attention module includes two GCA modules and a CNN; the first GCA module includes CNN and a GCA to form a two-stream network CNN-GCA to realize the component utilization of input time-frequency features; the other GCA module follows the CNN-GCA network to analyze the fusion of high-level features and capture the global context information of SER, and the two parts are fused through the fusion module to obtain high-level features with precise contribution and layer correlation.
[0038] Optionally, the step of fusing the multi-dimensional growth image features of the sample raw material and the infrared spectrum image features of the sample to obtain the fusion features of the Maotai-flavor liquor includes:
[0039] The multi-dimensional growth image features of the sample raw materials and the infrared spectrum image features of the sample are processed separately through the feature projection layer, and the calculation formula is:
[0040] f S =ξ(FC(X s ))
[0041] f W =ξ(FC(X w ))
[0042] f B =ξ(FC(X b ))
[0043] Among them, f S ∈R K 、f W ∈R K and f B ∈R K They refer to the output vectors of the multi-dimensional growth image features of the sample raw material and the infrared spectrum image features of the sample through the feature projection layer, respectively; ξ is the RELU activation function, and FC(·) represents the fully connected layer;
[0044] In the subsequent bilinear pooling layer, f S 、f W and f B The outer product is calculated between them to obtain the feature map matrix, and then the matrix is flattened into a vector The calculation formula is:
[0045]
[0046] in, represents the outer product operation;
[0047] Finally, f bil Send it to the output module and add f to the features obtained by weighted summation and feature concatenation out ∈R DAs the final output of the multimodal fusion module, the calculation formula is:
[0048] f out =FC(ξ[FC(f bil )]).
[0049] Optionally, the Maotai-flavor liquor deep learning recognition model has a fully connected layer for receiving the fusion features and outputting the classification result of the origin;
[0050] The training set with origin labels is used to train the deep learning recognition model of Maotai-flavor liquor. The loss function of the deep learning recognition model of Maotai-flavor liquor is:
[0051] L(origin)=∑ i y i *log(p i )
[0052] Among them, y i is the value of the i-th element in the one-hot encoding form of the true label, p i is the value of the i-th element in the probability vector output by the model; then, the back propagation algorithm is used to update the network parameters of the fully connected layer to optimize the deep learning recognition model of the sauce-flavor liquor.
[0053] Optionally, after obtaining the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample, the method further includes:
[0054] Preprocessing the multi-dimensional growth image and the infrared spectrum image;
[0055] Preprocessing the multidimensional growth image includes: constructing positive and negative data sets of the multidimensional growth image by inserting a pseudo image, performing grayscale processing, Canny edge algorithm and region growing processing on the time series image;
[0056] The preprocessing of the infrared spectrum image includes: using standard normal transformation SNV, polynomial correction and wavelet transformation to preprocess the positive and negative sample data.
[0057] According to a second aspect of the present application, there is provided a device for identifying geographical indication products of Maotai-flavor liquor, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, a method for identifying geographical indication products of Maotai-flavor liquor according to any one of the above-described methods is implemented.
[0058] The third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned methods for identifying geographical indication products of Maotai-flavor liquor.
[0059] The method for identifying geographical indication products of Maotai-flavor liquor provided in the present application is to obtain the multi-dimensional growth image of Maotai-flavor liquor sample raw materials and the infrared spectrum image of Maotai-flavor liquor samples; extract the multi-dimensional growth image features of the sample raw materials using a time-series growth image feature extraction model; extract the infrared spectrum image features of the samples using a hyperspectral brewing image feature extraction model; fuse the multi-dimensional growth image features of the sample raw materials and the infrared spectrum image features of the samples to obtain the fusion features of Maotai-flavor liquor; input the fusion features into the constructed Maotai-flavor liquor deep learning recognition model, and output the geographical indication origin information of the Maotai-flavor liquor samples. The present application combines the growth time-series features and infrared spectrum image features of Maotai-flavor liquor sample raw materials, and realizes the rapid and accurate identification of the origin of Maotai-flavor liquor with geographical indications based on deep learning, providing a new technical guarantee for the intelligent traceability identification of Maotai-flavor liquor. In addition, the present application also provides a Maotai-flavor liquor geographical indication product identification device and medium with the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this specification. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0061] Figure 1 A flowchart of a specific implementation method of the method for identifying geographical indication products of Maotai-flavor liquor provided in this application;
[0062] Figure 2 A flowchart of another specific implementation method of the method for identifying a geographical indication product of a Maotai-flavor liquor provided in this application;
[0063] Figure 3 A schematic diagram of another specific implementation of the method for identifying a geographical indication product of a Maotai-flavor liquor provided in this application;
[0064] Figure 4 A schematic diagram of the structure of a time-series growth image feature extraction model in another specific implementation of the method for identifying geographical indication products of Maotai-flavor liquor provided in this application;
[0065] Figure 5 A schematic diagram of the structure of a hyperspectral brewing image feature extraction model in another specific implementation of the method for identifying geographical indication products of Maotai-flavor liquor provided in this application;
[0066] Figure 6This is a structural block diagram of the geographical indication product identification device for the sauce-flavor liquor provided in this application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that, in the absence of conflict, the embodiments in the present disclosure and the features in the embodiments can be combined, separated, interchanged and / or rearranged with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0068] The terms used here are for the purpose of describing specific embodiments, and are not intended to be restrictive. As used here, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups. It should also be noted that, as used here, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or the values provided that will be recognized by those of ordinary skill in the art.
[0069] A flowchart of a specific implementation method of the method for identifying geographical indication products of Maotai-flavor liquor provided in this application is as follows Figure 1 As shown, the method includes:
[0070] S101: Acquire a multi-dimensional growth image of a Maotai-flavor liquor sample raw material and an infrared spectrum image of the Maotai-flavor liquor sample.
[0071] Specifically, a multi-dimensional growth image of a Maotai-flavor liquor sample raw material can be collected on the user device side. After collecting the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample on the user device side, the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample are uploaded to the server side for subsequent processing.
[0072] Among them, the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample are encrypted on the user device side; and the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample are decrypted on the server side.
[0073] S102: extracting multi-dimensional growth image features of the sample raw material from the multi-dimensional growth image using a time-series growth image feature extraction model.
[0074] Among them, the time-series growth image feature extraction model is a deep learning-based model, which is used to extract and identify the multi-dimensional growth image features of sample raw materials so as to be used for the origin identification of Maotai-flavor liquor.
[0075] Among them, the time series growth image feature extraction model mainly includes:
[0076] Module 1: Layer Space Mapping (LSM) module: After obtaining the original features using the ResNet50 network, the image pyramid technology is used to fuse features of different scales, and the globality and accuracy of the features are enhanced through the attention mechanism.
[0077] Module 2: Attention module: including channel attention, spatial attention and temporal attention. These mechanisms work together to improve the model's recognition accuracy of key local features in sorghum growth images.
[0078] Among them, channel attention uses global pooling and one-dimensional convolution for feature fusion to focus on important channel features. Spatial attention uses global pooling and two-dimensional convolution to learn spatial interaction information and highlight key spatial features. Temporal attention fuses time series information through sequence connection and specially designed temporal attention convolution block (TACB) to extract key features of the entire growth cycle.
[0079] Module 3: Gated Cross-Channel Control (GAC) module: used to further refine and strengthen the features of local target areas, using a strategy based on gating mechanism and multi-head attention.
[0080] The model effectively improves the richness and discrimination of features by integrating attention mechanisms in space, time, and channels, which is critical for complex biological growth data. The deep learning method can automatically learn complex patterns and features that are difficult to directly observe from the original image, which is crucial for accurately identifying and classifying the geographical indications of Maotai-flavor liquor. In addition, the multi-scale feature extraction and multi-level attention mechanism in the model design can effectively handle image changes caused by different growth stages and environmental conditions, improving the accuracy and robustness of recognition.
[0081] S103: extracting infrared spectral image features of the sample from the infrared spectral image of the Maotai-flavor liquor sample using a hyperspectral brewing image feature extraction model.
[0082] The hyperspectral winemaking image feature extraction model uses a deep learning architecture and aims to analyze the infrared spectral image features of Maotai-flavor liquor through hyperspectral images. It includes the following modules:
[0083] Module 1: LSTM Adaptive Pruning: Use LSTM (Long Short-Term Memory Network) to process time series data, identify and retain the sequence parts containing key information.
[0084] Module 2: Feature processing module: Use convolutional neural network (CNN) to process spectral data and extract time-frequency features.
[0085] Module 3: Dual Global Context Attention (GCA) Module: Deeply utilize context information, strengthen feature representation, and extract the most influential features for the final task. Among them, the first GCA module uses CNN to process local features, and then strengthens the global context dependency through the GCA module to extract global temporal features. The second GCA module further strengthens the features obtained by the first GCA module, and refines and fuses multiple layers of features through another context modeling and feature transformation layer.
[0086] By combining LSTM and CNN to handle different types of data dependencies and features, the GCA module is used to enhance the global view of features, ensuring that the features extracted from each time point contain useful information for the overall task. Through this multi-stage and multi-module approach, the model is able to extract extremely rich and useful features from hyperspectral data, which are critical for the accurate identification of liquor characteristics.
[0087] S104: Fusing the multi-dimensional growth image features of the sample raw material and the infrared spectrum image features of the sample to obtain the fusion features of the sauce-flavor liquor.
[0088] S105: Input the fusion features of the sauce-flavor liquor into the constructed sauce-flavor liquor deep learning recognition model, and output the geographical indication origin information of the sauce-flavor liquor sample.
[0089] The deep learning recognition model for Maotai-flavor liquor is a model obtained by training the deep learning model multiple times using a training data set with origin labels. The deep learning recognition model for Maotai-flavor liquor is constructed, trained and optimized, and the fusion features of Maotai-flavor liquor are input into the model to obtain the geographical indication origin information of the Maotai-flavor liquor sample.
[0090] The training set with origin labels is used to train the deep learning recognition model of Maotai-flavor liquor. The loss function of the deep learning recognition model of Maotai-flavor liquor is:
[0091] L(origin)=∑ i y i *log(p i )
[0092] Among them, y i is the value of the i-th element in the one-hot encoding form of the true label, p i is the value of the i-th element in the probability vector output by the model; then, the back propagation algorithm is used to update the network parameters of the fully connected layer to optimize the deep learning recognition model of the sauce-flavor liquor.
[0093] A flowchart of another specific implementation method of the method for identifying geographical indication products of Maotai-flavor liquor provided in this application is as follows Figure 2 As shown, the structural diagram is as follows Figure 3 As shown, refer to Figure 2 as well as Figure 3 , the method specifically comprises:
[0094] S201: Collect multi-dimensional growth images of Maotai-flavor liquor sample raw materials and infrared spectrum images of Maotai-flavor liquor samples.
[0095] A collection plan is generated based on the names of raw grains (sorghum and wheat), origins, and varieties submitted by suppliers of Maotai-flavor liquor with different geographical indications. Taking sorghum as an example, an embodiment of the present invention selects a sorghum plantation with a determined origin and variety, randomly demarcates a 16㎡ sample area, and further divides the sample area into 16 monitoring areas, each of which is 1㎡ in size. A robot with visual functions is used to regularly poll each of the monitoring areas, capture images of each monitoring area, including images of sorghum fruits and plants, group them by time and region, and save them, to form a multi-dimensional growth image of the sample raw material (e.g. sorghum).
[0096] Through such a setting, the growth process of Maotai-flavor liquor sample raw materials from different geographical indication origins can be fully observed. The images of each monitoring area are recorded, and a series of growth image data of sample raw materials are formed over time. This time-series image library can provide dynamic growth information of sample raw materials, analyze their growth characteristics and change trends, group these images according to time and region, and fix factors of the same origin in the same group, providing an interpretable data set for subsequent deep learning models, and helping to provide a reliable foundation for the subsequent identification of the origin of Maotai-flavor liquor. At the same time, through the robot's polling operation and image capture, the automatic acquisition of time-series image data of the growth of sample raw materials is realized, which reduces the errors and workload of manual operations and improves the accuracy and reliability of the data.
[0097] An infrared spectrometer is used to collect infrared spectra of the entire brewing process of the geographical indication Maotai-flavor liquor, forming an infrared spectral image of the Maotai-flavor liquor sample.
[0098] Specifically, a pipette can be used to accurately drop 2 μl of samples from different brewing time periods onto the diamond crystal of the ATR accessory of the Spectrum Two infrared spectrometer. After about 5 minutes, the alcohol and water have evaporated, and the remaining compounds are attached to the crystal surface. The scanning program can be started to collect the ATR infrared spectrum.
[0099] In order to eliminate background interference and potential distortion effects, in an embodiment of the present invention, the central pixel of each sample is used as a reference point, a 20×20 pixel central area is extracted as a region of interest (i.e., ROI), and then the spectral data of each pixel in the ROI is extracted, and the average spectrum of all pixels is calculated as the representative spectrum of the sample.
[0100] Through the above processing steps, the original spectral information of the Maotai-flavor liquor sample can be effectively obtained for subsequent analysis and processing. This method can reduce background interference and ensure that the spectral data of the sample is more accurate and reliable, thus providing a reliable basis for the identification of the origin of Maotai-flavor liquor.
[0101] S202: Preprocessing the multi-dimensional growth image and the infrared spectrum image.
[0102] Considering that the growth of sorghum and wheat is affected by many factors, such as soil, climate, and cultivation measures in the planting area, the collected multi-dimensional growth images must be processed to ensure the accuracy of the data. At the same time, in the natural environment of sorghum and wheat planting areas, the daylight that changes over time is also an important factor. Preprocessing the multi-dimensional growth images includes: constructing positive and negative data sets of multi-dimensional growth images by inserting pseudo images, performing grayscale processing on the time series images, Canny edge algorithm, and regional growth processing operations.
[0103] By adding the spectral data of other brands of Maotai-flavor liquor, a positive and negative sample data set of Maotai-flavor liquor infrared spectrum is constructed, wherein the positive sample data is Maotai-flavor liquor with geographical indications, and the negative sample data is Maotai-flavor liquor of other brands. In addition, the environmental conditions such as temperature and humidity during the infrared spectrum measurement of Maotai-flavor liquor will also affect the infrared spectrum collection and analysis. There may be influences such as slope and noise in the infrared spectrum. In order to eliminate these influences, the embodiment of the present invention preprocesses the infrared spectrum image, including: using standard normal transformation SNV, polynomial correction and wavelet transformation to preprocess the positive and negative sample data. After these preprocessing steps, the slope problem in the infrared spectrum is effectively corrected, the noise in the original spectrum is successfully eliminated, and the absorption peak position of the spectrum is made more prominent.
[0104] S203: Upload the multi-dimensional growth image of the sample raw material and the infrared spectrum image of the sauce-flavor liquor sample to the server through image encryption.
[0105] Suppliers and merchants in different geographical indication areas upload their own datasets with origin labels to the server based on multi-image encryption technology using image scaling and ghost imaging. The server decrypts the images and then realizes the identification of Maotai-flavor liquor geographical indication products on the basis of protecting data privacy. The specific implementation is:
[0106] (1) The n raw material growth images are scaled by an image scaling algorithm, and the image information is hidden in n pseudo images t.
[0107] The information of the original image is embedded by adjusting the pixel values of the pseudo image. The adjustment amount of each pixel is determined by the pixel value of the corresponding position in the original image and the preset weight. At the same time, the kernel function is used to define the distribution of weights to determine the influence range of each original image pixel on the pseudo image pixel value. Each pixel in the pseudo image corresponds to its specific kernel size and weight, which is stored as the first stage key.
[0108] (2) Using the images obtained from the first stage of encryption, select one of them and use the modulation mode K1(x,y) for ghost imaging encryption, and obtain the ciphertext C through the bucket detector. The calculation formula is as follows:
[0109] B i =∫T(x,y)I i (x,y)dxdy
[0110] Where T(x,y) is the image to be encrypted, B i is the i-th data collected by the bucket detector. During the encryption process, the two-dimensional image T(x,y) of size n×n is transformed into a one-dimensional column vector (n 2 ×1). i (x p ,Y q ) is the i-th light intensity distribution function, where i = 1, 2, ...N; p, q = 1, 2, ...n.
[0111] (3) Using the ciphertext as a constraint, the modulation patterns of the ciphertext image are generated. These modulation patterns are used as the second-stage key for the corresponding image. The calculation formula is as follows:
[0112] FT[H i (x,y)M(x,y)](ε,η) ε=0,η=0 =D i
[0113]
[0114] where FT[·] is the Fourier transform, H i (x, y) is a series of modulation modes, M(x, y) is the constraint in the signal domain, that is, given the target image, Di is the generated ciphertext, mh i (ε,η) is the new Fourier spectrum generated.
[0115] (4) The ciphertext C measured by the bucket detector is sent to the server through a public channel. All generated modulation patterns (first-stage and second-stage keys) are sent to the server through a secure channel to complete the encryption.
[0116] The server decrypts the encrypted image. The receiver uses the received ciphertext C and modulation mode (key) to decrypt the fake image. After obtaining the disguised image, the corresponding source image is decrypted according to the kernel and weight in the scaling algorithm.
[0117] During the data transmission process, the ciphertext and pseudo image corresponding to the modulation mode of the required decrypted image are sent to the server together with the kernel and weights in the scaling algorithm. This encryption method not only solves the crosstalk problem of current multi-image encryption, but also realizes "one code, one key" by associating the ciphertext with the source text during the encryption process; at the same time, the scaling algorithm pseudo-encrypts the plaintext, improving the security of the entire encryption system.
[0118] S204: extracting multi-dimensional growth image features of the sample raw material from the multi-dimensional growth image using a time-series growth image feature extraction model.
[0119] Existing deep learning-based identification methods for Maotai-flavor liquor only consider the metabolic information and chemical composition of liquor, but ignore the important influence of liquor's raw materials sorghum and wheat on the liquor's origin. The origin of Maotai-flavor liquor can be determined not only by the quality of liquor, but also by the information of its raw materials sorghum and wheat during their growth process.
[0120] In response to the above problems, Figure 4 As shown, an embodiment of the present invention constructs a sorghum and wheat multi-dimensional growth image feature extraction model in a server, and divides the sorghum and wheat time series images into training sets, verification sets, and test sets in a ratio of 6:3:1, and performs training, verification, and testing in the model.
[0121] The model includes three key modules (the sample raw material in this embodiment takes sorghum as an example).
[0122] Module 1: Layer Space Mapping Module
[0123] The layer space mapping module receives the original features obtained by the ResNet50 residual network, and performs data enhancement on this basis, using the image pyramid technology to fuse sorghum features of different scales, which helps to expand the receptive field of the feature map and capture more global feature information. Through the attention mechanism, the richness and accuracy of sorghum global features are enhanced, ensuring that the model can focus on more potential target areas without losing global information. The details are as follows:
[0124] (1) Feature fusion based on PPM and attention mechanism;
[0125] The global feature maps x of the three sorghum multi-dimensional growth images are fused from low to high layers using PPM to generate three feature maps containing multi-scale information. The attention mechanism is used to give different weights to features of different scales and positions, and perform feature fusion, so as to pay more attention to important feature information. The calculation formula is as follows:
[0126] x i+1 =x i+1 +upsampling(x i ),i∈{1,2}
[0127] W i =x i +Φ(δ(f(x i ),g(x i ))z(x i ))
[0128] x′=Concat[W 1 ,W 2 ,W 3 ]
[0129] where x i ∈R c×h×w represents the i-th layer feature map obtained by the PPM network, upsampling(·) represents the upsampling of the feature map. δ represents the ReLU activation function, and the corresponding W i corresponds to the output of the weight generator. In addition, f(·), g(·), and z(·) represent the corresponding convolutional layers, respectively. Similarly, Φ also represents the corresponding convolutional network. Finally, x′ represents the feature obtained after fusing the channel dimension according to each weight generator.
[0130] (2) Use dilated convolution to extract multi-scale features of sorghum growth images.
[0131] Convolution kernels of different sizes are used to process the corresponding global features and extract features of different scales of the sorghum image, thereby obtaining target areas with different receptive fields. The calculation formula is as follows:
[0132] F1=C onv1(x′),F2=C onv2 (x′),F3=C onv3 (x′)
[0133] Among them, C onvi Represents dilated convolutions with kernels of different sizes, 3×3, 5×5, and 7×7.
[0134] Since the feature region with resolution may only exist in a specific part of the feature map, the multi-sensory field of the present application can well cover the target area of the image. In this way, even if part of the image in the feature region is blocked, it can be classified by other local features.
[0135] Module 2: Attention Module
[0136] The attention module includes three aspects: channel attention, spatial attention, and temporal attention. The channel attention mechanism scores the importance of each channel by weighted summation, thereby highlighting the features with large contributions and suppressing irrelevant features. Spatial attention focuses on the important areas in the sorghum growth image, and emphasizes the key parts of sorghum by learning the weight of each pixel in the feature map. Temporal attention focuses on the important areas in the sorghum growth image, and emphasizes the key parts of sorghum by learning the weight of each pixel in the feature map. These three attention mechanisms work together to learn the location, spatial and temporal relationships of feature maps across layers, and discover more key local features in sorghum growth images. The specific implementation is:
[0137] (1) Channel attention features.
[0138] Use global maximum pooling, global average pooling and one-dimensional convolution to obtain the feature F of LSM i ∈R c×h×w ,i∈{1,2,3} for feature fusion, and then use one-dimensional convolution to replace the fully connected layer to avoid information loss in the fully connected layer. Use Sigmoid activation function and small receptive field feature map to focus on related channel features and obtain cross-channel domain attention feature map. The calculation formula is as follows:
[0139] C j =σ(F tr (concat(C onv4 (GMP(F i )),C onv4 (GAP(F i ))))),j∈{1,2,3}
[0140]
[0141] Among them, F iRepresents the rich global features obtained by the spatial mapping module of the layer. Among them, GMP(·) and GAP(·) represent the global average pooling function and the global maximum pooling function respectively, Concat(·) represents the cascade operation in the channel dimension, σ and C onv4 Represents Sigmoid activation function and one-dimensional convolution respectively, X C Represents the feature map obtained by focusing on cross-channel domains.
[0142] (2) Spatial attention characteristics.
[0143] For large receptive field F i The feature map is subjected to global average pooling and global maximum pooling, and two-dimensional convolution is used to learn spatial interaction information and fuse features. Then, 7×7 convolution, Sigmoid activation function and small receptive field feature map are used to obtain spatial attention features and obtain cross-spatial domain attention feature maps. The calculation formula is as follows:
[0144] S j =σ(C onv5 (Concat(C onv5 (AVG(F i )),C onv5 (MAX(F i ))))),j∈{1,2,3}
[0145]
[0146] Similarly, AVG(·) and MAX(·) are the parameters of the single-channel spatial attention map obtained by performing mean and maximum operations on the channel dimension, respectively. onv5 represents a 7×7 two-dimensional convolution, Y S The corresponding representation is the feature map obtained by focusing on cross-spatial domains.
[0147] (3) Temporal attention characteristics
[0148] Before learning the temporal features, the spatial attention feature maps learned in each frame are concatenated along the channel dimension to form a total feature map, which contains the temporal feature information of the sorghum growth process. Subsequently, this total feature map is input into the temporal attention convolution block, and the temporal feature information is learned through convolution operations based on the channel attention mechanism.
[0149] Specifically, first, the spatial attention feature map learned in the previous stage is connected along the channel dimension according to the frame sequence to obtain the total feature map. The calculation formula is as follows;
[0150]
[0151] in, represents the spatial attention feature map obtained after the spatial feature extraction stage of the i-th frame, and F ST Represents the total feature map, which contains spatial attention features and temporal features.
[0152] It is then input into the proposed temporal attention feature to learn the temporal features of the sorghum growth process. First, the input is globally averaged to obtain the global feature value of sorghum, and then it is passed through an MLP layer designed based on a fully connected layer and a nonlinear activation function, followed by an upsampling operation to increase the dimension of the learned features and obtain the feature map F u Finally, we apply the feature map F u The temporal attention weight vector V is obtained by using a convolutional layer with the same kernel size and the same number of channels as the input feature map. T The calculation formula is as follows:
[0153]
[0154] Among them, F ti Indicates that the channel size is C ti The input feature map, H u and W u Respectively represent the feature maps F obtained after upsampling u In particular, for MLP, it is implemented using three fully connected layers with activation functions. The calculation formula is as follows:
[0155] V tf =σ(FC n1 (σ(FC n2 (σ(FC n3 (V ti ))))))
[0156] The above equation represents the implementation of the MLP structure, where V ti represents the input feature vector, V tf represents the output time feature vector, σ(·) represents the Sigmoid activation function, and FC n (·) represents a fully connected layer with n nodes. The temporal attention weight vector V T The i-th component of is multiplied by the feature matrix of the i-th channel of the input feature map F to obtain the temporal attention feature map. The calculation formula is as follows:
[0157]
[0158] in Represents the attention weight vector V T The i-th component of ti i ,i∈1,2,…,C tiRepresents the input feature map F ti The feature matrix diagram on the i-th channel of and F″ ti i The process of multiplying and then concatenating them along the channel dimension produces the temporal attention feature map Z T .
[0159] Module 3: Cross-channel gating module
[0160] Due to different shooting angles and light changes, similar images of the same species with significant intra-class differences can only be correctly distinguished by finding more distinguishable feature areas. Therefore, the cross-channel gating module further refines the features by introducing a strategy based on the gating mechanism and multi-head attention. The gating mechanism can filter out important local target areas and exclude interference information, while the multi-head attention explores and extracts discriminative features in local areas from multiple angles. This cross-layer attention learning strategy enhances the model's ability to distinguish fine-grained features, allowing the model to more accurately locate and identify targets. The specific implementation is:
[0161] (1) Feature mapping through a multi-layer fully connected network;
[0162] Three output features X based on the attention module C ,Y S ,Z S ∈R c×h×w , using a multi-layer fully connected network to construct the spatial relationship of features. The calculation formula is as follows:
[0163]
[0164] Among them, φ is the GELU activation function, LN is the layer normalization, and W1, W2 are the MLP projection matrices.
[0165] (2) Based on the gating mechanism, obtain the gated attention weight parameters;
[0166] The output of the gating unit is calculated through the fully connected layer and the activation function, and the gating vector is calculated using the bias term. The calculation formula is as follows:
[0167] A i =θ(W3LN(Concat[X1,Y1,Z1]))
[0168] B i =θ(A i ′X1+b1)
[0169] C i =θ(A i ′Y1+b2)
[0170] Di =θ(A i ′Z1+b3)
[0171] Among them, W3 is the mapping of the sum of the feature matrices of the MLP projection input X1, Y1 and Z1 and the fusion feature. i ,C i and D i is the feature map obtained by the corresponding gating vector function θ, where b1, b2 and b3 are bias parameters.
[0172] (3) Feature fusion and output;
[0173] Based on the multi-head attention mechanism, the gated vector is used to expand the local limited feature area, and the gated features are further refined to find more local discriminant features. The gated attention features are fused with the original features, and the model's fitting ability is enhanced through a multi-layer fully connected network. At the same time, in order to improve the stability of the model and avoid the gradient disappearance problem, the residual connection is used to obtain the final discriminant feature F total , F to ' tal and F to ″ tal The calculation formula is as follows:
[0174] F total =W4(X1⊙CG(Y1))+W1X C
[0175] F to ' tal =W4(Y1⊙CG(Z1))+W1Y S
[0176] F to ″ tal =W4(Z1⊙CG(X1))+W1Z T
[0177] Where ⊙ represents channel element multiplication, and the function CG(·) extracts the cross-gated attention feature unit from the input according to the cross-channel gating module proposed in this application. W4 represents the MLP linear layer mapping feature corresponding to the module, which can be used to enhance the fitting ability of the model.
[0178] S205: extracting infrared spectral image features of the sample from the infrared spectral image of the Maotai-flavor liquor sample using a hyperspectral brewing image feature extraction model.
[0179] Build a hyperspectral winemaking image feature extraction model in the server, such as Figure 5Schematic diagram of the structure of the hyperspectral brewing image feature extraction model provided in this application. The liquor hyperspectral positive and negative sample dataset is divided into training set, validation set, and test set in a ratio of 6:3:1, and training, validation, and testing are performed in this feature extraction model. The time series hyperspectral images of Maotai-flavor liquor are used to analyze their time information and spectral data to identify the brand of Maotai-flavor liquor for merchants. The proposed model has three main components: LSTM adaptive pruning module, feature processing module, and dual global context attention (GCA) module.
[0180] Module 1: LSTM Adaptive Pruning
[0181] In the data pruning process, the LSTM model is used to model the sequence data, and the optimal split point is selected based on the output of the model. The sequence data is then divided into multiple subsequences, each of which contains the key information required by the model. This reduces the deviation between the subsequence and the global representation, making it more representative. To this end, this application designs a subsequence generation module based on the LSTM model. The specific implementation is:
[0182] First, the input sequence is mapped to a hidden state sequence using an LSTM model, and then the hidden state sequence is mapped to an output sequence through a fully connected layer. To generate two subsequences, the model uses a Sigmoid function to compress each element between 0 and 1 in the output sequence and selects a position to split the sequence into two subsequences. The LSTM model then calculates the probability of each position as a split point and sets the position with a probability value below the threshold to invalid. Finally, the model selects the average of all valid positions as the split point to divide the input sequence into the first half and the second half.
[0183] The input sequence is denoted as S∈R N×L×D , where N represents the batch size, L represents the sequence length, and D represents the feature dimension of each time step. The calculation formula is as follows:
[0184] p l =FC(LSTM(x l ))
[0185] i=argmax(mean(p l ,-1))
[0186]
[0187] where p l represents the corresponding segmentation probability, k represents the size of the overlapping window considered when calculating the segmentation point from the sequence, i represents the position of the segmentation point, s1 and s2 represent the subsequences after segmentation, and mean represents the average function.
[0188] Module 2: Feature processing module
[0189] This module uses two parallel 2D CNN architectures to process spectral data and extract time-frequency features. The specific implementation is:
[0190] First, the sub-time series spectrogram S is input and used to capture the time scale features and frequency scale features through 2D CNN. Then, the deep time domain features R are obtained through layer normalization layer, activation layer and average pooling layer. t and the deep frequency domain features R f Finally, the deep time domain features and frequency domain features are connected to form the deep time-frequency features R. The calculation formula is as follows:
[0191]
[0192] R = Concat[R t ,R f ]
[0193] Where φ is the GELU activation function, LN is layer normalization, AP(·) represents average pooling, and C onv6 represents a two-dimensional convolutional neural network of [32,10*2], C onv7 Represents a two-dimensional convolutional neural network of [32,2*8].
[0194] Module 3: Dual Global Context Attention Module
[0195] In order to effectively capture all valuable information from the input time-frequency features, this application designs a new dual global context attention (GCA) model, which contains two GCAs and one CNN. The first GCA module is composed of a CNN and a GCA to form a two-stream network (CNN-GCA) to achieve component utilization of the input time-frequency features. The other GCA module follows the CNN-GCA network to analyze the fusion of high-level features and capture the global context information of SER.
[0196] (1) CNN-GCA module
[0197] Due to its ability to process spatial features, CNN is used to process spectral and local temporal features. It contains 5 stacked convolutional layers. GCA can effectively model global context information while solving the problem of irrelevant dependencies to a certain extent. The specific implementation is:
[0198] The time-frequency features are input into the GCA-based time domain analysis flow. The data of all time feature positions are weighted through the context modeling module to extract global context features with long-range time dependencies. The context features are then processed through the feature transformation module to fine-tune the initially extracted features, aiming to capture and strengthen the complex dependencies between features, while eliminating redundant information to ensure that each feature is accurate and efficient, and obtain the features that have the greatest impact on the final recognition performance. Finally, the time position features are combined with the global context features and fused to all time feature positions, so that each time feature position can obtain enhanced context perception capabilities, thereby generating high-level time features and providing strong support for the final recognition task.
[0199] By inputting such time-frequency features into the time-domain analysis flow based on GCA, this application achieves a deep and global understanding and utilization of time series data. The calculation formula is as follows:
[0200]
[0201] Where R represents the time-frequency feature, α i is the attention weight of position j, R i is the feature representation at position i, N is the total number of positions in the feature sequence, δ(·) is the feature transformation function, and F(·, ·) is the feature fusion operation by broadcast element-wise addition.
[0202] By adopting a two-stream framework of CNN and GCA, this application obtains high-level spectral and temporal features and concatenates them and sends them to the second GCA module.
[0203] (2) The second GCA module
[0204] First, the high-level time-frequency features are input into the second GCA block. Its context modeling module enhances the features of the query position by aggregating information from different dimensions to find the global context features that contribute most to the final accuracy. Then the feature transformation module calculates the correlation between different network layers through linear transformation and aggregates the hierarchical features of multiple layers. Finally, the two parts are combined through the fusion module to obtain high-level features with accurate contribution and layer correlation.
[0205] S206: Fusing the multi-dimensional growth image features of the sample raw material and the infrared spectrum image features of the sample to obtain the fusion features of the sauce-flavor liquor.
[0206] First, the features of sorghum and wheat growth images and infrared spectra are processed separately through the feature projection layer. The calculation formula is as follows:
[0207] f S =ξ(FC(X s ))
[0208] f W =ξ(FC(X w ))
[0209] f B =ξ(FC(X b ))
[0210] Among them, f S ∈R K 、f W ∈R K and f B ∈R K Refers to the output vectors of sorghum and wheat growth images and infrared spectra through the feature projection layer, respectively. ξ is the ReLU activation function, and FC(·) represents the fully connected layer. It should be noted that considering the memory cost of storing high-dimensional features, the present embodiment sets K <D。
[0211] In the subsequent bilinear pooling layer, f S 、f W and f B The outer product is calculated between them to obtain the feature map matrix, and then the matrix is flattened into a vector The calculation formula is as follows:
[0212]
[0213] in Represents the outer product operation.
[0214] Finally, f bil Send it to the output module and add f to the features obtained by weighted summation and feature concatenation out ∈R D As the final output of the multimodal fusion module. The calculation formula is as follows:
[0215] f out =FC(ξ[FC(f bil )]).
[0216] S207: Input the fusion features of the sauce-flavor liquor into the constructed sauce-flavor liquor deep learning recognition model, and output the geographical indication origin information of the sauce-flavor liquor sample.
[0217] The deep learning recognition model for Maotai-flavor liquor has a fully connected layer for receiving the fusion features and outputting the classification result of the origin. Then, the deep learning recognition model for Maotai-flavor liquor is trained using a training set with origin labels. The loss function of the deep learning recognition model for Maotai-flavor liquor is:
[0218] L(origin)=∑ i yi*log(pi)
[0219] Among them, y i is the value of the i-th element in the one-hot encoding form of the true label vector (0 or 1), p i It is the value of the i-th element in the probability vector output by the model (i.e., the probability distribution obtained by the network output through the function). Then, the network parameters of the fully connected layer are updated using the back propagation algorithm to optimize the deep learning recognition model of the Maotai-flavor liquor.
[0220] In the deep learning recognition model testing phase for Maotai-flavor liquor, for each input sample, the trained model is used to extract the probability distribution corresponding to each origin through the ReLU activation layer of the origin classifier, and the corresponding classification results are obtained. The validation set is used as an independent data set to comprehensively evaluate the model's predictive ability, record the model's performance under different parameter configurations, and especially save the model parameters that show the best performance so that they can be directly called in future practical applications.
[0221] In order to improve the accuracy of origin and brand recognition of Maotai-flavor liquor, the present invention adopts a deep learning model and optimizes its parameters through multiple iterative training. In this process, the focus is on enhancing the model's predictive ability for new samples by adjusting and optimizing hyperparameters such as model architecture, learning rate, and batch size. When evaluating model performance, accuracy is selected as the core indicator, and a validation set that does not participate in training is used to objectively measure the accuracy and robustness of the model. Based on the evaluation results, the model configuration with the best performance is screened out, and its parameters are saved as a solid foundation for subsequent applications or further research.
[0222] Compared with the prior art, this application has the following advantages:
[0223] (1) This application is based on a hybrid model of LSTM and 2D-CNN, which is used to process the infrared spectrum data of Maotai-flavor liquor to extract the overall spectrum characteristics of Maotai-flavor liquor. The model uses LSTM and adaptive pruning to generate positive and negative sample data, and then uses 2D-CNN to extract not only the spectral features in the spectral image, but also the temporal information features. At the same time, the idea of a dual contextual attention mechanism is introduced into the model to understand the relationship between the features of spectral data, improve the accuracy of feature extraction, and further quickly and accurately identify the origin of Maotai-flavor liquor with geographical indications.
[0224] (2) This application proposes an image processing model based on a cross-channel attention mechanism and a cross-gated multi-head attention mechanism to extract the growth characteristics of sorghum and wheat. By using the interaction between the global features of cross-layer channel attention and spatial attention, some key local features of the image are found, thereby capturing subtle changes in the growth process and further understanding the growth characteristics of sorghum and wheat. At the same time, the multi-head attention mechanism can be used to expand the local limited feature area, thereby finding more local discriminant features in the growth process of sorghum and wheat.
[0225] (3) This application uses an image encryption method based on image scaling and ghost imaging to upload the encrypted multi-dimensional growth images of the sample raw materials and the infrared spectrum images of the Maotai-flavor liquor samples to the server, and learns the image features through a deep learning recognition model, which can not only protect privacy data, but also accurately and reliably identify the origin of the Maotai-flavor liquor, providing a more comprehensive and reliable solution for geographical indication Maotai-flavor liquor.
[0226] In addition, the present application also provides a device for identifying geographical indication products of Maotai-flavor liquor, such as Figure 6 The present application provides a structural block diagram of a device for identifying geographical indication products of Maotai-flavor liquor, which specifically includes: a memory 61 and a processor 62, wherein the memory 61 stores a computer program, and when the computer program is executed by the processor 62, a method for identifying geographical indication products of Maotai-flavor liquor according to any one of the above-mentioned methods is implemented.
[0227] In addition, the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for identifying a geographical indication product of a sauce-flavor liquor according to any of the above-mentioned methods is implemented.
[0228] Computer readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0229] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0230] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0231] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for identifying a Maotai-flavor liquor geographical indication product, characterized in that: include: Obtain multi-dimensional growth images of Maotai-flavor liquor sample raw materials and infrared spectrum images of Maotai-flavor liquor samples; Extracting multi-dimensional growth image features of the sample raw material from the multi-dimensional growth image using a time-series growth image feature extraction model; Extracting infrared spectral image features of the sample from the infrared spectral image of the Maotai-flavor liquor sample using a hyperspectral brewing image feature extraction model; The multi-dimensional growth image features of the sample raw materials and the infrared spectrum image features of the samples are fused to obtain the fusion features of the Maotai-flavor liquor. Inputting the fusion features of the Maotai-flavor liquor into the constructed Maotai-flavor liquor deep learning recognition model, and outputting the geographical indication origin information of the Maotai-flavor liquor sample; Among them, the deep learning recognition model for Maotai-flavor liquor is a model obtained by multiple iterative training of the deep learning model using a training data set with origin labels.
2. The method for identifying geographical indication products of Maotai-flavor liquor according to claim 1, characterized in that: The method of obtaining the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample comprises: The server receives the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample collected and uploaded by the user device; Among them, the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample are encrypted on the user device side; and the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample are decrypted on the server side.
3. The method for identifying geographical indication products of Maotai-flavor liquor according to claim 2, characterized in that: The encryption processing of the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample on the user device side includes: The multi-dimensional growth images of n Maotai-flavor liquor sample raw materials are scaled by an image scaling algorithm to hide the image information into n pseudo images t; the information of the original image is embedded by adjusting the pixel value of the pseudo image; the adjustment amount of each pixel is determined by the pixel value of the corresponding position of the original image and the preset weight; the kernel function is used to define the distribution of weights to determine the influence range of each original image pixel on the pseudo image pixel value; each pixel point in the pseudo image corresponds to its specific kernel size and weight, which is stored as the first stage key; Using the images obtained from the first stage of encryption, select one of them and use the modulation mode K1(x,y) for ghost imaging encryption. The ciphertext C is obtained through the bucket detector. The calculation formula is: B i =∫T(x,y)I i (x,y)dxdy, where T(x,y) is the image to be encrypted, B i is the i-th data collected by the bucket detector; during the encryption process, the two-dimensional image T(x,y) of size n×n is transformed into a one-dimensional column vector (n 2 ×1), I i (x p ,Y q ) is the i-th light intensity distribution function, where i = 1, 2, ... N; p, q = 1, 2, ... n; Using the ciphertext as a constraint, the modulation patterns of the ciphertext image are generated. These modulation patterns are used as the second-stage keys of the corresponding images. The calculation formula is: FT[H i (x,y)M(x,y)](ε,η)| ε=0,η=0 =D i where FT[·] is the Fourier transform, H i (x, y) is a series of modulation modes, M(x, y) is the constraint in the signal domain, that is, given the target image, Di is the generated ciphertext, mh i (ε,η) is the new Fourier spectrum generated; The ciphertext C measured by the bucket detector is sent to the server through a public channel; the first-stage key and the second-stage key are sent to the server through a secure channel to complete the encryption; The decryption process of the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample on the server side includes: The server uses the received ciphertext C, the first-stage key, and the second-stage key to decrypt the fake image; After getting the pseudo image, the image is decrypted according to the kernel and weights in the scaling algorithm.
4. The method for identifying geographical indication products of Maotai-flavor liquor according to claim 1, characterized in that: The method of extracting multi-dimensional growth image features of the sample raw material from the multi-dimensional growth image using the time-series growth image feature extraction model includes: Constructing a time-series growing image feature extraction model; the time-series growing image feature extraction model includes a layer space mapping module, an attention module and a cross-channel gating module; The layer space mapping module receives the original features obtained by the ResNet50 residual network, performs data enhancement, and uses the image pyramid technology to fuse the features of sample raw materials of different scales; The attention module includes three aspects: channel attention, spatial attention and temporal attention. The channel attention mechanism scores the importance of each channel by weighted summation to highlight the features with great contribution. The spatial attention focuses on the important areas in the growth image of the sample raw material, and identifies the key local features of the sample raw material by learning the weight of each pixel in the feature map. The temporal attention focuses on the important areas in the growth image of the sample raw material, and identifies the key local features of the sample raw material by learning the weight of each pixel in the feature map. The cross-channel gating module introduces a strategy based on gating mechanism and multi-head attention; the gating mechanism is used to screen out important local target areas, and the multi-head attention explores and extracts discriminative features in local areas from multiple angles; the gated attention features are fused with the original features, and the fitting ability of the model is enhanced through a multi-layer fully connected network.
5. The method for identifying geographical indication products of Maotai-flavor liquor according to claim 1, characterized in that: The method of extracting infrared spectral image features of a sample from the infrared spectral image of the Maotai-flavor liquor sample using a hyperspectral brewing image feature extraction model includes: The hyperspectral winemaking image feature extraction model includes: an LSTM adaptive pruning module, a feature processing module and a dual global context attention module; The LSTM adaptive pruning module is used to model the sequence data, and the optimal split point is selected according to the output; the sequence data is divided into multiple subsequences, each of which includes the required key information; The feature processing module uses two parallel 2D CNN architectures to process the spectral data and extract time-frequency features; The dual global context attention module includes two GCA modules and a CNN; the first GCA module includes CNN and a GCA to form a two-stream network CNN-GCA to realize the component utilization of input time-frequency features; the other GCA module follows the CNN-GCA network to analyze the fusion of high-level features and capture the global context information of SER, and the two parts are fused through the fusion module to obtain high-level features with precise contribution and layer correlation.
6. The method for identifying geographical indication products of Maotai-flavor liquor according to any one of claims 1 to 5, characterized in that: The fusion characteristics of the multi-dimensional growth image characteristics of the sample raw material and the infrared spectrum image characteristics of the sample are fused to obtain the fusion characteristics of the Maotai-flavor liquor, including: The multi-dimensional growth image features of the sample raw materials and the infrared spectrum image features of the sample are processed separately through the feature projection layer, and the calculation formula is: f S =ξ(FC(X s )) f W =ξ(FC(X w )) f B =ξ(FC(X b )) Among them, f S ∈R K 、f W ∈R K and f B ∈R K They refer to the output vectors of the multi-dimensional growth image features of the sample raw material and the infrared spectrum image features of the sample through the feature projection layer, respectively; ξ is the RELU activation function, and FC(·) represents the fully connected layer; In the subsequent bilinear pooling layer, f S 、f W and f B The outer product is calculated between them to obtain the feature map matrix, and then the matrix is flattened into a vector The calculation formula is: in, represents the outer product operation; Finally, f bil Send it to the output module and add f to the features obtained by weighted summation and feature concatenation out ∈R D As the final output of the multimodal fusion module, the calculation formula is: f out =FC(ξ[FC(f bil )]).
7. The method for identifying geographical indication products of Maotai-flavor liquor according to any one of claims 1 to 5, characterized in that: The Maotai-flavor liquor deep learning recognition model has a fully connected layer for receiving the fusion features and outputting the classification result of the origin; The training set with origin labels is used to train the deep learning recognition model of Maotai-flavor liquor. The loss function of the deep learning recognition model of Maotai-flavor liquor is: L(origin)=∑ i y i *log(p i ) Among them, y i is the value of the i-th element in the one-hot encoding form of the true label, p i is the value of the i-th element in the probability vector output by the model; then, the back propagation algorithm is used to update the network parameters of the fully connected layer to optimize the deep learning recognition model of the sauce-flavor liquor.
8. The method for identifying geographical indication products of Maotai-flavor liquor according to claim 7, characterized in that: After obtaining the multi-dimensional growth image of the Maotai-flavor liquor sample raw material and the infrared spectrum image of the Maotai-flavor liquor sample, the method further includes: Preprocessing the multi-dimensional growth image and the infrared spectrum image; Preprocessing the multidimensional growth image includes: constructing positive and negative data sets of the multidimensional growth image by inserting a pseudo image, performing grayscale processing, Canny edge algorithm and region growing processing on the time series image; The preprocessing of the infrared spectrum image includes: using standard normal transformation SNV, polynomial correction and wavelet transformation to preprocess the positive and negative sample data.
9. A device for identifying geographical indication products of Maotai-flavor liquor, characterized in that: It includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the method for identifying the geographical indication product of the sauce-flavor liquor according to any one of claims 1-8 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for identifying a geographical indication product of a sauce-flavor liquor according to any one of claims 1-8 is implemented.