A base liquor batch decoupling quality control method and system

By constructing a batch-decoupled quality control model for base liquor, utilizing a shared encoder to split invariant grade features and batch perturbation features, and combining dual-branch supervision and multi-source environmental constraints, the stability and high-precision prediction of the base liquor quality control method are achieved. This solves the problems of unstable cross-batch grade discrimination and low prediction accuracy with few samples, and improves the robustness and generalization ability of base liquor quality control.

CN122332964APending Publication Date: 2026-07-03贵州轻工职业大学

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
贵州轻工职业大学
Filing Date
2026-05-29
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing methods for quality control of base liquor suffer from problems such as unstable cross-batch grade discrimination, invariant feature extraction due to batch disturbances, and low accuracy in predicting target batches with few samples. Furthermore, they fail to effectively utilize multi-source environmental data for feature decoupling and prototype calibration.

Method used

Using base wine sample data from multi-source production environments, a batch decoupled quality control model is constructed. It is split into invariant level features and batch perturbation features through a shared encoder, performs bi-branch supervision, and suppresses environmental label leakage through batch adversarial constraints and branch orthogonal constraints. It is jointly trained by multi-source environmental risk constraints and cross-environment homogeneous aggregation constraints to achieve explicit separation of invariant level features and batch perturbation features, and performs prototype calibration when there are a few labeled samples.

Benefits of technology

It achieves explicit separation of invariant rank features and batch perturbation features, ensuring the stability of rank discrimination and the controllability of batch perturbation, improving the prediction accuracy and generalization ability of target batches, reducing dependence on labeled samples, and solving the problems of low accuracy and environmental interference in cross-batch, low-sample or zero-sample scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332964A_ABST
    Figure CN122332964A_ABST
Patent Text Reader

Abstract

This invention discloses a batch decoupling quality control method and system for base liquor, relating to the field of intelligent data processing technology. The method includes acquiring base liquor sample data from multi-source production environments to form training data containing chromatographic fingerprints, quality grade labels, and environmental labels; constructing a batch decoupling quality control model, inputting the training data into a shared encoder and splitting it into invariant grade features and batch perturbation features; performing grade prediction based on the invariant grade features and performing environmental identification based on the batch perturbation features to form a dual-branch supervision; suppressing environmental label leakage in the invariant grade features through batch adversarial constraints and branch orthogonal constraints; jointly training the batch decoupling quality control model based on multi-source environmental risk constraints and cross-environmental same-level aggregation constraints; using the trained batch decoupling quality control model for target batch quality control prediction, and performing prototype calibration to output grade results when a small number of labeled samples are present.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent data processing technology, specifically to a batch decoupling quality control method and system for base wine. Background Technology

[0002] In recent years, with the increasing demands for product quality and flavor stability in the base liquor industry, automated quality control technologies based on chromatographic fingerprinting and machine learning have gradually become a research hotspot. Traditional quality inspection methods rely on manual experience or single indicators for judgment, making it difficult to cope with complex differences across multiple batches and production environments. To improve prediction accuracy and batch-to-batch comparability, researchers have begun to explore methods such as multi-source data fusion, deep feature representation, and prototype learning to capture invariant quality information of products under different production environments, while also considering batch perturbation characteristics. These methods have gradually been applied in the grading and process quality control of high-end base liquors such as wine and baijiu, providing a theoretical foundation and practical experience for achieving automated and intelligent quality control.

[0003] Traditional chromatographic or composition-based models struggle to effectively distinguish between batch perturbations and true grade information under different production environments, leading to unstable cross-batch predictions. Models trained on multi-source data often fail to explicitly decouple invariant grade features from batch perturbation features, making them susceptible to environmental interference and reducing grade discrimination accuracy. Furthermore, target batch prediction with a small number of labeled samples still relies on simple fine-tuning or direct inference, failing to fully utilize existing multi-source environmental information for prototype calibration, thus limiting model performance in low-sample scenarios. In addition, existing methods do not fully leverage the shaping capabilities of adversarial constraints, orthogonal constraints, and cross-environmental risk constraints on the feature space, making it difficult to form robust and generalizable invariant grade features. These shortcomings directly result in existing methods being unable to achieve the comprehensive technical effects of stable cross-batch grade discrimination, low-sample target batch calibration, and batch perturbation suppression as described in this invention during actual production. Summary of the Invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by this invention is that existing base wine quality control methods suffer from unstable cross-batch grade discrimination, invariant feature extraction due to batch disturbances, low accuracy in predicting target batches with few samples, and the problem of how to achieve stable and high-precision target batch quality control through multi-source environmental data training, feature decoupling, dual-branch supervision, and prototype calibration.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a batch decoupling quality control method for base liquor, comprising: acquiring base liquor sample data from multi-source production environments to form training data including chromatographic fingerprints, quality grade labels, and environmental labels; constructing a batch decoupling quality control model, inputting the training data into a shared encoder and splitting it into invariant grade features and batch perturbation features; performing grade prediction based on invariant grade features and performing environmental identification based on batch perturbation features to form a dual-branch supervision; suppressing environmental label leakage in invariant grade features through batch adversarial constraints and branch orthogonal constraints; jointly training the batch decoupling quality control model based on multi-source environmental risk constraints and cross-environmental same-level aggregation constraints; using the trained batch decoupling quality control model for target batch quality control prediction, and performing prototype calibration to output grade results when a small number of labeled samples are present.

