Method for constructing true and adulterated wine discrimination model

By extracting multimodal data and performing deep learning feature extraction, combined with transfer learning and adversarial training, the problem of insufficient generalization ability of existing real and fake wine discrimination models across brands and batches is solved, achieving higher detection accuracy and reliability.

CN119808010AActive Publication Date: 2025-04-11SHANDONG BAIMAIQUAN LIQUEUR IND CO LTD +1

Patent Information

Application Number
CN202510295564.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-04-11
Estimated Expiration
2045-03-13

AI Technical Summary

Technical Problem

The existing genuine and fake wine discrimination model lacks generalization ability when cross-brand and batches, resulting in a decrease in the accuracy of the model's detection of wine in new brands or new batches.

Method used

By obtaining wine samples from multiple brands and batches, multi-modal data is extracted using multiple non-destructive testing methods, and standardized processing and feature fusion are carried out. Deep learning model is used to extract distribution similarity features and domain offset robust features, and combine transfer learning and adversarial training to optimize the model to improve its generalization ability.

Benefits of technology

It significantly improves the adaptability and generalization ability of the authentic and fake wine discrimination model, so that it has higher detection accuracy and reliability in complex market environments, and can accurately judge wine from different brands and batches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808010A_ABST
    Figure CN119808010A_ABST
Patent Text Reader

Abstract

The invention discloses a method for constructing a true and adulterated wine discrimination model, and particularly relates to the technical field of wine detection. The method comprises the following steps: extracting component data, a spectrum curve, smell fingerprints and texture information of wine liquid through nondestructive testing, carrying out standardization processing and feature fusion on multi-modal data, extracting distribution similarity features and domain offset robustness features, constructing a comprehensive feature vector, and evaluating a generalization ability value of a true and adulterated wine discrimination model by utilizing a machine learning model; aiming at a low generalization ability model, adopting a transfer learning method to carry out multi-stage training and optimization, and evaluating the detection accuracy of the model on unseen brands and batches in combination with cross validation; and finally, inputting the multi-modal characteristics of the to-be-detected wine on the optimized model, and outputting a true and false wine judgment result and a confidence score. According to the invention, the stability and adaptability of the true and adulterated wine discrimination model can be significantly improved, and it is ensured that the method has high accuracy, high generalization ability and wide market applicability in detection of wine of different brands and batches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wine detection, and in particular to a method for constructing a model for distinguishing true from false wine. Background Art

[0002] With the development of social economy, the variety of alcoholic products is becoming more and more abundant. The emergence of counterfeit alcohol in the market has posed a serious threat to the health, safety and brand reputation of consumers. Traditional methods of identifying counterfeit alcohol mainly rely on manual sensory evaluation, chemical analysis or spectral detection, but these methods usually have problems such as long detection cycle, high cost, and strong dependence on professional equipment and personnel. In recent years, with the development of big data and artificial intelligence technology, the use of data-driven methods to construct a model for distinguishing true from false alcohol has become a research hotspot. By analyzing the physical and chemical properties, spectral characteristics or fingerprint information of the alcohol, and combining it with machine learning algorithms, more efficient and accurate counterfeit alcohol detection can be achieved.

[0003] The prior art has the following deficiencies: When building a model to distinguish between genuine and fake wine, the model's generalization ability is insufficient due to differences in wine composition across brands and batches. Because different brands of wine use different raw materials, brewing processes, and storage methods, even genuine wine may have very different compositional characteristics. In addition, the same brand of wine may cause changes in detection characteristics between different batches due to fluctuations in trace ingredients, causing the trained model to have a lower detection accuracy for new batches or new brands of wine. This problem causes existing discrimination models to easily overfit to sample data of specific brands or batches, making them difficult to promote and apply in a wide range of market environments, limiting their practicality and commercial value. Summary of the invention

[0004] The purpose of the present invention is to provide a method for constructing a genuine wine discrimination model to address the deficiencies in the background technology.

