Tobacco cutter moisture dynamic prediction method based on double attention mechanism and XGBoost

By combining a dual attention mechanism and the XGBoost method with feature and temporal attention mechanisms, the problem of mining deep structural information during the tobacco drying process was solved, achieving high-precision dynamic prediction of tobacco moisture content and improving the model's generalization ability and prediction accuracy.

CN117494007BActive Publication Date: 2026-11-27ZHENGZHOU UNIVERSITY OF LIGHT INDUSTRY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311506756.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-13
Publication Date
2026-11-27
Estimated Expiration
2043-11-13

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively extract deep structural information during the tobacco drying process, resulting in limited generalization ability of tobacco moisture prediction models. Furthermore, traditional static network structures cannot describe the dynamic changes in the tobacco drying process.

Method used

By employing a dual attention mechanism and the XGBoost method, a dynamic prediction model for tobacco moisture is established by filtering features through mutual information, introducing a feature and time attention mechanism, and combining BiLSTM and XGBoost to capture nonlinear relationships and dynamic change patterns.

Benefits of technology

It achieves high-precision dynamic prediction of tobacco moisture content, improves the model's generalization ability and prediction accuracy, reduces model complexity, and adapts to the dynamic characteristics of the tobacco drying process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117494007B_ABST
    Figure CN117494007B_ABST
Patent Text Reader

Abstract

The application discloses a kind of double attention mechanism and XGBoost's export moisture dynamic prediction method, preliminary feature screening is carried out to process variable using mutual information, the input with the largest correlation with export moisture is selected, the feature dimension is reduced, and the model complexity is simplified;Secondly, the feature attention mechanism is introduced, the nonlinear relationship between different process variables and export moisture is captured, and the key part weight is highlighted;On the basis of extracting time sequence characteristics by BiLSTM, introduce time attention mechanism to mine process variables at different times, independently select key time points of historical information, and put the variables with weights into BiLSTM to further learn the deep features of variables. Finally, a drying process model based on XGBoost is established to realize accurate prediction of export moisture;The experimental results verify the feasibility and effectiveness of the algorithm in this paper. The application can automatically weight the process variable information to predict the change trend of tobacco moisture with high precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automation technology, and in particular relates to a method for dynamic prediction of moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost. Background Technology

[0002] The tobacco drying process is a crucial and downstream step in the cigarette manufacturing process. It involves dehydrating the tobacco shreds within the drying cylinder through heat transfer via steam cylinder walls and hot air convection, ensuring the moisture content meets the requirements of cigarette manufacturing. The moisture content of the tobacco shreds at the outlet is a key indicator for evaluating tobacco quality during production. However, the drying process is significantly influenced by factors such as the moisture content of the incoming material, the grade of the tobacco, and ambient temperature and humidity, resulting in an extremely complex reaction mechanism. Due to a lack of reliable testing instruments, it is difficult to directly and in real-time detect the moisture content online, leading to inconsistent batch quality. Therefore, there is an urgent need to establish a high-precision tobacco moisture prediction model to lay the foundation for stable control and operational optimization of the drying process.

[0003] Data-driven modeling does not require knowledge of complex tobacco drying mechanisms. It primarily relies on industrial data and theoretical methods such as machine learning to construct mathematical models between easily measurable process variables and difficult-to-detect variables. This approach can address the challenge of predicting key process or quality indicators, thus attracting significant attention from scholars and technicians. In the tobacco processing field, for example, Wang Longzhu et al. established an RBF neural network model to predict the moisture content of raw tobacco leaves. Liu Dawei used an MLP neural network and multiple linear regression analysis model to predict the moisture content of cut tobacco leaves. Despite these positive research results, the following problems remain: Firstly, ELM, MLP, and RBF are all shallow neural networks, making it difficult to effectively mine the deep structural information hidden in tobacco industry data, resulting in limited model generalization ability. Secondly, due to factors such as differences in raw material quality grades and unstable steam pressure, the drying process exhibits significant non-steady-state characteristics, and traditional static network structures cannot describe the dynamic changes in the tobacco drying process. Summary of the Invention

[0004] The purpose of this invention is to provide a method for dynamic prediction of moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost.