[0007] As a preferred embodiment of the batch decoupling quality control method for base liquor described in this invention, the following steps are included: The formation of training data comprising chromatographic fingerprints, quality grade labels, and environmental labels includes reading base liquor sample records from historical production environments. Each base liquor sample record includes chromatographic fingerprint data generated by a detection device, a quality grade label corresponding to the base liquor sample, and an environmental label used to distinguish the production environment. A unified data formatting process is performed on the chromatographic fingerprint data so that the chromatographic fingerprints of each base liquor sample are arranged according to the same feature dimension. When a sample is found to lack a quality grade label, the corresponding sample is excluded from the supervised training data. When a sample is found to lack an environmental label, the corresponding sample is not used for batch decoupling training. The retained samples are grouped according to the environmental labels, so that samples under the same environmental label form a subset of source production environment samples, and all source production environment sample subsets are merged into training data.

[0008] As a preferred embodiment of the batch decoupling quality control method for base wine described in this invention, the following steps are taken: The splitting into invariant grade features and batch perturbation features includes setting a shared encoder, an invariant grade branch connected to the shared encoder, and a batch perturbation branch connected to the shared encoder; chromatographic fingerprint samples from the training data are input into the shared encoder, which maps the peak intensity, inter-peak relationships, and overall distribution structure of the chromatographic fingerprint to obtain potential features characterizing the overall information of the sample; according to a preset feature channel division rule, the potential features are divided into invariant grade features and batch perturbation features, as follows: in, The parameter is Shared encoder, This represents the input chromatographic fingerprint sample of the base wine. Indicates invariant hierarchical characteristics, This indicates the characteristics of batch perturbation. This represents feature concatenation; invariant grade features are used as input to the grade classification head, and batch perturbation features are used as input to the batch classification head; the shared encoder generates two feature branches simultaneously for the same input sample in one forward computation, so that the invariant grade branch is used to carry stable discrimination information related to quality grade, and the batch perturbation branch is used to carry perturbation information related to differences in the production environment; when performing batch decoupled quality control model training, grade supervision only applies to the invariant grade branch, and environmental supervision only applies to the batch perturbation branch, so as to form mutually distinguishable feature processing paths.

[0009] As a preferred embodiment of the batch decoupling quality control method for base wine described in this invention, the dual-branch supervision includes: inputting invariant grade features into a grade classification head, outputting the predicted probability corresponding to each quality grade from the grade classification head, comparing the predicted probability with the quality grade labels in the training data, and generating a grade classification loss according to the cross-entropy calculation rule; the grade classification loss is obtained by averaging the grade prediction deviations of each sample according to the number of samples, and is used to constrain the invariant grade features to retain quality grade discrimination information; inputting batch perturbation features into a batch classification head, outputting the predicted probability corresponding to each source production environment from the batch classification head, comparing the predicted probability with the environment labels in the training data, and generating a batch absorption loss according to the cross-entropy calculation rule; the batch absorption loss is obtained by averaging the environment prediction deviations of each sample according to the number of samples, and is used to constrain the batch perturbation features to carry environmental difference information; during training, the grade classification loss and batch absorption loss are calculated simultaneously on the same batch of training samples as supervision signals for different branches, so that the invariant grade branch and the batch perturbation branch receive constraints from different targets respectively.

[0010] As a preferred embodiment of the batch decoupling quality control method for base wine described in this invention, the method for suppressing environmental label leakage in invariant rank features includes connecting a gradient inversion layer after the invariant rank branch and a batch adversarial head after the gradient inversion layer; inputting the invariant rank features into the batch adversarial head, enabling the batch adversarial head to predict environmental labels based on the invariant rank features, and generating a batch adversarial loss based on the deviation between the prediction result and the actual environmental label; during parameter updates, the batch adversarial head updates in the direction of reducing environmental prediction deviation, while the shared encoder and the invariant rank branch are updated in the direction of weakening environmental recognizability via the gradient inversion layer, forming an adversarial constraint against environmental label leakage; summarizing the invariant rank features and batch perturbation features separately within the same training batch, and centering the two feature sets; generating branch orthogonal constraints based on the correlation between the two centered feature sets, the correlation being determined by the internal accumulation between the invariant rank feature direction and the batch perturbation feature direction; simultaneously reading the batch adversarial loss and branch orthogonal constraints during backpropagation, enabling the invariant rank branch to reduce environmental label recognizability and reduce the coupling between the two branches in the feature direction.

[0011] As a preferred embodiment of the batch decoupling quality control method for base wine described in this invention, the following steps are included: Joint training of the batch decoupling quality control model involves dividing the training data into multiple source production environment sample subsets according to environmental labels, and calculating the classification risk of each source production environment sample subset; the classification risk is obtained by averaging the classification prediction deviations of each sample within the corresponding source production environment; consistency constraints are applied to the classification risk of each source production environment to ensure that the same classification head satisfies the same optimization direction in different source production environments; during calculation, a virtual scaling factor is introduced to detect the environmental consistency of the classification head, and multi-source environment risk constraints are generated based on the change in risk of each source production environment relative to the virtual scaling factor; for anchor samples in the current training batch, a set of positive samples of the same level across environments is determined, represented as: in, Represents anchor point sample The set of positive samples Indicates candidate samples, Indicates the quality level label of the candidate sample. The quality grade label indicates the anchor sample. This represents the environmental label of the candidate sample. This represents the environmental label of the anchor sample. The data augmentation samples represent anchor point samples; supervised contrastive learning is performed based on the cross-environment peer positive sample set to form an aggregated structure according to the quality level of the invariant rank feature space; the rank classification loss, batch absorptive loss, batch adversarial loss, branch orthogonality constraint, multi-source environment risk constraint and cross-environment peer aggregation constraint are combined according to preset weights to form the total training objective, and the parameters of the shared encoder, rank classification head, batch classification head, batch adversarial head and projection head are updated according to the total training objective.