[0005] In order to achieve the above object, the present invention provides the following technical solution: a method for constructing a genuine and fake wine discrimination model, comprising: Obtain wine samples from multiple brands and batches, and extract multimodal data based on a variety of non-destructive testing methods, including composition data, spectral curves, odor fingerprints, and texture information; The collected multimodal data is standardized, and feature fusion and hierarchical extraction of feature data of different modalities are performed based on the pre-built deep wine discrimination model, and the distribution similarity features and domain shift robustness features in the multimodal data are extracted respectively; The extracted distribution similarity features and domain shift robustness features are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as inputs of the machine learning model, and the generalization ability value of the real and fake wine discrimination model is output through the machine learning model; For the genuine and fake wine discrimination model with low generalization ability, we use the transfer learning method to conduct multi-stage training and optimization based on data sets of different brands and batches, and evaluate the detection accuracy of the genuine and fake wine discrimination model on unseen brands and batches through cross-validation; The multimodal features of the wine to be tested are input into the optimized model for distinguishing genuine and fake wines, and the results of distinguishing genuine and fake wines are output, along with the corresponding confidence scores.

[0006] Preferably, multimodal data is extracted based on a variety of nondestructive testing methods, including near-infrared spectroscopy, Raman spectroscopy, UV-visible spectroscopy, fluorescence spectroscopy, Fourier transform infrared spectroscopy, gas chromatography-mass spectrometry, electronic nose and high-resolution microscopy, which are used to respectively extract the composition data, spectral curve, odor fingerprint and texture information of the wine.

[0007] Preferably, the distribution similarity characteristics of different brands and batches of liquor samples in the feature space are analyzed to generate a distribution similarity deviation index, and the method for obtaining the distribution similarity deviation index is: Suppose there are two brands or batches of wine samples, and their feature vectors are: , represents the characteristics of the first brand / batch of wine samples, the number of samples is m; , represents the characteristics of the second brand / batch of wine samples, the number of samples is n; among them, each sample and They are all high-dimensional feature vectors; Define a kernel function k(x,y) to measure the similarity between two sample points: ; where σ is the bandwidth parameter, and the mean distribution deviation value MD of two samples in the high-dimensional feature space is calculated, and the expression is: , compare the calculated MD value with the maximum MD value calculated in all brands or batch combinations, and calculate the distribution similarity deviation index, which is expressed as: ; In the formula, is the maximum MD value calculated from all brands or batch combinations. is the distribution similarity deviation index.

[0008] Preferably, the acquired domain shift robustness feature is analyzed to generate a domain shift robustness anomaly index, and the method for obtaining the domain shift robustness anomaly index is: Get source brand / batch training set , target brand / batch test set ; Build a denoising autoencoder or variational autoencoder for training so that it can be used on the source brand / batch data Accurately reconstruct the input features; The autoencoder structure includes: Encoder: maps high-dimensional input features to a low-dimensional latent space z; Decoder: remaps the low-dimensional latent variable z back to the original feature space; Loss function: Use mean square error to calculate the error between input data x and reconstructed data; After training, the autoencoder should be able to accurately reconstruct the sample features of the source brand / batch; The target brand / batch data Input into the trained autoencoder model to generate reconstruction features , calculate the average reconstruction error of the target brand / batch , the expression is: ; Calculate the domain shift robustness anomaly index DSRAI, the expression is: ; In the formula, is the average reconstruction error of the source brand / batch, is the maximum reconstruction error among all brand / batch combinations.

[0009] Preferably, the distribution similarity deviation index and the domain shift robustness anomaly index are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as inputs of the machine learning model. The machine learning model predicts the generalization ability value label of the genuine and fake wine discrimination model with each group of comprehensive feature vectors as the prediction target, and takes minimizing the sum of prediction errors of the generalization ability value labels of all genuine and fake wine discrimination models as the training target. The machine learning model is trained until the sum of prediction errors converges, and the model training is stopped. The generalization ability value of the genuine and fake wine discrimination model is determined according to the model output results, wherein the machine learning model is a polynomial regression model.

