Baijiu brewing spectral data analysis method and system based on large language model

CN121543010BActive Publication Date: 2026-08-21WULIANGYE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511719704.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-08-21
Estimated Expiration
2045-11-21

AI Technical Summary

Technical Problem

传统的白酒质量检测主要依赖于人工感官评价和理化指标检测,这些方法存在诸多局限性

Benefits of technology

[0052] The beneficial effects of this invention are as follows: By combining traditional spectral analysis technology with a large language model, and using professional knowledge in the field of baijiu (Chinese liquor) to conduct specialized supervised fine-tuning training of the large language model, questions are posed to the trained large language model using natural language commands. The large language model identifies and analyzes the spectral data of the baijiu brewing process and outputs a response to the natural language commands. This achieves intelligent monitoring and analysis of the baijiu brewing process, improves the accuracy and efficiency of interpreting spectral data in the baijiu brewing process, reduces reliance on professional technicians, and provides a new technical path for the digital transformation of the baijiu industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543010B_ABST
    Figure CN121543010B_ABST
Patent Text Reader

Abstract

The present application mainly relates to the technical field of spectral analysis, in order to efficiently and accurately obtain liquor brewing information according to multi-modal spectral data of each link of liquor brewing, the present application provides a liquor brewing spectral analysis method and system based on multi-modal large language model, the core is: collecting multi-modal spectral data including gas chromatography data, infrared spectrum data and Raman spectrum data in each link of liquor brewing, converting multi-modal spectral data and natural language instructions into feature embedding vectors that can be recognized by a large language model, training the large language model based on the professional knowledge of the liquor field, the trained large language model receives the user's natural language instruction form of question, performs flavor compound identification, key microorganism detection, fermentation state evaluation, base liquor quality grading and other liquor analysis tasks, and finally outputs the analysis results and liquor brewing process optimization suggestions in the form of natural language, improving the accuracy and efficiency of spectral data interpretation in the liquor brewing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention mainly relates to the field of spectral analysis technology, and in particular to a method and system for analyzing spectral data of Baijiu brewing based on a large language model. Background Technology

[0002] With the rapid development of my country's liquor industry and the continuous improvement of consumers' quality requirements, precise control and quality monitoring of the liquor brewing process have become key technological needs for the industry's development. As a traditional advantageous industry in my country, liquor brewing involves complex processes, including koji making, fermentation, distillation, and aging. Quality control at each stage directly affects the quality of the final product. Traditional liquor quality testing mainly relies on manual sensory evaluation and physicochemical index testing, but these methods have many limitations.

[0003] The main problems in the quality control of baijiu brewing at present include: traditional spectroscopic analysis methods based on analytical chemistry mainly rely on the experience and judgment of professional technicians. The interpretation of multi-source data such as gas chromatography, infrared spectroscopy, and Raman spectroscopy requires extensive professional knowledge, resulting in low analytical efficiency and susceptibility to subjective factors; existing quality testing systems lack the ability to monitor and provide intelligent early warning for complex fermentation processes, especially in terms of the dynamic changes of microbial communities, the formation rules of flavor compounds, fermentation status assessment, and quality grading of base liquor / finished liquor; in addition, most detection methods adopt a single-index analysis approach, failing to effectively integrate information from multiple spectroscopic data, resulting in an insufficient understanding of the brewing process and difficulty in providing accurate process optimization suggestions.

[0004] In recent years, the rapid development of artificial intelligence technology, especially large language models, has provided new technical paths for solving the above problems. Advanced technologies such as multimodal data fusion, deep learning, and natural language processing have shown great potential in spectral data analysis, pattern recognition, and knowledge reasoning. However, effectively applying these technologies to the intelligent monitoring of baijiu brewing, particularly designing fusion analysis algorithms for the unique multispectral data (volatile compound information from gas chromatography, molecular vibrational characteristics from infrared spectroscopy, molecular structural information from Raman spectroscopy, etc.) specific to baijiu brewing, and constructing a professional brewing process knowledge base and reasoning model, remains a technical challenge. While existing spectral analysis systems have applications in food testing and other fields, the baijiu brewing process has its unique characteristics: the fermentation microbial community is complex and diverse, flavor compounds are numerous and interact intricately, the integration of traditional process parameters with modern detection technologies requires professional knowledge bridging, and users face technical barriers in understanding and applying the analysis results. Directly transplanting existing technologies cannot meet the special needs of intelligent analysis in baijiu brewing. Summary of the Invention

