Methods, devices, equipment and storage media for early warning of acid inhibition in anaerobic digestion systems
By constructing a volatile fatty acid concentration prediction model, the acid inhibition problem in the anaerobic digestive system is solved, and accurate prediction and early warning of the volatile fatty acid concentration in the anaerobic digestive system is achieved, ensuring the stability of the system.
Patent Information
- Application Number
- CN202411296064.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-18
AI Technical Summary
The rapid accumulation of volatile fatty acids in the anaerobic digestive system leads to acid inhibition, destroying the acid-base balance of the system, and it is difficult to adjust in time. The existing online monitoring methods are not real-time and inaccurate, resulting in system instability or collapse.
By obtaining the operating data of the anaerobic digestion system under different substrates and initial matrix characteristics data, a time series data set is constructed using a sliding window, and pre-processing and feature screening is performed. The volatile fatty acid concentration prediction model is constructed based on the random forest regression model, and the acid is performed Suppress early warning.
Accurate prediction and timely warning of the concentration of volatile fatty acids in the anaerobic digestive system, avoiding the negative impact of acid inhibition on the system, and maintaining the stability of the system.
Smart Images

Figure CN118824400B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an acid inhibition early warning method, device, equipment and storage medium for an anaerobic digestion system. Background Art
[0002] The anaerobic digestion process can be divided into four stages: hydrolysis, fermentation, acetic acid production, and methanogenesis. Since most of the substances in anaerobic digestion contain high concentrations of biodegradable organic substrates, they can be quickly converted into various organic acids (such as volatile fatty acids, VFA for short) during the anaerobic digestion process. When the production rate of organic acids exceeds the consumption rate of organic acids by methanogens, it will lead to the accumulation of acidic substances in the anaerobic digestion system, causing acid inhibition. Acid inhibition will cause the pH value of the anaerobic digestion system to decrease, but in a highly buffered anaerobic digestion system, the pH may change very little. When a decrease in pH is detected in the anaerobic digestion system, the acid-base balance of the anaerobic digestion system may have been completely destroyed and difficult to adjust in time. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to provide an acid inhibition warning method, device, equipment and storage medium for an anaerobic digestion system, so as to timely and accurately provide acid inhibition warning for the anaerobic digestion system.
[0004] To achieve the above object, one aspect of the embodiment of the present application provides an acid inhibition early warning method for an anaerobic digestion system, the method comprising the following steps:
[0005] Obtain the operating data of the anaerobic digestion system under different substrates and the characteristic data of each initial substrate;
[0006] extracting data from the operating data and the initial matrix characteristic data using a sliding window and constructing a time series data set, and preprocessing the time series data set;
[0007] Filtering and obtaining an optimal feature set from the preprocessed time series data set;
[0008] Constructing a concentration prediction model of volatile fatty acids based on the optimal feature set;
[0009] predicting the concentration of volatile fatty acids in the anaerobic digestion system according to the concentration prediction model;
[0010] Acid inhibition warning is performed based on the volatile fatty acid concentration.
[0011] In some embodiments, extracting data from the operational data and the initial matrix characteristic data using a sliding window and constructing a time series data set comprises the following steps:
[0012] The sliding window is used to traverse the operation data and the initial matrix characteristic data to extract input features and output features; wherein the sliding window is used to extract data of the n-2th time period, the n-1th time period and the nth time period from the operation data and the initial matrix characteristic data as the input features, and to extract volatile fatty acid concentration data of the n+1th time period and the n+2th time period from the operation data and the initial matrix characteristic data as the output features;
[0013] The time series dataset is constructed according to the input features and the output features.
[0014] In some embodiments, the preprocessing of the time series data set comprises the following steps:
[0015] Normalizing the time series data set;
[0016] The normalized calculation formula includes:
[0017] ;
[0018] in, is the normalized feature, is any feature in the time series dataset, is the feature with the minimum value in the time series dataset, is the feature of the maximum value in the time series dataset.
[0019] In some embodiments, the step of selecting and obtaining the optimal feature set from the preprocessed time series data set comprises the following steps:
[0020] A first training set is obtained by randomly sampling the preprocessed time series data set according to a first set ratio;
[0021] Using the first training set to train a random forest regression model, and calculating the importance score of each feature in the first training set;
[0022] Removing the feature with the lowest importance score in the first training set;
[0023] Return to the step of training the random forest regression model using the first training set until the number of remaining features in the first training set is the same as the set number, and the features in the current first training set are used as the optimal feature set.
[0024] In some embodiments, constructing a volatile fatty acid concentration prediction model based on the optimal feature set comprises the following steps:
[0025] The number of features when splitting nodes in the random forest regression model, the number of decision trees, and the maximum depth of the decision trees are selected as hyperparameters;
[0026] Setting multiple candidate values for each of the hyperparameters;
[0027] Combining the candidate values of each of the hyperparameters to obtain a plurality of candidate parameter combinations;
[0028] Dividing the optimal feature set into multiple subsets, and dividing any one of the subsets into a validation set, and dividing the remaining subsets into a second training set;
[0029] Using each of the second training sets to train the random forest regression model under each of the candidate parameter combinations, and using the validation set to evaluate the performance parameters of the random forest regression model under each of the candidate parameter combinations;
[0030] Returning to dividing the optimal feature set into a plurality of subsets, and dividing any one of the subsets into a validation set, and dividing the remaining subsets into a second training set, until all the subsets are used as the validation sets to evaluate the performance parameters of the random forest regression model under each of the candidate parameter combinations;
[0031] A target parameter combination is selected from each of the candidate parameter combinations according to each of the performance parameters, and the random forest regression model under the target parameter combination is used as the concentration prediction model of volatile fatty acids.
[0032] In some embodiments, the acid inhibition warning according to the volatile fatty acid concentration comprises the following steps:
[0033] Comparing the volatile fatty acid concentration with various preset warning concentrations to determine the risk warning level of the volatile fatty acid concentration;
[0034] The volatile fatty acid concentration and the risk warning level are output as acid inhibition warning information.
[0035] In some embodiments, the step of outputting the volatile fatty acid concentration and the risk warning level as acid inhibition warning information comprises the following steps:
[0036] Creating an interactive window and setting user interface elements in the interactive window;
[0037] In response to an operation on the user interface element, the volatile fatty acid concentration and the risk warning level are displayed in the interactive window.
[0038] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides an acid inhibition early warning device for an anaerobic digestion system, the device comprising:
[0039] A data acquisition unit, used for acquiring operation data of the anaerobic digestion system under different substrates and characteristic data of each initial substrate;
[0040] A data set construction unit, used for extracting data from the operation data and the initial matrix characteristic data using a sliding window and constructing a time series data set, and preprocessing the time series data set;
[0041] A feature set screening unit, used for screening the optimal feature set from the preprocessed time series data set;
[0042] A model building unit, used for building a volatile fatty acid concentration prediction model based on the optimal feature set;
[0043] an acid concentration prediction unit, used for predicting the concentration of volatile fatty acids in the anaerobic digestion system according to the concentration prediction model;
[0044] The acid inhibition warning unit is used to provide acid inhibition warning according to the concentration of the volatile fatty acids.
[0045] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the above-mentioned acid inhibition warning method for an anaerobic digestion system is implemented.
[0046] To achieve the above objectives, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned acid inhibition early warning method for an anaerobic digestion system is implemented.
[0047] The embodiments of the present application include at least the following beneficial effects:
[0048] The present application can obtain the operation data and each initial substrate characteristic data in the anaerobic digestion system under different substrates; use the sliding window to extract data from the operation data and characteristic data and construct a time series data set, and preprocess the time series data set; filter the optimal feature set from the preprocessed time series data set; construct a volatile fatty acid concentration prediction model based on the optimal feature set; predict the volatile fatty acid concentration in the anaerobic digestion system according to the concentration prediction model; and provide acid inhibition warning according to the volatile fatty acid concentration. The concentration prediction model can accurately predict the volatile fatty acid concentration in the anaerobic digestion system, and then provide acid inhibition warning in a timely manner according to the volatile fatty acid concentration. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 A schematic diagram of a process flow of an acid inhibition early warning method for an anaerobic digestion system provided in an embodiment of the present application;
[0051] Figure 2 A comparison chart of the predicted value and the actual value of the VFA concentration on the n+1 day by the VFA early warning model provided in the embodiment of the present application;
[0052] Figure 3 A comparison chart of the predicted value and the actual value of the VFA concentration on the n+2 day by the VFA early warning model provided in the embodiment of the present application;
[0053] Figure 4 An example diagram of the output of the interactive window provided in the embodiment of the present application;
[0054] Figure 5 A schematic diagram of the structure of an acid suppression warning device for an anaerobic digestion system provided in an embodiment of the present application;
[0055] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0057] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0058] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] Before describing the embodiments of the present application in detail, some related technologies involved in the embodiments of the present application are first described as follows:
[0061] At present, the technical means for treating this type of wet garbage pollutants at home and abroad include physical methods (such as mechanical dehydration and sanitary landfill), chemical methods (such as chemical fixation and heat treatment), biological treatment methods (such as aerobic composting and anaerobic digestion), etc. Among them, the anaerobic digestion process has the advantages of mature technology, stable operation, and low cost. It has been applied on site and is one of the most commonly used treatment processes. As a substance with a high organic content, wet garbage is considered to be an ideal substrate for anaerobic digestion. Using anaerobic digestion technology to treat wet garbage can not only effectively reduce the volume of wet garbage, but also convert it into bioenergy biogas and organic fertilizer.
[0062] The anaerobic digestion process can be divided into four stages: hydrolysis, fermentation, acetic acid production, and methanogenesis. Since most wet garbage contains high concentrations of biodegradable organic substrates, they can be quickly converted into various organic acids (such as volatile fatty acids, VFA for short) during the anaerobic digestion process. When the production rate of organic acids exceeds the consumption rate of organic acids by methanogens, acidic substances will accumulate in the anaerobic digestion system, causing acid inhibition. Acid inhibition will cause the pH value of the anaerobic digestion system to decrease, but in highly buffered anaerobic digestion tanks, the pH may change very little. When a decrease in pH is detected in the anaerobic digestion system, the acid-base balance of the anaerobic digestion system may have been completely destroyed and difficult to adjust in time. For example, under high concentrations of undissociated acid, undissociated acid can pass through the cell membrane, destroy macromolecules in bacteria, reduce the activity of methanogens or even inactivate them, and cause the collapse of the anaerobic digestion system. Therefore, timely determination of the concentration of organic acids such as VFA in the anaerobic digestion system is an important means of online regulation of the anaerobic digestion system. Predicting the concentration of VFA and future changes is of great significance for maintaining the stability of the anaerobic digestion system. The determination of VFA includes online monitoring and offline sampling and analysis. Online monitoring requires online sensors. However, when the current VFA online sensors work in an environment with a high total solid content, the measured data is not reliable and requires a lot of maintenance and calibration work. Offline sampling and analysis measurements not only require expensive equipment, but also lack high timeliness. Regardless of which method is used to measure the VFA concentration, when VFA accumulation is found, the anaerobic digestion system is likely to be in an unstable state and difficult to recover.
[0063] With the accumulation of experimental and field data of anaerobic digestion systems, machine learning models can establish accurate and reliable prediction models by analyzing a large amount of historical operation data, providing new solutions for dynamic monitoring and early warning of acid inhibition in anaerobic digestion systems. The rapid development of instrumentation has enabled rapid and real-time online measurement of parameters such as pH, temperature, ammonia nitrogen concentration, and gas composition. Therefore, machine learning algorithms can be used to construct models with the above historical operation data and different matrix characteristic data of the anaerobic digestion system as model input variables and future VFA concentration as output variables to predict the VFA concentration in the anaerobic reactor and its future change trend, identify system anomalies, and thus prevent and alleviate the acid inhibition problem of the anaerobic digestion system in advance (such as controlling the feed rate, reducing the organic load, adding buffers, adjusting the hydraulic retention time, etc.), maintain the stability of the anaerobic digestion system, and reduce the instability or collapse of the anaerobic digestion system caused by acid accumulation.
[0064] The embodiments of the present application provide an acid inhibition warning method, device, equipment and storage medium for an anaerobic digestion system. The technical solution of the present application includes: obtaining operation data and each initial substrate characteristic data in an anaerobic digestion system under different substrates; extracting data from the operation data and characteristic data using a sliding window and constructing a time series data set, and preprocessing the time series data set; screening the optimal feature set from the preprocessed time series data set; constructing a volatile fatty acid concentration prediction model based on the optimal feature set; predicting the volatile fatty acid concentration in the anaerobic digestion system according to the concentration prediction model; and providing an acid inhibition warning according to the volatile fatty acid concentration. The concentration prediction model can accurately predict the volatile fatty acid concentration in the anaerobic digestion system, and then the acid inhibition warning can be timely provided according to the volatile fatty acid concentration.
[0065] The embodiment of the present application provides an acid inhibition early warning method for an anaerobic digestion system, which relates to the field of data processing technology. The acid inhibition early warning method for an anaerobic digestion system provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the acid inhibition early warning method for an anaerobic digestion system, etc., but is not limited to the above forms.
[0066] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0067] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only set for the convenience of explanation and description, and the order between the steps is not limited in any way. The execution order and implementation method of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0068] Reference Figure 1 The present application embodiment provides an anaerobic digestion system acid inhibition early warning method, which may include but is not limited to S100 to S150, as follows:
[0069] S100: Obtaining operation data of the anaerobic digestion system under different substrates and each initial substrate characteristic data.
[0070] It can be understood that the operating data in this embodiment is the historical operating data of the anaerobic digestion system. This embodiment can obtain multiple operating data in units of a set period, wherein the set period can be one hour, one day or one week, etc. The specific value of the set period can be set arbitrarily according to actual conditions. Therefore, this embodiment can obtain multiple daily operating data, multiple hourly operating data or multiple weekly operating data.
[0071] Exemplarily, the daily operating data may include the operating time, pH, temperature, ammonia nitrogen concentration, daily gas production per unit volume, daily methane production per unit volume and VFA concentration of the anaerobic digestion system, and the initial substrate characteristic data may include total solid content (TS), volatile solid content (VS) and substrate carbon-nitrogen ratio (C / N).
[0072] The total solids content (TS) of the substrate refers to the content of all solid matter remaining after removing water from the anaerobic digestion substrate. Too high or too low a content will affect the structure of the microbial community.
[0073] Volatile Solids (V) refers to the portion of total solids that can be volatilized by heating or degraded by microorganisms. It is an indicator of the content of biodegradable organic matter in the matrix.
[0074] Matrix C / N refers to the mass ratio of carbon (Carbon) element to nitrogen (Nitrogen) element in the matrix, which has an important influence on the activity of anaerobic microorganisms and the effect of anaerobic digestion.
[0075] S110: extracting data from the operating data and the initial matrix characteristic data using a sliding window and constructing a time series data set, and preprocessing the time series data set.
[0076] It can be understood that this embodiment extracts data from the operating data and the initial matrix characteristic data and uses the extracted data to construct a time series data set. In order to improve the efficiency of subsequent data processing, this embodiment can also pre-process the time series data set.
[0077] Furthermore, the step of extracting data from the operating data and the initial matrix characteristic data using a sliding window and constructing a time series data set in S110 may include S111 to S112:
[0078] S111: using the sliding window to traverse the operating data and the initial matrix characteristic data to extract input features and output features.
[0079] It should be noted that the sliding window is used to extract the data of the n-2 time period, the n-1 time period and the n time period from the operating data and the initial matrix characteristic data as the input features, and to extract the volatile fatty acid concentration data of the n+1 time period and the n+2 time period from the operating data and the initial matrix characteristic data as the output features.
[0080] Exemplarily, the time period can be the same as the set period in S100. For example, if the time period is one day, the data of the n-2 day, the n-1 day and the n-1 day can be extracted as input features using the sliding window, and the volatile fatty acid concentration data of the n+1 day and the n+2 day can be extracted as output features. It can be understood that when the sliding window starts to traverse, the data of the first day are extracted from the operating data and the initial matrix characteristic data as the data of the n-2 day extracted by the sliding window this time, and then extracted in sequence in units of daily days. When the data of the last day is traversed, the data of the last day are extracted as the data of the n+2 day extracted by the sliding window this time.
[0081] S112: Construct the time series dataset according to the input features and the output features.
[0082] Furthermore, preprocessing the time series data set in S110 may include:
[0083] S113: normalizing the time series data set;
[0084] The normalized calculation formula includes:
[0085] ;
[0086] in, is the normalized feature, is any feature in the time series dataset, is the feature with the minimum value in the time series dataset, is the feature of the maximum value in the time series dataset.
[0087] It should be noted that this embodiment can normalize all data in the time series data set, that is, each feature of this embodiment is each data in the time series data set.
[0088] S120: Filtering and obtaining an optimal feature set from the preprocessed time series data set.
[0089] Considering that the preprocessed time series data set may include multiple features (data), in order to determine the features that mainly affect the acid concentration and improve the accuracy and efficiency of predicting the acid concentration, this embodiment can screen several features from the preprocessed time series data set as the optimal feature set.
[0090] Furthermore, S120 may include S121 to S124:
[0091] S121: Selecting a first training set from the preprocessed time series data set in a random sampling manner according to a first set ratio;
[0092] S122: Using the first training set to train a random forest regression model, and calculating the importance score of each feature in the first training set;
[0093] S123: removing the feature with the lowest importance score in the first training set;
[0094] S124: Return to the step of training the random forest regression model using the first training set until the number of remaining features in the first training set is the same as the set number, and the features in the current first training set are used as the optimal feature set.
[0095] It can be understood that after each training of the random forest regression model, the importance score of each feature in the first training set is calculated once, and then the feature with the lowest importance score in the first training set is removed, that is, one feature is removed after each training, and then the random forest regression model is trained again using the remaining features in the first training set until the number of remaining features in the first training set is the same as the set number, and the current remaining features in the first training set are used as the optimal feature set.
[0096] S130: constructing a volatile fatty acid concentration prediction model based on the optimal feature set.
[0097] It can be understood that the screened optimal feature set includes features that mainly affect acid concentration, and the concentration prediction model constructed based on the optimal feature set can more accurately predict the concentration of volatile fatty acids in the anaerobic digestion system.
[0098] Further, S130 may include S131 to S137:
[0099] S131: Selecting the number of features when splitting nodes in the random forest regression model, the number of decision trees, and the maximum depth of the decision trees as hyperparameters;
[0100] S132: Setting multiple candidate values for each of the hyperparameters;
[0101] S133: Combining the candidate values of each of the hyperparameters to obtain a plurality of candidate parameter combinations;
[0102] S134: Divide the optimal feature set into multiple subsets, and divide any one of the subsets into a validation set, and divide the remaining subsets into a second training set;
[0103] S135: using each of the second training sets to train the random forest regression model under each of the candidate parameter combinations, and using the validation set to evaluate the performance parameters of the random forest regression model under each of the candidate parameter combinations;
[0104] S136: Returning to dividing the optimal feature set into a plurality of subsets, and dividing any one of the subsets into a validation set, and dividing the remaining subsets into a second training set, until all the subsets are used as the validation sets to evaluate the performance parameters of the random forest regression model under each of the candidate parameter combinations;
[0105] S137: selecting a target parameter combination from each of the candidate parameter combinations according to each of the performance parameters, and using the random forest regression model under the target parameter combination as the concentration prediction model of volatile fatty acids.
[0106] It can be understood that in this embodiment, multiple candidate parameter combinations can be combined first, and then the performance parameters of the random forest regression model under each candidate parameter combination can be determined, so that the candidate parameter combination corresponding to the optimal performance parameters is used as the target parameter combination, and the random forest regression model under the target parameter combination is determined as the volatile fatty acid concentration prediction model.
[0107] S140: Predicting the concentration of volatile fatty acids in the anaerobic digestion system according to the concentration prediction model.
[0108] It can be understood that this embodiment can accurately predict the concentration of volatile fatty acids in the anaerobic digestion system for a period of time in the future based on the concentration prediction model under the initial substrate characteristic data and historical operation data.
[0109] S150: Performing acid inhibition warning according to the volatile fatty acid concentration.
[0110] It is understandable that if the predicted volatile fatty acid concentration is greater than a preset concentration threshold, an acid inhibition warning may be issued.
[0111] Furthermore, S150 may include S151-S152:
[0112] S151: comparing the volatile fatty acid concentration with various preset warning concentrations to determine the risk warning level of the volatile fatty acid concentration;
[0113] S152: Outputting the volatile fatty acid concentration and the risk warning level as acid inhibition warning information.
[0114] Specifically, this embodiment can output acid inhibition warning information of a corresponding level according to the predicted volatile fatty acid concentration.
[0115] Furthermore, S152 may include S1521~S1522:
[0116] S1521: Create an interactive window and set user interface elements in the interactive window;
[0117] S1522: In response to the operation on the user interface element, display the volatile fatty acid concentration and the risk warning level in the interactive window.
[0118] It is understandable that this embodiment can create an interactive window and display the volatile fatty acid concentration and risk warning level in the interactive window.
[0119] Next, the solution of the embodiment of the present application will be described in detail and explained in conjunction with specific application examples:
[0120] In response to the technical problems raised in the background technology that organic acids, mainly volatile organic acids (VFA), accumulate in the anaerobic digestion system, causing the anaerobic digestion system to become unstable and collapse, and VFA cannot be monitored online, this embodiment proposes to use machine learning methods to establish a real-time prediction model for organic acids such as VFA and perform acid inhibition warning to reduce the negative impact of acid inhibition on the anaerobic digestion system.
[0121] Specifically, this embodiment may include the following steps:
[0122] S1. Collect data through anaerobic digestion experiments and process operation sites to obtain daily operation data and initial substrate characteristic data in the anaerobic digestion system under different substrates;
[0123] S1.1. Collect field data of anaerobic digestion experiments and process operation;
[0124] In this embodiment, the acquired data include anaerobic digestion data of different types of solid organic waste and high-concentration organic wastewater from the laboratory and the process operation site.
[0125] S1.2. Obtain daily operating data and initial matrix characteristic data;
[0126] In this embodiment, the daily operation data include the operation time, pH, temperature, ammonia nitrogen concentration, daily gas production per unit volume, daily methane production per unit volume and VFA concentration of the anaerobic digestion system, and the initial substrate characteristic data include total solid content (TS), volatile solid content (VS) and substrate carbon-nitrogen ratio (C / N), and a data set containing 540 data items is constructed;
[0127] The total solids content (TS) of the substrate refers to the content of all solid matter remaining after removing water from the anaerobic digestion substrate. Too high or too low a content will affect the structure of the microbial community.
[0128] Volatile Solids (V) refers to the portion of total solids that can be volatilized by heating or degraded by microorganisms. It is an indicator of the content of biodegradable organic matter in the matrix.
[0129] Matrix C / N refers to the mass ratio of carbon (Carbon) element to nitrogen (Nitrogen) element in the matrix, which has an important influence on the activity of anaerobic microorganisms and the effect of anaerobic digestion.
[0130] S2, construct a time series data set using a sliding window and preprocess the time series data set;
[0131] S2.1. Data were collated according to different anaerobic digestion reaction experiments and different anaerobic digestion systems. Daily operation data and initial substrate characteristic data of each anaerobic digestion system were collated into a table file (CSV);
[0132] CSV file (Comma-Separated Values) is a common data storage format used to save tabular data in plain text format, which can easily exchange data with different software and programming languages.
[0133] S2.2. For the data in each CSV file, the operating time, ammonia nitrogen concentration, pH, temperature, daily gas production per unit volume, daily methane production per unit volume, VFA concentration, substrate TS, substrate VS and substrate C / N of the anaerobic digestion system on day n-2, day n-1 and day n are taken as input features, and the VFA concentration on day n+1 and day n+2 is taken as output features;
[0134] S2.3. Traverse the time series data set, extract features according to the size of the sliding window, and construct data sets P1 and P2, which are used to predict the VFA concentrations on day n+1 and day n+2, respectively.
[0135] S2.4, use the normalization method to preprocess the data set P1 and data set P2 to unify the scale between features. The normalization calculation formula is:
[0136] ;
[0137] in, is the normalized feature, is any feature in the time series dataset, is the feature with the minimum value in the time series dataset, is the feature with the maximum value in the time series dataset.
[0138] S2.5, using random sampling, the two preprocessed data sets are divided into training set: test set = 8:2 ratio;
[0139] In this embodiment, the training set A1 of the data set P1 has a total of 439 groups of data, and the test set B1 has a total of 109 groups of data. The training set A2 of the data set P2 has a total of 432 groups of data, and the test set B2 has a total of 108 groups of data.
[0140] S3. Recursive feature elimination is used to select the importance of each feature, and cross-validation is used to evaluate the performance of the concentration prediction model after each round of iteration to improve the stability and generalization ability of the concentration prediction model.
[0141] S3.1, use recursive feature elimination (RFE) to perform feature screening on the running data;
[0142] In this embodiment, there are a large number of operating data features (24), and feature screening is performed on them.
[0143] Recursive Feature Elimination (RFE) is a feature selection algorithm that aims to recursively train the model and gradually remove the least important features, and finally select the optimal feature subset that is most important to the model.
[0144] S3.2. Specify the random forest regression model as the base model of RFE, use all features to train the random forest regression model, calculate the importance score of each feature, and remove the feature with the lowest importance score;
[0145] S3.3, repeat S3.1~S3.2 until the specified number of features remain;
[0146] To verify the performance of the random forest regression model after each training, this embodiment may also include:
[0147] S3.4. Use five-fold cross validation to evaluate the performance of the model under different numbers of features. That is, based on the data under different numbers of features, divide the data set into five subsets, use four of the subsets as training sets each time, and use the remaining one subset as the validation set. Use the training set to train the model and evaluate it on the validation set to obtain the model performance index (R 2 ). Select different subsets as validation sets until each subset is used as a validation set, obtain the performance indicators of the five models, and calculate the average of the performance indicators of the five models as the final evaluation result;
[0148] According to the importance score, this embodiment finally screens out the optimal feature set containing 8 input features from the operation data, including the daily methane production per unit volume on the n-2 day, the gas production per unit volume on the n-2 day, the daily methane production per unit volume on the n-1 day, the gas production per unit volume on the n-1 day, the VFA concentration on the n-1 day, the daily methane production per unit volume on the n day, the gas production per unit volume on the n day, and the VFA concentration on the n day. Using these eight operation data as input features, the model is trained on the training set A1 and the training set A2, and the model performance is evaluated on the test set B1 and the test set B2 respectively. The R of the model on the test set B1 is 2 = 0.9963, R of the model on the test set B2 2 = 0.9762.
[0149] S4. Construct a volatile fatty acid (VFA) concentration prediction model based on the optimal feature set:
[0150] S4.1, based on the optimal feature set, the initial matrix characteristics are used as input features to select the optimal data set from the original data set;
[0151] The optimal data set input in this embodiment includes 8 operation data and 3 matrix characteristic data, a total of 11 columns; the output characteristic data set is the VFA concentration on the n+1th day and the VFA concentration on the n+2th day, a total of 2 columns.
[0152] S4.2. Based on the optimal data set, the model hyperparameters are optimized using grid search and cross validation.
[0153] S4.2.1. Specify the random forest regression model as the concentration prediction model, and optimize the three hyperparameters of the number of features considered when splitting nodes in the random forest regression model (max_features), the number of decision trees (n_estimators), and the maximum depth of the decision tree (max_depth);
[0154] S4.2.2. Set candidate values for three hyperparameters: max_features to [2, 5, 8], n_estimators to [100, 200, 300, 500], and max_depth to [None, 10, 20].
[0155] S4.2.3, combining the candidate values of each hyperparameter to obtain multiple candidate parameter combinations;
[0156] S4.2.4 For each candidate parameter combination, use five-fold cross validation to evaluate the performance of the random forest regression model under different candidate parameter combinations. That is, based on different candidate parameter combinations, divide the optimal data set into five subsets, use four of the subsets as training sets each time, and use the remaining one subset as the validation set. Use the training set to train the random forest regression model, and evaluate it on the validation set to obtain the performance index (R 2 ). Select different subsets as validation sets until each subset is used as a validation set, obtain the performance indicators of the random forest regression model with 5 different hyperparameter values, and calculate the average of the 5 model performance indicators as the final evaluation result;
[0157] S4.2.5. Select the optimal hyperparameter combination (i.e., target parameter combination) based on the evaluation results.
[0158] The optimal hyperparameter values based on data set P1 are max_features=8, n_estimators=100, max_depth=None, and the optimal hyperparameter values based on data set P2 are max_features=2, n_estimators=100, max_depth=10.
[0159] S4.3. Based on the optimized hyperparameters (i.e., target parameter combination), a VFA concentration prediction model was constructed. The model was trained using training set A1 and training set A2, and tested on the test set. The mean square error (MSE) and the coefficient of determination (R) were used. 2 Evaluate the generalization ability and prediction accuracy of the model. The calculation formula is as follows:
[0160] ;
[0161] ;
[0162] Where n is the number of samples, is the predicted concentration of VFA, is the actual concentration of VFA, is the actual average concentration of VFA;
[0163] In this embodiment, using the concentration prediction model after hyperparameter optimization, it is calculated that MSE=0.0001 on the test set B1, R 2 =0.9967; MSE=0.0006 on test set B2, R 2 =0.9841.
[0164] S5. Combined with the initial matrix characteristic data, the risk level of VFA concentration warning is set and a VFA warning model is constructed;
[0165] S5.1. Customize the VFA warning concentration and warning level;
[0166] Since the operation of anaerobic digestion systems is different in different environments, the design allows custom settings for VFA warning concentrations and warning levels. The warning levels are divided according to the VFA warning concentrations;
[0167] In this embodiment, the VFA warning concentration is set to 2000 mg / L, and the "normal operation" in the warning level means that the predicted VFA concentration is within the range of 0-70% of the VFA warning concentration, "low risk" means that the predicted VFA concentration is within the range of 70%-80% of the VFA warning concentration, "medium risk" means that the predicted VFA concentration is within the range of 80%-90% of the VFA warning concentration, and "high risk" means that the predicted VFA concentration is within the range of 90%-100% of the VFA warning concentration. When the VFA warning model issues an "alarm", it means that the predicted VFA concentration exceeds the warning limit.
[0168] S6. Based on the VFA early warning model, an acid inhibition risk early warning system for anaerobic digestion system is constructed;
[0169] S6.1. Design an acid suppression risk warning system for anaerobic digestion system using Tkinter;
[0170] Tkinter is a module in the Python standard library for creating graphical user interfaces (GUIs). It is a wrapper for the Tcl / TkGUI toolkit.
[0171] In this embodiment, an interactive window is created through Tkinter, the interactive window title is set to "Acid Inhibition Risk Early Warning System for Anaerobic Digestion System", and the interactive window size is set to "345 750", and at the same time create corresponding labels and input boxes for each input feature to input feature data, and create corresponding labels and result display boxes for each output feature;
[0172] S6.2, using the VFA early warning model to make predictions, and denormalizing the predicted VFA concentrations;
[0173] S6.3. Create a prediction button and bind the prediction button and prediction function;
[0174] S6.4. Enter all characteristic data and click the Prediction button to display the predicted VFA concentrations on day n+1 and day n+2 and the corresponding risk levels.
[0175] For example, Figure 2 This is a comparison chart of the predicted value and actual value of VFA concentration on the n+1 day by the VFA early warning model. Figure 3 This is a comparison chart of the predicted value and actual value of VFA concentration on day n+2 by the VFA early warning model. Figure 4 This is an example diagram of the output of the interactive window provided in this embodiment.
[0176] This embodiment makes full use of and screens the features that are important for VFA concentration based on the daily operation data and initial substrate characteristic data of the anaerobic digestion system, and based on the sliding window and feature selection method, and uses the optimal feature set to build a VFA concentration prediction model, thereby improving the prediction performance of the concentration prediction model; then, by setting a VFA concentration warning, a VFA warning model is obtained; based on the VFA warning model, an acid inhibition risk warning system for the anaerobic digestion system is constructed through Tkinter. By inputting the feature data into the warning system, the VFA concentration in the anaerobic digestion system can be predicted and a warning can be issued, which solves the problem of unreal-time or inaccurate VFA concentration measurement in the anaerobic digestion system, and facilitates the operation and maintenance personnel to optimize and adjust the anaerobic digestion system.
[0177] Reference Figure 5 The embodiment of the present application also provides an anaerobic digestion system acid inhibition early warning device, which can implement the above-mentioned anaerobic digestion system acid inhibition early warning method, and the device includes:
[0178] A data acquisition unit, used for acquiring operation data of the anaerobic digestion system under different substrates and characteristic data of each initial substrate;
[0179] A data set construction unit, used for extracting data from the operation data and the initial matrix characteristic data using a sliding window and constructing a time series data set, and preprocessing the time series data set;
[0180] A feature set screening unit, used for screening the optimal feature set from the preprocessed time series data set;
[0181] A model building unit, used for building a volatile fatty acid concentration prediction model based on the optimal feature set;
[0182] an acid concentration prediction unit, used for predicting the concentration of volatile fatty acids in the anaerobic digestion system according to the concentration prediction model;
[0183] The acid inhibition warning unit is used to provide acid inhibition warning according to the concentration of the volatile fatty acids.
[0184] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0185] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned anaerobic digestion system acid inhibition early warning method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0186] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0187] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0188] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0189] The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 is called to execute the acid inhibition early warning method for the anaerobic digestion system of the embodiment of this application;
[0190] Input / output interface 603, used to implement information input and output;
[0191] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0192] A bus 605 that transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604);
[0193] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .
[0194] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned acid inhibition early warning method for the anaerobic digestion system is implemented.
[0195] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0196] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0197] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0198] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0199] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0201] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising 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.
[0202] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0203] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0204] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0206] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0207] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. An anaerobic digestion system acid inhibition early warning method, characterized in that: The method comprises the following steps: Obtain the operation data of the anaerobic digestion system under different substrates and the characteristic data of each initial substrate; extracting data from the operating data and the initial matrix characteristic data using a sliding window and constructing a time series data set, and preprocessing the time series data set; Filtering and obtaining an optimal feature set from the preprocessed time series data set; Constructing a concentration prediction model of volatile fatty acids based on the optimal feature set; predicting the concentration of volatile fatty acids in the anaerobic digestion system according to the concentration prediction model; providing acid inhibition warning according to the volatile fatty acid concentration; The method of extracting data from the operating data and the initial matrix characteristic data using a sliding window and constructing a time series data set comprises the following steps: The sliding window is used to traverse the operation data and the initial matrix characteristic data to extract input features and output features; wherein the sliding window is used to extract data of the n-2th time period, the n-1th time period and the nth time period from the operation data and the initial matrix characteristic data as the input features, and to extract volatile fatty acid concentration data of the n+1th time period and the n+2th time period from the operation data and the initial matrix characteristic data as the output features; Construct the time series dataset according to the input features and the output features; The preprocessing of the time series data set comprises the following steps: Normalizing the time series data set; The normalized calculation formula includes: ; in, is the normalized feature, is any feature in the time series dataset, is the feature with the minimum value in the time series dataset, is the feature with the maximum value in the time series dataset; The step of selecting and obtaining the optimal feature set from the preprocessed time series data set comprises the following steps: A first training set is obtained by randomly sampling the preprocessed time series data set according to a first set ratio; Using the first training set to train a random forest regression model, and calculating the importance score of each feature in the first training set; Removing the feature with the lowest importance score in the first training set; Returning to the step of training the random forest regression model using the first training set until the number of remaining features in the first training set is the same as the set number, and the features in the current first training set are used as the optimal feature set; The method of constructing a volatile fatty acid concentration prediction model based on the optimal feature set comprises the following steps: The number of features when splitting nodes in the random forest regression model, the number of decision trees, and the maximum depth of the decision trees are selected as hyperparameters; Setting multiple candidate values for each of the hyperparameters; Combining the candidate values of each of the hyperparameters to obtain a plurality of candidate parameter combinations; Dividing the optimal feature set into multiple subsets, and dividing any one of the subsets into a validation set, and dividing the remaining subsets into a second training set; Using each of the second training sets to train the random forest regression model under each of the candidate parameter combinations, and using the validation set to evaluate the performance parameters of the random forest regression model under each of the candidate parameter combinations; Returning the method of dividing the optimal feature set into a plurality of subsets, and dividing any one of the subsets into a validation set, and dividing the remaining subsets into a second training set, until all the subsets are used as the validation sets to evaluate the performance parameters of the random forest regression model under each of the candidate parameter combinations; Selecting a target parameter combination from each of the candidate parameter combinations according to each of the performance parameters, and using the random forest regression model under the target parameter combination as the concentration prediction model of volatile fatty acids; The acid inhibition early warning according to the volatile fatty acid concentration comprises the following steps: Comparing the volatile fatty acid concentration with various preset warning concentrations to determine the risk warning level of the volatile fatty acid concentration; The volatile fatty acid concentration and the risk warning level are output as acid inhibition warning information.
2. The acid inhibition early warning method for an anaerobic digestion system according to claim 1, characterized in that: The step of outputting the volatile fatty acid concentration and the risk warning level as acid inhibition warning information comprises the following steps: Creating an interactive window and setting user interface elements in the interactive window; In response to an operation on the user interface element, the volatile fatty acid concentration and the risk warning level are displayed in the interactive window.
3. An acid suppression early warning device for an anaerobic digestion system, characterized in that: The device comprises: A data acquisition unit, used for acquiring operation data of the anaerobic digestion system under different substrates and characteristic data of each initial substrate; A data set construction unit, used for extracting data from the operation data and the initial matrix characteristic data using a sliding window and constructing a time series data set, and preprocessing the time series data set; A feature set screening unit, used for screening the optimal feature set from the preprocessed time series data set; A model building unit, used for building a volatile fatty acid concentration prediction model based on the optimal feature set; an acid concentration prediction unit, used for predicting the concentration of volatile fatty acids in the anaerobic digestion system according to the concentration prediction model; an acid inhibition early warning unit, used for providing acid inhibition early warning according to the volatile fatty acid concentration; The method of extracting data from the operating data and the initial matrix characteristic data using a sliding window and constructing a time series data set comprises the following steps: The sliding window is used to traverse the operation data and the initial matrix characteristic data to extract input features and output features; wherein the sliding window is used to extract data of the n-2th time period, the n-1th time period and the nth time period from the operation data and the initial matrix characteristic data as the input features, and to extract volatile fatty acid concentration data of the n+1th time period and the n+2th time period from the operation data and the initial matrix characteristic data as the output features; Construct the time series dataset according to the input features and the output features; The preprocessing of the time series data set comprises the following steps: Normalizing the time series data set; The normalized calculation formula includes: ; in, is the normalized feature, is any feature in the time series dataset, is the feature with the minimum value in the time series dataset, is the feature with the maximum value in the time series dataset; The step of selecting and obtaining the optimal feature set from the preprocessed time series data set comprises the following steps: A first training set is obtained by randomly sampling the preprocessed time series data set according to a first set ratio; Using the first training set to train a random forest regression model, and calculating the importance score of each feature in the first training set; Removing the feature with the lowest importance score in the first training set; Returning to the step of training the random forest regression model using the first training set until the number of remaining features in the first training set is the same as the set number, and the features in the current first training set are used as the optimal feature set; The method of constructing a volatile fatty acid concentration prediction model based on the optimal feature set comprises the following steps: The number of features when splitting nodes in the random forest regression model, the number of decision trees, and the maximum depth of the decision trees are selected as hyperparameters; Setting multiple candidate values for each of the hyperparameters; Combining the candidate values of each of the hyperparameters to obtain a plurality of candidate parameter combinations; Dividing the optimal feature set into multiple subsets, and dividing any one of the subsets into a validation set, and dividing the remaining subsets into a second training set; Using each of the second training sets to train the random forest regression model under each of the candidate parameter combinations, and using the validation set to evaluate the performance parameters of the random forest regression model under each of the candidate parameter combinations; Returning the method of dividing the optimal feature set into a plurality of subsets, and dividing any one of the subsets into a validation set, and dividing the remaining subsets into a second training set, until all the subsets are used as the validation sets to evaluate the performance parameters of the random forest regression model under each of the candidate parameter combinations; Selecting a target parameter combination from each of the candidate parameter combinations according to each of the performance parameters, and using the random forest regression model under the target parameter combination as the concentration prediction model of volatile fatty acids; The acid inhibition early warning according to the volatile fatty acid concentration comprises the following steps: Comparing the volatile fatty acid concentration with various preset warning concentrations to determine the risk warning level of the volatile fatty acid concentration; The volatile fatty acid concentration and the risk warning level are output as acid inhibition warning information.
4. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the acid inhibition early warning method for an anaerobic digestion system as claimed in any one of claims 1 to 2 is implemented.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, an acid inhibition early warning method for an anaerobic digestion system according to any one of claims 1 to 2 is implemented.
Citation Information
Cited By
Anaerobic fermentation system stability comprehensive evaluation method based on dynamic monitoring
CN121350870A