[0010] Preferably, the obtained generalization ability value of the genuine and fake wine discrimination model is compared with a pre-set reference threshold of the generalization ability value. If the generalization ability value of the genuine and fake wine discrimination model is greater than or equal to the pre-set reference threshold of the generalization ability value, it means that the generalization ability of the fake wine discrimination model is high, and it is marked as a genuine and fake wine discrimination model with high generalization ability; if the generalization ability value of the genuine and fake wine discrimination model is less than the pre-set reference threshold of the generalization ability value, it means that the generalization ability of the fake wine discrimination model is low, and it is marked as a genuine and fake wine discrimination model with low generalization ability.

[0011] Preferably, the cross-validation adopts a K-fold cross-validation method, dividing the target brand or batch data set into K parts, training and testing the models separately, and calculating the average accuracy of all K rounds of experiments. If the average accuracy is greater than a preset threshold, it means that the transfer learning optimization is effective.

[0012] Preferably, when distinguishing the wine to be tested, the optimized model for distinguishing genuine and fake wine uses a deep learning model based on multimodal feature fusion for inference and outputs a confidence score. The confidence score is based on the feature similarity of the model to the sample to be tested. If the confidence is ≥90%, the judgment result is reliable. If the confidence is lower than 70%, additional detection means are added to assist decision-making.

[0013] In the above technical solution, the technical effects and advantages provided by the present invention are: 1. The present invention uses non-destructive testing methods such as near-infrared spectroscopy, Raman spectroscopy, gas chromatography-mass spectrometry (GC-MS), electronic nose, and high-resolution microscopy to extract the composition data, spectral curves, odor fingerprints, and texture information of the wine, and standardizes the data to eliminate measurement deviations between brands. The real and fake wine discrimination model built based on deep learning performs feature fusion through self-attention mechanism and cross-modal feature alignment, extracts distribution similarity features and domain shift robustness features, calculates distribution similarity deviation index and domain shift robustness anomaly index, forms a comprehensive feature vector, and uses a polynomial regression model to predict the generalization ability value of the real and fake wine discrimination model. For models with low generalization ability, transfer learning and adversarial training are used for optimization, and K-fold cross validation is used to evaluate its adaptability to unseen brands and batches to ensure its stable detection accuracy on new brands / batches.

[0014] 2. The present invention not only improves the adaptability and generalization ability of the real and fake wine discrimination model, but also enhances its applicability and detection reliability in complex market environments. After receiving the multimodal features of the wine to be tested, the optimized model can accurately output the results of real and fake wine discrimination and give a confidence score to ensure the credibility and interpretability of the test results. When the confidence level is ≥90%, the judgment result is highly reliable; when the confidence level is lower than 70%, the system may suggest adding additional detection methods or combining expert evaluation to assist decision-making. Compared with traditional fake wine detection methods, the present invention realizes an efficient, intelligent, and low-cost real and fake wine identification solution, which is suitable for quality control and market supervision of different brands and batches of wine products, and has broad commercial value and industry application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0016] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] For examples, see Figure 1 As shown, the method for constructing a genuine wine discrimination model described in this embodiment includes: Obtain wine samples from multiple brands and batches, and extract multimodal data based on a variety of non-destructive testing methods, including composition data, spectral curves, odor fingerprints, and texture information; The collected multimodal data is standardized, and feature fusion and hierarchical extraction of feature data of different modalities are performed based on the pre-built deep wine discrimination model, and the distribution similarity features and domain shift robustness features in the multimodal data are extracted respectively; The extracted distribution similarity features and domain shift robustness features are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as inputs of the machine learning model, and the generalization ability value of the real and fake wine discrimination model is output through the machine learning model; For the genuine and fake wine discrimination model with low generalization ability, we use the transfer learning method to conduct multi-stage training and optimization based on data sets of different brands and batches, and evaluate the detection accuracy of the genuine and fake wine discrimination model on unseen brands and batches through cross-validation; The multimodal features of the wine to be tested are input into the optimized model for distinguishing genuine and fake wines, and the results of distinguishing genuine and fake wines are output, along with the corresponding confidence scores.