[0012] As a preferred embodiment of the batch decoupling quality control method for base wine described in this invention, the following steps are included: The execution of prototype calibration output grade results includes freezing the shared encoder and grade classification head after the batch decoupling quality control model training is completed; receiving the base wine samples to be predicted for the target batch and extracting the corresponding chromatographic fingerprint data; when no labeled samples of the target batch are received, the base wine samples to be predicted are input into the frozen shared encoder to extract invariant grade features, and the invariant grade features are input into the grade classification head, which outputs the probability values ​​corresponding to each quality grade, and the quality grade with the highest probability value is determined as the quality control prediction result for the target batch; when a small set of labeled samples of the target batch is received, the small set of labeled samples is first grouped according to the quality grade label, and it is determined whether there are labeled samples available for calibration for each quality grade; for quality grades with labeled samples, the invariant grade features of all labeled samples under the corresponding quality grade are extracted, and the grade prototype of the quality grade in the target batch is calculated, expressed as: in, Indicates the quality grade in the target batch The prototype of the hierarchy, Indicates the quality grade in the target batch The number of labeled samples, This represents a small set of labeled samples in the target batch. 'Indicates the labeled sample in the target batch, This indicates the quality grade label of the sample. Indicates labeled samples The invariant grade features are used to determine the quality level of the target batch. For the sample to be predicted, the distance between the corresponding invariant grade features and the prototypes of each grade is calculated. The quality level corresponding to the prototype with the smallest distance is determined as the calibrated grade result. If there are no labeled samples for a certain quality level in the target batch, the corresponding quality level will not participate in the prototype distance comparison, or the grade probability output by the grade classification head will be used for supplementary judgment.

[0013] As a preferred embodiment of the base wine batch decoupling quality control system described in this invention, it includes: a feature decomposition module, a supervision and constraint module, and a prediction output module; the feature decomposition module is used to acquire base wine sample data from multi-source production environments to form training data containing chromatographic fingerprints, quality grade labels, and environmental labels; a batch decoupling quality control model is constructed, and the training data is input into a shared encoder and decomposed into invariant grade features and batch perturbation features; the supervision and constraint module is used to perform grade prediction based on invariant grade features and to perform environmental identification based on batch perturbation features to form a dual-branch supervision; environmental label leakage in invariant grade features is suppressed through batch adversarial constraints and branch orthogonal constraints; the prediction output module is used to jointly train the batch decoupling quality control model based on multi-source environmental risk constraints and cross-environment same-level aggregation constraints; the trained batch decoupling quality control model is used for target batch quality control prediction, and prototype calibration is performed to output grade results when there are a few labeled samples.

[0014] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a batch decoupling quality control method for base wine.

[0015] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a batch decoupling quality control method for base wine.

[0016] The beneficial effects of this invention are as follows: The batch decoupling quality control method for base wine provided by this invention forms a complete batch decoupling quality control process through system design, including data acquisition, shared encoder dual-branch decoupling, dual-branch supervision, batch adversarial and orthogonal constraints, multi-source environment risk constraints and cross-environment aggregation, and target batch prototype calibration. This achieves explicit separation of invariant grade features and batch perturbation features, ensuring the stability of grade discrimination and the controllability of batch perturbation. Under multi-source environment and low-sample conditions, the model can converge quickly, significantly improving the prediction accuracy and generalization ability of the target batch. Simultaneously, this invention reduces the dependence on labeled samples, solving the problems of low accuracy, high susceptibility to batch interference, and weak cross-environment generalization ability of traditional quality control methods in cross-batch, low-sample, or zero-sample scenarios. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 The overall flowchart of a batch decoupling quality control method for base wine provided by the present invention is shown.

[0019] Figure 2 The target batch small sample calibration accuracy curve is shown in the decoupling quality control method for base wine provided by the present invention.

[0020] Figure 3 A schematic diagram of a computer device for a batch decoupling quality control method for base wine provided by the present invention. Detailed Implementation

[0021] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0022] Reference Figure 1 As an embodiment of the present invention, a batch decoupling quality control method for base wine is provided, comprising: S1: Acquire base wine sample data from multiple production environments to form training data including chromatographic fingerprints, quality grade labels, and environmental labels.

[0023] Furthermore, the training data, which includes chromatographic fingerprints, quality grade labels, and environmental labels, involves reading base wine sample records from historical production environments. Each base wine sample record includes chromatographic fingerprint data generated by the testing equipment, a quality grade label corresponding to the base wine sample, and an environmental label used to distinguish the production environment. A uniform data formatting process is performed on the chromatographic fingerprint data so that the chromatographic fingerprints of each base wine sample are arranged according to the same feature dimension. When a sample is found to lack a quality grade label, the corresponding sample is excluded from the supervised training data. When a sample is found to lack an environmental label, the corresponding sample is not used for batch decoupling training. The retained samples are grouped according to the environmental label, so that samples under the same environmental label form a subset of source production environment samples, and all source production environment sample subsets are merged into training data.

