Method and device for quantifying odor concentration in livestock and poultry breeding process
Through the combination of machine learning model and partial least squares regression method, the odor-causing substances in livestock and poultry breeding process are identified and quantified, which solves the limitations and difficulty of identifying odor concentration analysis methods in the existing technology, and achieves odor concentration accurate quantitative and relational explanation.
Patent Information
- Application Number
- CN202411250997.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, the odor concentration analysis method during livestock and poultry breeding has high limitations and cannot identify the odor-causing components, making it difficult to accurately characterize and quantify the odor concentration.
By obtaining the gas component data set in the livestock and poultry breeding process, machine learning models (such as random forest, gradient enhancement regression, extreme random tree regression) combined with partial least squares regression method, odor-causing substances are identified and odor concentration relationships are established by using machine learning models (such as random forests, gradient enhancement regression, and extreme random tree regression) combined with partial least squares regression method. to achieve quantitative analysis of odor concentration.
Effectively identifying odor-causing substances reduces the cost and time of odor concentration analysis, provides accurate quantitative results of odor concentration, and explains the correlation between odor-causing components and odor concentration.
Smart Images

Figure CN119199020A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of odor concentration analysis, and in particular to a method and a device for quantifying odor concentration in a livestock and poultry breeding process. Background Art
[0002] Odors emitted during livestock and poultry farming not only pollute the surrounding environment, but also harm the health of human respiratory and nervous systems. Odors are mainly composed of complex gas components, such as ammonia, sulfur compounds, and volatile organic compounds. Due to the diversity of odor components, it is difficult to accurately characterize the odor concentration during livestock and poultry farming.
[0003] Commonly used methods for analyzing odor concentration are the dynamic dilution olfaction method and the three-point comparison odor bag method. These methods rely on human sense of smell, consume a lot of manpower, are costly, and take a long time to analyze; and this method does not consider the interaction between odors of different substances.
[0004] It can be seen that the odor concentration analysis method in the related art has technical problems such as high limitations and inability to identify odor-causing components. Summary of the invention
[0005] The present invention provides a method and device for quantifying odor concentration in a livestock and poultry breeding process, so as to solve the defects of the odor concentration analysis method in the prior art, which has high limitations and cannot identify odor-causing components, and realizes the identification of odor-causing substance components and the quantification of odor concentration.
[0006] The present invention provides a method for quantifying odor concentration in livestock and poultry breeding processes, comprising the following steps: obtaining a gas component data set in the livestock and poultry breeding process, wherein the gas component data set comprises a training sample set and a measurement sample set, and the training sample set comprises at least one gas component and a gas concentration corresponding to the gas component; inputting the training sample set into a plurality of odor concentration prediction models respectively to obtain target indicators of predicted odor concentration output by the plurality of odor concentration prediction models, wherein the target indicators comprise a determination coefficient and a root mean square error; determining a target odor concentration prediction model from the plurality of odor concentration prediction models based on the determination coefficient and the root mean square error; identifying odor-causing substances in the measurement sample set through the target odor concentration prediction model to obtain a target odor-causing component; determining an odor concentration relationship equation corresponding to the target odor-causing component based on the target odor-causing component according to the partial least squares regression method, wherein the odor concentration relationship equation is used to represent the degree of correlation between the target odor-causing component and the predicted odor concentration.
[0007] According to a method for quantifying odor concentration in a livestock and poultry breeding process provided by the present invention, the training sample set is respectively input into a plurality of odor concentration prediction models to obtain target indicators of predicted odor concentration output by the plurality of odor concentration prediction models, comprising: performing data preprocessing on the training sample set to obtain a processed training sample set; inputting the processed training sample set into a plurality of odor concentration prediction models to obtain target indicators of predicted odor concentration output by the plurality of odor concentration prediction models, wherein the plurality of odor concentration prediction models are respectively based on random forest, gradient boosting regression, and extreme random tree regression models.
[0008] According to a method for quantifying odor concentration in a livestock and poultry breeding process provided by the present invention, the target indicator also includes the number of features, and the target odor concentration prediction model is determined from the multiple odor concentration prediction models based on the determination coefficient and the root mean square error, including: based on the determination coefficient, the root mean square error and the number of features, the target odor concentration prediction model is determined from the multiple odor concentration prediction models, wherein the target indicator of the target odor concentration prediction model includes at least one of the following: the determination coefficient is maximized, the root mean square error is minimized, and the number of features is minimized.
[0009] According to a method for quantifying odor concentration in a livestock and poultry breeding process provided by the present invention, the odor-causing substances in the measured sample set are identified by the target odor concentration prediction model to obtain the target odor-causing component, including: identifying the odor-causing substances in the measured sample set by the target odor concentration prediction model to obtain multiple odor-causing components and odor concentration contributions corresponding to the multiple odor-causing components; determining, from the multiple odor-causing components, the odor-causing component whose odor concentration contribution is greater than a contribution threshold as the target odor-causing component.
[0010] According to a method for quantifying odor concentration in a livestock and poultry breeding process provided by the present invention, after the odor-causing substances in the measured sample set are identified by the target odor concentration prediction model to obtain a plurality of odor-causing components and the odor concentration contribution corresponding to the plurality of odor-causing components, the method further comprises: performing SHAP analysis based on the plurality of odor-causing components to obtain a SHAP analysis result, wherein the SHAP analysis result is used to represent the positive and negative effects of each of the plurality of odor-causing components on the predicted odor concentration.
[0011] According to a method for quantifying odor concentration in a livestock and poultry breeding process provided by the present invention, after performing SHAP analysis based on the multiple odor-causing components to obtain the SHAP analysis results, the method further includes: determining the relationship between each of the multiple odor-causing components based on the SHAP analysis results; and determining the relative importance of each of the multiple odor-causing components to the predicted odor concentration based on the relationship.
[0012] The present invention also provides an odor concentration quantification device in the livestock and poultry breeding process, comprising the following modules: an acquisition module, used to acquire a gas component data set in the livestock and poultry breeding process, wherein the gas component data set includes a training sample set and a measurement sample set, and the training sample set includes at least one gas component and a gas concentration corresponding to the gas component; an input module, used to input the training sample set into multiple odor concentration prediction models respectively, to obtain target indicators of the predicted odor concentration output by the multiple odor concentration prediction models, wherein the target indicators include a determination coefficient and a root mean square error; a determination module, used to determine a target odor concentration prediction model from the multiple odor concentration prediction models based on the determination coefficient and the root mean square error; an identification module, used to identify odor-causing substances in the measurement sample set through the target odor concentration prediction model to obtain a target odor-causing component; an output module, used to determine an odor concentration relationship equation corresponding to the target odor-causing component based on the target odor-causing component according to a partial least squares regression method, wherein the odor concentration relationship equation is used to represent the degree of correlation between the target odor-causing component and the predicted odor concentration.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for quantifying odor concentration in the livestock and poultry breeding process as described in any one of the above is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for quantifying odor concentration in livestock and poultry breeding processes.
[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for quantifying odor concentration in livestock and poultry breeding processes.
[0016] The odor concentration quantitative method and device provided by the present invention in the livestock and poultry breeding process are as follows: a training sample set and a measurement sample set in the livestock and poultry breeding process are obtained, wherein the training sample set includes at least one gas component and a gas concentration corresponding to the gas component; the training sample sets are respectively input into a plurality of odor concentration prediction models, and a target odor concentration prediction model is determined according to the determination coefficient and the root mean square error of the output predicted odor concentration, thereby the odor concentration prediction capabilities of different machine learning models can be compared to obtain a preferred target odor concentration prediction model; odor-causing substances are identified in the measurement sample set by the target odor-causing component through the target odor-causing component, thereby the odor-causing substances obtained by the preferred machine learning model method have wide applicability; an odor concentration relationship corresponding to the target odor-causing component is determined based on the partial least squares regression method, a relationship between the odor-causing substance concentration and the odor concentration is established, the odor concentration emitted in the livestock and poultry breeding process is predicted, and the odor concentration relationship is given; thereby the technical problem that the odor concentration analysis method in the related art has high limitations and cannot identify odor-causing components is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a schematic diagram of the process of the method for quantitative determination of odor concentration in livestock and poultry breeding process provided by the present invention.
[0019] Figure 2 It is a schematic diagram of the ability of the extreme random tree regression model provided by the present invention to predict odor concentration.
[0020] Figure 3 The present invention provides a quantitative model of odor concentration constructed by coupling partial least squares method with 20 odor-causing substances based on extreme random tree regression model and a schematic diagram of the model's prediction ability for odor concentration.
[0021] Figure 4 It is a structural schematic diagram of the odor concentration quantitative device in the livestock and poultry breeding process provided by the present invention.
[0022] Figure 5 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0024] Odors emitted during livestock and poultry farming not only pollute the surrounding environment, but also harm the health of human respiratory and nervous systems. Odors are mainly composed of complex gas components, such as ammonia, sulfur compounds, and volatile organic compounds. Due to the diversity of odor components, it is difficult to accurately characterize the odor concentration during livestock and poultry farming.
[0025] Commonly used methods for analyzing odor concentration are the dynamic dilution olfaction method and the three-point comparison odor bag method. These methods rely on human sense of smell, are labor-intensive, costly, and take a long time to analyze. In addition, some research reports use the partial least squares method to predict odor concentration, that is, to construct a relationship between gas component concentration and odor concentration, but this method does not take into account the interaction between odors of different substances.
[0026] In the related technology, gaseous pollutants such as ammonia and hydrogen sulfide generated in the whole process of livestock and poultry breeding have been reported, but the relationship model between the main odor-causing components and odor concentration in the gaseous pollutants is still unclear.
[0027] The odor activity value method is a common method for identifying odor-causing substances, but it can only calculate the contribution of threshold substances to odor concentration. However, most emerging substances often lack olfactory threshold information. Considering the large number of newly detected odor components, it becomes impractical to experimentally measure all substances. In addition, although some studies have combined the odor activity value method with correlation analysis to obtain odor-causing substances, these methods still require a lot of time to measure multiple or even hundreds of gas components. Therefore, it is very important to explore suitable methods to determine odor-causing substances in complex gas components.
[0028] According to the latest progress in machine learning, machine learning is expected to resolve the complex relationship between the concentration of odor-causing substances and the concentration of odor. Machine learning identifies wastewater pollution sites and predicts air pollution levels by evaluating the importance of features in the model. It can not only overcome the limitations of the applicability of substances without odor thresholds, but also effectively identify odor components. However, there are relatively few studies on the use of machine learning to identify odorous substances in animal husbandry. And machine learning cannot provide an equation between the concentration of odor-causing substances and the concentration of odor. In contrast, partial least squares is good at providing relationship expressions. Therefore, it is an effective method to combine machine learning with partial least squares to further identify odor-causing substances and quantify odor concentrations.
[0029] In response to the above technical problems, the present invention provides a method for identifying odor-causing components and quantifying odor concentrations by coupling machine learning with partial least squares method, which solves the problem of unknown odor-causing components and unclear relationship between odor-causing components and odor concentration.
[0030] refer to Figure 1 , Figure 1 Schematic diagram of the process of odor concentration quantification method in livestock and poultry breeding process provided by the present invention, such as Figure 1 As shown, the method includes the following steps.
[0031] Step 101, obtaining a gas component data set in a livestock and poultry breeding process, wherein the gas component data set includes a training sample set and a measurement sample set, and the training sample set includes at least one gas component and a gas concentration corresponding to the gas component.
[0032] The gas components produced during livestock and poultry farming are extremely complex, mainly including ammonia, hydrogen sulfide, volatile organic compounds (VOCs), mercaptans, etc. These gases are mixed together and emit unpleasant odors, which not only affect the growth environment of livestock and poultry, but may also cause harm to their health.
[0033] In the embodiment of the present invention, the gas components in the livestock and poultry breeding process are measured and analyzed.
[0034] For example, Teflon anti-adsorption sampling bags were used to collect gas at each sampling point, and the concentrations of 128 gas components were measured and analyzed. Among them, the 128 gas components were ammonia, odor concentration, 9 sulfides (hydrogen sulfide, thiophene, carbon disulfide, dimethyl disulfide, methyl mercaptan, methyl sulfide, methyl ethyl sulfide, ethyl mercaptan and ethyl sulfide) and 117 volatile organic compounds (57 PAMS substances, TO15 and 13 aldehydes and ketones. For specific components, please refer to the "Determination of Volatile Organic Compounds in Ambient Air by Can Sampling Gas Chromatography-Mass Spectrometry" and "TO15").
[0035] It should be noted that in the embodiment of the present invention, odor concentration is a separate gas measurement indicator, while in the related art, odor concentration is an indicator that quantifies the size of the odor based on the olfactory organ test method (it is also the dilution multiple when the odor-free clean air continuously dilutes the odor sample to the odorist's threshold, and the unit is dimensionless), which is a sensory evaluation of the gas. In the embodiment of the present invention, 20 odor-causing substances are identified through machine learning coupled with the partial least squares method, and the odor concentration is determined based on the concentrations of the 20 odor-causing substances. This replaces the related art, which requires olfactory detectives to conduct olfactory organ test methods (three-point comparison odor bag method).
[0036] In the embodiment of the present invention, a gas monitor (eg, INNOVA) is used to measure ammonia concentration, a three-point comparison odor bag method is used to measure odor concentration, and a gas chromatograph-mass spectrometer is used to measure and analyze the concentrations of 117 volatile organic compounds and 9 sulfides.
[0037] For example, volatile organic compounds are detected in gas samples collected in livestock and poultry houses through gas chromatography-mass spectrometry, and each gas component is determined based on characteristic ions and retention time, and the concentration of each gas component is determined based on the internal standard method.
[0038] Step 102, respectively input the training sample set into a plurality of odor concentration prediction models to obtain target indicators of the predicted odor concentration output by the plurality of odor concentration prediction models, wherein the target indicators include a determination coefficient and a root mean square error.
[0039] Step 103 : determining a target odor concentration prediction model from a plurality of odor concentration prediction models based on the determination coefficient and the root mean square error.
[0040] In an embodiment of the present invention, training, testing and evaluation are performed on multiple preset machine learning models. With the concentrations of multiple gas components as independent variables, odor concentration prediction models of multiple gas component concentrations and odor concentrations are constructed using random forest, gradient boosting regression and extreme random tree regression machine learning respectively. The odor concentration prediction capabilities of different machine learning models are compared to obtain the preferred machine learning model.
[0041] For example, the determination coefficient, root mean square error and number of features of each machine model in predicting odor concentration are analyzed to screen the optimal machine learning model (i.e., the target odor concentration prediction model) that is most effective in predicting the odor concentration in the livestock and poultry breeding process.
[0042] Step 104, identifying odor-causing substances in the measured sample set by using the target odor concentration prediction model to obtain target odor-causing components.
[0043] In an embodiment of the present invention, key odor-causing substances (target odor-causing components) are identified by a target odor concentration prediction model (preferably a machine learning model).
[0044] In the embodiment of the present invention, according to the training results of the target odor concentration prediction model and the calculation of the importance of features (gas components), the features that contribute greatly to the odor concentration are obtained, the key odor-causing components are determined, the contribution of the features to the odor concentration is analyzed, and the qualitative characterization of the odor components is achieved.
[0045] Through the embodiments of the present invention, compared with the odor activity value method for identifying odor-causing substances, the odor-causing substances obtained by the preferred machine learning model method have wide applicability and can solve the problems of lack of olfactory thresholds for emerging pollutants, and the large number of types of gas pollutants to be detected and the high detection cost.
[0046] Step 105, determining an odor concentration relationship equation corresponding to the target odor-causing component based on the target odor-causing component according to the partial least squares regression method, wherein the odor concentration relationship equation is used to represent the degree of correlation between the target odor-causing component and the predicted odor concentration.
[0047] In the embodiment of the present invention, a relationship model of odor concentration in livestock and poultry breeding process is constructed. Since the target odor concentration prediction model can predict the odor concentration, but cannot give the relationship between the concentration of odor-causing components and the odor concentration, and the partial least squares regression method can give the odor concentration relationship. Therefore, the partial least squares regression method is combined with the machine learning method, and the relationship model of odor-causing substance concentration and odor concentration is established through the obtained target odor-causing components, the odor concentration emitted in the livestock and poultry breeding process is predicted, and the odor concentration relationship is given.
[0048] Here, the odor concentration relationship formula can predict the odor concentration in the gas based on the concentration of each odor-causing substance in the target odor-causing component; that is, the odor concentration relationship formula is used to express the degree of correlation (correlation) between the target odor-causing component and the predicted odor concentration, for example, the concentration corresponding to the target odor-causing component has a positive impact (causing the predicted odor concentration in the gas to increase) or a negative impact (causing the predicted odor concentration in the gas to decrease) on the predicted odor concentration.
[0049] Among them, the correlation between the target odor-causing component and the predicted odor concentration can be expressed by weight, influence coefficient, etc.
[0050] Through the embodiments of the present invention, a gas component data set in a livestock and poultry breeding process is obtained, wherein the gas component data set includes a training sample set and a measurement sample set, and the training sample set includes at least one gas component and a gas concentration corresponding to the gas component; the training sample sets are respectively input into a plurality of odor concentration prediction models to obtain target indicators of predicted odor concentrations output by the plurality of odor concentration prediction models, wherein the target indicators include a determination coefficient and a root mean square error; based on the determination coefficient and the root mean square error, a target odor concentration prediction model is determined from the plurality of odor concentration prediction models; odor-causing substances are identified in the measurement sample set through the target odor concentration prediction model to obtain a target odor-causing component; based on the target odor-causing component, an odor concentration relationship equation corresponding to the target odor-causing component is determined according to a partial least squares regression method, wherein the odor concentration relationship equation is used to represent the degree of correlation between the target odor-causing component and the predicted odor concentration. In the embodiment of the present invention, by coupling machine learning and partial least squares method, the odor concentration can be predicted by only measuring the concentration of key odor-causing substances by instruments, and the relationship between the odor concentration and the concentration of odor-causing substances is given, thereby realizing the quantification of the odor concentration; thereby solving the technical problem that the odor concentration analysis method in the related art has high limitations and cannot identify the odor-causing components.
[0051] According to a quantitative method for odor concentration in livestock and poultry breeding process provided by the present invention, the training sample sets are respectively input into multiple odor concentration prediction models to obtain target indicators of predicted odor concentration output by multiple odor concentration prediction models, including: Performing data preprocessing on the training sample set to obtain a processed training sample set; The processed training sample set is input into multiple odor concentration prediction models to obtain target indicators of predicted odor concentration output by the multiple odor concentration prediction models, wherein the multiple odor concentration prediction models are based on random forest, gradient boosting regression, and extreme random tree regression, respectively.
[0052] In the embodiment of the present invention, multiple preset machine learning models are trained, tested and evaluated. With the concentration of multiple gas components as independent variables, random forest, gradient boosting regression and extreme random tree regression machine learning are used to build odor concentration prediction models of multiple gas component concentrations and odor concentrations, and the prediction capabilities of different machine learning models for odor concentration are compared to obtain the optimal machine learning model.
[0053] According to a quantitative method for odor concentration in livestock and poultry breeding process provided by the present invention, the target index also includes the number of features, and based on the determination coefficient and the root mean square error, the target odor concentration prediction model is determined from multiple odor concentration prediction models, including: Based on the determination coefficient, root mean square error and number of features, a target odor concentration prediction model is determined from multiple odor concentration prediction models, wherein the target indicators of the target odor concentration prediction model include at least one of the following: the largest determination coefficient, the smallest root mean square error and the least number of features.
[0054] The training, testing and optimization of random forest, gradient boosting regression and extreme random tree regression machine learning models are completed using the Python package Scikit-learn. The steps are as follows: Data preprocessing: Features with variance equal to zero (gas component concentrations) are removed, i.e., features with the same value in all samples are deleted as redundant (cannot serve as effective predictors).
[0055] Machine learning model training and testing: Random forest, gradient boosting regression and extreme random tree regression are used as base models, and the training set and test set are divided into 8:2 or 9:1.
[0056] Machine learning model optimization: Analyze the determination coefficient, root mean square error and number of features of each machine model in predicting odor concentration, and select the optimal machine learning model (i.e., target odor concentration prediction model) that is most effective in predicting odor concentration in livestock and poultry breeding processes.
[0057] In the embodiment of the present invention, the machine model (odor concentration prediction model) with the largest determination coefficient, the smallest root mean square error and the least number of features is used as the target odor concentration prediction model.
[0058] According to a method for quantifying odor concentration in livestock and poultry breeding processes provided by the present invention, odor-causing substances are identified in a measurement sample set through a target odor concentration prediction model to obtain target odor-causing components, including: The odor-causing substances in the measured sample set are identified by using the target odor concentration prediction model to obtain multiple odor-causing components and the odor concentration contribution corresponding to the multiple odor-causing components; From among the multiple odor-causing components, an odor-causing component whose odor concentration contribution is greater than a contribution threshold is determined as a target odor-causing component.
[0059] In an embodiment of the present invention, based on the training results of the target odor concentration prediction model (preferably a machine learning model), according to the calculation of the importance of features (gas components), the features that contribute greatly to the odor concentration are obtained, the key odor-causing components (i.e., the target odor-causing components) are determined, the contribution of the features to the odor concentration is analyzed, and the qualitative characterization of the odor components is achieved.
[0060] It should be noted that the contribution threshold for the odor concentration contribution is pre-set according to the actual application scenario. For example, in an embodiment of the present invention, the contribution threshold can usually be set to 0, that is, if there is an odor-causing component that causes the odor concentration of the predicted gas to increase, then the odor-causing component will be used as the target odor-causing component.
[0061] In the embodiment of the present invention, among the gas components, features (i.e., odor-causing components) that may have a significant impact on the odor concentration are selected through machine learning. These features should be measurable and have a clear correlation with the odor concentration. The feature importance and SHAP analysis of machine learning models (such as random forests, gradient boosting trees, etc.) are used to directly obtain the importance score of each odor-causing component from the model.
[0062] For each key odor-causing component (target odor-causing component), its specific contribution to the odor concentration can be further determined through feature importance and SHAP analysis.
[0063] Through the embodiments of the present invention, compared with the odor activity value method for identifying odor-causing substances, the odor-causing substances obtained by the preferred machine learning model method have wide applicability and can solve the problems of lack of olfactory thresholds for emerging pollutants, and the large number of types of gas pollutants to be detected and the high detection cost.
[0064] According to a method for quantifying odor concentration in livestock and poultry breeding processes provided by the present invention, after identifying odor-causing substances in a measured sample set through a target odor concentration prediction model to obtain multiple odor-causing components and odor concentration contributions (feature importance) corresponding to the multiple odor-causing components, the method further includes: A SHAP analysis is performed based on multiple odor-causing components to obtain a SHAP analysis result, wherein the SHAP analysis result is used to indicate the positive and negative effects of each of the multiple odor-causing components on the predicted odor concentration.
[0065] In the embodiment of the present invention, SHAP (SHapley Additive exPlanations) is used to analyze the positive and negative effects of key odor-causing components (i.e., relative weights) on the predicted odor concentration. SHAP is a game theory-based method used to explain the predictions of any machine learning model. It evaluates the importance of features and their direction of influence (positive or negative) by calculating the contribution (i.e., "shapley value") of each feature (odor-causing component) to the model's predicted results (predicted odor concentration).
[0066] In the embodiment of the present invention, in the SHAP analysis, the absolute value of the SHAP value (also called the Shapley value) reflects the degree of influence of the feature (here, the concentration of odor-causing substances) on the model prediction result (odor concentration), and the positive or negative sign of the SHAP value indicates the direction of this influence.
[0067] For example, if the higher the concentration of a certain odor-causing substance, the higher its corresponding SHAP value (and it is a positive number), then it can be considered that the increase in the concentration of this odor-causing substance has a positive effect on the prediction of the odor concentration, that is, it will tend to increase the predicted odor concentration value.
[0068] On the contrary, if the higher the concentration of a certain odor-causing substance, the lower its corresponding SHAP value (and it is a negative number), then it can be considered that the increase in the concentration of this odor-causing substance has a negative impact on the prediction of odor concentration, that is, it will tend to reduce the predicted odor concentration value.
[0069] In addition, SHAP analysis can also explain the interrelationships between odorants and determine the relative importance of each odorant to the overall prediction.
[0070] According to a method for quantifying odor concentration in livestock and poultry breeding processes provided by the present invention, after performing SHAP analysis based on multiple odor-causing components and obtaining SHAP analysis results, the method further includes: Based on the SHAP analysis results, the relationship between each of the multiple odor-causing components is determined; Based on the interrelationships, the relative importance of each of the plurality of odor-causing components for predicting odor concentration is determined.
[0071] In the embodiment of the present invention, SHAP analysis can not only explain the contribution of a single feature (odor component) in the machine learning model, but also reveal the interaction between the features and evaluate the relative importance of each feature to the model prediction results.
[0072] In the present embodiment, the SHAP value provides the specific contribution of each odor component to the predicted value of odor concentration. A positive value indicates that the component increases the odor concentration, while a negative value indicates that the odor concentration is reduced. These values can be directly used to identify key odor-causing components that have a significant positive contribution to the odor concentration.
[0073] SHAP analysis reveals interactions between features by displaying "force plots" or "bee swarmplots" of features. These plots not only show the contribution of each feature in a single sample, but also the mutual influence between the contributions of different features. For example, certain odor components have an enhanced odor-causing effect when they coexist with other specific components.
[0074] By summarizing the SHAP values of each feature, the global importance score of each feature can be calculated. The global importance score indicates the average contribution of the feature to the model prediction results over the entire dataset. By sorting the global importance scores, the importance of each odor component to the odor concentration prediction can be determined.
[0075] For example, collect a data set containing odor component concentrations and odor concentrations. Use machine learning algorithms (such as random forests, gradient boosting machines, etc.) to train a model that can predict odor concentrations. Apply SHAP analysis to the trained model to obtain the contribution and importance information of each odor component. Based on the SHAP analysis results, identify key odor-causing components, analyze their interactions, and evaluate their relative importance to odor concentrations.
[0076] According to the embodiments of the present invention, SHAP analysis can not only identify key odor-causing components, but also reveal the complex relationships between the components.
[0077] Through the above-mentioned embodiments provided by the present invention, the key odor-causing substances in the livestock and poultry breeding process are identified by using a machine learning model, which reduces the number of odor-causing substances to be measured and reduces the cost of gas component measurement. Further, based on the molecular bond characteristics or water-solubility characteristics of the odor-causing substances identified by machine learning, emission reduction technologies such as photocatalytic oxidation, low-temperature plasma and wet scrubbing are qualitatively selected to achieve the removal of odor-causing substances. By innovatively coupling machine learning and partial least squares, the odor concentration can be predicted by simply measuring the concentration of key odor-causing substances with instruments, and the relationship between the odor concentration and the concentration of odor-causing substances is given, thereby achieving odor concentration quantification and solving the problem of time-consuming and labor-intensive traditional odor concentration measurement.
[0078] The following describes an example of a method for quantifying odor concentration in livestock and poultry breeding processes provided by an embodiment of the present invention in a practical application scenario.
[0079] refer to Figure 2 , Figure 2 It is a schematic diagram of the ability of the extreme random tree regression model provided by the present invention to predict odor concentration.
[0080] We collected and measured 128 odor components from 411 samples of pig manure management in different regions, trained and tested random forest, gradient regression and extreme random tree regression (ETR) machine learning models, and compared the R 2 , RMSE and number of features, and optimally selected extreme random tree regression machine learning models (R 2 =0.81, RMSE=1.05) and identified 20 key odor-causing substances: 1-hexene (X1), 2-butanone (X2), benzene (X3), propionaldehyde (X4), acetone (X5), carbon disulfide (X6), dichloromethane (X7), cyclohexane (X8), hexanal (X9), toluene (X10), valeraldehyde (X11), acetaldehyde (X12), acetylene (X13), ethylene (X14), 2-propanol (X15), methyl mercaptan (X16), methyl sulfide (X17), ethyl sulfide (X18), ammonia (NH3, X19), and hydrogen sulfide (H2S, X20).
[0081] like Figure 2 As shown, Figure 2 The relationship between the actual odor concentration and the predicted value on different training sets and test sets is shown. Each data point represents the odor concentration of a sample, and the data of the training set and test set are represented by red and blue circles. A green line represents the true relationship, while the blue line and red line represent the model's fit to the training set and test set, respectively. Among them, the blue line indicates that the model has an R² of 0.99 in the training set and an R² of 0.81 in the test set; the red line indicates that the model has an R² of 0.99 in the training set and an RMSE of 1.05 in the test set.
[0082] The partial least squares regression method was further coupled to construct the relationship model between the concentration of odor-causing substances and the odor concentration (Y) (R 2 =0.80, RMSE=0.74): Y=e^(1.9172+0.5273ln(X1+1)+0.5952ln(X2+1)-0.3036ln(X3+1)+0.4363ln(X4 +1)-0.17801ln(X5+1)-0.3266ln(X6+1)+0.3099ln(X7+1)-0.1304ln(X8+1)+0.45 56ln(X9+1)+0.0518ln(X10+1)-0.4816ln(X11+1)-0.1998ln(X12+1)+0.4072ln(X 13+1)-0.1835ln(X14+1)-0.1261ln(X15+1)+0.6665ln(X16+1)+0.2858ln(X17+1) +0.2306ln(X18+1) +0.2181ln(X19+1)+0.1554ln(X20+1))-1
[0083] The specific meanings of the parameters can be found in the above text, and the present invention will not be elaborated here.
[0084] refer to Figure 3 , Figure 3 The present invention provides a quantitative model of odor concentration constructed by coupling partial least squares method with 20 odor-causing substances based on extreme random tree regression model and a schematic diagram of the model's prediction ability for odor concentration.
[0085] like Figure 3 As shown, the relationship between odor-causing substances with different numbers and their corresponding measured odor concentrations and predicted odor concentrations is shown.
[0086] The embodiment of the present invention is based on the extreme random tree regression machine learning model and determines 20 key odor-causing substances, and quantifies the odor concentration relationship model using the partial least squares regression method. This model has a good prediction ability for the odor concentration in the livestock and poultry breeding process (R 2 =0.80).
[0087] In addition, the embodiments of the present invention identify odor-causing substances through machine learning methods, which reduces the number of odor components to be monitored and reduces the cost of odor detection. At the same time, it overcomes the defects of the current use of the odor activity value method to identify odor-causing substances and provides a new idea for the identification of odorous substances.
[0088] The odor concentration quantification device in the livestock and poultry breeding process provided by the present invention is described below. The odor concentration quantification device in the livestock and poultry breeding process described below and the odor concentration quantification method in the livestock and poultry breeding process described above can be referred to each other.
[0089] refer to Figure 4 , Figure 4 It is a structural schematic diagram of the odor concentration quantitative device in the livestock and poultry breeding process provided by the present invention, which includes: an acquisition module 401, an input module 402, a determination module 403, an identification module 404 and an output module 405.
[0090] An acquisition module 401 is used to acquire a gas component data set in a livestock and poultry breeding process, wherein the gas component data set includes a training sample set and a measurement sample set, and the training sample set includes at least one gas component and a gas concentration corresponding to the gas component; An input module 402 is used to input the training sample set into a plurality of odor concentration prediction models respectively, and obtain target indicators of the predicted odor concentration output by the plurality of odor concentration prediction models, wherein the target indicators include a determination coefficient and a root mean square error; A determination module 403, for determining a target odor concentration prediction model from a plurality of odor concentration prediction models based on a determination coefficient and a root mean square error; An identification module 404 is used to identify odor-causing substances in the measurement sample set by using a target odor concentration prediction model to obtain a target odor-causing component; The output module 405 is used to determine the odor concentration relationship corresponding to the target odor component based on the target odor component according to the partial least squares regression method, wherein the odor concentration relationship is used to express the correlation between the target odor component and the predicted odor concentration.
[0091] Specifically, the odor concentration quantification device in the livestock and poultry breeding process provided by the present invention can implement all the method steps implemented by the above-mentioned odor concentration quantification method embodiment in the livestock and poultry breeding process, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0092] Figure 5 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 5As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the odor concentration quantification method in the livestock and poultry breeding process, which method includes: obtaining a gas component data set in the livestock and poultry breeding process, wherein the gas component data set includes a training sample set and a measurement sample set, and the training sample set includes at least one gas component and a gas concentration corresponding to the gas component; inputting the training sample set into multiple odor concentration prediction models respectively to obtain target indicators of predicted odor concentration output by multiple odor concentration prediction models, wherein the target indicators include a determination coefficient and a root mean square error; based on the determination coefficient and the root mean square error, determining a target odor concentration prediction model from multiple odor concentration prediction models; identifying odor-causing substances in the measurement sample set through the target odor concentration prediction model to obtain a target odor-causing component; determining an odor concentration relationship corresponding to the target odor-causing component based on the target odor-causing component according to the partial least squares regression method, wherein the odor concentration relationship is used to represent the quantitative concentration of each odor-causing substance in the target odor-causing component.
[0093] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the 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 a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0094] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the odor concentration quantitative method in the livestock and poultry breeding process provided by the above methods, and the method includes: obtaining a gas component data set in the livestock and poultry breeding process, wherein the gas component data set includes a training sample set and a measurement sample set, and the training sample set includes at least one gas component and a gas concentration corresponding to the gas component; inputting the training sample set into multiple odor concentration prediction models respectively to obtain target indicators of predicted odor concentration output by multiple odor concentration prediction models, wherein the target indicators include a determination coefficient and a root mean square error; based on the determination coefficient and the root mean square error, determining a target odor concentration prediction model from multiple odor concentration prediction models; identifying odor-causing substances in the measurement sample set through the target odor concentration prediction model to obtain a target odor-causing component; determining an odor concentration relationship equation corresponding to the target odor-causing component based on the target odor-causing component according to the partial least squares regression method, wherein the odor concentration relationship equation is used to represent the degree of correlation between the target odor-causing component and the predicted odor concentration.
[0095] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the method for quantifying odor concentration in the livestock and poultry breeding process provided by the above-mentioned methods, the method comprising: obtaining a gas component data set in the livestock and poultry breeding process, wherein the gas component data set comprises a training sample set and a measurement sample set, and the training sample set comprises at least one gas component and a gas concentration corresponding to the gas component; inputting the training sample set into a plurality of odor concentration prediction models respectively to obtain target indicators of predicted odor concentration output by the plurality of odor concentration prediction models, wherein the target indicators comprise a determination coefficient and a root mean square error; determining a target odor concentration prediction model from a plurality of odor concentration prediction models based on the determination coefficient and the root mean square error; identifying odor-causing substances in the measurement sample set through the target odor concentration prediction model to obtain a target odor-causing component; determining an odor concentration relationship equation corresponding to the target odor-causing component based on the target odor-causing component according to the partial least squares regression method, wherein the odor concentration relationship equation is used to represent the degree of correlation between the target odor-causing component and the predicted odor concentration.
[0096] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for quantifying odor concentration in livestock and poultry breeding, characterized in that: include: Acquire a gas component data set in a livestock and poultry breeding process, wherein the gas component data set includes a training sample set and a measurement sample set, and the training sample set includes at least one gas component and a gas concentration corresponding to the gas component; Inputting the training sample sets into a plurality of odor concentration prediction models respectively to obtain target indicators of predicted odor concentration output by the plurality of odor concentration prediction models, wherein the target indicators include a determination coefficient and a root mean square error; determining a target odor concentration prediction model from the plurality of odor concentration prediction models based on the determination coefficient and the root mean square error; Identify odor-causing substances in the measured sample set using the target odor concentration prediction model to obtain target odor-causing components; Based on the target odor-causing component, an odor concentration relationship equation corresponding to the target odor-causing component is determined according to the partial least squares regression method, wherein the odor concentration relationship equation is used to represent the degree of correlation between the target odor-causing component and the predicted odor concentration.
2. The method for quantifying odor concentration in livestock and poultry breeding process according to claim 1, characterized in that: The step of inputting the training sample set into a plurality of odor concentration prediction models respectively to obtain target indicators of predicted odor concentration output by the plurality of odor concentration prediction models includes: Performing data preprocessing on the training sample set to obtain a processed training sample set; The processed training sample set is input into a plurality of odor concentration prediction models to obtain target indicators of predicted odor concentration output by the plurality of odor concentration prediction models, wherein the plurality of odor concentration prediction models are based on random forest, gradient boosting regression, and extreme random tree regression, respectively.
3. The method for quantifying odor concentration in livestock and poultry breeding process according to claim 1, characterized in that: The target indicator also includes the number of features, and the determining of a target odor concentration prediction model from the plurality of odor concentration prediction models based on the determination coefficient and the root mean square error includes: Based on the determination coefficient, the root mean square error and the number of features, a target odor concentration prediction model is determined from the multiple odor concentration prediction models, wherein the target indicator of the target odor concentration prediction model includes at least one of the following: the determination coefficient is maximized, the root mean square error is minimized and the number of features is minimized.
4. The method for quantifying odor concentration in livestock and poultry breeding process according to claim 1, characterized in that: The step of identifying odor-causing substances in the measured sample set by using the target odor concentration prediction model to obtain target odor-causing components includes: Identify odor-causing substances in the measured sample set by using the target odor concentration prediction model to obtain multiple odor-causing components and odor concentration contribution degrees corresponding to the multiple odor-causing components; The odor-causing component whose odor concentration contribution is greater than a contribution threshold is determined from the plurality of odor-causing components as a target odor-causing component.
5. The method for quantifying odor concentration in livestock and poultry breeding process according to claim 4, characterized in that: After identifying odor-causing substances on the measurement sample set by using the target odor concentration prediction model to obtain a plurality of odor-causing components and odor concentration contributions corresponding to the plurality of odor-causing components, the method further includes: A SHAP analysis is performed based on the multiple odor-causing components to obtain a SHAP analysis result, wherein the SHAP analysis result is used to indicate the positive and negative effects of each of the multiple odor-causing components on the predicted odor concentration.
6. The method for quantifying odor concentration in livestock and poultry breeding process according to claim 5, characterized in that: After performing SHAP analysis based on the multiple odor-causing components to obtain SHAP analysis results, the method further includes: Based on the SHAP analysis results, determining the relationship between each of the multiple odor-causing components; Based on the correlation, the relative importance of each of the plurality of odor-causing components to the predicted odor concentration is determined.
7. A device for quantitatively measuring odor concentration in livestock and poultry breeding, characterized in that: include: An acquisition module, used to acquire a gas component data set in a livestock and poultry breeding process, wherein the gas component data set includes a training sample set and a measurement sample set, and the training sample set includes at least one gas component and a gas concentration corresponding to the gas component; An input module, used to input the training sample set into a plurality of odor concentration prediction models respectively, to obtain target indicators of predicted odor concentration output by the plurality of odor concentration prediction models, wherein the target indicators include a determination coefficient and a root mean square error; a determination module, configured to determine a target odor concentration prediction model from the plurality of odor concentration prediction models based on the determination coefficient and the root mean square error; An identification module, used to identify odor-causing substances in the measurement sample set by using the target odor concentration prediction model to obtain target odor-causing components; An output module is used to determine an odor concentration relationship equation corresponding to the target odor-causing component based on the target odor-causing component according to the partial least squares regression method, wherein the odor concentration relationship equation is used to represent the degree of correlation between the target odor-causing component and the predicted odor concentration.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for quantifying odor concentration in the livestock and poultry breeding process as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for quantifying odor concentration in livestock and poultry breeding processes as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for quantifying odor concentration in livestock and poultry breeding processes as described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Municipal sewage system odor concentration calculation method based on machine learning
CN121410197A