[0005] The technical solution of this invention is as follows: Addressing the challenge of accurately predicting the moisture content at the outlet of a tobacco drying machine, this invention proposes a dynamic prediction method for outlet moisture using a dual attention mechanism and XGBoost. First, mutual information is used for preliminary feature screening of process variables, selecting the input with the highest correlation to outlet moisture, reducing feature dimensionality and simplifying model complexity. Second, a feature attention mechanism is introduced to capture the nonlinear relationship between different process variables and outlet moisture, highlighting the weights of key components. Third, based on the extraction of time-series features using BiLSTM, a time attention mechanism is introduced to mine different moments in the process variables, autonomously selecting key historical time points, and placing the weighted variables into XGBoost. Finally, a drying process model based on XGBoost is established to achieve accurate prediction of outlet moisture. Experimental results verify the feasibility and effectiveness of the proposed algorithm. It automatically assigns weights to process variables to accurately predict the changing trend of tobacco moisture content.

[0006] A dynamic prediction method for moisture content in a yarn drying machine based on dual attention mechanism and XGBoost includes the following steps: Step 1: Construct a data acquisition module;

[0007] Step 2: Establish a data preprocessing module; normalize the raw data collected by the data acquisition module; and perform feature selection to remove redundant variables that have a weak impact on the output.

[0008] Step 3: Construct a dynamic moisture prediction model for the yarn drying machine based on a dual attention mechanism and XGBoost;

[0009] Step 3.1: Introduce a feature attention mechanism. By dynamically assigning attention weights to the input features, adaptive dynamic weight assignment is performed to describe the nonlinear relationship between process variables and moisture content at the outlet of the drying machine, highlighting the weights of key components.

[0010] Step 3.2: Construct a BiLSTM temporal feature extraction module;

[0011] Step 3.3: Introduce a time attention mechanism to mine process variables at different times, autonomously select key time points of historical information, and put the weighted variables into XGBoost;

[0012] Step 3.4: Establish the XGBoost prediction model;

[0013] Step 4: Iteratively train the dynamic moisture prediction model for the drying machine based on dual attention mechanism and XGBoost constructed in Step 3, and train the prediction model according to the evaluation index.

[0014] The evaluation indicators are:

[0015] Among them, yi This represents the actual moisture content of the tobacco shreds. For predicted values, R is the average of the model's output for all samples in the test set, and N is the number of samples in the validation set; the smaller the RMSE and MAE metrics, the better the prediction performance; R 2 The closer the result is to 1, the better the prediction effect.

[0016] Step 5: Use the trained dynamic moisture prediction model for the drying machine to predict the dynamic moisture content of the drying machine.

[0017] Preferably, the data acquisition module includes: acquiring the instantaneous values ​​of blade expansion-inlet material flow rate, blade expansion-inlet material moisture content, actual values ​​of blade expansion-steam flow rate, blade expansion-outlet temperature, actual values ​​of drum drying-cylinder wall temperature, drum drying-steam pressure, drum drying-steam valve opening, drum drying-hot air steam flow rate, actual values ​​of drum drying-hot air temperature, drum drying-exhaust damper opening, drum drying-exhaust negative pressure, and actual values ​​of drum drying-outlet material temperature; the dataset is constructed as follows:

[0018] Y(t) = F(X(t));

[0019] Where X(t) is the process variable, y(t) is the moisture content at the outlet of the drying machine, t-τ represents the length of the time series window, and m is the number of process variables.

[0020] Preferably, the data preprocessing module includes: normalizing the raw data collected by the data acquisition module, wherein the normalization formula is: Where x represents the value of the variable before normalization, and x′ represents the value after normalization. min x max These represent the minimum and maximum values ​​of the variable before normalization. Since there are numerous production state parameters controlling variables during the drying process, introducing redundant information can easily increase the complexity of the network structure and reduce the model's prediction accuracy and timeliness. Therefore, feature selection is performed by calculating mutual information to eliminate redundant variables with weak impact on the output. The mutual information formula is as follows: Where p(x,y) is the joint probability distribution function of x and y, and p(x) and p(y) are the marginal probability density functions of x and y, respectively; the greater the mutual information, the more information x contains about y, that is, the stronger the correlation between the two.