[0024] It should be noted that one method for generating training data that includes chromatographic fingerprints, quality grade labels, and environmental labels specifically involves collecting records of each batch of base wine samples from historical production environments, with each record containing a chromatographic fingerprint vector generated by the testing equipment. This describes the peak intensity and distribution of each chemical component in the base liquor, and each sample also has a quality grade label. and environmental labels Environmental labels are used to distinguish the production batch or production environment to which a sample belongs, ensuring that the characteristics of different batches can be identified and processed by subsequent models. All chromatographic fingerprint data undergoes uniform formatting after reading, mapping the characteristics of samples from different batches to the same dimension. The vector space is used to form a standardized feature set. During data cleaning, when a sample is detected to be missing a quality level label... In this case, the sample will be excluded from the training set; if environmental labels are missing... If the sample is not selected, it will not participate in batch decoupling training. Retained samples are selected based on their environmental labels. Grouping, with each group forming a subset of the source production environment samples. ,in Indicates environment The number of samples in This represents the sample index. All source production environment subsets are merged to form the complete training set. ,in This represents the set of source production environments.

[0025] S2: Construct a batch decoupled quality control model, input the training data into a shared encoder and split it into invariant rank features and batch perturbation features.

[0026] Furthermore, the breakdown into invariant-rank features and batch perturbation features includes setting up a shared encoder, an invariant-rank branch connected to the shared encoder, and a batch perturbation branch connected to the shared encoder. The chromatographic fingerprint samples from the training data are input into the shared encoder, which maps the peak intensity, inter-peak relationships, and overall distribution structure of the chromatographic fingerprint to obtain latent features characterizing the overall information of the sample. According to a preset feature channel partitioning rule, the latent features are divided into invariant-rank features and batch perturbation features, as follows: in, The parameter is Shared encoder, This represents the input chromatographic fingerprint sample of the base wine. Indicates invariant hierarchical characteristics, This indicates the characteristics of batch perturbation. This represents feature concatenation; invariant grade features are used as input to the grade classification head, and batch perturbation features are used as input to the batch classification head; the shared encoder generates two feature branches simultaneously for the same input sample in one forward computation, so that the invariant grade branch is used to carry stable discrimination information related to quality grade, and the batch perturbation branch is used to carry perturbation information related to differences in the production environment; when performing batch decoupled quality control model training, grade supervision only applies to the invariant grade branch, and environmental supervision only applies to the batch perturbation branch, so as to form mutually distinguishable feature processing paths.

[0027] It should be noted that one approach to inputting training data into a shared encoder and splitting it into invariant rank features and batch perturbation features specifically includes setting up a shared encoder. And connect the two branches: invariant level branches and batch perturbation branches Training samples The input to the shared encoder is mapped to a latent feature vector, and then split into two branch features according to a preset channel partitioning rule, as follows: in, The parameter is Shared encoder, This represents the chromatographic fingerprint vector of the input sample. Indicates invariant grade characteristics, used for load-bearing and quality grades. Relevant stability determination information, Indicates batch disturbance characteristics, used to carry environmental labels. Relevant batch information, This represents the concatenation or partitioning of feature channels. The shared encoder generates two branches simultaneously in a single forward computation, allowing the invariant rank branch features to be used as input to the rank classification head, and the batch perturbation branch features to be used as input to the batch classification head. During training, the invariant rank branch uses only rank labels. The supervisory signal, while the batch perturbation branch only uses environmental labels. The supervisory signal is used to decouple the latent features from the grade and batch information. In subsequent prediction tasks, the features output by the invariant grade branch can be stably used for grade discrimination, while the features output by the batch perturbation branch can be used for environmental information capture, realizing the core function of batch decoupled quality control.

[0028] S3: Perform level prediction based on invariant level features and perform environment identification based on batch perturbation features to form a dual-branch supervision.

[0029] Furthermore, the dual-branch supervision involves inputting invariant rank features into a rank classification head, which outputs the predicted probability corresponding to each quality level. The predicted probability is then compared with the quality level labels in the training data, and a rank classification loss is generated according to the cross-entropy calculation rule. This rank classification loss is obtained by averaging the rank prediction biases of each sample over the sample size, and is used to constrain the invariant rank features to retain quality level discrimination information. Similarly, batch perturbation features are input into a batch classification head, which outputs the predicted probability corresponding to each source production environment. The predicted probability is then compared with the environment labels in the training data, and a batch absorption loss is generated according to the cross-entropy calculation rule. This batch absorption loss is obtained by averaging the environment prediction biases of each sample over the sample size, and is used to constrain the batch perturbation features to carry environmental difference information. During training, both the rank classification loss and the batch absorption loss are calculated simultaneously on the same batch of training samples, serving as supervision signals for different branches, allowing the invariant rank branch and the batch perturbation branch to receive constraints from different objectives.

[0030] It should be noted that one specific scheme for forming a two-branch supervision method includes inputting invariant hierarchical features into the hierarchical classification head. Then, output each quality level. Predicted probability and compared with the true rank labels of the training samples. Perform cross-entropy comparison to generate hierarchical classification loss. , represented as: in, This represents the total number of samples in the training batch. This represents the total number of quality levels, i.e., the number of different possible quality levels predicted by the model in a classification task. Represents the cross-entropy loss function. Indicates sample The invariant hierarchical characteristics, Indicates the true level label, This represents the predicted probability vector output by the hierarchical classification head. The hierarchical classification loss is used to constrain... Retain grade discrimination information to ensure stable predictions across batches. Simultaneously, incorporate batch perturbation features. Enter batch classification header Output environment prediction probability , and real-world labels Comparison, generation batch absorption loss , represented as: in, This represents the environmental prediction probability vector output by the batch classification header. Indicates sample The real-world environment labels. Simultaneously calculated during training. and The model backpropagates to both the invariant rank branch and the batch perturbation branch, achieving decoupled supervision between the two branches. Rank prediction is performed based on the split invariant rank features, while environment recognition is performed based on the batch perturbation features, forming an independent dual-branch supervision system. By independently constraining the two branches, the model can optimize rank discrimination and batch information capture separately during the training phase, thus ensuring the purity of invariant rank features and the specificity of batch perturbation features. It maintains high accuracy even with a small number of or zero-sample target batches, improving the model's stability in complex, multi-source environments and solving the problem that existing technologies cannot simultaneously achieve both rank prediction accuracy and environmental interference suppression.