[0019] The steps of multimodal data extraction include: selecting wine samples from multiple brands and different batches to ensure that the samples cover different alcohol content, brewing processes and raw material sources to increase the applicability of the model. Ensure that the sample storage environment is consistent to avoid data deviation due to external factors (such as temperature and humidity). Use near-infrared spectroscopy (NIR) or Raman spectroscopy to perform non-destructive testing of the main chemical components of the wine (such as ethanol content, organic acids, esters, and sugars). Combine gas chromatography-mass spectrometry (GC-MS) to analyze trace chemical components and extract chemical fingerprint data. Record the composition change characteristics between different brands and batches and perform standardization.

[0020] Ultraviolet-visible spectroscopy (UV-Vis) and fluorescence spectroscopy are used to obtain the absorption and emission characteristics of wine at different wavelengths to form a spectral curve. Fourier transform infrared spectroscopy (FTIR) is used to analyze the molecular vibration information of the wine and extract the molecular structure characteristics. Normalize the spectral data to eliminate the systematic error of the measuring equipment and improve the characteristic stability. Use the electronic nose (E-nose) system to sense the odor characteristics of the volatile components of the wine using metal oxide semiconductor sensors (MOS) or surface acoustic wave sensors (SAW). Extract odor fingerprint data to form a volatile organic compound (VOC) feature matrix. Combine principal component analysis (PCA) or linear discriminant analysis (LDA) to reduce data dimensions and improve model training efficiency.

[0021] Use high-resolution microscopy or optical coherence tomography (OCT) to analyze the surface texture or sedimentation characteristics of wine samples. Use image processing techniques (such as edge detection and morphological analysis) to extract the texture pattern of the wine and improve the ability to identify adulterated ingredients or impurities. Use deep learning methods (such as CNN) to automatically extract key visual features.

[0022] The collected multimodal data is standardized and feature fusion and hierarchical extraction are performed through a pre-built genuine and fake wine discrimination model to obtain distribution similarity features and domain shift robustness features to enhance the generalization ability of the model.

[0023] In order to ensure that data from different sources and different modalities are learned at the same scale, the following normalization method is used: Z-score standardization is used, which is applicable to the chemical composition of wine (such as ethanol, esters, organic acids, etc.), eliminating the measurement scale differences between different brands and batches.

[0024] The maximum-minimum normalization is used, which is applicable to UV-Vis, Fluorescence, FTIR, etc., to eliminate equipment measurement errors and improve feature stability.

[0025] Odor fingerprint data processing (electronic nose sensor output): Use principal component analysis (PCA) to reduce dimension, remove redundant information, and retain the main odor characteristics. Normalize the odor sensor response value to keep the output of different sensors consistent.

[0026] Image data standardization (texture information): Gaussian normalization is used to adjust the image contrast so that the visual features of different batches remain consistent. A deep learning algorithm (CNN) is used for feature extraction and normalization of high-dimensional feature vectors.

[0027] After the multimodal data is standardized, feature fusion and hierarchical extraction are performed using a pre-built deep genuine and fake wine discrimination model.

[0028] Use Transformer network or self-attention mechanism to perform global feature fusion on multimodal data to improve the model's ability to understand features of different modalities.

[0029] Cross-Modal Alignment is used to keep the composition, spectrum, smell and texture features consistent in high-dimensional space through self-supervised learning or contrastive learning methods.

[0030] Through adaptive weighted fusion, the weights of different modal features are dynamically adjusted to adapt to different brands and batches of wine.

[0031] Hierarchical feature extraction includes: Low-level features: extract local patterns (such as spectral peaks, odor response curves, etc.) from raw multimodal data.

[0032] Mid-level features: Time series features (such as changes in odor signals over time) are extracted through convolutional neural networks (CNN) or long short-term memory networks (LSTM).

[0033] High-level features: Use a deep neural network (DNN) or Transformer to extract the global feature vector and generate the final feature representation for distinguishing real wine from fake wine.

[0034] The distribution similarity feature extraction is used to measure the similarity of different brands and batches of wine samples in the feature space and improve the generalization ability of the model. The Fréchet distance between different brands / batches is calculated. A lower similarity value indicates that the feature distributions between different brands / batches are closer and the model has better generalization ability.