[0005] The technical problem to be solved by this invention is to provide a method and system for spectral analysis of Baijiu brewing based on a multimodal large language model, with the aim of efficiently and accurately acquiring information in the Baijiu brewing process based on spectral data of Baijiu brewing.

[0006] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0007] On the one hand, this invention provides a method for analyzing spectral data of Baijiu brewing based on a large language model, the method comprising the following steps:

[0008] Step S1: Collect multimodal spectral data from each stage of the liquor brewing process, preprocess the collected spectral data, and form a standardized spectral data sequence.

[0009] Step S2: Convert the spectral data sequence and natural language analysis instructions into feature embedding vectors using a multimodal encoder;

[0010] Step S3: Jointly encode the feature embedding vector with the natural language analysis instructions provided by the user, and input it into a large language model that has been trained with specialization supervision in the field of liquor brewing.

[0011] Step S4: The large language model performs the analysis task in the analysis instruction based on the joint encoding and outputs the analysis results in the form of natural language text.

[0012] Furthermore, the multimodal spectral data in step S1 includes at least one of the following: gas chromatography data, infrared spectral data, and Raman spectroscopy.

[0013] Furthermore, step S1, which involves forming a standardized spectral data sequence, includes converting gas chromatography into a time-peak intensity sequence, infrared spectroscopy into a wavenumber-absorbance feature vector, and Raman spectroscopy into a shift-intensity feature vector.

[0014] Furthermore, the multimodal encoder described in step S2 is built based on the Transformer architecture, and the multimodal encoder includes:

[0015] The spectral coding branch is used to extract spectral features from different types of spectral data sequences and map them to a high-dimensional vector space;

[0016] The text encoding branch is used to process natural language analysis instructions and generate semantic representations;

[0017] The cross-modal fusion layer establishes an alignment relationship between spectral features and the semantics of natural language analysis instructions through an attention mechanism, generating a fixed-dimensional feature embedding vector.

[0018] Furthermore, extracting spectral features from different types of spectral data sequences includes:

[0019] Convolutional feature extraction of spectral sequences is performed based on a spectral coding function, and static weight enhancement is applied to key feature peaks based on wavelength priors to extract spectral features. The spectral coding function is as follows:

[0020] ;

[0021] in, The spectral features are extracted based on the spectral coding function. For the first Weights of each spectral channel, For convolutional feature extraction functions, Input sequence for spectral features, For wavelength, The center wavelength, For spectral attenuation parameters;

[0022] Spectral features extracted from spectral coding functions Perform a linear transformation to obtain the attention weight values: , , ,in , , These are the learnable weight matrices. , , These are the query vector, key vector, and value vector, respectively.

[0023] Identifying and enhancing value vectors using a spectral peak perception attention mechanism. The weights of the key feature peaks and the attention weights are:

[0024] ;

[0025] in, Here is the spectral attention weight matrix. Peak enhancement factor, This is the scaling factor.

[0026] Furthermore, the cross-modal fusion layer establishes the connection between spectral features and semantics based on a modal alignment loss function, which is defined as follows:

[0027] ;

[0028] in, Let be the modal alignment loss function. For similarity, For temperature coefficient, Spectral characteristics, To combine natural language analysis instructions that are independent of the current spectrum, For the corresponding natural language analysis instructions, , As a chemical similarity adjustment factor, For learnable weights, To incorporate expert knowledge from the field of brewing analytical chemistry into the model parameters using knowledge distillation technology.

[0029] Furthermore, the large language model is built on an autoregressive decoding Transformer architecture and trained under specialized supervised fine-tuning in the field of strong-aroma baijiu brewing.

[0030] The model employs a causal self-attention mechanism for sequence modeling, and the autoregressive generation probability is expressed as:

[0031] ;

[0032] in, For the first Each output token Input sequence for spectral features;

[0033] The supervised fine-tuning process adopts the instruction-following paradigm, and the training objective function is:

[0034] ;

[0035] in, The total number of training samples, For the first Each input sample contains spectral data and user instructions. The corresponding target output sequence;

[0036] During model generation, a kernel sampling strategy is used to control output quality, and the sampling probability distribution is as follows:

[0037] ;

[0038] in, For the cumulative probability to exceed the threshold The set of tokens For temperature coefficient, For the first The logit value of each token.

[0039] Furthermore, based on the probability distribution entropy and sequence consistency of the generated tokens, the confidence level is calculated as follows:

[0040] ;

[0041] in For confidence level, For the first The predicted entropy of each token. It serves as an indicator of internal consistency within the sequence.

[0042] Furthermore, the preprocessing in step S1 includes:

[0043] Denoising is achieved using wavelet transform algorithm and adaptive filtering technique;

[0044] Baseline correction is performed based on asymptotic least squares, adaptive iterative reweighted least squares, or polynomial fitting.

[0045] Standardization is performed based on intensity normalization, wavelength correction, and unit conversion.

[0046] On the other hand, the present invention also provides a spectral data analysis system for Baijiu brewing based on a large language model, the system comprising:

[0047] Spectral data acquisition module: used to collect multimodal spectral data at various stages of baijiu brewing;

[0048] Preprocessing module: Used to preprocess spectral data to obtain standardized spectral data sequences;

[0049] Feature Embedding Transformation Module: Used to convert spectral data sequences and natural language analysis instructions into feature embedding vectors through a multimodal encoder;

[0050] The model training module is used to jointly encode the feature embedding vector and the analysis instructions proposed by the user, and input them into the large language model that has been trained with special supervision in the field of liquor brewing, so as to train the large language model.

[0051] Results output module: Used to obtain spectral analysis results of liquor brewing based on the user's questions using a large language model that has been trained.

[0052] The beneficial effects of this invention are as follows: By combining traditional spectral analysis technology with a large language model, and using professional knowledge in the field of baijiu (Chinese liquor) to conduct specialized supervised fine-tuning training of the large language model, questions are posed to the trained large language model using natural language commands. The large language model identifies and analyzes the spectral data of the baijiu brewing process and outputs a response to the natural language commands. This achieves intelligent monitoring and analysis of the baijiu brewing process, improves the accuracy and efficiency of interpreting spectral data in the baijiu brewing process, reduces reliance on professional technicians, and provides a new technical path for the digital transformation of the baijiu industry. Attached Figure Description

[0053] Figure 1 This is a flowchart of the spectral analysis method for Baijiu brewing based on a multimodal large language model as described in this invention;

[0054] Figure 2 This is a flowchart of the spectral analysis system for Baijiu brewing based on a multimodal large language model, as described in this invention. Detailed Implementation

[0055] The core of the technical solution adopted by this invention to solve the above-mentioned technical problems is as follows: Multimodal spectral data, including at least gas chromatography, infrared spectroscopy, and Raman spectroscopy, is collected from various stages of Baijiu brewing. This multimodal spectral data is then modally aligned with natural language commands related to Baijiu analysis, converting them into feature embedding vectors that a large language model can recognize. This achieves unified encoding of spectral signals and natural language commands, and trains a large language model fine-tuned based on Baijiu expertise. During the spectral data analysis process, the trained large language model receives user queries in the form of natural language commands, analyzes the multimodal spectral data, and obtains analysis results for brewing analysis tasks such as flavor compound identification, key microbial detection, fermentation status assessment, and base liquor quality grading. The analysis results are then output in natural language to provide brewing process suggestions.

[0056] like Figure 1 As shown, the specific steps for achieving the above-mentioned core technology of the present invention include:

[0057] Step S1: Collect multimodal spectral data, and convert the spectral data sequence and natural language analysis instructions into feature embedding vectors through a multimodal encoder.

[0058] Data were collected at different stages of the baijiu brewing process, including raw materials, lees, distillation process, and finished product samples, including gas chromatography data, infrared spectroscopy data, and Raman spectroscopy data.

[0059] Gas chromatographic data were acquired using gas chromatography-mass spectrometry (GC-MS). This data includes chromatographic retention times and peak areas of organic compounds at various stages of baijiu brewing, enabling the identification and quantitative analysis of flavor compounds such as esters. Infrared spectroscopy data were acquired using a Fourier transform infrared spectrometer, encompassing molecular vibrational absorption information in the near- and mid-infrared bands. This data reflects the vibrational characteristics of chemical bonds, allowing for the analysis of changes in the structure and concentration of functional groups in organic molecules. Raman spectroscopy data were obtained using a laser Raman spectrometer, acquiring characteristic Raman scattering peaks and providing information on complementary molecular vibrations. This data is suitable for detecting the structural characteristics of symmetrical molecules and inorganic ions.