[0031] S4: Suppress environmental label leakage in invariant hierarchical features by using batch adversarial constraints and branch orthogonal constraints.

[0032] Furthermore, suppressing environment label leakage in invariant-level features involves connecting a gradient inversion layer after the invariant-level branch, and then connecting a batch adversarial head after the gradient inversion layer. The invariant-level features are input into the batch adversarial head, which predicts environment labels based on these features and generates a batch adversarial loss based on the deviation between the predicted and actual environment labels. During parameter updates, the batch adversarial head updates in the direction that reduces environment prediction bias, while the shared encoder and the invariant-level branch are updated via the gradient inversion layer in the direction that weakens environment recognizability, forming adversarial constraints against environment label leakage. Invariant-level features and batch perturbation features are aggregated separately within the same training batch, and the two feature sets are centered. Branch orthogonal constraints are generated based on the correlation between the two centered feature sets, with the correlation determined by the internal accumulation between the invariant-level feature direction and the batch perturbation feature direction. During backpropagation, the batch adversarial loss and branch orthogonal constraints are simultaneously read, causing the invariant-level branch to reduce environment label recognizability and decrease the coupling between the two branches in the feature direction.

[0033] It should be noted that one specific scheme for suppressing environmental label leakage in invariant grading features includes, to further suppress To address environmental information leakage, the model connects a gradient inversion layer (GRL) after the invariant level branch and integrates a batch adversarial head. Batch-based anti-tank head Output predictions about the environment Generate batches to combat losses , represented as: GRL flips the gradient during backpropagation, causing the shared encoder and invariant rank branches to update in directions that weaken the recognizability of environmental information, thus achieving adversarial constraints. Simultaneously, for each sample... and Centralize the process and calculate the internal accumulation to generate branch orthogonal constraints. , represented as: in and This represents the centered eigenvector. It is achieved by simultaneously minimizing... and This method effectively suppresses environmental label leakage in invariant grade features while ensuring the independence of the two branches, providing a robust feature foundation for subsequent grade prediction and cross-environment batch generalization. An adversarial mechanism is introduced after the invariant grade feature branch, and orthogonal constraints are used to reduce feature coupling between the two branches, allowing the invariant grade features to remove environmental information as much as possible. This ensures the purity of the invariant grade features, avoids environmental label leakage interfering with grade discrimination, and keeps the two feature branches independent in the feature space, contributing to the consistency and reliability of cross-batch prediction. Compared to traditional methods, this invention can systematically reduce the impact of environmental interference and achieve robust quality control across different production batches.

[0034] S5: Jointly train the batch decoupled quality control model based on multi-source environmental risk constraints and cross-environment peer-level aggregation constraints.

[0035] Furthermore, joint training of the batch decoupled quality control model includes dividing the training data into multiple source production environment sample subsets according to environmental labels, and calculating the classification risk of each source production environment sample subset; the classification risk is obtained by averaging the classification deviation of each sample within the corresponding source production environment; consistency constraints are applied to the classification risk of each source production environment to ensure that the same classification head satisfies the same optimization direction in different source production environments; during calculation, a virtual scaling factor is introduced to detect the environmental consistency of the classification head, and multi-source environment risk constraints are generated based on the change magnitude of each source production environment risk relative to the virtual scaling factor; for anchor samples in the current training batch, a set of positive samples of the same level across environments is determined, represented as: in, Represents anchor point sample The set of positive samples Indicates candidate samples, Indicates the quality level label of the candidate sample. The quality grade label indicates the anchor sample. This represents the environmental label of the candidate sample. This represents the environmental label of the anchor sample. The data augmentation samples represent anchor point samples; supervised contrastive learning is performed based on the cross-environment peer positive sample set to form an aggregated structure according to the quality level of the invariant rank feature space; the rank classification loss, batch absorptive loss, batch adversarial loss, branch orthogonality constraint, multi-source environment risk constraint and cross-environment peer aggregation constraint are combined according to preset weights to form the total training objective, and the parameters of the shared encoder, rank classification head, batch classification head, batch adversarial head and projection head are updated according to the total training objective.

[0036] It should be noted that one specific approach to jointly train a batch decoupled quality control model includes dividing the training data according to environmental labels. Divided into multiple source production environment sample subsets Statistically analyze the risk classification of each subset. , represented as: This refers to the average prediction error of the class level for samples within each environmental subset. By comparing the class level risks of different source environments, a virtual scaling factor is introduced to detect the consistency between the classification head and the environment, thereby generating multi-source environmental risk constraints. This ensures that the optimization direction of the same level of classification head is consistent in different source environments.

[0037] For each anchor sample in the current training batch Construct a set of positive samples at the same level across environments: in As candidate samples, Represents anchor point sample Data augmentation to generate samples. Based on set. Perform supervised contrastive learning to maintain invariant hierarchical features The space forms a clustered structure at the quality level, resulting in cross-environmental same-level clustered constraint loss. Ultimately, the classification loss will be determined by the ranking. Batch absorption loss Batch countermeasures loss Branch orthogonal constraint Multi-source environmental risk constraints Cross-environment sibling aggregation constraints The overall training objective is to combine elements according to preset weights. and according to Update shared encoder Classification Head Batch classification head Batch of anti-head By combining the parameters of the projection head with those of the target head, joint training can be achieved.