[0021] Preferably, the feature attention mechanism includes: at time t, the feature vector Attention weights A are calculated using a single-layer neural network. t ; Where α t The weight coefficients of the input features at time t;

[0022] The calculation process for feature attention weights is as follows: after the calculation is completed in a single fully connected layer, the input feature vector x... t The feature vector α is generated by activating the feature vector using the Sigmoid function and then normalizing it using the Softmax function. t And the eigenvector x t The weighted input features x′ are calculated by performing the Hadamard product operation. t ;

[0023]

[0024] Preferably, the BiLSTM temporal feature extraction module includes: further mining dynamic features through BiLSTM temporal modeling, which are calculated in the LSTM unit as: In the formula, x t Indicates input timing data; f t i t o t These represent the outputs of the forget gate, input gate, and output gate, respectively; W f W i W o Here are the weight matrices for the three gates, b f b i b o These are the three corresponding bias units; sigmoid is the activation function; tanh is the hyperbolic tangent function; W c b c These correspond to the weight matrix and bias unit of the corresponding layer, respectively; c t In cellular state; h t This represents the hidden state. The BiLSTM contains one forward LSTM unit and one backward LSTM unit. Each LSTM unit is consistent with the above LSTM structure, and the forward and backward units are independent of each other.

[0025] Preferably, the introduced time attention mechanism includes: calculating the hidden layer output values ​​of the LSTM model, focusing on the correlation between the hidden layer output values ​​at different past times and the current hidden layer output value compared to the LSTM model itself; that is, determining the weights of past hidden layer output values ​​by calculating their correlation, and obtaining the final hidden layer output value; the time attention weights are calculated as follows: the input is the state H = [h1, h2, ..., ht] of the hidden layer of the LSTM network unit when the model iterates to t. τ+1The input sequence is mapped to the 0-x interval using the ReLU activation function, then normalized using the Softmax function to generate the temporal attention weight B. The Hadamard product of the attention weight B and the state H output from the BiLSTM layer is then calculated to obtain H′, where τ+1 is the time window length of the input sequence. The final temporal attention output B is: B=TA(H′)=[β1,β2,...,β τ+1 ]; H′=He B=[h1β1,h2β2,...,h τ+1 β τ+1 ].

[0026] Preferably, the establishment of the XGBoost prediction model includes: XGBoost (Extreme Gradient Boosting) can effectively capture the nonlinear relationships in the data, and the prediction model is expressed as:

[0027] In the formula, x i It is the i-th feature vector, and K is the number of trees;

[0028] The objective function of XGBoost is: Where l is the loss function used to measure the difference between the predicted value and the true score, and the second term... ω is the regularization term, where ω is the score on the leaf node; T is the total number of leaf nodes; γ and λ are the penalty terms of L1 regularization, which avoid overfitting, reduce model complexity, and enhance generalization ability.

[0029] The present invention provides a dynamic prediction method for moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost, which has the following advantages: 1) The method in this paper does not require any expert knowledge, but only relies on the quality of industrial process data to explore and mine the deep information of the production process operation hidden in the data, and designs a new high-precision real-time prediction method with the advantages of low cost and strong versatility.

[0030] 2) In order to more accurately describe the dynamic characteristics of the tobacco drying process, based on BiLSTM modeling, this paper introduces feature attention and time attention mechanisms to improve the quality of abstract features of deep network self-learning. The former is mainly responsible for mining the nonlinear relationship between different variables and tobacco moisture during the drying process, while the latter describes the dynamic relationship between the process variables of the sample and tobacco moisture at different times, which greatly improves the accuracy of predicting the dynamic change trend of moisture. Attached Figure Description

[0031] Figure 1 This is a schematic diagram illustrating the dynamic moisture prediction of a yarn drying machine based on a dual attention mechanism and XGBoost according to the present invention.

[0032] Figure 2 This is an experimental result of a method for dynamic prediction of moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost, according to the present invention.

[0033] Figure 3 This is a flowchart of a method for dynamic moisture prediction in a yarn drying machine based on a dual attention mechanism and XGBoost, according to the present invention. Detailed Implementation