[0035] Domain shift robustness feature extraction is to measure the adaptability of the model to unseen brands or batches to prevent the model's performance from degrading on new samples.

[0036] When training the model, two models (baseline model and multi-domain adaptation model) are built using single-brand data and multi-brand data respectively. Test on new brands or batches, and calculate the performance degradation ratio. The inverse of the performance degradation ratio is taken as the domain shift robustness feature. The higher the value, the stronger the adaptability of the model on new brands or batches, and the better the generalization ability.

[0037] After analyzing the distribution similarity characteristics of different brands and batches of wine samples in the feature space, the distribution similarity deviation index is generated. The method for obtaining the distribution similarity deviation index is as follows: Suppose there are two brands or batches of wine samples, and their feature vectors are: , represents the characteristics of the first brand / batch of wine samples, the number of samples is m; , represents the characteristics of the second brand / batch of wine samples, the number of samples is n; among them, each sample and They are all high-dimensional feature vectors, usually composed of deep features fused from multimodal data.

[0038] When calculating, you need to define a kernel function k(x,y) to measure the similarity between two sample points. Common kernel functions include: Gaussian kernel (RBF kernel): ; where σ is the bandwidth parameter, which controls the scale of the kernel function.

[0039] Calculate the mean distribution deviation value MD of two samples in the high-dimensional feature space. The expression is: , compare the calculated MD value with the maximum MD value calculated in all brands or batch combinations, and calculate the distribution similarity deviation index, which is expressed as: ; In the formula, is the maximum MD value calculated from all brands or batch combinations. is the distribution similarity deviation index.

[0040] After analyzing the acquired domain shift robustness features, a domain shift robustness anomaly index is generated. The method for obtaining the domain shift robustness anomaly index is as follows: Get source brand / batch training set , target brand / batch test set ; Among them, each sample x is a high-dimensional feature vector, which is usually obtained by fusing multimodal features (such as spectral curves, odor fingerprints, and component data).

[0041] Build a denoising autoencoder or variational autoencoder and train it to be able to The input features are accurately reconstructed.

[0042] The autoencoder structure includes: Encoder: maps high-dimensional input features to a low-dimensional latent space z; Decoder: remaps the low-dimensional latent variable z back to the original feature space; Loss function: Use mean square error (MSE) to calculate the error between the input data x and the reconstructed data; After training, the autoencoder should be able to accurately reconstruct the sample characteristics of the source brand / batch.

[0043] The target brand / batch data Input into the trained autoencoder model to generate reconstruction features , calculate the average reconstruction error of the target brand / batch , the expression is: ;like If the reconstruction error is higher than that of the source brand / batch, it means that the model has poor adaptability to the target brand / batch and the domain shift is serious. The domain shift robustness anomaly index DSRAI is calculated as: ; In the formula, is the average reconstruction error of the source brand / batch, is the maximum reconstruction error among all brand / batch combinations (used for normalization).

[0044] DSRAI is close to 0: The reconstruction error of the target brand / batch is similar to that of the source brand / batch, indicating that the model adapts well to the new brand / batch and has a small domain shift.

[0045] DSRAI is close to 1: The reconstruction error of the target brand / batch is much higher than that of the source brand / batch, indicating that the model has poor adaptability to new brands / batches and has a serious domain shift problem.

[0046] The extracted distribution similarity features and domain shift robustness features are converted into comprehensive feature vectors, which are used as the input of the machine learning model. The generalization ability value of the real and fake wine discrimination model is output through the machine learning model, which is specifically: The distribution similarity deviation index and the domain shift robustness anomaly index are converted into comprehensive feature vectors, which are used as inputs of the machine learning model. The machine learning model predicts the generalization ability value label of the genuine and fake wine discrimination model with each group of comprehensive feature vectors as the prediction target, and takes minimizing the sum of prediction errors of the generalization ability value labels of all genuine and fake wine discrimination models as the training target. The machine learning model is trained until the sum of prediction errors converges, and the model training is stopped. The generalization ability value of the genuine and fake wine discrimination model is determined according to the model output results, wherein the machine learning model is a polynomial regression model.