[0038] S6: Use the trained batch decoupled quality control model for target batch quality control prediction, and perform prototype calibration to output grade results when there are a few labeled samples.

[0039] Furthermore, the prototype calibration output grade results include freezing the shared encoder and grade classification head after the batch decoupled quality control model training is completed, receiving the base wine samples to be predicted for the target batch and extracting the corresponding chromatographic fingerprint data; when no labeled samples for the target batch are received, the base wine samples to be predicted are input into the frozen shared encoder to extract invariant grade features, and the invariant grade features are input into the grade classification head, which outputs the probability values ​​corresponding to each quality grade, and the quality grade with the highest probability value is determined as the quality control prediction result for the target batch; when a small set of labeled samples for the target batch is received, the small set of labeled samples are first grouped according to the quality grade label, and it is determined whether there are labeled samples available for calibration for each quality grade; for quality grades with labeled samples, the invariant grade features of all labeled samples under the corresponding quality grade are extracted, and the grade prototype of the quality grade in the target batch is calculated, represented as: in, Indicates the quality grade in the target batch The prototype of the hierarchy, Indicates the quality grade in the target batch The number of labeled samples, This represents a small set of labeled samples in the target batch. This refers to the labeled samples in the target batch. This indicates the quality grade label of the sample. Indicates labeled samples The invariant grade features are used to determine the quality level of the target batch. For the sample to be predicted, the distance between the corresponding invariant grade features and the prototypes of each grade is calculated. The quality level corresponding to the prototype with the smallest distance is determined as the calibrated grade result. If there are no labeled samples for a certain quality level in the target batch, the corresponding quality level will not participate in the prototype distance comparison, or the grade probability output by the grade classification head will be used for supplementary judgment.

[0040] It should be noted that one approach to performing prototype calibration output level results when there are a few labeled samples specifically includes using the trained batch-decoupled quality control model for target batch quality control prediction and performing prototype calibration when there are a few labeled samples. Freezing the shared encoder. and classification header Receive the target batch of samples to be predicted Chromatographic fingerprints were extracted, and invariant rank characteristics were calculated. When no labeled samples are received, the probability value is directly output by the rank classification header. , represented as: Choose the level with the highest probability as the prediction result. When there is a small set of labeled samples... At that time, according to the level label Group the samples and extract the invariant rank features corresponding to each rank. Calculation level prototype , represented as: in For level The number of labeled samples. For each sample to be predicted. Calculate the Euclidean distance between its invariant rank characteristics and all rank prototypes, and determine the rank corresponding to the rank prototype with the smallest distance as the calibrated prediction result. , represented as: in, This represents the set of quality levels in the target batch that can participate in prototype calibration. It includes only the level categories that have labeled samples in the target batch or need to be used for calibration. If a level does not have labeled samples in the target batch, that level is not included in the distance comparison, or the probability output by the level classification head is used for supplementary judgment. Through this step, the model can achieve reliable batch quality control prediction in low-sample scenarios while maintaining cross-environment generalization ability.

[0041] Reference Figure 2 As an embodiment of the present invention, a decoupled quality control method for base wine batches is provided. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0042] First, in this embodiment, to verify the performance of the batch decoupled quality control model under the condition of a small number of labeled samples in the target batch, the number of available labeled samples for each quality level is determined. A few-sample calibration experiment was conducted. The experiment used the LORO (leave-one-round-out) protocol to predict each level in each target batch and record the average accuracy. The methods compared included: the IBDR combined with prototype calibration method proposed in this invention (IBDR+prototype calibration), the IBDR weight fine-tuning method (IBDR+weight fine-tuning), ProtoNet trained on a static ERM backbone, MAML trained on a static ERM backbone, and the performance ceiling for retraining per batch (Retrain-Per-Batch ceiling). The experimental results are shown in Table 1.

[0043] Table 1. Average Accuracy of Small Sample Calibration in Target Batch As can be seen from Table 1, when the number of samples labeled at each level... At 0, the IBDR+ prototype calibration method achieved an accuracy of 0.826, significantly higher than ProtoNet and MAML, indicating that the shared encoder and batch decoupling features can still provide stable level discrimination capability under zero annotation conditions. As the numbers increased to 1, 3, and 5, the accuracy continued to improve, reaching 0.837, 0.864, and 0.879 respectively, indicating strong robustness in low-sample regimes. Medium sample size... At that time, the accuracy of the method of this invention reached 0.903, close to the upper limit of 0.912 per batch retraining, showing that prototype calibration can approach ideal performance under conditions of few samples. As the number of labeled samples further increases... and The accuracy rates reached 0.909 and 0.911, respectively, further verifying the stability and cross-batch generalization ability of the method.

[0044] refer to Figure 2 Even with zero labeled samples, the IBDR+prototype calibration method of this invention still achieves high prediction accuracy. As the number of labeled samples increases, the prediction accuracy rapidly improves and approaches the upper limit of batch retraining, significantly outperforming traditional ProtoNet and MAML methods. This verifies the stability and efficiency of the batch decoupling quality control model in maintaining grade information under low-sample and multi-source environments. This invention achieves stable prediction across environments by explicitly separating invariant grade features from batch perturbation features, while reducing dependence on labeled data, demonstrating significant technical effects. Compared with other methods, ProtoNet and MAML perform worse than IBDR in low-sample regimes, indicating that relying solely on static ERMbackbone or meta-learning methods is insufficient to fully capture the decoupling relationship between batch perturbations and invariant grade features. IBDR combined with prototype calibration utilizes the dual-branch supervision features from the training phase to form a clear aggregation structure in the invariant grade feature space, thereby improving cross-batch generalization ability and low-sample prediction accuracy. This embodiment fully demonstrates the feasibility and robustness of the batch decoupling quality control model under different labeled sample volumes, providing an executable reference solution for practical target batch quality control.