[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] First embodiment: as follows Figure 1 This embodiment provides a method for dynamic prediction of moisture content in a filament drying machine based on a dual attention mechanism and XGBoost. The method includes the following steps: Step 1: Constructing a data acquisition module; The data acquisition module includes: using a SCADA system to collect the instantaneous values ​​of blade expansion-inlet material flow rate, blade expansion-inlet material moisture content, actual values ​​of blade expansion-steam flow rate, blade expansion-outlet temperature, actual values ​​of drum drying-cylinder wall temperature, drum drying-steam pressure, drum drying-steam valve opening, drum drying-hot air steam flow rate, actual values ​​of drum drying-hot air temperature, drum drying-exhaust damper opening, drum drying-exhaust negative pressure, and actual values ​​of drum drying-outlet material temperature; 70% of the collected data is used as the training set, and 30% as the test set, with twelve variables and a sampling interval of 15 seconds. The dataset is constructed as follows:

[0036]

[0037] Where X(t) is the process variable, y(t) is the moisture content at the outlet of the drying machine, t-τ represents the length of the time series window, and m is the number of process variables.

[0038] Step 2: Establish a data preprocessing module; In actual production, the data acquisition system will inevitably contain random noise and some outliers, which will affect the performance of the model. In order to improve the quality of modeling data, the raw data collected by the data acquisition module is normalized; and feature selection is performed to remove redundant variables that have a weak impact on the output.

[0039] The data preprocessing module includes: Since the process variables have varying values ​​and large differences in units, to reduce the impact on model convergence performance, the raw data collected by the data acquisition module is normalized. The normalization formula is: Where x represents the value of the variable before normalization, and x′ represents the value after normalization. min x max These represent the minimum and maximum values ​​of the variable before normalization. Since there are a large number of production state parameter control variables in the drying process, introducing redundant information can easily increase the complexity of the network structure and reduce the prediction accuracy and timeliness of the model. Therefore, feature selection is often required to remove redundant variables that have a weak impact on the output. Where p(x,y) is the joint probability distribution function of x and y, and p(x) and p(y) are the marginal probability density functions of x and y, respectively; the greater the mutual information, the more information x contains about y, that is, the stronger the correlation between the two.

[0040] Step 3: Construct a dynamic moisture prediction model for the yarn drying machine based on a dual attention mechanism and XGBoost;

[0041] Step 3.1: Introduce a feature attention mechanism. By dynamically assigning attention weights to the input features, adaptive dynamic weight assignment is performed to describe the nonlinear relationship between process variables and moisture content at the outlet of the drying machine, highlighting the weights of key components.

[0042] The introduced feature attention mechanism includes: at time t, the feature vector... Attention weights A are calculated using a single-layer neural network. t ; Where A t The weight coefficients of the input features at time t;

[0043] The calculation process for feature attention weights is as follows: after the calculation is completed in a single fully connected layer, the input feature vector X... t The feature vector A is generated by activating the feature vector using the Sigmoid function and then normalizing it using the Softmax function. t and the eigenvector X t The weighted input features X′ are calculated by performing the Hadamard product operation. t ;

[0044]

[0045] Step 3.2: Constructing a BiLSTM temporal feature extraction module; the construction of the BiLSTM temporal feature extraction module includes: further mining dynamic features through BiLSTM temporal modeling, which are calculated in the LSTM unit as:

[0046] In the formula, x t Indicates input timing data; f t i t o tThese represent the outputs of the forget gate, input gate, and output gate, respectively; W f W i W o Here are the weight matrices for the three gates, b f b i b o These are the three corresponding bias units; sigmoid is the activation function; tanh is the hyperbolic tangent function; W c b c These correspond to the weight matrix and bias unit of the corresponding layer, respectively; c t In cellular state; h t Indicates a hidden state;

[0047] However, LSTM only inputs information from the forward sequence into the neural network's prediction results, making it difficult to perceive the backward data content during model training. The emergence of Bidirectional Long Short-Term Memory (BiLSTM) networks solves this problem of lack of attention to backward information. Bidirectional means that BiLSTM contains one forward LSTM unit and one backward LSTM unit. Each LSTM unit has the same structure as the LSTM described above, and the forward and backward units are independent of each other.