[0060] The acquired spectral data undergoes denoising, baseline calibration, and normalization preprocessing, specifically including:

[0061] Denoising: Employing multi-layer wavelet transform algorithms or adaptive filtering techniques, high-frequency random noise, electronic device interference, and environmental electromagnetic interference can be effectively removed while preserving the shape and intensity information of spectral peaks without distortion. The denoising algorithm can automatically adjust parameters according to different spectral types and signal-to-noise ratio levels to achieve the best denoising effect. The wavelet transform is expressed as:

[0062] ;

[0063] in, For scale parameters, For displacement parameters, For wavelet functions, The signal to be analyzed, For time.

[0064] Baseline calibration: Asymptotic least squares, adaptive iterative reweighted least squares, or polynomial fitting methods are employed to automatically identify and correct baseline shifts caused by instrument drift, sample matrix effects, and optical system variations, ensuring consistent baseline levels for spectral data obtained from different batches and devices. The objective function for baseline fitting is:

[0065] ;

[0066] in, As weight, For the observed values, These are the fitted values.

[0067] Standardization: Standardization functions include intensity normalization, wavelength correction, and unit conversion. It eliminates the effects of instrument response differences and variations in detection conditions through internal and external standard methods, and establishes a database of standard reference materials for periodic calibration and verification, ensuring the consistency and comparability of long-term data. The normalization formula is:

[0068] ;

[0069] in, For the first in the original data One value, The value is the normalized value. The maximum value, This is the maximum value.

[0070] The preprocessed gas chromatography data are converted into a time-peak intensity sequence, the infrared spectral data are converted into a wavenumber-absorbance feature vector, and the Raman spectral data are converted into a shift-intensity feature vector, forming a standardized input spectral data sequence.

[0071] Step S2: Convert the spectral data sequence and natural language analysis instructions into feature embedding vectors using a multimodal encoder.

[0072] The feature embedding transformation employs a multimodal encoder based on the Transformer architecture, which includes a spectral coding branch, a text coding branch, and a cross-modal fusion layer. The spectral branch extracts spectral features from the spectral data sequence and maps them to a high-dimensional vector space. The text branch generates a textual semantic representation of natural language analysis instructions. The cross-modal fusion layer establishes the mapping relationship between spectral features and textual semantic concepts, ultimately generating a feature embedding vector of uniform dimension, providing standardized input for subsequent processing of large language models.

[0073] The spectral coding branch designs dedicated one-dimensional convolutional neural networks for spectral feature extraction based on the different characteristics of gas chromatography, infrared spectroscopy, and Raman spectroscopy. It captures spectral features across different frequency ranges using multi-scale convolutional kernels. The spectral coding function is expressed as:

[0074] ;

[0075] in, The spectral features are extracted based on the spectral coding function. For the first Weights of each spectral channel, For convolutional feature extraction functions, Input sequence for spectral features, For wavelength, The center wavelength, This is the spectral attenuation parameter.

[0076] Spectral features extracted from spectral coding functions Perform a linear transformation to obtain the attention weight values: , , ,in , , These are the learnable weight matrices. , , These are the query vector, key vector, and value vector, respectively.

[0077] Identifying and enhancing value vectors using a spectral peak perception attention mechanism. The weights of the key feature peaks and the attention weights are:

[0078] ;

[0079] in, Here is the spectral attention weight matrix. Peak enhancement factor, This is the scaling factor.

[0080] The text encoding branch processes natural language queries and chemical knowledge descriptions, generating semantic vector representations through pre-trained word embeddings and positional encodings.

[0081] The cross-modal fusion layer employs a cross-attention mechanism to establish the correspondence between spectral features and semantic concepts. A contrastive learning method is used to cluster spectral patterns with similar chemical meanings in the feature space. The modal alignment loss function is defined as follows:

[0082] ;

[0083] in, Let be the modal alignment loss function. For similarity, For temperature coefficient, Spectral characteristics, To combine natural language analysis instructions that are independent of the current spectrum, For the corresponding natural language analysis instructions, , As a chemical similarity adjustment factor, For learnable weights, To incorporate expert knowledge from the field of brewing analytical chemistry into the model parameters using knowledge distillation technology.