[0047] The method for obtaining the generalization ability value of the genuine and fake wine discrimination model is as follows: from the comprehensive feature vector training data of the trained machine learning model, the corresponding function expression is obtained: ; Where F is the output function of the model, is the distribution similarity deviation index, DSRAI is the domain shift robustness anomaly index, is the generalization ability value of the real and fake wine discrimination model.

[0048] The obtained generalization ability value of the genuine and fake wine discrimination model is compared with the pre-set reference threshold of the generalization ability value. If the generalization ability value of the genuine and fake wine discrimination model is greater than or equal to the pre-set reference threshold of the generalization ability value, it means that the generalization ability of the fake wine discrimination model is high, and it is marked as a genuine and fake wine discrimination model with high generalization ability; if the generalization ability value of the genuine and fake wine discrimination model is less than the pre-set reference threshold of the generalization ability value, it means that the generalization ability of the fake wine discrimination model is low, and it is marked as a genuine and fake wine discrimination model with low generalization ability.

[0049] For the genuine and fake wine discrimination model with low generalization ability, we use the transfer learning method to conduct multi-stage training and optimization based on data sets of different brands and batches, and evaluate the detection accuracy of the genuine and fake wine discrimination model on unseen brands and batches through cross-validation; Suppose the source brand / batch dataset is DS, its feature distribution is PS(X), and its label distribution is ; Assume that the target brand / batch dataset is DT, its feature distribution is PT(X), and its label distribution is .

[0050] The goal is to use the model trained by DS Migrate to DT and optimize its performance. The expression is: ; Where: θ is the model parameter, E is the loss function (such as cross entropy loss, mean square error), represents the expected loss under the target brand / batch data distribution. When PS(X)≠PT(X) or When the model is used, the generalization ability of the model may be insufficient, so transfer learning methods are needed to optimize it.

[0051] The initial model trained from the source brand / batch dataset DS Perform transfer learning, that is: ;in: are the initial model parameters on the source brand / batch, are the optimized model parameters on the target brand / batch, and Δθ is the adjustment amount of the parameters during the migration process.

[0052] In order to adapt the model to the target brand / batch data, self-supervised domain adaptation is used for optimization to minimize the distribution deviation between the source domain DS and the target domain DT: In the process of transfer learning, adversarial training, such as the Gradient Reversal Layer (GRL), is introduced to minimize the brand / batch bias of the real and fake wine discrimination features: To evaluate the optimized model The detection accuracy on unseen brands / batches was evaluated using K-Fold Cross-Validation.

[0053] Divide the target brand / batch dataset DT into K parts and perform K rounds of training and testing: In the kth round, use the As training set, the remaining one is used as test set; Calculate the model accuracy Acck for each round; Calculate the average accuracy as an indicator of the model's generalization ability on the target brand / batch: If the average accuracy is greater than the preset accuracy threshold, it means that the transfer learning optimization is effective and the model has better adaptability to new brands / batches.

[0054] After completing the transfer learning and generalization ability optimization of the model, the multimodal features of the wine to be tested can be input into the optimized authenticity discrimination model to output the authenticity discrimination results and give the corresponding confidence score to ensure the accuracy and reliability of the detection.

[0055] The characteristic data of the wine to be tested are obtained through non-destructive testing, including but not limited to: ingredient data (such as ethanol content, organic acids, esters, etc.); spectral curves (UV-visible spectrum, infrared spectrum, etc.); odor fingerprints (volatile organic compound characteristics detected by electronic nose sensors); texture information (high-resolution image analysis). These features are standardized and feature extracted, and converted into the input format required by the optimized real and fake wine discrimination model.

[0056] The optimized wine authenticity discrimination model receives input features and performs inference to determine whether the wine to be tested is authentic or fake.

[0057] Analyze input features through deep learning models or machine learning classifiers (such as convolutional neural networks (CNN) and random forests (RF)) and compare them with the data already available in the model.

[0058] Combined with cross-brand and cross-batch generalization capability optimization, the model’s adaptability to different wine samples is ensured.