[0048] Step 3.3: Introduce a temporal attention mechanism; the temporal attention mechanism includes: calculating the hidden layer output values ​​of the LSTM model, focusing on the correlation between the hidden layer output values ​​at different times in the past and the hidden layer output value at the current time compared to the LSTM model, autonomously selecting key historical time points, and putting the weighted variables into XGBoost.

[0049] The time attention weights are calculated as follows: the input is the hidden state H = [h1, h2, ..., ht] of the BiLSTM network unit at iteration t. τ+1 The input sequence is mapped to the 0-x interval using the ReLU activation function and then normalized using the Softmax function to generate the temporal attention weight B. The attention weight B and the state H output by the BiLSTM layer are used to calculate the Hadamard product, resulting in H′, where τ+1 is the time window length of the input sequence. The final temporal attention output B is: B=TA(H′)=[β1,β2,...,β τ+1 ]; H′=He B=[h1β1,h2β2,...,h τ+1 β τ+1 ]; where β is the attention weight coefficient for each corresponding input feature;

[0050] Step 3.4: Establish the XGBoost prediction model; establishing the XGBoost prediction model includes: XGBoost (Extreme Gradient Boosting) can effectively capture the nonlinear relationships in the data, and the prediction model is expressed as:

[0051] In the formula, x i It is the i-th feature vector, and K is the number of trees;

[0052] The objective function of XGBoost is: Where l is the loss function used to measure the difference between the predicted value and the true score, and the second term... ω is the regularization term, T is the score of the leaf node, γ and λ are the penalty terms of L1 regularization, which avoid overfitting, reduce the complexity of the model, and enhance the generalization ability.

[0053] Step 4: Iteratively train the dynamic moisture prediction model for the drying machine based on dual attention mechanism and XGBoost constructed in Step 3, and train the prediction model according to the evaluation index.

[0054] The evaluation indicators are:

[0055] Among them, y i This represents the actual moisture content of the tobacco shreds. For predicted values, R is the average of the model's output for all samples in the test set, and N is the number of samples in the validation set; the smaller the RMSE and MAE metrics, the better the prediction performance; R 2 The closer the result is to 1, the better the prediction effect.

[0056] Step 5: Use the trained dynamic moisture prediction model for the drying machine to predict the dynamic moisture content of the drying machine.

[0057] The data collected in this embodiment is shown in Table 1:

[0058] Table 1. Process variables in the tobacco drying section

[0059]

[0060] To verify the performance of the proposed method for dynamic moisture prediction in yarn drying machines based on a dual attention mechanism and XGBoost, root mean square error (RMSE), mean error (MAE), and coefficient of determination (R²) were used. 2 The prediction results were evaluated using various metrics. A comparative analysis of the prediction results from MLP, ELM, and LSTM was conducted. The calculation results of the prediction performance metrics for each model are shown in Table 2. Figure 2 As shown.

[0061] Table 1 Experimental Results and Comparison

[0062]

[0063]

[0064] To verify the effectiveness of the dual attention mechanism and the XGBoost yarn dryer outlet moisture prediction model, the proposed algorithm was tested using historical data collected from the drum dryer. The test results demonstrate the effectiveness and feasibility of the proposed method, providing operators with reliable production status information.