[0045] One embodiment of the present invention provides a batch decoupled quality control system for base wine, including a feature decomposition module, a supervision and constraint module, and a prediction output module.

[0046] The feature decomposition module acquires base wine sample data from multiple production environments to form training data containing chromatographic fingerprints, quality grade labels, and environmental labels. A batch-decoupled quality control model is constructed by inputting the training data into a shared encoder and decomposing it into invariant grade features and batch perturbation features. A supervision and constraint module performs grade prediction based on invariant grade features and environmental identification based on batch perturbation features, forming a dual-branch supervision. Batch adversarial constraints and branch orthogonal constraints suppress environmental label leakage in invariant grade features. A prediction output module jointly trains the batch-decoupled quality control model based on multi-source environmental risk constraints and cross-environmental homogeneous aggregation constraints. The trained batch-decoupled quality control model is used for target batch quality control prediction, and prototype calibration is performed to output grade results when a small number of labeled samples are present.

[0047] Reference Figure 3 This embodiment also provides a computer device applicable to the decoupled quality control method for base wine batches, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the decoupled quality control method for base wine batches as proposed in the above embodiment.

[0048] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0049] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the batch decoupling quality control method for base wine as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

Claims

1. A batch decoupling quality control method for base wine, characterized in that, include: Acquire base wine sample data from multiple production environments to form training data including chromatographic fingerprints, quality grade labels, and environmental labels; Construct a batch decoupled quality control model, input the training data into a shared encoder and split it into invariant rank features and batch perturbation features; Level prediction is performed based on invariant level features, and environment identification is performed based on batch perturbation features to form a dual-branch supervision; Suppressing environmental label leakage in invariant hierarchical features by using batch adversarial constraints and branch orthogonal constraints; Based on multi-source environmental risk constraints and cross-environmental homogeneous aggregation constraints, the batch decoupled quality control model is jointly trained. The trained batch decoupled quality control model is used for target batch quality control prediction, and prototype calibration is performed to output grade results when there are a few labeled samples.

2. The batch decoupling quality control method for base wine as described in claim 1, characterized in that: The training data that includes chromatographic fingerprints, quality grade labels, and environmental labels includes reading base wine sample records from historical production environments. Each base wine sample record includes chromatographic fingerprint data generated by the detection device, a quality grade label corresponding to the base wine sample, and an environmental label used to distinguish the production environment. Perform uniform data formatting on the chromatographic fingerprint data so that the chromatographic fingerprints of each base wine sample are arranged according to the same feature dimensions; When a sample is found to be missing a quality grade label, the corresponding sample is excluded from the supervised training data; When a sample is found to be missing an environmental label, the corresponding sample will not be used for batch decoupling training. The retained samples are grouped according to their environment labels, so that samples under the same environment label form a subset of source production environment samples, and all subsets of source production environment samples are combined into training data.

3. The batch decoupling quality control method for base wine as described in claim 2, characterized in that: The splitting into invariant grade features and batch perturbation features includes setting a shared encoder, an invariant grade branch connected to the shared encoder, and a batch perturbation branch connected to the shared encoder; The chromatographic fingerprint samples in the training data are input into the shared encoder, which maps the peak intensity, inter-peak relationship and overall distribution structure in the chromatographic fingerprint to obtain potential features that characterize the overall information of the sample. According to the preset feature channel division rules, the latent features are divided into invariant level features and batch perturbation features, as follows: in, The parameter is Shared encoder, This represents the input chromatographic fingerprint sample of the base wine. Indicates invariant hierarchical characteristics, This indicates the characteristics of batch perturbation. Indicates feature splicing; Invariant rank features are used as input to the rank classification head, and batch perturbation features are used as input to the batch classification head; In a single forward computation, the shared encoder generates two feature branches for the same input sample. The invariant grade branch is used to carry stable discrimination information related to the quality grade, while the batch perturbation branch is used to carry perturbation information related to differences in the production environment. When training the batch decoupled quality control model, hierarchical supervision only applies to the invariant hierarchical branch, and environmental supervision only applies to the batch perturbation branch, so as to form mutually distinguishable feature processing paths.

4. The batch decoupling quality control method for base wine as described in claim 3, characterized in that: The bi-branch supervision method includes inputting invariant grade features into a grade classification head, outputting the predicted probability corresponding to each quality grade from the grade classification head, comparing the predicted probability with the quality grade labels in the training data, and generating a grade classification loss according to the cross-entropy calculation rules. The classification loss is obtained by averaging the sum of the classification prediction biases of each sample according to the number of samples, and is used to constrain invariant classification features to retain quality classification information. The batch perturbation features are input into the batch classification head, which outputs the predicted probability corresponding to each source production environment. The predicted probability is then compared with the environment label in the training data, and the batch absorption loss is generated according to the cross-entropy calculation rule. The batch absorption loss is obtained by averaging the environmental prediction biases of each sample according to the number of samples, and is used to constrain the batch perturbation characteristics to carry environmental difference information. During training, the rank classification loss and batch assimilation loss are calculated simultaneously on the same batch of training samples as supervision signals for different branches, so that the invariant rank branch and the batch perturbation branch receive constraints from different objectives.

