Moisture prediction method and device based on temperature and humidity prediction, equipment and medium
By constructing a multi-scale feature matrix and a target random forest model, the problem of low accuracy in moisture prediction at the tofu drying machine outlet was solved, the dynamic correlation between temperature and humidity data and moisture prediction was achieved, and the accuracy of moisture prediction results was improved.
Patent Information
- Application Number
- CN202511152413.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-10-10
AI Technical Summary
In the existing technology, the accuracy of the moisture prediction results at the outlet of the silk drying machine in the silk-making workshop is low and cannot meet the demand for quality stability in modern production. This is mainly due to the lack of mining the periodic laws and dynamic correlations between temperature and humidity data and time series.
By obtaining the current and historical indoor and outdoor temperature and humidity data of the target tofu drying machine, a multi-scale feature matrix is constructed using the preset feature partitioning rules, and the target random forest model is used for data prediction. The moisture prediction results are calculated in combination with the preset moisture mapping rules.
The accuracy of moisture prediction at the silk drying machine outlet is improved, the dynamic correlation between temperature and humidity data and moisture prediction is realized, and the demand for quality stability in silk workshop production is met.
Smart Images

Figure CN120753422A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data prediction, and in particular to a moisture prediction method and device based on temperature and humidity prediction, equipment and medium. BACKGROUND
[0002] Tobacco cutting is a key link in cigarette production. Through processes such as formula feeding, leaf conditioning, cutting, curing and flavoring, tobacco leaves are processed into tobacco that meets the requirements. However, due to the high moisture content at the outlet of the curing machine in the cutting workshop, the tobacco is prone to clogging and mold storage. If the moisture content is too low, the tobacco is prone to breakage and poor burning taste. Therefore, the moisture content at the outlet of the curing machine in the cutting workshop is very important to the quality and production of tobacco.
[0003] In the prior art, due to the lack of constant temperature conditions in the existing cutting workshop production environment, it is easily affected by external climate, resulting in fluctuations in product quality. Usually, a baseline model is used to predict the moisture content at the outlet of the curing machine in the cutting workshop, and then the process parameters of the curing machine are adjusted manually to adjust the moisture content at the outlet of the curing machine.
[0004] However, the baseline model using only original temperature and humidity data as input has low prediction accuracy, and cannot fully exploit the periodicity in time series and the dynamic correlation of temperature and humidity variables, resulting in insufficient accuracy of the outlet moisture prediction result, which is difficult to meet the demand for quality stability in modern production. Therefore, how to realize the dynamic correlation between temperature and humidity data and moisture prediction and improve the accuracy of the moisture prediction result is a problem to be solved at present. SUMMARY
[0005] The present application provides a moisture prediction method and device based on temperature and humidity prediction, equipment and medium, which can solve the problem of low accuracy of the outlet moisture prediction result of the curing machine.
[0006] According to one aspect of the present application, a moisture prediction method based on temperature and humidity prediction is provided, comprising:
[0007] Obtaining current indoor and outdoor temperature and humidity data, historical lag indoor and outdoor temperature and humidity data, prediction time requirements and current operating parameters corresponding to a target curing machine;
[0008] Reconstructing features based on a preset feature division rule to the current indoor and outdoor temperature and humidity data, historical lag indoor and outdoor temperature and humidity data and prediction time requirements, and determining a current multi-scale feature matrix corresponding to the target curing machine; wherein the current multi-scale feature matrix includes a time dimension feature sequence, a temperature and humidity dimension feature sequence and a cross lag item feature sequence;
[0009] Based on the target random forest model, data prediction is performed on the current multi-scale feature matrix to obtain a current temperature and humidity prediction result corresponding to the target tofu drying machine; wherein the target random forest model is obtained by training the historical multi-scale feature matrix corresponding to the target tofu drying machine;
[0010] The current temperature and humidity prediction result and the current operating parameters are numerically calculated based on a preset moisture mapping rule to determine the current moisture prediction result corresponding to the target tofu drying machine.
[0011] According to another aspect of the present invention, there is provided a moisture prediction device based on temperature and humidity prediction, comprising:
[0012] The data acquisition module is used to obtain the current indoor and outdoor temperature and humidity data, historical lagged indoor and outdoor temperature and humidity data, predicted time requirements and current operating parameters corresponding to the target tofu drying machine;
[0013] A feature partitioning module is configured to reconstruct features of the current indoor and outdoor temperature and humidity data, the historical lagged indoor and outdoor temperature and humidity data, and the predicted time requirements based on preset feature partitioning rules, and determine a current multi-scale feature matrix corresponding to the target tofu drying machine; wherein the current multi-scale feature matrix includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged feature sequence;
[0014] a temperature and humidity prediction module, configured to perform data prediction on the current multi-scale feature matrix based on a target random forest model to obtain a current temperature and humidity prediction result corresponding to the target tofu drying machine; wherein the target random forest model is trained using a historical multi-scale feature matrix corresponding to the target tofu drying machine;
[0015] The moisture prediction module is used to perform numerical calculations on the current temperature and humidity prediction results and current operating parameters based on preset moisture mapping rules to determine the current moisture prediction results corresponding to the target tofu drying machine.
[0016] According to another aspect of the present invention, an electronic device is provided, comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the moisture prediction method based on temperature and humidity prediction described in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the moisture prediction method based on temperature and humidity prediction described in any embodiment of the present invention when executed.
[0021] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the moisture prediction method based on temperature and humidity prediction according to any embodiment of the present invention.
[0022] The technical solution of the embodiments of the present invention uses preset feature partitioning rules to reconstruct the current indoor and outdoor temperature and humidity data, historical lagged indoor and outdoor temperature and humidity data, and predicted time requirements corresponding to the target tofu dryer. This determines the current multi-scale feature matrix corresponding to the target tofu dryer, which includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged feature sequence. Next, data prediction is performed on this multi-scale feature matrix based on a target random forest model to obtain the current temperature and humidity prediction result for the target tofu dryer. Finally, numerical calculations are performed on the current temperature and humidity prediction result and the current operating parameters corresponding to the target tofu dryer based on preset moisture mapping rules to determine the current moisture prediction result for the target tofu dryer. By constructing a multi-dimensional feature system, the periodic patterns in the time series and the dynamic correlation between temperature and humidity variables are fully exploited, and the moisture prediction value is indirectly determined through the mapping relationship between temperature and humidity data and moisture. This solves the problem of low accuracy of moisture prediction results at the tofu dryer outlet, realizes a dynamic correlation between temperature and humidity data and moisture prediction, and improves the accuracy of moisture prediction results.
[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 is a flow chart of a moisture prediction method based on temperature and humidity prediction according to embodiment 1 of the present invention;
[0026] Figure 2 is a flow chart of a moisture prediction method based on temperature and humidity prediction according to the second embodiment of the present invention;
[0027] Figure 3 is a flow chart of an optional moisture prediction method based on temperature and humidity prediction provided according to the second embodiment of the present invention;
[0028] Figure 4 2 is a schematic structural diagram of a moisture prediction device based on temperature and humidity prediction according to a third embodiment of the present invention;
[0029] Figure 5 It is a structural diagram of an electronic device for implementing the moisture prediction method based on temperature and humidity prediction according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Example 1
[0033] Figure 1 This is a flow chart of a moisture prediction method based on temperature and humidity prediction provided in the first embodiment of the present invention. This embodiment is applicable to the case of predicting the moisture at the outlet of a tofu drying machine. The method can be executed by a moisture prediction device based on temperature and humidity prediction. The moisture prediction device based on temperature and humidity prediction can be implemented in the form of hardware and / or software. The moisture prediction device based on temperature and humidity prediction can be configured in an electronic device, for example, in a computer device. Figure 1 As shown, the method includes:
[0034] S110: Obtain current indoor and outdoor temperature and humidity data, historical lagged indoor and outdoor temperature and humidity data, predicted time requirements, and current operating parameters corresponding to the target tofu drying machine.
[0035] The target tow-filament dryer may refer to the tow-filament dryer for which outlet moisture prediction is required. For example, the target tow-filament dryer may be determined based on actual application requirements. Indoor and outdoor temperature and humidity data may refer to temperature and humidity data related to the production environment. Typically, indoor and outdoor temperature and humidity data may include indoor and outdoor temperature and humidity data. Current indoor and outdoor temperature and humidity data may refer to the indoor and outdoor temperature and humidity data corresponding to the target tow-filament dryer collected at the current moment. Historically lagged indoor and outdoor temperature and humidity data may refer to the indoor and outdoor temperature and humidity data corresponding to the target tow-filament dryer collected during a historical time period. Typically, historically lagged indoor and outdoor temperature and humidity data refers to indoor and outdoor temperature and humidity data with a specified historical time step. For example, if the current indoor and outdoor temperature and humidity data is collected at time t and the specified historical time step is 3, the historically lagged indoor and outdoor temperature and humidity data may refer to the indoor and outdoor temperature and humidity data from time t-1 to time t-3. The prediction time requirement may refer to a pre-set value used to limit the time point corresponding to the prediction data result. Typically, the prediction time requirement may be determined based on actual user needs. The prediction time requirement can be used to define the specific future time point at which the model predicts the value. For example, the predicted time requirement may be a year, month, day, hour, week, or time period code. The current operating parameters may refer to the equipment operating parameters corresponding to the current moment. For example, the current operating parameters may be the steam pressure and drum speed corresponding to the target tofu drying machine at the current moment.
[0036] S120. Reconstruct the features of the current indoor and outdoor temperature and humidity data, the historical lagged indoor and outdoor temperature and humidity data, and the predicted time requirements based on preset feature division rules to determine a current multi-scale feature matrix corresponding to the target tofu drying machine; wherein the current multi-scale feature matrix includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged term feature sequence.
[0037] Among them, the preset feature division rules may refer to pre-set rules for limiting the feature division process. Exemplarily, the preset feature division rules may include the object of feature division and the specific division process. Feature reconstruction may refer to the operation of constructing features using the preset feature division rules. Scale may refer to the standard for dimensional division of relevant data in the production process. A multi-scale feature matrix may refer to a data set composed of feature sequences of multiple scales. The current multi-scale feature matrix may refer to the multi-scale feature matrix corresponding to the target tofu drying machine at the current moment. Typically, the current multi-scale feature matrix includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged feature sequence.
[0038] In one optional embodiment, the time dimension feature sequence includes macrocyclical features, mesochronous features, and microtime series features; the temperature and humidity dimension feature sequence includes central features, volatility features, and extreme value features; and the cross-lagged feature sequence includes cross-lagged terms and their corresponding interaction terms. Macrocyclical features may refer to features used to describe long-term, low-frequency cyclical variations in a time series. For example, macrocyclical features can be constructed using quarterly divisions and monthly features. Mesochronous features may refer to features used to describe short-term, medium-term, or event-driven patterns in a time series. For example, mesochronous features may be constructed by breaking down dates into diurnal periods. Microtime series features may refer to features used to describe short-term, high-frequency local fluctuations and dependencies in a time series. For example, microtime series features may be constructed using hourly features and daily weights. Central features may refer to features used to describe the core position or long-term equilibrium level of a time series. Typically, central features reflect the baseline of the data. Volatility features may refer to features used to quantify the magnitude and uncertainty of a time series' deviation from the central axis. Volatility characteristics can generally reflect the stability and risk level of data. Extreme value features can be used to describe unusually high or low extreme values in a series. Cross-lagged terms can be used to represent combinations of historical lagged indoor and outdoor temperature and humidity data arranged by time step. The interaction term corresponding to a cross-lagged term can be the interaction result of any two data points in the cross-lagged term.
[0039] S130. Perform data prediction on the current multi-scale feature matrix based on the target random forest model to obtain a current temperature and humidity prediction result corresponding to the target tofu drying machine; wherein the target random forest model is obtained by training the historical multi-scale feature matrix corresponding to the target tofu drying machine.
[0040] The random forest model may refer to an ensemble learning algorithm that improves model accuracy and stability by constructing multiple decision trees and combining their prediction results. The target random forest model may refer to the final trained random forest model. The historical multi-scale feature matrix may refer to the multi-scale feature matrix corresponding to the target tofu dryer constructed during a historical time period. The temperature and humidity prediction result may refer to the temperature and humidity prediction data corresponding to the indoor environment of the tofu dryer. The current temperature and humidity prediction result may refer to the temperature and humidity prediction result for the target tofu dryer within the prediction time period.
[0041] S140: Perform numerical calculation on the current temperature and humidity prediction result and current operating parameters based on a preset moisture mapping rule to determine a current moisture prediction result corresponding to the target tofu drying machine.
[0042] The preset moisture mapping rule may refer to a preset rule for representing the mapping relationship between the moisture at the tow dryer outlet and temperature, humidity, and operating parameters. For example, the preset moisture mapping rule may be a preset mapping function. The moisture prediction result may refer to the predicted moisture value at the outlet of the target tow dryer. The current moisture prediction result may refer to the moisture prediction result corresponding to the target tow dryer within the predicted time requirement.
[0043] The technical solution of the embodiments of the present invention uses preset feature partitioning rules to reconstruct the current indoor and outdoor temperature and humidity data, historical lagged indoor and outdoor temperature and humidity data, and predicted time requirements corresponding to the target tofu dryer. This determines the current multi-scale feature matrix corresponding to the target tofu dryer, which includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged feature sequence. Next, data prediction is performed on this multi-scale feature matrix based on a target random forest model to obtain the current temperature and humidity prediction result for the target tofu dryer. Finally, numerical calculations are performed on the current temperature and humidity prediction result and the current operating parameters corresponding to the target tofu dryer based on preset moisture mapping rules to determine the current moisture prediction result for the target tofu dryer. By constructing a multi-dimensional feature system, the periodic patterns in the time series and the dynamic correlation between temperature and humidity variables are fully exploited, and the moisture prediction value is indirectly determined through the mapping relationship between temperature and humidity data and moisture. This solves the problem of low accuracy of moisture prediction results at the tofu dryer outlet, realizes a dynamic correlation between temperature and humidity data and moisture prediction, and improves the accuracy of moisture prediction results.
[0044] Example 2
[0045] Figure 2A flowchart of a moisture prediction method based on temperature and humidity prediction is provided for the second embodiment of the present application. The present embodiment is refined based on the above-mentioned embodiment. In the present embodiment, the operation of determining the current multi-scale feature matrix corresponding to the target drying engine is refined. Specifically, it can include: based on a preset seasonal coding rule, performing macro feature extraction on the prediction time requirement to determine the macro periodic feature corresponding to the prediction time requirement, based on a preset time period coding rule, performing meso feature extraction on the prediction time requirement to determine the meso time feature corresponding to the prediction time requirement, based on a preset proportion calculation rule, performing micro feature extraction on the prediction time requirement to determine the micro time sequence feature corresponding to the prediction time requirement, and combining the macro periodic feature, the meso time feature and the micro time sequence feature to obtain the time dimension feature sequence corresponding to the target drying engine; based on a preset mean value calculation rule, performing mean value calculation on the current indoor and outdoor temperature and humidity data to determine the central feature corresponding to the current indoor and outdoor temperature and humidity data, based on a preset variance calculation rule, performing variance calculation on the current indoor and outdoor temperature and humidity data to determine the volatility feature corresponding to the current indoor and outdoor temperature and humidity data, based on a preset extreme value calculation rule, performing extreme value calculation on the current indoor and outdoor temperature and humidity data to determine the extreme value feature corresponding to the current indoor and outdoor temperature and humidity data, and combining the central feature, the volatility feature and the extreme value feature to obtain the temperature and humidity dimension feature sequence corresponding to the target drying engine; based on a preset cross-lag item construction rule, performing data filling on the historical lag indoor and outdoor temperature and humidity data to determine the cross-lag item corresponding to the target drying engine, and based on a preset interaction item calculation rule, performing numerical calculation on the cross-lag item to determine the interaction item corresponding to the cross-lag item, and combining the cross-lag item and the corresponding interaction item to obtain the cross-lag item feature sequence corresponding to the target drying engine; and combining the time dimension feature sequence, the temperature and humidity dimension feature sequence and the cross-lag item feature sequence to obtain the current multi-scale feature matrix corresponding to the target drying engine. As shown in Figure 2 the method comprises:
[0046] S210, obtaining the current indoor and outdoor temperature and humidity data, the historical lag indoor and outdoor temperature and humidity data, the prediction time requirement and the current running parameter corresponding to the target drying engine.
[0047] Specifically, the temperature and humidity sensor can be arranged at the key position of the indoor and outdoor of the cut tobacco workshop. Thus, the current indoor and outdoor temperature and humidity data corresponding to the target drying engine is collected in real time through the temperature and humidity sensor. At the same time, through the communication interface of the drying engine control system, the running parameter is acquired at a frequency of 1 second / time, and the collected current running parameter is temporarily stored in the local cache database, preparing for subsequent processing.
[0048] S220. Extract macro features of the predicted time demand based on the preset season coding rule to determine the macro cycle features corresponding to the predicted time demand; extract meso features of the predicted time demand based on the preset time period coding rule to determine the meso time features corresponding to the predicted time demand; extract micro features of the predicted time demand based on the preset proportion calculation rule to determine the micro time series features corresponding to the predicted time demand; combine and process the macro cycle features, meso time features and micro time series features to obtain a time dimension feature sequence corresponding to the target tofu drying machine.
[0049] The preset season coding rule may refer to a pre-set rule for limiting the macro-cycle feature division process. Exemplarily, the preset season coding rule may include a season feature coding rule and a month feature coding rule. The season feature coding rule may be to divide the year into spring, summer, autumn, and winter according to the 24 solar terms of the lunar calendar, and code them as 1, 2, 3, and 4, respectively. The month feature coding rule may be to use the current month's value as the month feature. Thus, the preset season coding rule can be used to extract the season features and month features corresponding to the predicted time demand, thereby obtaining the macro-cycle features corresponding to the predicted time demand.
[0050] The preset time period coding rule may refer to a pre-set rule for defining the process of dividing meso-time features. For example, the preset time period coding rule may divide the 24-hour time period of a day into 0-6 am as early morning, 6-9 am as morning, 9-12 pm as morning, 12-18 pm as afternoon, 6-21 pm as evening, and 9-12 pm as night, and code them from 1 to 6 in sequence. Thus, the preset time period coding rule can be used to match the predicted time demand with the corresponding time period code, which serves as the meso-time feature corresponding to the predicted time demand.
[0051] Among them, the preset proportion calculation rule may refer to a pre-set rule for limiting the micro-time series feature division process. Exemplarily, the preset proportion calculation rule may be an hourly feature coding rule and a daily weight construction rule. The hourly feature coding rule may be to encode the 24 hours of a day as 0 to 23 in sequence. The daily weight construction rule may be to use the proportion of the current hour in a day as the daily weight. For example, if the current hour is 8 o'clock, the corresponding daily weight is 8 / 24=1 / 3. Thus, the hourly features and daily weights corresponding to the predicted time demand can be extracted through the preset proportion calculation rule to obtain the micro-time series features corresponding to the predicted time demand.
[0052] S230. Perform mean calculation on the current indoor and outdoor temperature and humidity data based on a preset mean calculation rule to determine the central features corresponding to the current indoor and outdoor temperature and humidity data; perform variance calculation on the current indoor and outdoor temperature and humidity data based on a preset variance calculation rule to determine the volatility features corresponding to the current indoor and outdoor temperature and humidity data; perform extreme value calculation on the current indoor and outdoor temperature and humidity data based on a preset extreme value calculation rule to determine the extreme value features corresponding to the current indoor and outdoor temperature and humidity data; combine and process the central features, volatility features, and extreme value features to obtain a temperature and humidity dimension feature sequence corresponding to the target tofu drying machine.
[0053] The preset mean calculation rule may refer to a pre-set rule for limiting the central feature calculation process. For example, the preset mean calculation rule may be to traverse the current indoor and outdoor temperature and humidity data, and calculate the average value of the current indoor and outdoor temperature and humidity data within the same time window as the central feature.
[0054] The preset variance calculation rule may refer to a pre-set rule for limiting the volatility feature calculation process. For example, the preset variance calculation rule may be to traverse the current indoor and outdoor temperature and humidity data and calculate the variance and standard deviation of the current indoor and outdoor temperature and humidity data within the same time window as the volatility feature.
[0055] The preset extreme value calculation rule may refer to a pre-set rule for limiting the extreme value feature calculation process. For example, the preset extreme value calculation rule may be to traverse the current indoor and outdoor temperature and humidity data, and extract the maximum and minimum values of the current indoor and outdoor temperature and humidity data within the same time window as the extreme value features.
[0056] S240. Based on a preset cross-lagged item construction rule, data is filled in the historical lagged indoor and outdoor temperature and humidity data to determine the cross-lagged items corresponding to the target tofu drying machine. Based on a preset interaction item calculation rule, numerical calculation is performed on the cross-lagged items to determine the interaction items corresponding to the cross-lagged items. The cross-lagged items and the corresponding interaction items are combined and processed to obtain a cross-lagged item feature sequence corresponding to the target tofu drying machine.
[0057] The preset cross-lagged term construction rule may refer to a pre-set rule for limiting the cross-lagged term construction process. For example, the preset cross-lagged term construction rule may be storing the historical lagged indoor and outdoor temperature and humidity data in the form of an array according to the time step of each historical lagged indoor and outdoor temperature and humidity data relative to the current indoor and outdoor temperature and humidity data. Thus, the cross-lagged term X generated by the preset cross-lagged term construction rule is lag It can be expressed as: X lag ={x t-1 , x t-2 ,...,xt-k}, where x t-k It can represent the value of the temperature and humidity variables at time step tk, that is, the historical lagged indoor and outdoor temperature and humidity data at time step tk.
[0058] The preset interaction term calculation rule may refer to a pre-set rule for limiting the calculation process of the interaction term. For example, the preset interaction term calculation rule may be to multiply any two data in the cross-lagged term as the interaction term. For example, taking the collection time corresponding to the current indoor and outdoor temperature and humidity data as t, and the historical time step as 3, the cross-lagged term may be X lag ={x t-1 , x t-2 , x t-3}, the corresponding interaction term can be: x t-1 ×x t-2 、x t-1 ×x t-3 and x t-2 ×x t-3 .
[0059] S250 , combining and processing the time dimension feature sequence, the temperature and humidity dimension feature sequence, and the cross-lagged feature sequence to obtain a current multi-scale feature matrix corresponding to the target tofu drying machine.
[0060] Specifically, after obtaining the current indoor and outdoor temperature and humidity data corresponding to the target drying machine, the historical lag indoor and outdoor temperature and humidity data, and the prediction time requirement, the macro periodic feature can be determined by performing macro feature extraction on the prediction time requirement according to a preset seasonal coding rule, the meso temporal feature can be determined by performing meso feature extraction on the prediction time requirement according to a preset time period coding rule, and the micro temporal feature can be determined by performing micro feature extraction on the prediction time requirement according to a preset proportion calculation rule. The macro periodic feature, the meso temporal feature, and the micro temporal feature are combined to obtain a time dimension feature sequence corresponding to the target drying machine. Meanwhile, the central feature can be determined by performing mean value calculation on the current indoor and outdoor temperature and humidity data according to a preset mean value calculation rule, the volatility feature can be determined by performing variance calculation on the current indoor and outdoor temperature and humidity data according to a preset variance calculation rule, and the extreme value feature can be determined by performing extreme value calculation on the current indoor and outdoor temperature and humidity data according to a preset extreme value calculation rule. The central feature, the volatility feature, and the extreme value feature are combined to obtain a temperature and humidity dimension feature sequence corresponding to the target drying machine. In addition, the cross-lag item can be determined by performing data filling on the historical lag indoor and outdoor temperature and humidity data according to a preset cross-lag item construction rule, and the interaction item corresponding to the cross-lag item can be determined by performing numerical calculation on the cross-lag item according to a preset interaction item calculation rule. The cross-lag item and the corresponding interaction item are combined to obtain a cross-lag item feature sequence corresponding to the target drying machine. Finally, the time dimension feature sequence, the temperature and humidity dimension feature sequence, and the cross-lag item feature sequence are combined to obtain a current multi-scale feature matrix corresponding to the target drying machine. Thus, by constructing a multi-dimensional feature system, the periodicity in the time sequence and the dynamic correlation of the temperature and humidity variables can be fully mined, thereby providing an effective basis for subsequent model prediction.
[0061] It should be noted that, in the embodiments of the present application, the generation processes of the time dimension feature sequence, the temperature and humidity dimension feature sequence, and the cross-lag item feature sequence can be implemented in parallel or in series, and the embodiments of the present application do not make specific limitations thereon.
[0062] S260, data prediction is performed on the current multi-scale feature matrix based on the target random forest model to obtain a current temperature and humidity prediction result corresponding to the target drying machine.
[0063] In an optional embodiment, before the data prediction is performed on the current multi-scale feature matrix based on the target random forest model to obtain the current temperature and humidity prediction result corresponding to the target drying machine, the following steps can also be included:
[0064] Step a1: obtaining a historical temperature and humidity information set corresponding to a target tow dryer; wherein the historical temperature and humidity information set includes various historical temperature and humidity information, and each historical temperature and humidity information includes historical temperature and humidity data and corresponding historical temperature and humidity collection time.
[0065] The historical temperature and humidity collection time may refer to the historical time point at which temperature and humidity data was collected. The historical temperature and humidity data may refer to the indoor and outdoor temperature and humidity data collected during the historical temperature and humidity collection time. The historical temperature and humidity information may refer to a data set containing historical temperature and humidity data and the corresponding historical temperature and humidity collection time. Typically, one piece of historical temperature and humidity data corresponds to one piece of historical temperature and humidity information. The historical temperature and humidity information set may refer to a data set containing all pieces of historical temperature and humidity information corresponding to the same target tofu drying machine.
[0066] Step a2: reconstruct the historical temperature and humidity information set based on preset feature division rules, determine the historical multi-scale feature matrix corresponding to the target tofu drying machine, and standardize the historical multi-scale feature matrix and the historical temperature and humidity information set to obtain a data set corresponding to the target tofu drying machine.
[0067] Standardization refers to a statistical preprocessing method that converts raw data of different dimensions or orders of magnitude into a unified standard scale. Typically, standardization eliminates dimensional differences between data features, making all features comparable and thus improving model performance and stability. A dataset refers to the data obtained by standardizing a historical multi-scale feature matrix and a collection of historical temperature and humidity information. Typically, a dataset serves as the data foundation for model training and validation.
[0068] Step a3: training the basic random forest model based on a preset grid search method, a preset cross-validation method, and a data set to obtain a trained target random forest model.
[0069] The term "preset grid search method" may refer to a predefined method for systematically searching for the optimal parameter combination. Typically, a predefined grid search method exhaustively attempts all combinations within a specified parameter grid. A predefined cross-validation method may refer to a predefined method for evaluating the generalization ability of a model. A base random forest model may refer to a pre-constructed, untrained random forest model.
[0070] Specifically, before performing data prediction on the current multi-scale feature matrix based on the target random forest model to obtain the current temperature and humidity prediction results for the target tofu drying machine, the system first performs feature reconstruction on the historical temperature and humidity information set corresponding to the target tofu drying machine to determine the historical multi-scale feature matrix corresponding to the target tofu drying machine. The historical multi-scale feature matrix and the historical temperature and humidity information set are then normalized to obtain a dataset corresponding to the target tofu drying machine. Subsequently, the basic random forest model is trained using a preset grid search method, a preset cross-validation method, and the dataset. This results in a trained target random forest model, providing an effective foundation for subsequent model predictions.
[0071] In an optional embodiment, the model training of the basic random forest model based on a preset grid search method, a preset cross-validation method, and a data set to obtain a trained target random forest model may include:
[0072] Step b1: Obtain a preset hyperparameter set, determine the corresponding current hyperparameter combination in the preset hyperparameter set based on the current training round, and determine the current training set and current validation set corresponding to the current training round in the data set based on the preset data partitioning rule.
[0073] Among them, the preset hyperparameter set may refer to a pre-set parameter grid containing various hyperparameter ranges. Generally, the preset hyperparameter set may specify the hyperparameters to be optimized and the search range. Exemplarily, the preset hyperparameter set may be the number of decision trees: between 100-500, with candidate values selected at intervals of 50; the maximum depth: between 10-30, with candidate values selected at intervals of 5; the minimum number of leaf node samples: between 1-5, with candidate values selected at intervals of 1. The current training round may refer to the number of iterations corresponding to the current moment. Exemplarily, in an embodiment of the present invention, the current training round may be any one from 1 to 5. The current hyperparameter combination may refer to the hyperparameter combination selected at the current moment. Exemplarily, the current hyperparameter combination may be any hyperparameter combination in the preset hyperparameter set.
[0074] The preset data partitioning rule may refer to a pre-set rule for defining the data partitioning process of a dataset. For example, the preset data partitioning rule may be to randomly divide the dataset into 5 parts, with 4 parts used as training sets and 1 part used as validation sets. A training set may refer to a dataset used to provide a data foundation for the model training process. The current training set may refer to the training set corresponding to the current training round. A validation set may refer to a dataset used during training to evaluate model effectiveness and help adjust parameters. The current validation set may refer to the validation set corresponding to the current training round.
[0075] Step b2, model training is performed on the base random forest model based on the current training set and the current hyperparameter combination, to obtain a candidate random forest model corresponding to the base random forest model, and model verification is performed on the candidate random forest model based on the current validation set, to obtain a current performance verification result corresponding to the candidate random forest model.
[0076] The candidate random forest model can refer to a random forest model preliminarily obtained after the current training round is completed. The performance verification result can refer to a data result obtained by performing performance evaluation on the candidate random forest model according to a preset evaluation index. The preset evaluation index can refer to an index preset for evaluating the accuracy of the output result of the candidate random forest model. For example, the preset evaluation index can be classification accuracy, root mean square error, or mean absolute error. Generally, under the same training process, the preset evaluation index corresponding to each candidate random forest model in each training round is the same, and the embodiments of the present application do not make specific limitations thereto. The current performance verification result can refer to a performance verification result corresponding to the current training round.
[0077] Step b3, result judgment is performed on the current performance verification result based on a preset verification result judgment rule, to determine a target performance verification result satisfying the preset verification result judgment rule, and a current hyperparameter combination corresponding to the target performance verification result is taken as a target hyperparameter combination.
[0078] The preset verification result judgment rule can refer to a rule preset for limiting the judgment process of the verification result. For example, the preset verification result judgment rule can be to arrange the current performance verification results in sequence, and to select the performance verification result with the minimum mean absolute error as the optimal performance verification result. The target performance verification result can refer to a performance verification result satisfying the preset verification result judgment rule. The target hyperparameter combination can refer to a hyperparameter combination corresponding to the target performance verification result. Generally, the target hyperparameter combination can be taken as the optimal hyperparameter combination.
[0079] Step b4, model training is performed on the base random forest model based on the target hyperparameter combination and the data set, to obtain a target random forest model corresponding to the base random forest model.
[0080] Specifically, when training the basic random forest model, the current hyperparameter combination corresponding to the current training round can be randomly determined from the preset hyperparameter set, and the current training set and current validation set corresponding to the current training round can be determined from the data set according to the preset data partitioning rules. Afterwards, the basic random forest model is trained using the current training set and the current hyperparameter combination to obtain each candidate random forest model corresponding to the basic random forest model. Furthermore, the candidate random forest model is model-validated using the current validation set to obtain the current performance validation result corresponding to the candidate random forest model, and the current performance validation results corresponding to all training rounds are judged based on the preset validation result judgment rules to determine the target performance validation result that meets the preset validation result judgment rules, and the current hyperparameter combination corresponding to the target performance validation result is used as the target hyperparameter combination. Finally, the basic random forest model is trained based on the target hyperparameter combination and the data set to obtain the target random forest model corresponding to the basic random forest model. In this way, the basic random forest model fully learns the mapping relationship between the feature matrix and the historical temperature and humidity labels, and ultimately generates a target random forest model that can be used to predict future temperature and humidity.
[0081] S270: Perform numerical calculation on the current temperature and humidity prediction result and the current operating parameters based on a preset moisture mapping rule to determine a current moisture prediction result corresponding to the target tofu drying machine.
[0082] In an optional embodiment, before performing numerical calculation on the current temperature and humidity prediction result and the current operating parameters based on the preset moisture mapping rule to determine the current moisture prediction result corresponding to the target tofu drying machine, the following method may be further included:
[0083] Step c1: obtaining historical moisture values of the target tofu drying machine under preset temperature, humidity and operating parameters.
[0084] The preset temperature and humidity may refer to preset indoor temperature and humidity values. Typically, each preset temperature and humidity value can be set in advance based on actual application requirements, or real-time collected temperature and humidity data can be used as the preset temperature and humidity value. The preset operating parameters may refer to preset operating parameters of the tofu drying machine. Typically, each preset operating parameter can be set in advance based on actual application requirements, or real-time collected operating parameters can be used as the preset operating parameters. The historical moisture value may refer to the outlet moisture value actually measured at the target tofu drying machine under the preset temperature and humidity and preset operating parameters.
[0085] Step c2: normalize the preset temperature and humidity, preset operating parameters, and corresponding historical moisture values to obtain a sample data set corresponding to the target tofu drying machine.
[0086] Normalization refers to a data preprocessing technique that linearly transforms raw data into a specific range to eliminate dimensional differences, unify data scales, and improve model performance. For example, the normalization can be performed by traversing preset temperature and humidity, preset operating parameters, and corresponding historical moisture values according to the formula: Implement normalization processing, where x is the currently processed data, min is the minimum value in the x dimension, and max is the maximum value in the x dimension. The sample data set can refer to the data set obtained after normalization processing of the preset temperature and humidity, preset operating parameters, and the corresponding historical moisture measurement values.
[0087] Step c3: Regression analysis is performed on the sample data set to obtain a preset moisture mapping rule corresponding to the target tofu drying machine.
[0088] Regression analysis refers to a statistical method used to explore and quantify the dependency between a dependent variable and one or more independent variables. Typically, regression analysis can be used to fit the mapping between the moisture content at the tofu dryer outlet and temperature, humidity, and operating parameters, determining the function y = f(T, H, P), where T is the temperature prediction value output by the target random forest model, H is the humidity prediction value output by the target random forest model, and P is the tofu dryer's current operating parameters.
[0089] Specifically, before performing numerical calculations based on the current temperature and humidity prediction results and operating parameters based on the preset moisture mapping rules to determine the current moisture prediction result for the target tofu dryer, actual measured moisture values at the tofu dryer outlet under different temperature and humidity conditions and operating parameters can be collected. The temperature, humidity, operating parameters, and outlet moisture data are normalized to generate a sample dataset. Regression analysis of the sample dataset is then performed to fit the mapping relationship between the tofu dryer outlet moisture, temperature, humidity, and operating parameters. This results in the preset moisture mapping rules, providing an effective foundation for subsequent moisture prediction.
[0090] S280: Convert the current moisture prediction result into a format based on a preset instruction format, generate an instruction result corresponding to the current moisture prediction result, and send the instruction result to a tow dryer control system corresponding to the target tow dryer.
[0091] The preset instruction format may refer to a pre-set communication data transmission format. Typically, the preset instruction format can be determined based on the communication protocol used for data transmission. The instruction result may refer to the conversion result obtained by encapsulating the current moisture prediction result using the preset instruction format. The tofu dryer control system may refer to a computer system used to control and adjust the operating status of the target tofu dryer.
[0092] S290: Generate, by the tow dryer control system, a parameter adjustment strategy corresponding to the instruction result based on preset parameter adjustment rules and the instruction result, and execute the parameter adjustment strategy.
[0093] The preset parameter adjustment rule may refer to a pre-set strategy for adjusting parameters of the target tow-fiber drying machine's operating status. Exemplarily, the preset parameter adjustment rule may include performing a threshold comparison on the instruction result using a preset moisture threshold, and generating a corresponding parameter adjustment strategy based on the threshold comparison result. The parameter adjustment strategy may refer to a rule for instructing the parameter adjustment process. Exemplarily, if the current moisture prediction result in the instruction result is lower than the preset moisture threshold, the parameter adjustment strategy may include reducing the steam flow rate and slowing down the feed speed. If the current moisture prediction result in the instruction result exceeds the preset moisture threshold, the parameter adjustment strategy may include increasing the drum speed and increasing the steam pressure.
[0094] It is worth noting that, in the embodiment of the present invention, the timing of executing the parameter adjustment strategy by the tofu drying machine control system should be consistent with the predicted time requirement, and the embodiment of the present invention will not further elaborate on this.
[0095] The tofu drying machine control system thus stabilizes the moisture content at the tofu drying machine outlet within a reasonable range, enabling intelligent control of the production process. This addresses the traditional process's reliance on operator experience to set process parameters, which lacks the ability to accurately predict dynamic changes in ambient temperature and humidity. This leads to inaccurate settings for outlet moisture content, poor consistency in product physical indicators, large human errors, and delayed parameter adjustments during production. This approach meets the demand for quality stability in modern production.
[0096] The technical solution of the embodiment of the present invention is to extract macro features of the predicted time demand through the preset season coding rule to determine the macro cycle features corresponding to the predicted time demand, extract meso features of the predicted time demand based on the preset time period coding rule to determine the meso time features corresponding to the predicted time demand, extract micro features of the predicted time demand based on the preset proportion calculation rule to determine the micro time series features corresponding to the predicted time demand, combine and process the macro cycle features, meso time features and micro time series features to obtain the time dimension feature sequence corresponding to the target silk drying machine. At the same time, based on the preset mean calculation rule, the mean of the current indoor and outdoor temperature and humidity data is calculated to determine the central features corresponding to the current indoor and outdoor temperature and humidity data, based on the preset variance calculation rule, the variance of the current indoor and outdoor temperature and humidity data is calculated to determine the volatility features corresponding to the current indoor and outdoor temperature and humidity data, based on the preset extreme value calculation rule, the extreme value of the current indoor and outdoor temperature and humidity data is calculated to determine the extreme value features corresponding to the current indoor and outdoor temperature and humidity data, and the central features, volatility features and extreme value features are combined and processed to obtain the temperature and humidity dimension feature sequence corresponding to the target silk drying machine. Simultaneously, based on the preset cross-lagged term construction rules, historical lagged indoor and outdoor temperature and humidity data are populated to determine the cross-lagged term corresponding to the target tofu dryer. Numerical calculations are then performed on the cross-lagged term based on the preset interaction term calculation rules to determine the corresponding interaction term. The cross-lagged term and the corresponding interaction term are then combined to obtain the cross-lagged term feature sequence corresponding to the target tofu dryer. The time dimension feature sequence, the temperature and humidity dimension feature sequence, and the cross-lagged term feature sequence are then combined to obtain the current multi-scale feature matrix corresponding to the target tofu dryer. Furthermore, data prediction is performed on the current multi-scale feature matrix based on the target random forest model to obtain the current temperature and humidity prediction result corresponding to the target tofu dryer. Numerical calculations are then performed on the current temperature and humidity prediction result and current operating parameters based on the preset moisture mapping rules to determine the current moisture prediction result corresponding to the target tofu dryer. Finally, the current moisture prediction result is formatted according to the preset instruction format to generate an instruction result corresponding to the current moisture prediction result. This instruction result is then sent to the tofu dryer control system corresponding to the target tofu dryer. The tofu dryer control system then generates and executes a parameter adjustment strategy corresponding to the instruction result based on the preset parameter adjustment rules and the instruction result. By constructing a multi-dimensional feature system, fully exploring the periodic laws in the time series and the dynamic correlation between temperature and humidity variables, and indirectly determining the moisture prediction value through the mapping relationship between temperature and humidity data and moisture, the problem of low accuracy of the moisture prediction results at the tofu drying machine outlet is solved. The dynamic correlation between temperature and humidity data and moisture prediction can be realized, thereby improving the accuracy of the moisture prediction results.
[0097] Figure 3An optional humidity prediction method based on temperature and humidity prediction provided by the embodiment of the present application is shown in the flow chart. Specifically, first, the temperature and humidity sensors arranged at the key positions inside and outside the cut-tobacco workshop are used to collect the current indoor and outdoor temperature and humidity data and the historical lag indoor and outdoor temperature and humidity data of the target cut-tobacco machine in real time. At the same time, the current operating parameters are obtained through the communication interface of the cut-tobacco machine control system at a frequency of 1 second / time, and the collected data is temporarily stored in the local cache database, realizing data collection and preparing for subsequent processing. Then, the prediction time requirement corresponding to the target cut-tobacco machine is obtained. Further, the current indoor and outdoor temperature and humidity data, the historical lag indoor and outdoor temperature and humidity data, and the prediction time requirement are reconstructed based on the preset feature division rule to determine the current multi-scale feature matrix corresponding to the target cut-tobacco machine. Then, the temperature and humidity data prediction of the current multi-scale feature matrix is carried out based on the target random forest model to obtain the current temperature and humidity prediction result corresponding to the target cut-tobacco machine. Based on the preset moisture mapping rule, the numerical calculation of the current temperature and humidity prediction result and the current operating parameter is carried out to determine the current moisture prediction result corresponding to the target cut-tobacco machine. Finally, based on the industrial Ethernet communication protocol, the communication link with the cut-tobacco machine control system is built. The current moisture prediction result is transmitted to the cut-tobacco machine control system in the form of an instruction. The parameter adjustment strategy corresponding to the target cut-tobacco machine is generated by the cut-tobacco machine control system based on the preset parameter adjustment rule and the instruction result, and the parameter adjustment strategy is executed. Thus, the intelligent regulation and control of the production process is realized.
[0098] Embodiment three
[0099] Figure 4 The structure diagram of a moisture prediction device based on temperature and humidity prediction provided by the third embodiment of the present application is shown. As shown in the figure, the device comprises a data acquisition module 310, a feature division module 320, a temperature and humidity prediction module 330, and a moisture prediction module 340. Figure 4
[0100] The data acquisition module 310 is used to acquire the current indoor and outdoor temperature and humidity data, the historical lag indoor and outdoor temperature and humidity data, the prediction time requirement, and the current operating parameter corresponding to the target cut-tobacco machine.
[0101] The feature division module 320 is used to reconstruct the current indoor and outdoor temperature and humidity data, the historical lag indoor and outdoor temperature and humidity data, and the prediction time requirement based on the preset feature division rule to determine the current multi-scale feature matrix corresponding to the target cut-tobacco machine. The current multi-scale feature matrix comprises a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross lag item feature sequence.
[0102] The temperature and humidity prediction module 330 is configured to perform data prediction on the current multi-scale feature matrix based on a target random forest model to obtain a current temperature and humidity prediction result corresponding to the target tofu drying machine; wherein the target random forest model is trained using the historical multi-scale feature matrix corresponding to the target tofu drying machine;
[0103] The moisture prediction module 340 is configured to perform numerical calculations on the current temperature and humidity prediction results and current operating parameters based on preset moisture mapping rules to determine the current moisture prediction result corresponding to the target tofu drying machine.
[0104] The technical solution of the embodiments of the present invention uses preset feature partitioning rules to reconstruct the current indoor and outdoor temperature and humidity data, historical lagged indoor and outdoor temperature and humidity data, and predicted time requirements corresponding to the target tofu dryer. This determines the current multi-scale feature matrix corresponding to the target tofu dryer, which includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged feature sequence. Next, data prediction is performed on this multi-scale feature matrix based on a target random forest model to obtain the current temperature and humidity prediction result for the target tofu dryer. Finally, numerical calculations are performed on the current temperature and humidity prediction result and the current operating parameters corresponding to the target tofu dryer based on preset moisture mapping rules to determine the current moisture prediction result for the target tofu dryer. By constructing a multi-dimensional feature system, the periodic patterns in the time series and the dynamic correlation between temperature and humidity variables are fully exploited, and the moisture prediction value is indirectly determined through the mapping relationship between temperature and humidity data and moisture. This solves the problem of low accuracy of moisture prediction results at the tofu dryer outlet, realizes a dynamic correlation between temperature and humidity data and moisture prediction, and improves the accuracy of moisture prediction results.
[0105] Optionally, the time dimension feature sequence includes: macro-cycle features, meso-time features and micro-time series features; the temperature and humidity dimension feature sequence includes: central features, volatility features and extreme value features; the cross-lagged term feature sequence includes: cross-lagged terms and interaction terms corresponding to the cross-lagged terms.
[0106] Optionally, the feature division module 320 can be specifically used to: extract macro features of the predicted time demand based on the preset season coding rule to determine the macro cycle features corresponding to the predicted time demand, extract meso features of the predicted time demand based on the preset time period coding rule to determine the meso time features corresponding to the predicted time demand, extract micro features of the predicted time demand based on the preset proportion calculation rule to determine the micro time series features corresponding to the predicted time demand, combine and process the macro cycle features, meso time features and micro time series features to obtain the time dimension feature sequence corresponding to the target tow dryer; perform mean calculation on the current indoor and outdoor temperature and humidity data based on the preset mean calculation rule to determine the central features corresponding to the current indoor and outdoor temperature and humidity data, perform variance calculation on the current indoor and outdoor temperature and humidity data based on the preset variance calculation rule to determine the current indoor and outdoor temperature and humidity data. The volatility characteristics corresponding to the outdoor temperature and humidity data are calculated based on the preset extreme value calculation rules to calculate the extreme values of the current indoor and outdoor temperature and humidity data, and the extreme value characteristics corresponding to the current indoor and outdoor temperature and humidity data are determined. The central characteristics, volatility characteristics and extreme value characteristics are combined to obtain the temperature and humidity dimension feature sequence corresponding to the target wire drying machine; the historical lagged indoor and outdoor temperature and humidity data are filled with data based on the preset cross-lagged item construction rules to determine the cross-lagged items corresponding to the target wire drying machine, and the cross-lagged items are numerically calculated based on the preset interaction item calculation rules to determine the interaction items corresponding to the cross-lagged items. The cross-lagged items and the corresponding interaction items are combined to obtain the cross-lagged item feature sequence corresponding to the target wire drying machine; the time dimension feature sequence, the temperature and humidity dimension feature sequence and the cross-lagged item feature sequence are combined to obtain the current multi-scale feature matrix corresponding to the target wire drying machine.
[0107] Optionally, the moisture prediction device based on temperature and humidity prediction may further include: a model training module, which is used to obtain a historical temperature and humidity information set corresponding to the target silk-cutting machine before performing data prediction on the current multi-scale feature matrix based on the target random forest model to obtain the current temperature and humidity prediction result corresponding to the target silk-cutting machine; wherein, the historical temperature and humidity information set includes various historical temperature and humidity information, and each historical temperature and humidity information includes historical temperature and humidity data and the corresponding historical temperature and humidity acquisition time; based on a preset feature division rule, the historical temperature and humidity information set is feature reconstructed to determine the historical multi-scale feature matrix corresponding to the target silk-cutting machine, and the historical multi-scale feature matrix and the historical temperature and humidity information set are standardized to obtain a data set corresponding to the target silk-cutting machine; based on a preset grid search method, a preset cross-validation method and a data set, the basic random forest model is model trained to obtain a trained target random forest model.
[0108] Optionally, the model training module can be specifically used to: obtain a preset hyperparameter set, determine the corresponding current hyperparameter combination in the preset hyperparameter set based on the current training round, and determine the current training set and current verification set corresponding to the current training round in the data set based on the preset data partitioning rules; perform model training on the basic random forest model based on the current training set and the current hyperparameter combination to obtain a candidate random forest model corresponding to the basic random forest model, and perform model verification on the candidate random forest model based on the current verification set to obtain a current performance verification result corresponding to the candidate random forest model; perform result judgment on the current performance verification result based on a preset verification result judgment rule to determine a target performance verification result that meets the preset verification result judgment rule, and use the current hyperparameter combination corresponding to the target performance verification result as the target hyperparameter combination; perform model training on the basic random forest model based on the target hyperparameter combination and the data set to obtain a target random forest model corresponding to the basic random forest model.
[0109] Optionally, the moisture prediction device based on temperature and humidity prediction may further include: a mapping rule construction module for obtaining the historical moisture measured values of the target wire drying machine under the preset temperature and humidity and preset operating parameters before performing numerical calculations on the current temperature and humidity prediction results and current operating parameters based on the preset moisture mapping rules to determine the current moisture prediction results corresponding to the target wire drying machine; normalizing the preset temperature and humidity, preset operating parameters and corresponding historical moisture measured values to obtain a sample data set corresponding to the target wire drying machine; and performing regression analysis on the sample data set to obtain the preset moisture mapping rules corresponding to the target wire drying machine.
[0110] Optionally, the moisture prediction device based on temperature and humidity prediction may further include: a post-processing module for performing numerical calculations on the current temperature and humidity prediction results and current operating parameters based on the preset moisture mapping rules to determine the current moisture prediction result corresponding to the target wire drying machine, performing format conversion on the current moisture prediction result based on a preset instruction format, generating an instruction result corresponding to the current moisture prediction result, and sending the instruction result to the wire drying machine control system corresponding to the target wire drying machine; generating a parameter adjustment strategy corresponding to the instruction result based on the preset parameter adjustment rules and the instruction result through the wire drying machine control system, and executing the parameter adjustment strategy.
[0111] The moisture prediction device based on temperature and humidity prediction provided by the embodiment of the present invention can execute the moisture prediction method based on temperature and humidity prediction provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0112] Example 4
[0113] Figure 5 A schematic diagram of the structure of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0114] like Figure 5 As shown, the electronic device 410 includes at least one processor 420, and a memory connected to the at least one processor 420 in communication, such as a read-only memory (ROM) 430, a random access memory (RAM) 440, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 420 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 430 or the computer program loaded from the storage unit 490 to the random access memory (RAM) 440. Various programs and data required for the operation of the electronic device 410 can also be stored in the RAM 440. The processor 420, ROM 430 and RAM 440 are connected to each other via a bus 450. An input / output (I / O) interface 460 is also connected to the bus 450.
[0115] Multiple components in the electronic device 410 are connected to the I / O interface 460, including an input unit 470, such as a keyboard, a mouse, etc.; an output unit 480, such as various types of displays, speakers, etc.; a storage unit 490, such as a magnetic disk, an optical disk, etc.; and a communication unit 4100, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 4100 allows the electronic device 410 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0116] Processor 420 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 420 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processor, controller, microcontroller, etc. Processor 420 executes the various methods and processes described above, such as the moisture prediction method based on temperature and humidity prediction.
[0117] The method includes:
[0118] Obtain the current indoor and outdoor temperature and humidity data, historical lagged indoor and outdoor temperature and humidity data, predicted time requirements, and current operating parameters corresponding to the target tofu drying machine;
[0119] Based on a preset feature partitioning rule, the current indoor and outdoor temperature and humidity data, the historical lagged indoor and outdoor temperature and humidity data, and the predicted time demand are reconstructed to determine a current multi-scale feature matrix corresponding to the target tofu drying machine; wherein the current multi-scale feature matrix includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged feature sequence;
[0120] Based on the target random forest model, data prediction is performed on the current multi-scale feature matrix to obtain a current temperature and humidity prediction result corresponding to the target tofu drying machine; wherein the target random forest model is obtained by training the historical multi-scale feature matrix corresponding to the target tofu drying machine;
[0121] The current temperature and humidity prediction result and the current operating parameters are numerically calculated based on a preset moisture mapping rule to determine the current moisture prediction result corresponding to the target tofu drying machine.
[0122] In some embodiments, the moisture prediction method based on temperature and humidity prediction can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 490. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 410 via the ROM 430 and / or the communication unit 4100. When the computer program is loaded into the RAM 440 and executed by the processor 420, one or more steps of the moisture prediction method based on temperature and humidity prediction described above can be performed. Alternatively, in other embodiments, the processor 420 can be configured to execute the moisture prediction method based on temperature and humidity prediction by any other appropriate means (for example, by means of firmware).
[0123] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0124] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0125] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0127] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0128] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0129] The present application also discloses a computer program product, comprising a computer program that, when executed by a processor, implements the moisture prediction method based on temperature and humidity prediction provided in any of the embodiments of the present application. This program product shares the same inventive concept as the moisture prediction method based on temperature and humidity prediction disclosed in each embodiment of the present application, and therefore is not further described here.
[0130] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0131] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A moisture prediction method based on temperature and humidity prediction, characterized in that: include: Obtain the current indoor and outdoor temperature and humidity data, historical lagged indoor and outdoor temperature and humidity data, predicted time requirements, and current operating parameters corresponding to the target tofu drying machine; Based on a preset feature partitioning rule, the current indoor and outdoor temperature and humidity data, the historical lagged indoor and outdoor temperature and humidity data, and the predicted time demand are reconstructed to determine a current multi-scale feature matrix corresponding to the target tofu drying machine; wherein the current multi-scale feature matrix includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged feature sequence; Performing data prediction on the current multi-scale feature matrix based on the target random forest model to obtain a current temperature and humidity prediction result corresponding to the target tofu drying machine; wherein the target random forest model is obtained by training the historical multi-scale feature matrix corresponding to the target tofu drying machine; The current temperature and humidity prediction result and the current operating parameters are numerically calculated based on a preset moisture mapping rule to determine the current moisture prediction result corresponding to the target tofu drying machine.
2. The method according to claim 1, characterized in that The time dimension feature sequence includes: macro-cycle features, meso-time features and micro-time series features; the temperature and humidity dimension feature sequence includes: central features, volatility features and extreme value features; the cross-lagged term feature sequence includes: cross-lagged terms and interaction terms corresponding to the cross-lagged terms.
3. The method according to claim 2, characterized in that The feature reconstruction of the current indoor and outdoor temperature and humidity data, the historical lagged indoor and outdoor temperature and humidity data, and the predicted time demand based on the preset feature division rule to determine the current multi-scale feature matrix corresponding to the target tofu drying machine includes: Based on the preset season coding rules, macro-feature extraction is performed on the predicted time demand to determine the macro-cycle characteristics corresponding to the predicted time demand; based on the preset time period coding rules, meso-feature extraction is performed on the predicted time demand to determine the meso-time characteristics corresponding to the predicted time demand; based on the preset proportion calculation rules, micro-feature extraction is performed on the predicted time demand to determine the micro-time series characteristics corresponding to the predicted time demand; the macro-cycle characteristics, meso-time characteristics, and micro-time series characteristics are combined and processed to obtain the time dimension feature sequence corresponding to the target tofu drying machine; Performing mean calculation on the current indoor and outdoor temperature and humidity data based on a preset mean calculation rule to determine the central features corresponding to the current indoor and outdoor temperature and humidity data; performing variance calculation on the current indoor and outdoor temperature and humidity data based on a preset variance calculation rule to determine the volatility features corresponding to the current indoor and outdoor temperature and humidity data; performing extreme value calculation on the current indoor and outdoor temperature and humidity data based on a preset extreme value calculation rule to determine the extreme value features corresponding to the current indoor and outdoor temperature and humidity data; and combining and processing the central features, volatility features, and extreme value features to obtain a temperature and humidity dimension feature sequence corresponding to the target tofu drying machine; Based on a preset cross-lagged term construction rule, data is filled in the historical lagged indoor and outdoor temperature and humidity data to determine the cross-lagged term corresponding to the target tofu drying machine. The cross-lagged term is numerically calculated based on a preset interaction term calculation rule to determine the interaction term corresponding to the cross-lagged term. The cross-lagged term and the corresponding interaction term are combined and processed to obtain a cross-lagged term feature sequence corresponding to the target tofu drying machine. The time dimension feature sequence, the temperature and humidity dimension feature sequence, and the cross-lagged feature sequence are combined and processed to obtain a current multi-scale feature matrix corresponding to the target tofu drying machine.
4. The method according to claim 1, wherein Before performing data prediction on the current multi-scale feature matrix based on the target random forest model to obtain the current temperature and humidity prediction result corresponding to the target tofu drying machine, the method further includes: Obtain a historical temperature and humidity information set corresponding to the target tofu drying machine; wherein the historical temperature and humidity information set includes various historical temperature and humidity information, and each historical temperature and humidity information includes historical temperature and humidity data and corresponding historical temperature and humidity collection time; Reconstructing the historical temperature and humidity information set based on a preset feature partitioning rule to determine a historical multi-scale feature matrix corresponding to a target tofu drying machine, and standardizing the historical multi-scale feature matrix and the historical temperature and humidity information set to obtain a data set corresponding to the target tofu drying machine; The basic random forest model is trained based on the preset grid search method, the preset cross-validation method and the data set to obtain a trained target random forest model.
5. The method according to claim 4, characterized in that The method of training the basic random forest model based on the preset grid search method, the preset cross-validation method and the data set to obtain a trained target random forest model includes: Obtain a preset hyperparameter set, determine a corresponding current hyperparameter combination in the preset hyperparameter set based on the current training round, and determine a current training set and a current validation set corresponding to the current training round in the dataset based on a preset data partitioning rule; Performing model training on the basic random forest model based on the current training set and the current hyperparameter combination to obtain a candidate random forest model corresponding to the basic random forest model, and performing model verification on the candidate random forest model based on the current verification set to obtain a current performance verification result corresponding to the candidate random forest model; Performing result judgment on the current performance verification result based on a preset verification result judgment rule, determining a target performance verification result that satisfies the preset verification result judgment rule, and using the current hyperparameter combination corresponding to the target performance verification result as the target hyperparameter combination; The basic random forest model is trained based on the target hyperparameter combination and the data set to obtain a target random forest model corresponding to the basic random forest model.
6. The method according to claim 1, characterized in that Before performing numerical calculation on the current temperature and humidity prediction result and the current operating parameters based on the preset moisture mapping rule to determine the current moisture prediction result corresponding to the target tofu drying machine, the method further includes: Obtaining historical moisture values of the target tofu drying machine under preset temperature, humidity, and operating parameters; Normalizing the preset temperature and humidity, the preset operating parameters, and the corresponding historical moisture measured values to obtain a sample data set corresponding to the target tofu drying machine; The sample data set is regressively analyzed to obtain a preset moisture mapping rule corresponding to the target tofu drying machine.
7. The method according to claim 1, characterized in that After performing numerical calculation on the current temperature and humidity prediction result and the current operating parameters based on the preset moisture mapping rule to determine the current moisture prediction result corresponding to the target tofu drying machine, the method further includes: Converting the current moisture prediction result into a format based on a preset instruction format, generating an instruction result corresponding to the current moisture prediction result, and sending the instruction result to a tow-steel drying machine control system corresponding to a target tow-steel drying machine; The tow thread drying machine control system generates a parameter adjustment strategy corresponding to the instruction result based on the preset parameter adjustment rules and the instruction result, and executes the parameter adjustment strategy.
8. A moisture prediction device based on temperature and humidity prediction, characterized in that: include: The data acquisition module is used to obtain the current indoor and outdoor temperature and humidity data, historical lagged indoor and outdoor temperature and humidity data, predicted time requirements and current operating parameters corresponding to the target tofu drying machine; A feature partitioning module is configured to reconstruct features of the current indoor and outdoor temperature and humidity data, the historical lagged indoor and outdoor temperature and humidity data, and the predicted time requirements based on preset feature partitioning rules, and determine a current multi-scale feature matrix corresponding to the target tofu drying machine; wherein the current multi-scale feature matrix includes a time dimension feature sequence, a temperature and humidity dimension feature sequence, and a cross-lagged feature sequence; a temperature and humidity prediction module, configured to perform data prediction on the current multi-scale feature matrix based on a target random forest model to obtain a current temperature and humidity prediction result corresponding to the target tofu drying machine; wherein the target random forest model is trained using a historical multi-scale feature matrix corresponding to the target tofu drying machine; The moisture prediction module is used to perform numerical calculations on the current temperature and humidity prediction results and current operating parameters based on preset moisture mapping rules to determine the current moisture prediction results corresponding to the target tofu drying machine.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the moisture prediction method based on temperature and humidity prediction according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the moisture prediction method based on temperature and humidity prediction according to any one of claims 1 to 7 when executed.