[0065] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for dynamic prediction of moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost, characterized in that, The method includes the following steps: Step 1: Build the data acquisition module; Step 2: Establish a data preprocessing module; normalize the raw data collected by the data acquisition module; and perform feature selection to remove redundant variables that have a weak impact on the output. Step 3: Construct a dynamic moisture prediction model for the yarn drying machine based on a dual attention mechanism and XGBoost; Step 3.1: Introduce a feature attention mechanism. By dynamically assigning attention weights to the input features, adaptive dynamic weight assignment is performed to describe the nonlinear relationship between process variables and moisture content at the outlet of the drying machine, highlighting the weights of key components. Step 3.2: Construct a BiLSTM temporal feature extraction module; Step 3.3: Introduce a time attention mechanism to mine process variables at different times, autonomously select key time points of historical information, and put the weighted variables into XGBoost; Step 3.4: Establish the XGBoost prediction model; Step 4: Iteratively train the dynamic moisture prediction model for the drying machine based on dual attention mechanism and XGBoost constructed in Step 3, and train the prediction model according to the evaluation index. The evaluation indicators are: ; ;in, This represents the actual moisture content of the tobacco shreds. For predicted values, R is the average of the model's output for all samples in the test set, and N is the number of samples in the validation set; the smaller the RMSE and MAE metrics, the better the prediction performance; R 2 The closer the result is to 1, the better the prediction performance. Step 5: Use the trained dynamic moisture prediction model for the drying machine to predict the dynamic moisture content of the drying machine. The introduced feature attention mechanism includes: in t At time, the feature vector ,in, m It refers to the number of features, and the attention weights are calculated using a single-layer neural network. ,in for t The weight coefficients of the input features at each time step; The calculation process for feature attention weights is as follows: after the calculation is completed in a single fully connected layer, the input feature vector... The feature vector is generated by activating the feature vector using the Sigmoid function and then normalizing it using the Softmax function. Union and eigenvectors The weighted input features are calculated by performing the Hadamard product. ; ; The introduced time attention mechanism includes: calculating the hidden layer output values ​​of the LSTM model; compared to the LSTM model, it focuses on the correlation between the hidden layer output values ​​at different past times and the current hidden layer output value, that is, determining the weights of past hidden layer output values ​​by calculating their correlation, and obtaining the final hidden layer output value; the time attention weights are calculated as follows: the input is the model iteration to... t The hidden layer state of a BiLSTM network cell ; map it to 0- using the ReLU activation function. x The interval is then normalized using the Softmax function to generate the temporal attention weight B. The Hadamard product is then calculated using the attention weight B and the state H output by the BiLSTM layer. ,in The time window length of the input sequence; the final output B of the time attention is... ; .

2. The method for dynamic prediction of moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost as described in claim 1, characterized in that, The data acquisition module includes: collecting the instantaneous values ​​of blade expansion-inlet material flow rate, blade expansion-inlet material moisture content, actual values ​​of blade expansion-steam flow rate, blade expansion-outlet temperature, actual values ​​of drum drying-cylinder wall temperature, drum drying-steam pressure, drum drying-steam valve opening, drum drying-hot air steam flow rate, actual values ​​of drum drying-hot air temperature, drum drying-exhaust damper opening, drum drying-exhaust negative pressure, and actual values ​​of drum drying-outlet material temperature. The dataset is constructed as follows: ;in It is a process variable. It is the moisture content at the outlet of the yarn drying machine. This represents the length of the time series window, where m is the number of process variables.

3. The method for dynamic prediction of moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost as described in claim 1, characterized in that, The data preprocessing module includes: normalizing the raw data collected by the data acquisition module, wherein the normalization formula is: , in This represents the value of the variable before normalization. This represents the normalized value. These represent the minimum and maximum values ​​of the variable before normalization. Since there are numerous production state parameters controlling variables during the drying process, introducing redundant information can easily increase the complexity of the network structure and reduce the model's prediction accuracy and timeliness. Therefore, feature selection is performed by calculating mutual information to eliminate redundant variables with weak impact on the output. The mutual information formula is as follows: ,in Joint probability distribution function, The marginal probability density function; the greater the mutual information, the more information x contains about y, that is, the stronger the correlation between the two.

4. The method for dynamic prediction of moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost as described in claim 1, characterized in that, The BiLSTM temporal feature extraction module includes: further mining dynamic features through BiLSTM temporal modeling, which are calculated in the LSTM unit as follows: In the formula, ; ; ; sigmoid is the activation function; tanh is the hyperbolic tangent function; * represents the inner product operation; ; The BiLSTM contains one forward LSTM unit and one backward LSTM unit. Each LSTM unit is consistent with the above LSTM structure, and the forward and backward units are independent of each other.

5. The method for dynamic prediction of moisture content in a yarn drying machine based on a dual attention mechanism and XGBoost as described in claim 1, characterized in that, The establishment of the XGBoost prediction model includes: XGBoost can effectively capture the nonlinear relationships in the data, and the prediction model is expressed as follows: In the formula, K is the number of trees; the XGBoost objective function is: ; in, The loss function measures the difference between the predicted value and the true score; the second term... It is a regularization term. Let T be the score of a leaf node; T is the total number of leaf nodes. This avoids overfitting, reduces model complexity, and enhances generalization ability.