5. The batch decoupling quality control method for base wine as described in claim 4, characterized in that: The method for suppressing environmental label leakage in invariant hierarchical features includes connecting a gradient inversion layer after the invariant hierarchical branch and a batch adversarial head after the gradient inversion layer. Invariant rank features are input into the batch adversarial head, which then predicts environment labels based on the invariant rank features and generates batch adversarial loss based on the deviation between the prediction results and the actual environment labels. During parameter updates, the batch adversarial head updates in the direction of reducing environmental prediction bias, while the shared encoder and invariant grade branch are updated in the direction of weakening environmental identifiability through the gradient inversion layer, forming an adversarial constraint against environmental label leakage. Invariant rank features and batch perturbation features are summarized separately within the same training batch, and the two feature sets are centered. Branch orthogonal constraints are generated based on the degree of correlation between two centralized feature sets. The degree of correlation is determined by the internal accumulation between the invariant rank feature direction and the batch perturbation feature direction. During backpropagation, batch adversarial loss and branch orthogonality constraints are read simultaneously, which makes the invariant rank branch reduce the recognizability of environment labels and reduce the coupling between the two branches in the feature direction.

6. The batch decoupling quality control method for base wine as described in claim 5, characterized in that: The joint training of the batch decoupled quality control model includes dividing the training data into multiple source production environment sample subsets according to environmental labels, and calculating the grade classification risk on each source production environment sample subset respectively. The risk classification is obtained by averaging the risk classification deviations of each sample within the corresponding source production environment; Consistency constraints are applied to the risk classification of each source production environment to ensure that the same classification head meets the same optimization direction in different source production environments. During the calculation, a virtual scaling factor is introduced to detect the consistency of the classification head environment, and multi-source environment risk constraints are generated based on the change magnitude of each source production environment risk relative to the virtual scaling factor. For anchor samples in the current training batch, determine the set of positive samples at the same level across environments, denoted as: in, Represents anchor point sample The set of positive samples Indicates candidate samples, Indicates the quality level label of the candidate sample. The quality grade label indicates the anchor sample. This represents the environmental label of the candidate sample. This represents the environmental label of the anchor sample. This represents data augmentation samples representing anchor point samples; Supervised contrastive learning is performed based on a set of positive samples of the same level across environments, so that the invariant hierarchical feature space forms an aggregated structure according to the quality level. The hierarchical classification loss, batch absorption loss, batch adversarial loss, branch orthogonality constraint, multi-source environment risk constraint, and cross-environment peer aggregation constraint are combined according to preset weights to form the overall training objective. The parameters of the shared encoder, hierarchical classification head, batch classification head, batch adversarial head, and projection head are updated according to the overall training objective.

7. The batch decoupling quality control method for base wine as described in claim 6, characterized in that: The execution of prototype calibration output grade results includes freezing the shared encoder and grade classification head after the batch decoupled quality control model training is completed, receiving the base wine samples to be predicted from the target batch and extracting the corresponding chromatographic fingerprint data; When no labeled sample of the target batch is received, the base wine sample to be predicted is input into the frozen shared encoder to extract the invariant grade feature. The invariant grade feature is then input into the grade classification head, which outputs the probability value corresponding to each quality grade. The quality grade with the highest probability value is determined as the quality control prediction result of the target batch. When a small set of labeled samples for the target batch is received, the small set of labeled samples is first grouped according to the quality level label, and it is determined whether there are labeled samples that can be used for calibration for each quality level. For quality levels with labeled samples, extract the invariant grade features of all labeled samples under the corresponding quality level, and calculate the grade prototype of the quality level in the target batch, represented as: in, Indicates the quality grade in the target batch The prototype of the hierarchy, Indicates the quality grade in the target batch The number of labeled samples, This represents a small set of labeled samples in the target batch. 'Indicates the labeled sample in the target batch, This indicates the quality grade label of the sample. Indicates labeled samples The invariant hierarchical characteristics; For the sample to be predicted, calculate the distance between the corresponding invariant grade feature and each grade prototype, and determine the quality grade corresponding to the grade prototype with the smallest distance as the calibrated grade result. If a certain quality level does not have a labeled sample in the target batch, the corresponding quality level will not participate in the prototype distance comparison, or the level probability output by the level classification header will be used for supplementary judgment.

8. A base wine batch decoupling quality control system, employing the base wine batch decoupling quality control method as described in any one of claims 1 to 7, characterized in that: It includes a feature decomposition module, a supervision and constraint module, and a prediction output module; The feature decomposition module is used to acquire base wine sample data from multi-source production environments to form training data containing chromatographic fingerprints, quality grade labels, and environmental labels; and to construct a batch decoupled quality control model by inputting the training data into a shared encoder and decomposing it into invariant grade features and batch perturbation features. The supervision and constraint module is used to perform level prediction based on invariant level features and to perform environment identification based on batch perturbation features, so as to form a dual-branch supervision; the leakage of environment labels in invariant level features is suppressed by batch adversarial constraints and branch orthogonal constraints. The prediction output module is used to jointly train the batch decoupled quality control model based on multi-source environmental risk constraints and cross-environment peer aggregation constraints; the trained batch decoupled quality control model is used for target batch quality control prediction, and prototype calibration is performed to output the level results when there are a few labeled samples.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the base wine batch decoupling quality control method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the base wine batch decoupling quality control method according to any one of claims 1 to 7.