[0059] Based on the fusion results of multimodal features, the final result of distinguishing true from false wine is output.

[0060] In order to increase the credibility of the detection results, the confidence score is calculated at the same time to measure the reliability of the discrimination results.

[0061] The confidence score is based on the similarity of the model's features to the sample being tested, measuring how well it matches known authentic and fake wine samples in the database.

[0062] The score is usually between 0% and 100%, and the higher the value, the more certain the model is about the sample. Confidence ≥ 90%: High confidence judgment, the model is highly certain about the result of the real wine.

[0063] Confidence level 70% - 90%: Medium confidence level. It is recommended to combine other detection methods to assist in judgment.

[0064] Confidence ≤ 70%: Low confidence, you may need to add more training data or further optimize the model.

[0065] Finally, the system outputs the result of distinguishing real from fake wine and provides a confidence score, for example: Result: fake wine; Confidence: 95%; this indicates that the spectral characteristics and odor fingerprint of the sample are highly similar to those of known fake wine samples, and the model has a high confidence level in judging it as fake wine.

[0066] If the confidence level is low, the system can provide further testing recommendations, such as adding additional testing methods (such as chemical analysis) or combining expert evaluation to improve the reliability of the final decision.

[0067] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0068] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0069] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the objects associated with each other are in an "or" relationship, but it may also indicate an "and / or" relationship, which can be understood by referring to the context. A person of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this article can be implemented in electronic hardware, or a combination of computer software and electronic hardware. 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 exceed the scope of this application.

[0070] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A method for constructing a model for distinguishing genuine and fake wines, characterized in that: include: Obtain wine samples from multiple brands and batches, and extract multimodal data based on a variety of non-destructive testing methods, including composition data, spectral curves, odor fingerprints, and texture information; The collected multimodal data is standardized, and feature fusion and hierarchical extraction of feature data of different modalities are performed based on the pre-built deep wine discrimination model, and the distribution similarity features and domain shift robustness features in the multimodal data are extracted respectively; The extracted distribution similarity features and domain shift robustness features are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as inputs of the machine learning model, and the generalization ability value of the real and fake wine discrimination model is output through the machine learning model; For the genuine and fake wine discrimination model with low generalization ability, we use the transfer learning method to conduct multi-stage training and optimization based on data sets of different brands and batches, and evaluate the detection accuracy of the genuine and fake wine discrimination model on unseen brands and batches through cross-validation; The multimodal features of the wine to be tested are input into the optimized model for distinguishing genuine and fake wines, and the results of distinguishing genuine and fake wines are output, along with the corresponding confidence scores.

2. The method for constructing a genuine wine discrimination model according to claim 1, characterized in that: Multimodal data is extracted based on a variety of non-destructive testing methods, including near-infrared spectroscopy, Raman spectroscopy, UV-visible spectroscopy, fluorescence spectroscopy, Fourier transform infrared spectroscopy, gas chromatography-mass spectrometry, electronic nose and high-resolution microscopy, which are used to extract the composition data, spectral curves, odor fingerprints and texture information of the wine respectively.

3. The method for constructing a genuine wine discrimination model according to claim 2, characterized in that: After analyzing the distribution similarity characteristics of different brands and batches of wine samples in the feature space, the distribution similarity deviation index is generated. The method for obtaining the distribution similarity deviation index is as follows: Suppose there are two brands or batches of wine samples, and their feature vectors are: , represents the characteristics of the first brand / batch of wine samples, the number of samples is m; , represents the characteristics of the second brand / batch of wine samples, the number of samples is n; among them, each sample and They are all high-dimensional feature vectors; Define a kernel function k(x,y) to measure the similarity between two sample points: ; where σ is the bandwidth parameter, and the mean distribution deviation value MD of two samples in the high-dimensional feature space is calculated, and the expression is: , compare the calculated MD value with the maximum MD value calculated in all brands or batch combinations, and calculate the distribution similarity deviation index, which is expressed as: ; In the formula, is the maximum MD value calculated from all brands or batch combinations. is the distribution similarity deviation index.