[0084] Step S3: Jointly encode the feature embedding vector with the natural language analysis instructions provided by the user, and input it into a large language model that has been trained with specialization supervision in the field of liquor brewing.

[0085] The large language model is built on an autoregressive decoding Transformer architecture and has undergone specialized supervised fine-tuning training in the field of strong-aroma baijiu brewing. It possesses the ability to process multimodal inputs and generate professional analysis reports. The model employs a causal self-attention mechanism for sequence modeling, and the autoregressive generation probability is expressed as:

[0086] ;

[0087] in, For the first Each output token The input sequence is the spectral feature sequence. The supervised fine-tuning process adopts the instruction-following paradigm, and the training objective function is:

[0088] ;

[0089] in, The total number of training samples, For the first Each input sample contains spectral data and user instructions. This corresponds to the target output sequence. During model generation, a kernel sampling strategy is used to control output quality, and the sampling probability distribution is as follows:

[0090] ;

[0091] in, For the cumulative probability to exceed the threshold The set of tokens For temperature coefficient, For the first The logit value of each token.

[0092] Confidence assessment is based on the probability distribution entropy of the generated tokens and sequence consistency, and is calculated as follows:

[0093] ;

[0094] in, For confidence level, For the first The predicted entropy of each token. It serves as an internal consistency indicator for the sequence, ensuring the reliability and professionalism of the analysis results.

[0095] Step S4: The large language model performs the analysis task in the analysis instruction based on the joint encoding and outputs the analysis results in the form of natural language text.

[0096] Intelligent analysis of spectral data is performed based on a trained large language model. The system accepts analysis commands from users in natural language, jointly encodes the commands with embedded feature vectors, and performs brewing analysis tasks such as identification of baijiu flavor compounds, detection of key microorganisms, assessment of fermentation status, and grading of base liquor quality. The analysis results are output in natural language, providing detailed analysis reports for direct answers and explanations to user queries, and offering optimization suggestions and improvement measures for the brewing process based on the analysis results, which are then returned to the user.

[0097] like Figure 2 As shown, the spectral analysis system for Baijiu brewing based on a multimodal large language model described in this invention includes:

[0098] Spectral data acquisition module: used to collect multimodal spectral data at various stages of baijiu brewing;

[0099] Preprocessing module: Used to preprocess spectral data to obtain standardized spectral data sequences;

[0100] Feature Embedding Transformation Module: Used to convert spectral data sequences and natural language analysis instructions into feature embedding vectors through a multimodal encoder;

[0101] The model training module is used to jointly encode the feature embedding vector and the analysis instructions proposed by the user, and input them into the large language model that has been trained with special supervision in the field of liquor brewing, so as to train the large language model.

[0102] Results output module: Used to obtain spectral analysis results of liquor brewing based on the user's questions using a large language model that has been trained.

[0103] The following example illustrates the process of querying baijiu (Chinese liquor) analysis commands using a trained large language model.

[0104] Example 1: Monitoring the fermentation status of Baijiu (Chinese liquor) cellars based on a trained large language model

[0105] On the 15th day of fermentation of strong-aroma baijiu, technicians took samples of the lees from the fermentation pits and used the system to assess the fermentation status.

[0106] Multimodal spectral data acquisition: Infrared spectral data (4000-400 cm⁻¹) of distiller's grains samples were acquired. -1 (wavelength bands) and Raman spectral data (200-4000 cm⁻¹) -1 (Band) to obtain molecular vibrational characteristic information.

[0107] Technicians input natural language commands: "Based on current chemical spectral data, analyze the fermentation status of the distiller's grains, and assess sugar conversion and microbial activity."

[0108] Intelligent analysis process: The system converts spectral data into feature embedding vectors, and the large language model outputs the thought process: "In the infrared spectrum, 3200-3600 cm⁻¹..." -1 The decrease in the intensity of the OH stretching vibration peak in the region indicates that sugar is being consumed; 1050-1150 cm⁻¹ -1 The variation in the CO stretching vibration peak in the region indicates the concentration of starch hydrolysis products; the Raman spectrum at 1400-1600 cm⁻¹... -1 The characteristic peaks of a region reflect changes in the composition of the microbial cell wall.

[0109] The large model finally outputs the analysis results, and the system generates a report: "The current fermentation status is good, the sugar conversion rate has reached 68%, and the microbial activity is at its peak. The butyric acid bacteria and lactic acid bacteria community structures are normal. It is recommended to maintain the current fermentation temperature of 28±2℃. The fermentation cycle is expected to take another 35-40 days to complete."

[0110] Example 2: Real-time monitoring of base spirit quality during distillation based on a trained large language model

[0111] During the distillation process, the outflowing base liquor is subjected to real-time quality testing and grading.

[0112] Multimodal spectral data acquisition: An online gas chromatography system was used to detect volatile compounds in the base wine and obtain retention time and peak area data of major flavor substances such as ethyl acetate, ethyl hexanoate, and ethyl lactate; at the same time, near-infrared spectral data were acquired to analyze alcohol content and moisture content.

[0113] User instruction: The production administrator asks, "Based on the current spectral data, determine the quality grade of the currently flowing base liquor and whether it meets the premium liquor standard?"

[0114] Intelligent analysis process: "Gas chromatography data shows that the content of ethyl acetate is 120mg / 100mL, the content of ethyl hexanoate is 180mg / 100mL, and the content of ethyl lactate is 85mg / 100mL; near-infrared spectroscopy analysis shows that the alcohol content is 52.8% vol";

[0115] The overall evaluation assessed the coordination and typicality of various indicators. The analysis results were: "The current base liquor is of superior quality, with a balanced content of major flavor compounds and an ethyl acetate / ethyl hexanoate ratio of 0.67, meeting the standards for high-quality base liquor in the strong-aroma category. It is recommended for use as a flavoring liquor and can be used in blending high-end products. The alcohol content is slightly high; it is suggested to adjust it appropriately during subsequent blending."

[0116] Example 3: Early warning of microbial contamination based on a trained large language model

[0117] On the 8th day of fermentation, the system detected an abnormal signal and conducted microbial contamination analysis.

[0118] Multimodal spectral data acquisition: Raman and mid-infrared spectral data of distiller's grains samples were acquired, with a focus on characteristic peaks of microbial metabolites and cell wall components.

[0119] User instruction: Quality inspector asks, "What is the cause of the detected abnormal signal, and is there a risk of contamination by other microorganisms?"

[0120] Intelligent analysis process: System analysis of Raman spectra reveals 1580 cm⁻¹ -1 and 1380 cm -1 An abnormal peak appeared at [location], consistent with the cell wall components of wild yeast; the mid-infrared spectrum was [value] at 2800-3000 cm⁻¹. -1 Abnormal fatty acid characteristic peaks were detected in the area, suggesting the possible presence of putrefactive bacteria.

[0121] Analysis results output: System warning: "Signs of wild yeast contamination detected, level is mild. The following measures are recommended immediately: 1) Increase fermentation temperature to 32℃ to inhibit wild yeast growth; 2) Increase the amount of brewing yeast strain; 3) Strengthen ventilation management; 4) Retest after 48 hours. Failure to address this promptly may affect the flavor quality and yield of the final product."

Claims

1. A method for analyzing spectral data of Baijiu brewing based on a large language model, characterized in that, The method includes the following steps: Step S1: Collect multimodal spectral data from each stage of the liquor brewing process, preprocess the collected spectral data, and form a standardized spectral data sequence. Step S2: Convert the spectral data sequence and natural language analysis instructions into feature embedding vectors using a multimodal encoder; The multimodal encoder is built based on the Transformer architecture and includes: The spectral coding branch is used to extract spectral features from different types of spectral data sequences and map them to a high-dimensional vector space; The text encoding branch is used to process natural language analysis instructions and generate semantic representations; The cross-modal fusion layer establishes an alignment relationship between spectral features and the semantics of natural language analysis instructions through an attention mechanism, generating a fixed-dimensional feature embedding vector. The extraction of spectral features from different types of spectral data sequences includes: Convolutional feature extraction of spectral sequences is performed based on a spectral coding function, and static weight enhancement is applied to key feature peaks based on wavelength priors to extract spectral features. The spectral coding function is as follows: ; in The spectral features are extracted based on the spectral coding function. For the first Weights of each spectral channel, For convolutional feature extraction functions, Input sequence for spectral features, For wavelength, The center wavelength, For spectral attenuation parameters; Spectral features extracted from spectral coding functions Perform a linear transformation to obtain the attention weight values: , , ,in , , These are the learnable weight matrices. , , These are the query vector, key vector, and value vector, respectively. Identifying and enhancing value vectors using a spectral peak perception attention mechanism. The weights of the key feature peaks and the attention weights are: ; in, Here is the spectral attention weight matrix. Peak enhancement factor, This is the scaling factor; The cross-modal fusion layer establishes the relationship between spectral features and semantics based on a modal alignment loss function, which is defined as follows: ; in Let be the modal alignment loss function. For similarity, For temperature coefficient, Spectral characteristics, To combine natural language analysis commands that are independent of the current spectrum, For the corresponding natural language analysis instructions, , As a chemical similarity adjustment factor, For learnable weights, To incorporate expert knowledge from the field of brewing analytical chemistry into the model parameters using knowledge distillation technology; Step S3: Jointly encode the feature embedding vector with the natural language analysis instructions provided by the user, and input it into a large language model that has been trained with specialization supervision in the field of liquor brewing. Step S4: The large language model executes the analysis task in the analysis instruction based on the joint encoding and outputs the analysis results in the form of natural language text.