4. The method for constructing a genuine wine discrimination model according to claim 3, characterized in that: After analyzing the acquired domain shift robustness features, a domain shift robustness anomaly index is generated. The method for obtaining the domain shift robustness anomaly index is as follows: Get source brand / batch training set , target brand / batch test set ; Build a denoising autoencoder or variational autoencoder for training so that it can be used on the source brand / batch data Accurately reconstruct the input features; The autoencoder structure includes: Encoder: maps high-dimensional input features to a low-dimensional latent space z; Decoder: remaps the low-dimensional latent variable z back to the original feature space; Loss function: Use mean square error to calculate the error between input data x and reconstructed data; After training, the autoencoder should be able to accurately reconstruct the sample features of the source brand / batch; The target brand / batch data Input into the trained autoencoder model to generate reconstruction features , calculate the average reconstruction error of the target brand / batch , the expression is: ; Calculate the domain shift robustness anomaly index DSRAI, the expression is: ; In the formula, is the average reconstruction error of the source brand / batch, is the maximum reconstruction error among all brand / batch combinations.

5. The method for constructing a genuine wine discrimination model according to claim 4, characterized in that: The distribution similarity deviation index and the domain shift robustness anomaly index are converted into comprehensive feature vectors, which are used as inputs of the machine learning model. The machine learning model predicts the generalization ability value label of the genuine and fake wine discrimination model with each group of comprehensive feature vectors as the prediction target, and takes minimizing the sum of prediction errors of the generalization ability value labels of all genuine and fake wine discrimination models as the training target. The machine learning model is trained until the sum of prediction errors converges, and the model training is stopped. The generalization ability value of the genuine and fake wine discrimination model is determined according to the model output results, wherein the machine learning model is a polynomial regression model.

6. The method for constructing a genuine wine discrimination model according to claim 5, characterized in that: The obtained generalization ability value of the genuine and fake wine discrimination model is compared with a pre-set reference threshold of the generalization ability value. If the generalization ability value of the genuine and fake wine discrimination model is greater than or equal to the pre-set reference threshold of the generalization ability value, it indicates that the fake wine discrimination model has high generalization ability, and it is marked as a genuine and fake wine discrimination model with high generalization ability. If the generalization ability value of the genuine and fake wine discrimination model is less than a pre-set reference threshold of the generalization ability value, it means that the generalization ability of the fake wine discrimination model is low, and it is marked as a genuine and fake wine discrimination model with low generalization ability.

7. The method for constructing a genuine wine discrimination model according to claim 6, characterized in that: The cross-validation adopts the K-fold cross-validation method, which divides the target brand or batch data set into K parts, trains and tests the model separately, and calculates the average accuracy of all K rounds of experiments. If the average accuracy is greater than a preset threshold, it means that the transfer learning optimization is effective.

8. The method for constructing a genuine wine discrimination model according to claim 7, characterized in that: When distinguishing the wine to be tested, the optimized model for distinguishing genuine and fake wine uses a deep learning model based on multimodal feature fusion for inference and outputs a confidence score. The confidence score is based on the feature similarity of the model to the sample to be tested. If the confidence is ≥90%, the judgment result is reliable. If the confidence is lower than 70%, additional detection methods are added to assist decision-making.

Citation Information

Patent Citations

  • Method and system for measuring total acid content and total ester content of wine

    CN116735811A

  • Self-adaptive feature fusion physiological signal identification method and related equipment

    CN117668604A

  • Food control method, processing device and refrigerator

    CN118120865A

  • Method for constructing true and adulterated wine distinguishing model and true and adulterated wine distinguishing method

    CN118655247A

  • Private domain live broadcast peak hot spot prediction and content scheduling method based on deep learning

    CN119450099A

Cited By

  • AGV material circulation scheduling system of 12-axis PCB drilling machine

    CN120181536A

  • A 12-axis PCB drilling machine AGV material flow scheduling system

    CN120181536B

  • Comparison matching system of spectrum and molecular structure based on machine learning

    CN120508836A

  • Identification system and method for intrinsic semantic difference learning

    CN121476550A

  • Accurate detection system for medicinal liquor components

    CN121612833A