2. The method for analyzing spectral data of Baijiu brewing based on a large language model according to claim 1, characterized in that, The multimodal spectral data in step S1 includes at least one of gas chromatography data, infrared spectral data, and Raman spectroscopy data.

3. The method for analyzing spectral data of Baijiu brewing based on a large language model according to claim 2, characterized in that, Step S1, which involves forming a standardized spectral data sequence, includes converting gas chromatography into a time-peak intensity sequence, infrared spectroscopy into a wavenumber-absorbance feature vector, and Raman spectroscopy into a shift-intensity feature vector.

4. The method for analyzing spectral data of Baijiu brewing based on a large language model according to claim 1, characterized in that, The large language model is built on an autoregressive decoding Transformer architecture and has been trained with specialized supervised fine-tuning in the field of strong-aroma baijiu brewing. The model employs a causal self-attention mechanism for sequence modeling, and the autoregressive generation probability is expressed as: ; in For the first Each output token Input sequence for spectral features; The supervised fine-tuning process adopts the instruction-following paradigm, and the training objective function is: ; in, The total number of training samples, For the first Each input sample contains spectral data and user instructions. The corresponding target output sequence; During model generation, a kernel sampling strategy is used to control output quality, and the sampling probability distribution is as follows: ; in, For the cumulative probability to exceed the threshold The set of tokens For temperature coefficient, For the first The logit value of each token.

5. The method for analyzing spectral data of Baijiu brewing based on a large language model according to claim 1, characterized in that, The confidence level is calculated based on the probability distribution entropy and sequence consistency of the generated tokens, using the following method: ; in For confidence level, Let be the predicted entropy of the t-th token. It serves as an indicator of internal consistency within the sequence.

6. The method for analyzing spectral data of Baijiu brewing based on a large language model according to claim 1, characterized in that, The preprocessing in step S1 includes: Denoising is achieved using wavelet transform algorithm and adaptive filtering technique; Baseline correction is performed based on asymptotic least squares, adaptive iterative reweighted least squares, or polynomial fitting. Standardization is performed based on intensity normalization, wavelength correction, and unit conversion.

7. A spectral data analysis system for Baijiu brewing based on a large language model, used to implement the spectral data analysis method for Baijiu brewing based on a large language model as described in any one of claims 1-6, characterized in that, The system includes: Spectral data acquisition module: used to collect multimodal spectral data at various stages of baijiu brewing; Preprocessing module: Used to preprocess spectral data to obtain standardized spectral data sequences; Feature Embedding Transformation Module: Used to convert spectral data sequences and natural language analysis instructions into feature embedding vectors through a multimodal encoder; The model training module is used to jointly encode the feature embedding vector and the analysis instructions proposed by the user, and input them into the large language model that has been trained with special supervision in the field of liquor brewing, so as to train the large language model. Results output module: Used to obtain spectral analysis results of liquor brewing based on the user's questions, using a large language model that has been trained.

Citation Information

Patent Citations

  • Industrial textile control system and method based on large language model

    CN118798486A

  • Mass spectrum structure analysis method and device, storage medium and program product

    CN119517179A