A septic tank methane production and emission simulation method, device, equipment and storage medium

By acquiring the fixed structural parameters and time-series dynamic input data of the septic tank, performing data preprocessing, and utilizing the validated dynamic simulation model of methane production and emission, the accuracy problem of dynamic methane simulation in septic tanks was solved, achieving precise simulation and quantitative evaluation of the methane production and emission process in septic tanks.

CN123033593APending Publication Date: 2026-11-03THREE GORGES ENVIRONMENTAL TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611470022.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing methods for simulating methane production and discharge in septic tanks are insufficient to accurately characterize the dynamic process of methane production and discharge within the septic tank. They also fail to adapt to differences in septic tank structure and operating conditions, resulting in inaccurate simulation results.

Method used

By acquiring the fixed structural parameters and time-series dynamic input data of the septic tank, and performing data preprocessing, the validated dynamic simulation model of methane production and emission is used to perform simulation calculations, extracting time-series data on methane generation, dissolved methane concentration, and emission flux, thereby realizing the dynamic simulation of methane in the septic tank.

Benefits of technology

It provides accurate simulation results of methane production and emission characteristics in septic tanks, balancing the reliability of model validation with the completeness of output results, and supports the identification of methane production and emission characteristics in septic tanks and the quantitative assessment of emissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033593A_ABST
    Figure CN123033593A_ABST
Patent Text Reader

Abstract

The present application relates to sewage treatment evaluation technical field, disclose a kind of septic tank methane production and discharge simulation method, device, equipment and storage medium, the method provided by the present application, first obtain septic tank fixed structure parameter and time sequence dynamic input data and carry out pre-processing, multiple-source heterogeneous data is unified as basic dataset, provides complete reliable input condition for subsequent simulation;Further based on the dynamic simulation model after verification is calculated, to simulate septic tank material conversion and gas-liquid mass transfer process, obtain the dynamic change result of each state variable, realize the dynamic characterization and quantitative reproduction of the production and discharge process of each state variable in septic tank;Finally by extracting the time series data of methane generation amount, dissolved methane concentration and diffusion flux, obtain the dynamic simulation result of methane, consider the reliability of model verification and the integrity of output result, provide more accurate simulation result for methane production and discharge feature identification and emission quantification evaluation of septic tank.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment assessment technology, specifically to a method, apparatus, equipment, and storage medium for simulating methane production and discharge in septic tanks. Background Technology

[0002] Septic tanks are widely used pre-treatment units in urban wastewater systems, responsible for the settling of suspended pollutants and the anaerobic decomposition of organic matter in wastewater discharged from residential areas. Under conditions of wastewater retention, sludge accumulation, and long-term anaerobic environment, a series of biochemical reactions occur inside the septic tank, including hydrolysis, acid production, acetic acid production, and methanogenesis, accompanied by dissolved methane generation, gas-liquid mass transfer, and emission into the environment. Accurately characterizing the generation and dynamic changes of methane within the septic tank is a crucial step in evaluating the low-carbon operation and emission reduction effects of wastewater systems.

[0003] In related technologies, methane production and emission simulation methods are disclosed that rapidly estimate methane production or emission by collecting the influent organic matter concentration and wastewater volume of a target septic tank and using empirical emission factors. However, due to significant differences in the structure and operating conditions of septic tanks in real-world scenarios, and the influence of variations in flow rate, water quality, retention time, and environmental conditions on the methane generation process, these methods are insufficient to accurately characterize the dynamic process of methane production within septic tanks. Summary of the Invention

[0004] This invention provides a method, apparatus, equipment, and storage medium for simulating methane production and discharge in septic tanks, in order to solve the problem that methane production and discharge simulation methods in related technologies are difficult to accurately characterize the dynamic process of methane in septic tanks.

[0005] In a first aspect, the present invention provides a method for simulating methane production and discharge in a septic tank, the method comprising: Based on the acquired fixed structural parameters of the target septic tank and the time-series dynamic input data, the data is processed using data preprocessing methods to obtain the basic dataset of the target septic tank; the fixed structural parameters include the septic tank volume and headspace volume; the time-series dynamic input data includes influent and effluent flow rate time series, influent and effluent chemical oxygen demand concentration time series, influent and effluent sulfate concentration time series, influent and effluent dissolved methane and gaseous methane time series, and temperature data. Based on the basic dataset of the target septic tank, the dynamic changes of each state variable in the target septic tank are obtained by using the validated dynamic simulation model of methane production and discharge. Based on the dynamic changes of various state variables within the target septic tank, time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux are extracted using the methane production and emission output method, resulting in dynamic methane simulation results for the target septic tank.

[0006] By adopting the above implementation method, firstly, the fixed structural parameters and time-series dynamic input data of the septic tank are acquired and preprocessed to unify the multi-source heterogeneous data into a basic dataset, providing complete and reliable input conditions for subsequent simulations. Then, calculations are performed based on the validated dynamic simulation model to simulate the material transformation and gas-liquid mass transfer processes within the septic tank, obtaining the dynamic changes of each state variable, and realizing the dynamic characterization and quantitative reproduction of the production and discharge processes of each state variable in the septic tank. Finally, by extracting the time-series data of methane generation, dissolved methane concentration, and emission flux, dynamic simulation results of methane are obtained, balancing the reliability of model validation with the completeness of output results, providing relatively accurate simulation results for the identification of methane production and discharge characteristics and the quantitative assessment of emissions from septic tanks.

[0007] In one optional implementation, the step of extracting time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux based on the dynamic changes of various state variables within the target septic tank using a methane production and emission output method to obtain dynamic methane simulation results for the target septic tank includes: Based on the dynamic changes of various state variables in the target septic tank, the generation rate and cumulative generation of dissolved methane are obtained using the methane generation extraction method, thus obtaining time-series data of methane generation. Based on the dynamic changes of the liquid phase state variables in the target septic tank, the liquid phase methane concentration values ​​at each simulation time were obtained using the liquid phase concentration extraction method, thus obtaining the time series data of dissolved methane concentration. Based on the dynamic changes of the headspace state variables in the target septic tank, and combined with the methane concentration difference inside and outside the inspection well, the methane emission flux calculation method is used to calculate the methane emission rate to the external environment at each simulation time, and the time series data of gaseous methane emission flux are obtained. By combining the time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux, a time-series integration method is used to align the time and unify the format, resulting in a dynamic simulation of methane in the target septic tank.

[0008] By employing the above implementation method, the methane generation rate and cumulative generation amount are extracted based on the dynamic changes of each state variable, obtaining time-series data on methane generation and quantifying the intensity and accumulation characteristics of the methane production process in the septic tank. Then, the dissolved methane concentration at each moment is extracted from the liquid phase state variables to obtain time-series data on dissolved methane concentration, reflecting the dissolution and accumulation patterns of methane in the liquid phase. Next, the emission rate is calculated by combining the headspace state variables and the methane concentration difference inside and outside the inspection well, obtaining time-series data on the gaseous methane emission flux, characterizing the dynamic characteristics of methane release from the liquid phase into the atmospheric environment. Finally, the three data are time-aligned and format-unified, integrating them into a dynamic methane simulation result for the target septic tank. This achieves the coordinated extraction and system integration of output parameters for the entire process of methane production, dissolution, and emission, providing complete data support for quantitative assessment of methane emissions and the formulation of emission reduction strategies.

[0009] In one optional implementation, the step of obtaining the generation rate and cumulative generation amount of dissolved methane using a methane generation extraction method based on the dynamic changes of various state variables within the target septic tank, to obtain time-series data on methane generation, includes: Based on the dynamic changes of various state variables in the target septic tank, the time series data of dissolved methane concentration and the concentration of relevant components involved in the methanogenic reaction are extracted using the time series feature extraction method to obtain the methane generation input parameter sequence; Based on the methane generation input parameter sequence, the dissolved methane generation rate at each simulation time is calculated using the methane generation extraction method to obtain time-series data of the methane generation rate. Based on the time-series data of the methane generation rate, the cumulative methane generation at each simulation time is calculated using the time integration method, and the output is the time-series data of methane generation.

[0010] By employing the above-described implementation method, the concentration of dissolved methane and the concentration of relevant components involved in the methanogenesis reaction are extracted from the dynamic changes of various state variables within the septic tank, forming a methane generation input parameter sequence to provide necessary component data for generation rate calculation. Then, based on the methane generation input parameter sequence, the dissolved methane generation rate at each simulation time is calculated, obtaining time-series data of the methane generation rate and quantifying the instantaneous intensity of the methane generation process. Finally, the methane generation rate is integrated over time to obtain the cumulative methane generation at each simulation time, outputting time-series data of methane generation. By simultaneously extracting the generation rate and cumulative amount, both the instantaneous dynamic characteristics of the methane generation process and the long-term cumulative trend of methane generation are reflected, providing complete generation-end input data for subsequent analysis of dissolved concentration and emission flux.

[0011] In one optional implementation, based on the dynamic changes in the headspace state variables within the target septic tank, and combined with the methane concentration difference inside and outside the inspection well, the methane emission flux calculation method is used to calculate the methane emission rate to the external environment at each simulation time, obtaining time-series data of gaseous methane emission flux, including: Based on the dynamic changes of the headspace state variables in the target septic tank, the concentration of gaseous methane in the headspace at each time moment is extracted using the parameter extraction method to obtain the time series data of headspace gaseous methane concentration. Based on the time series data of headspace methane concentration, combined with the atmospheric methane concentration outside the inspection well, the methane concentration difference inside and outside the inspection well at each moment is simulated using the concentration difference calculation method to obtain the time series data of methane concentration difference. Based on the methane concentration difference time series data, combined with the diffusion area, diffusion distance and gas diffusion coefficient of the target septic tank cover, the methane emission flux at each time moment is calculated using Fick's first law, and the methane emission rate time series data at each time moment is obtained. By combining the time-series data of methane emission rates at various times, the cumulative methane emission amount at each time is simulated using the time integration method, and the time-series data of gaseous methane emission flux is output.

[0012] By adopting the above implementation method, the gaseous methane concentration at each moment is first extracted from the dynamic results of the headspace state variables to form headspace concentration time series data, providing a headspace-side concentration boundary for subsequent methane emission calculations. Then, combined with the atmospheric methane concentration outside the inspection well, the concentration difference between inside and outside at each moment is calculated to obtain methane concentration difference time series data, thereby reflecting the magnitude of the driving force of the methane emission process. Then, based on the concentration difference, diffusion area, diffusion distance, and gas diffusion coefficient, the emission rate at each moment is calculated using Fick's first law, converting the concentration gradient into a quantifiable emission flux. Finally, the emission rate is integrated over time to obtain the cumulative emission amount at each moment, outputting gaseous methane emission flux time series data. This achieves complete quantification from methane concentration difference to emission rate to cumulative emission amount, providing a reliable calculation basis for intensity assessment and total amount accounting of methane emissions from septic tanks to the atmosphere.

[0013] In one optional implementation, the simulation, based on the target septic tank's basic dataset, utilizes a validated dynamic simulation model of methane production and discharge to obtain the dynamic changes of various state variables within the target septic tank, including: Based on the chemical oxygen demand (COD) concentration data in the basic dataset of the target septic tank, the concentrations of each organic component and inert substance are separated using a component splitting method to obtain the model input component concentration sequence; the organic components include carbohydrates, proteins, lipids, acetic acid, and propionic acid; Based on the input component concentration sequence of the model, combined with the flow data, sulfate concentration data and temperature data in the basic dataset, the anaerobic digestion reaction sub-model in the validated methane production and discharge dynamic simulation model is used to simulate the dynamic changes of the concentrations of each organic component, each microorganism and dissolved methane in the septic tank. Based on the dynamic changes in dissolved methane concentration, the methane mass transfer and efflux sub-model in the validated methane production and emission dynamic simulation model were used to simulate the dynamic changes in gaseous methane concentration and methane efflux flux in the septic tank, and the results were obtained. Based on the combined results of the dynamic changes in the concentrations of each organic component, each microorganism, dissolved methane concentration, gaseous methane concentration, and methane emission flux, the output is the dynamic change results of each state variable within the target septic tank.

[0014] By employing the above-described implementation method, the chemical oxygen demand (COD) concentration data is broken down into organic components such as carbohydrates, proteins, lipids, acetic acid, and propionic acid, as well as inert substances. This provides the anaerobic digestion model with input materials that more closely resemble the actual composition, overcoming the limitation that a single indicator cannot distinguish substances with different degradation characteristics. Subsequently, based on the input component concentration sequence, combined with flow rate data, sulfate concentration data, and temperature data, an anaerobic digestion reaction sub-model is used to simulate the biochemical reaction processes of hydrolysis and acidification of each organic component, acid and acetic acid production, and methanogenesis. The dynamic changes in the concentrations of each organic component, microorganisms, and dissolved methane are tracked, achieving in-septic tank regeneration. The simulation dynamically quantifies the multi-step biochemical transformation process. Driven by dissolved methane concentration, it uses mass transfer and exhalation models to simulate the entire process of methane migration from the liquid phase to the headspace gas phase and its release into the external environment, achieving coupled simulation of the two key stages of methane generation and exhalation. Finally, it integrates the dynamic results of state variables from liquid-phase biochemistry, gas-phase mass transfer, and exhalation, outputting a complete set of state variables. This provides a comprehensive data foundation for the subsequent extraction of methane generation, dissolved concentration, and exhalation flux, enabling multi-stage, multi-state collaborative simulation of the entire process from organic matter input to methane production and emission, significantly improving the internal consistency and comprehensiveness of the simulation results.

[0015] In one optional implementation, the verification of the methane production and emission dynamic simulation model includes: Based on the acquired time-series dynamic input data, the data is divided using a data partitioning method to obtain a calibration dataset and a validation dataset. Based on the calibration dataset, the parameters of the methane production and emission dynamic simulation model are calibrated using the model parameter determination method to obtain candidate parameter combinations; Based on the validation dataset, a dynamic simulation model of methane production and emissions is run using candidate parameter combinations. The dynamic changes of each state variable output by the model are compared with the measured values ​​in the validation dataset to obtain the validation error. When the verification error is less than a preset error threshold, the candidate parameter combination is confirmed as a verified parameter combination, and the dynamic simulation model of methane production and emission of the verified parameter combination is output as the verified dynamic simulation model of methane production and emission.

[0016] By adopting the above implementation method, the time-series dynamic input data is first divided into calibration dataset and validation dataset, so that the determination and validation of model parameters are based on independent data samples, avoiding overfitting of simulation results caused by using the same set of data for both parameter tuning and validation, and ensuring the objectivity of the validation conclusions. Then, based on the calibration dataset, parameter calibration is performed to obtain candidate parameter combinations, so that the model parameters can be adjusted according to the actual operating conditions of the target septic tank, avoiding simulation deviations caused by using empirical parameters. The model is run using an independent validation dataset, and the output is compared with the measured values ​​to obtain the validation error. This allows for independent testing of the model's extrapolation prediction ability on data not involved in parameter tuning, thereby objectively evaluating the model's applicability under different input conditions. When the validation error meets a preset threshold, the candidate parameter combination is confirmed as the validated parameters, thus establishing a quantitatively validated modeling basis for subsequent simulation calculations and effectively ensuring the reliability of methane production and emission simulation results.

[0017] In one optional implementation, the step of calibrating the parameters of the methane production and emission dynamic simulation model based on the calibration dataset using a model parameter determination method to obtain candidate parameter combinations includes: Based on the prior value range of each model parameter, multiple parameter combinations are obtained using the Latin hypercube sampling method; For each set of parameters corresponding to the dynamic simulation model of methane production and emission, the simulation results are compared with the measured values ​​in the calibration dataset using the error evaluation method, and the results are divided into acceptable and unacceptable results, and an acceptable parameter set is obtained. Based on the set of acceptable parameters, parameters below the sensitivity threshold are fixed to constant values ​​using parameter sensitivity analysis, while parameters above or equal to the sensitivity threshold are resampled and calibrated to obtain the final candidate parameter combination.

[0018] By adopting the above implementation method, firstly, Latin hypercube sampling is used to generate multiple parameter combinations within the prior range of each model parameter, making the parameter space coverage more uniform and the sampling efficiency higher, avoiding excessive computation or insufficient representativeness caused by random sampling. Then, the parameter combinations are distinguished into acceptable and unacceptable results by error evaluation method, so that subsequent calibration work is only performed on the set of acceptable parameter groups that meet the basic accuracy requirements, effectively reducing the parameter optimization space. Furthermore, parameter sensitivity analysis is used to identify and fix low-sensitivity parameters, while high-sensitivity parameters are resampled and finely calibrated, effectively reducing the number of model parameters during the calibration process, reducing the impact of interaction interference between different parameters on the calibration results, and improving parameter convergence efficiency and the reliability of calibration results.

[0019] Secondly, the present invention provides a septic tank methane production and discharge simulation device, the device comprising: The data preprocessing module is used to process the acquired fixed structural parameters and time-series dynamic input data of the target septic tank using data preprocessing methods to obtain the basic dataset of the target septic tank. The fixed structural parameters include the septic tank volume and headspace volume. The time-series dynamic input data includes influent and effluent flow rate time series, influent and effluent chemical oxygen demand concentration time series, influent and effluent sulfate concentration time series, influent and effluent dissolved methane and gaseous methane time series, and temperature data. The dynamic simulation module is used to perform simulation calculations based on the basic dataset of the target septic tank and the validated dynamic simulation model of methane production and discharge, so as to obtain the dynamic change results of each state variable in the target septic tank. The results output module is used to extract time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux based on the dynamic changes of various state variables within the target septic tank using the methane generation and emission output method, thereby obtaining the dynamic simulation results of methane in the target septic tank.

[0020] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the septic tank methane production and discharge simulation method of the first aspect or any corresponding embodiment described above.

[0021] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the septic tank methane production and discharge simulation method of the first aspect or any corresponding embodiment described above. Attached Figure Description

[0022] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the first process of a septic tank methane production and discharge simulation method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the second process of the septic tank methane production and discharge simulation method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the third process of the septic tank methane production and discharge simulation method according to an embodiment of the present invention; Figure 4 This is a structural block diagram of a septic tank methane production and discharge simulation device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

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

[0025] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0026] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0027] The methane production and emission simulation method disclosed in the related technology collects the influent organic matter concentration and sewage volume of the target septic tank, and uses empirical emission factors to quickly estimate the methane production or emission of the septic tank.

[0028] However, empirical emission factors cannot reveal the dynamic impact of changes in flow rate, water quality, residence time, and environmental conditions on methane generation. Septic tanks in different regions vary significantly in terms of system location, structural form, and operating conditions. Furthermore, estimating methane concentration or emission intensity based on actual data from specific septic tanks monitored on-site is greatly affected by sampling conditions, monitoring cycle, and environmental disturbances. The final results are usually only applicable to limited scenarios and are difficult to accurately characterize the dynamic process of methane in septic tanks.

[0029] To overcome the deficiencies in the methane production and emission simulation methods disclosed in the aforementioned related technologies, this application provides a methane production and emission simulation method. First, it acquires and preprocesses the fixed structural parameters and time-series dynamic input data of the septic tank, unifying the multi-source heterogeneous data into a unified basic dataset, providing complete and reliable input conditions for subsequent simulations. Then, it performs calculations based on the validated dynamic simulation model to simulate the material transformation and gas-liquid mass transfer processes within the septic tank, obtaining the dynamic changes of each state variable, thus achieving dynamic characterization and quantitative reproduction of the production and emission processes of each state variable in the septic tank. Finally, by extracting time-series data on methane generation, dissolved methane concentration, and emission flux, it obtains the dynamic simulation results of methane, balancing the reliability of model validation with the completeness of the output results, providing relatively accurate simulation results for the identification of methane production and emission characteristics and the quantitative assessment of emissions from septic tanks.

[0030] According to an embodiment of the present invention, a method for simulating methane production and discharge in a septic tank is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0031] This embodiment provides a method for simulating methane production and discharge in septic tanks, which can be used in wastewater treatment monitoring servers. Figure 1 This is a flowchart of a septic tank methane production and discharge simulation method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: S101, based on the acquired fixed structural parameters of the target septic tank and the time-series dynamic input data, the data is processed using a data preprocessing method to obtain the basic dataset of the target septic tank; the fixed structural parameters include the septic tank volume and headspace volume; the time-series dynamic input data includes the influent and effluent flow rate time series, the influent and effluent chemical oxygen demand concentration time series, the influent and effluent sulfate concentration time series, the influent and effluent dissolved methane and gaseous methane time series, and temperature data.

[0032] Fixed structural parameters refer to the static geometric characteristics of a septic tank, including the septic tank volume and headspace volume.

[0033] Septic tank volume refers to the effective volume of the septic tank, that is, the size of the space where sewage stays within the septic tank. It corresponds to the hydraulic retention time, reactant concentration, and total microbial count, and is a core spatial parameter that determines the total amount of organic matter degradation and methane generation. This parameter can be obtained through on-site investigation, design drawings, or existing operation and maintenance records. When there is a lack of clearly recorded septic tank volume data, it can be estimated by combining septic tank cleaning records and operation and maintenance information.

[0034] Headspace volume refers to the size of the gas phase space above the liquid surface in a septic tank. It represents the accumulation of methane in the headspace after it enters the headspace from the liquid phase via gas-liquid mass transfer. The headspace volume determines the rate of change of gaseous methane concentration and the escape pressure. It is a key parameter in the dynamic simulation of gaseous methane and can directly affect the simulation results of gaseous methane concentration and escape flux.

[0035] Time-series dynamic input data refers to the septic tank's operating status data that changes over time. It is used to reflect the boundary conditions and external environment changes of the target septic tank and serves as the input variable driving the model to perform dynamic simulation.

[0036] The influent and effluent flow time series is a data sequence showing the change in sewage flow rate entering and exiting the septic tank over time. It determines the hydraulic retention time and dilution degree of pollutants in the septic tank and is a key driving variable affecting the organic matter degradation efficiency and total methane generation. This data is obtained by installing flow meters in the inspection wells before and after the septic tank. If the flow rate is too low to read, it can be calculated by recording water meter data from residential areas and combining it with the service population and sewage discharge coefficient.

[0037] The time series of chemical oxygen demand (COD) concentrations in influent and effluent is a data sequence of chemical indicators of organic matter content in influent and effluent changing over time. It is a comprehensive measure of the total amount of organic matter and is used to represent the material basis for the anaerobic degradation of organic matter and the generation of methane. The higher the COD concentration in influent and effluent, the greater the theoretical methane production potential.

[0038] The influent and effluent sulfate concentration time series is a data sequence showing the change of sulfate content in the influent and effluent over time. In anaerobic environments, sulfate-reducing bacteria compete with methanogenic bacteria for substrates such as acetic acid and propionic acid. Higher sulfate concentrations result in greater substrate consumption and a corresponding decrease in methane production. Therefore, the influent and effluent sulfate concentrations serve as input data to characterize the competitive inhibitory effect of sulfate reduction on methane production.

[0039] The time series of dissolved methane in influent and effluent is a data sequence representing the change of methane concentration in the liquid phase of the septic tank over time. It is used to reflect the background value of dissolved methane when entering the septic tank and the amount of methane carried out with the water flow when exiting the septic tank, which facilitates subsequent model verification and dynamic simulation of dissolved methane.

[0040] The influent and effluent gaseous methane time series is a data sequence of the change of gaseous methane concentration in the air above the septic tank and inspection well over time. It is used to reflect the actual concentration level of methane accumulation and emission in the gas phase space inside the septic tank and is a key measured comparison data for model validation and emission intensity assessment.

[0041] Temperature data is a data sequence of changes in the internal temperature of a septic tank or the environment over time. It directly affects the activity of microorganisms and the rate of biochemical reactions in the septic tank. Generally, within a suitable temperature range, the higher the temperature, the faster the anaerobic digestion reaction rate and the higher the methane production rate. It is an environmental variable used to characterize the reaction rate of methane production.

[0042] The data preprocessing method is an operational process for uniformly organizing and standardizing the acquired fixed structural parameters of septic tanks and time-series dynamic input data. It includes time alignment, unit unification, missing value supplementation, and outlier removal. This is used to eliminate problems such as time inconsistency, unit inconsistency, missing data, and outlier interference between multi-source data, ensuring the quality of input data and the stability of model calculations, and providing a standardized and reliable basic dataset for subsequent simulation calculations.

[0043] The basic dataset refers to the collection of data formed after the various types of data and parameters are uniformly organized and preprocessed. It is used as the input parameters for subsequent model simulation calculations and directly affects the running stability and output accuracy of the simulation model.

[0044] By using fixed structural parameters to ensure that the spatial boundary of the model is consistent with the actual target septic tank, and by using continuously monitored time-series dynamic input data, the model can capture the dynamic changes of boundary conditions such as influent and effluent flow rates, influent and effluent chemical oxygen demand concentrations, sulfate concentrations, and temperatures, thereby reflecting the time evolution characteristics of the methane production and discharge process in the septic tank. Data preprocessing methods are used to eliminate inconsistencies between multi-source data, ensuring the quality of input data and the stability of model calculations, thus laying a data foundation for the accuracy of subsequent model simulations.

[0045] S102, based on the basic dataset of the target septic tank, uses the validated dynamic simulation model of methane production and discharge to perform simulation calculations and obtain the dynamic change results of each state variable in the target septic tank.

[0046] The validated dynamic simulation model of methane production and emissions refers to the coupled model that has been calibrated by parameters and validated by independent data. It includes the anaerobic digestion reaction sub-model and the methane mass transfer and emission sub-model. It can be implemented by simplifying and reconstructing the anaerobic digestion mathematical model (ADM1, an anaerobic digestion mathematical simulation model). While retaining the main methane production pathways and rate control processes, it reduces the complexity of the model structure and the scale of parameters.

[0047] The anaerobic digestion reaction sub-model is used to simulate the dynamic changes in the concentration of various organic components in a septic tank. It combines the multi-stage degradation process of complex organic matter from macromolecules to micromolecules and merges intermediate reaction processes that have little impact on methane production. While retaining the main methanogenic pathways, it supplements sulfate reduction-related reaction processes, ultimately forming a simplified model that includes seven main biochemical reaction processes: carbohydrate decomposition, protein decomposition, lipid decomposition, propionic acid decomposition, acetic acid-to-methane production, acetic acid-to-hydrogen sulfide production, and propionic acid-to-hydrogen sulfide production, as well as four microbial decay processes: acid-producing microorganism decay, acetic acid-nutritional methanogen decay, acetic acid-nutritional sulfate-reducing bacteria decay, and propionic acid-nutritional sulfate-reducing bacteria decay.

[0048] The methane mass transfer and escape sub-model is used to simulate the liquid-phase mass transfer, headspace accumulation, and escape of methane to the external environment based on the dissolved methane concentration. The methane escape flux is calculated using a concentration-difference-driven diffusion model, taking into account the methane concentration difference in the headspace of septic tanks and inspection wells, and Fick's first law is applied to calculate the methane diffusion flux to the external environment.

[0049] State variables refer to various variables that describe the state of the septic tank system, including the concentrations of various organic components (carbohydrates, proteins, lipids, acetic acid, propionic acid, etc.), the concentrations of various microorganisms (acid-producing microorganisms, acetic acid-nutritional methanogens, acetic acid-nutritional sulfate-reducing bacteria, propionic acid-nutritional sulfate-reducing bacteria, etc.), dissolved methane concentration, gaseous methane concentration, and methane emission flux, which change dynamically over time during the simulation process. They are used to collectively reflect the complete state of the methane production and emission process in the septic tank.

[0050] The validated dynamic simulation model of methane production and emissions dynamically reflects the impact of changes in boundary conditions such as influent and effluent flow rates, influent and effluent chemical oxygen demand concentrations, sulfate concentrations, and temperature on methane production and emissions. The simplified and reconstructed model significantly reduces the number of parameters and monitoring requirements while maintaining the accuracy of key mechanisms, making it more suitable for engineering scenarios such as septic tanks where monitoring data is limited. At the same time, the simulation process fully considers the competitive role of sulfate reduction in the methanogenesis process, the combined inhibitory effect of pH value, inorganic nitrogen, and free ammonia on microbial activity, and the contribution of physical sedimentation removal in septic tanks. This model can more realistically reflect the actual operating mechanism of septic tanks and provide a reliable guarantee for the accuracy of subsequent dynamic methane simulation results.

[0051] S103. Based on the dynamic changes of various state variables in the target septic tank, the time series data of methane generation, dissolved methane concentration and gaseous methane emission flux are extracted using the methane production and emission output method to obtain the dynamic simulation results of methane in the target septic tank.

[0052] The methane production and emission output method is a set of data processing methods that extract indicators directly related to methane production and emission from the various state variables output by the model. Specifically, it includes: a methane production extraction method for extracting the generation rate and cumulative generation of dissolved methane; a dissolved methane concentration extraction method for extracting the dissolved methane concentration values ​​at each simulation time from the liquid phase state variables; and a method for calculating the gaseous methane emission flux based on the headspace methane concentration and the concentration difference inside and outside the inspection well using Fick's first law.

[0053] The septic tank methane production and emission simulation method provided in this embodiment first acquires and preprocesses the fixed structural parameters and time-series dynamic input data of the septic tank, unifying the multi-source heterogeneous data into a unified basic dataset, providing complete and reliable input conditions for subsequent simulations. Then, calculations are performed based on the validated dynamic simulation model to simulate the material transformation and gas-liquid mass transfer processes within the septic tank, obtaining the dynamic changes of each state variable, thus achieving dynamic characterization and quantitative reproduction of the production and emission processes of each state variable in the septic tank. Finally, by extracting time-series data on methane generation, dissolved methane concentration, and emission flux, dynamic simulation results of methane are obtained, balancing the reliability of model validation with the completeness of output results, providing relatively accurate simulation results for the identification of methane production and emission characteristics and quantitative assessment of emissions from septic tanks.

[0054] This embodiment provides a method for simulating methane production and discharge in septic tanks, which can be used in wastewater treatment monitoring servers. Figure 2 This is a flowchart of a septic tank methane production and discharge simulation method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: S201, based on the acquired fixed structural parameters and time-series dynamic input data of the target septic tank, data preprocessing methods are used to obtain the basic dataset of the target septic tank. The fixed structural parameters include the septic tank volume and headspace volume. The time-series dynamic input data includes influent and effluent flow rate time series, influent and effluent chemical oxygen demand (COD) concentration time series, influent and effluent sulfate concentration time series, influent and effluent dissolved methane and gaseous methane time series, and temperature data. For details, please refer to [link to relevant documentation]. Figure 1 S101 of the illustrated embodiment will not be described again here.

[0055] S202, based on the basic dataset of the target septic tank, uses the validated dynamic simulation model of methane production and discharge to perform simulation calculations and obtain the dynamic change results of each state variable in the target septic tank.

[0056] For example, the validation of the dynamic simulation model of methane production and emissions in S202 includes: a1, based on the acquired time-series dynamic input data, is divided using a data partitioning method to obtain a calibration dataset and a validation dataset; a2. Based on the calibration dataset, the parameters of the dynamic simulation model of methane production and emissions are calibrated using the model parameter determination method to obtain candidate parameter combinations; a3. Based on the validation dataset, the dynamic simulation model of methane production and emission is run using candidate parameter combinations. The dynamic changes of each state variable output by the model are compared with the measured values ​​in the validation dataset to obtain the validation error. a4. When the verification error is less than the preset error threshold, the candidate parameter combination is confirmed as the verified parameter combination, and the dynamic simulation model of methane production and emission of the verified parameter combination is output as the verified dynamic simulation model of methane production and emission.

[0057] For example, the above a2 satisfies: Based on the prior value range of each model parameter, multiple parameter combinations are obtained using the Latin hypercube sampling method; For each set of parameters corresponding to the dynamic simulation model of methane production and emission, the simulation results are compared with the measured values ​​in the calibration dataset using the error evaluation method, and the results are divided into acceptable and unacceptable results, and the set of acceptable parameter groups is obtained. Based on the set of acceptable parameters, parameter sensitivity analysis is used to fix parameters below the sensitivity threshold to constant values, while parameters above or equal to the sensitivity threshold are resampled and calibrated to obtain the final candidate parameter combination.

[0058] By utilizing Latin hypercube sampling to generate multiple parameter combinations within the prior range of each model parameter, the parameter space coverage becomes more uniform and the sampling efficiency is higher, avoiding excessive computation or insufficient representativeness caused by random sampling. Then, an error evaluation method is used to distinguish between acceptable and unacceptable parameter combinations, ensuring that subsequent calibration work is performed only on the set of acceptable parameter groups that meet basic accuracy requirements, effectively narrowing the parameter optimization space. Furthermore, parameter sensitivity analysis is used to identify and fix low-sensitivity parameters, while high-sensitivity parameters are resampled and finely calibrated. This effectively reduces the number of model parameters during calibration, minimizes the impact of interaction interference between different parameters on the calibration results, and improves parameter convergence efficiency and the reliability of the calibration results.

[0059] Specifically, the aforementioned dynamic simulation model of methane production and emission simplifies and reconstructs the original anaerobic digestion reaction while retaining the main mechanism of methane generation in septic tanks. This includes merging the multi-stage degradation process of complex organic matter from macromolecules to micromolecules, and combining intermediate reaction processes that have a relatively small impact on methane generation in septic tanks but significantly increase parameter scale. At the same time, it retains key reaction pathways and rate-controlling reaction processes directly related to methane generation in septic tanks, thereby reducing the model's structural complexity and improving its applicability in septic tank scenarios.

[0060] Since the initial chemical kinetic equations and stoichiometric coefficients in the anaerobic digestion mathematical model are based on chemical oxygen demand (COD), in order to simplify and merge the model and maintain the conservation of mass and elements, the stoichiometric coefficients based on COD are first adjusted to those based on moles, satisfying the following:

[0061] in, A coefficient representing a component in moles; This represents the chemical oxygen demand equivalent per mole of the reference material used in the reaction process. This represents the stoichiometric coefficient of the corresponding reference material converted by chemical oxygen demand; This represents the chemical oxygen demand equivalent per mole of the corresponding component. This represents the stoichiometric coefficient of the corresponding component, expressed as chemical oxygen demand.

[0062] The merging of the reaction processes in the anaerobic digestion mathematical model can be implemented as follows: by utilizing the principle that the intermediate product of the reaction is both the product of the previous reaction and the reactant of the next reaction, the two-step reaction is merged into a one-step reaction, and the reaction rate is expressed by the reaction rate of the rate-controlling reaction.

[0063] Meanwhile, since the electrons from sulfates and other substances in wastewater compete with those for methane production, while retaining the main methane production pathway, reaction processes related to sulfate reduction, such as acetic acid to hydrogen sulfide and propionic acid to hydrogen sulfide, are further supplemented. The decay process of the corresponding functional bacterial communities is also simulated. The reaction rate of the hydrogen sulfide production process is simulated according to the Monod equation, satisfying the following:

[0064] in, This refers to a specific substrate in a septic tank. Indicates the corresponding number Maximum absorption ratio of the substrate; Indicates the corresponding number The concentration of the substrate; Indicates the corresponding number The half-saturation constant of the substrate; Indicates the corresponding number The concentration of bacteria that act as substrates.

[0065] The degradation process of sulfate-reducing bacteria can be described using first-order reaction kinetics, satisfying the following:

[0066] in, Indicates the corresponding number The decay rate of substrate-like bacteria; Indicates the corresponding number The concentration of bacteria that act as substrates.

[0067] By merging the decomposition, hydrolysis, acidification, and all acetylation processes except propionic acid to acetic acid and the hydrogen to methane process of recalcitrant organic compounds, and merging the propionic acid to hydrogen to acetic acid process with the hydrogen to methane process, while retaining the two key reactions of acetic acid to methane and hydrogen sulfide, and propionic acid to hydrogen sulfide, the combined chemical reaction equations are shown in Table 1 below.

[0068] Table 1 Summary of combined chemical reaction equations in the anaerobic digestion sub-models

[0069] The above mole-based chemical equation is then transformed into a mass-based expression, satisfying the following:

[0070] in, A coefficient representing a component by mass; The stoichiometric coefficients of the corresponding components in the septic tank are represented based on moles. Indicates the molar mass of the corresponding component in the septic tank; This represents the stoichiometric coefficient of the reference substance in the septic tank based on moles; This indicates the molar mass of the reference material in the septic tank.

[0071] The anaerobic digestion reaction sub-model specifically includes: a slow degradation product decomposition process, a methanogenesis process, and a sulfate reduction process. The slow degradation product decomposition process represents the direct breakdown of carbohydrates, proteins, and lipids into propionic acid, acetic acid, and methane by microorganisms. The methanogenesis process includes propionic acid to acetic acid and methanogenesis, as well as acetic acid to methanogenesis, where propionic acid to acetic acid and methanogenesis are combined with hydrogen-based methanogenesis during propionic acid decomposition. Finally, the sulfate reduction process simulates the competitive relationship between sulfate-reducing bacteria and methanogens by utilizing propionic acid and acetic acid to produce hydrogen sulfide.

[0072] In addition, the anaerobic digestion reaction sub-model also sets up the decay process of the main microorganisms in anaerobic digestion, namely the decay of acid-producing microorganisms, the decay of acetate-nutritive methanogens, the decay of acetate-nutritive sulfate-reducing bacteria, and the decay of propionic acid-nutritive sulfate-reducing bacteria.

[0073] By solving for the dissociation equilibrium concentrations of weak acids and weak bases, the effect of pH changes caused by hydrogen sulfide dissociation during chemical reactions on the model is simulated, satisfying the following:

[0074]

[0075] in, Indicates a weak acid; This indicates the conjugate base formed by dissociation; This indicates the hydrogen ions generated by dissociation; Indicates a weak base; This indicates the conjugate acid formed by dissociation; This indicates the hydroxide ions generated during dissociation.

[0076] The pH value was directly calculated from the hydrogen ion concentration, and the expression for the inhibitory effect of pH was derived from the hydrogen ion concentration. Then, the expressions for the inhibitory effects of inorganic nitrogen and free ammonia were derived using a non-competitive inhibition method. Finally, the various inhibitory effects were combined to obtain the following:

[0077]

[0078] in, This indicates the total inhibitory effect on the acetic acid reaction process; This indicates the inhibitory effect of pH on microbial activity during the acetic acid reaction process; This indicates the inhibitory effect of inorganic nitrogen; This indicates the inhibitory effect of free ammonia; This indicates the total inhibitory effect on the propionic acid reaction process; This indicates the inhibitory effect of pH on microbial activity during the propionic acid reaction.

[0079] Therefore, by breaking down the chemical oxygen demand (COD) in the original anaerobic digestion mathematical model into the input and inert substances required by the model according to a certain ratio, the COD of each organic component output can be obtained by adding the concentration of each component after the model reaction to the concentration of the inert substances that do not participate in the reaction, and finally forming a basic anaerobic digestion reaction model suitable for septic tank scenarios.

[0080] Based on the anaerobic digestion reaction model constructed above, a methane mass transfer and dispersion process is further introduced to construct a complete dynamic simulation model of methane in septic tanks. The calculation method for the gas-liquid mass transfer process follows the ADM1 method without any additional modifications to its basic mechanism and calculation formulas. Gaseous methane accumulates in the septic tank and the overhead airspace above the inspection well. By adding the process of releasing gaseous methane into the external environment, the entire process of methane generation, transfer, and release in the septic tank system is characterized. The methane concentration difference is used as the driving force to describe the gas dispersion process. Assuming that the methane concentration in the septic tank and the overhead airspace above the inspection well is uniformly mixed, the diffusion flux is calculated using Fick's first law, satisfying the following:

[0081] in, Indicates diffusion flux; Indicates the diffusion area correction factor; This indicates the number of openings on the surface of the manhole cover. This indicates the area of ​​each opening on the surface of the manhole cover. This represents the diffusion coefficient of a gas in air; This indicates the gas concentration difference inside and outside the inspection well; Distance indicating the direction of diffusion.

[0082] The HSY algorithm (Hornberger–Spear–Young algorithm) is used to perform uncertainty analysis on the model parameters, shifting the focus from finding the optimal parameters to finding acceptable parameters. All acceptable parameters are grouped into a parameter set with certain spatial distribution characteristics, thereby avoiding the decision-making risks that may arise from the distortion of optimal parameters. Specifically, this includes: b1. Through literature review or experience, determine the upper and lower limits of the range of values ​​for each parameter, and obtain the prior distribution space of the model parameters as the sampling space.

[0083] b2 performs random sampling within the sampling space, using Latin hypercube sampling to ensure uniform parameter distribution, resulting in a large number of random parameter sets.

[0084] b3. Calculate the simulation results for each random parameter set. Then, based on the model simulation requirements, divide the model simulation results into two categories: acceptable results and unacceptable results, and record the parameter sets corresponding to the acceptable and unacceptable results.

[0085] b4, taking the range of values ​​of each parameter corresponding to all acceptable parameter sets as the posterior distribution of the parameter, with the traversal of the random parameter set as the termination condition.

[0086] b5. Using the KS test statistic to rank parameter sensitivity, the parameter value with the highest posterior probability density is first used as the fixed value of the insensitive or low-sensitivity parameter. For sensitive parameters, the parameter value range with the 95% confidence interval in the posterior probability density function is taken as the new value range of the parameter. Then, the HSY method is used again, using the average relative error between the true value and the simulated value as the benchmark, to calibrate the model to obtain the acceptable values ​​of sensitive parameters, which together with the values ​​of insensitive parameters constitute an acceptable parameter space.

[0087] Based on the calibration of the model parameters, the constructed dynamic simulation model of methane production and emission was validated using data that were not involved in the calibration. The average relative error between the model output and the measured data was compared. If the error is small, it indicates that the constructed model and parameters have good reliability.

[0088] First, the time-series dynamic input data is divided into calibration and validation datasets. This ensures that model parameter determination and validation are based on independent data samples, avoiding overfitting of simulation results caused by using the same set of data for both parameter tuning and validation, and ensuring the objectivity of the validation conclusions. Next, parameter calibration is performed based on the calibration dataset to obtain candidate parameter combinations. This allows model parameters to be adjusted according to the actual operating conditions of the target septic tank, avoiding simulation bias caused by using empirical parameters. The model is then run using the independent validation dataset, and the output is compared with measured values ​​to obtain the validation error. This allows for independent verification of the model's extrapolation and prediction capabilities on data not involved in parameter tuning, thus objectively assessing the model's applicability under different input conditions. When the validation error meets a preset threshold, the candidate parameter combination is confirmed as validated parameters, providing a quantitatively validated modeling basis for subsequent simulation calculations and effectively ensuring the reliability of the methane production and emission simulation results.

[0089] Specifically, S202 above includes: S2021, based on the chemical oxygen demand (COD) concentration data in the basic dataset of the target septic tank, uses a component splitting method to split the concentrations of each organic component and inert substance to obtain the model input component concentration sequence; the organic components include carbohydrates, proteins, lipids, acetic acid, and propionic acid; S2022, based on the model input component concentration sequence, combined with the flow data, sulfate concentration data and temperature data in the basic dataset, uses the anaerobic digestion reaction sub-model in the validated methane production and discharge dynamic simulation model to simulate the dynamic changes of the concentrations of each organic component, each microorganism and dissolved methane in the septic tank. S2023, based on the dynamic change results of dissolved methane concentration, the methane mass transfer and efflux sub-model in the validated methane production and emission dynamic simulation model was used to simulate the dynamic change results of gaseous methane concentration and methane efflux flux in the septic tank. S2024 integrates the dynamic changes of the concentrations of various organic components, microorganisms, dissolved methane, gaseous methane, and methane emission flux, and outputs the dynamic changes of various state variables within the target septic tank.

[0090] Chemical oxygen demand (COD) concentration data is broken down into organic components such as carbohydrates, proteins, lipids, acetic acid, and propionic acid, as well as inert substances. This provides the anaerobic digestion model with input materials that more closely resemble the actual composition, overcoming the limitation that a single indicator cannot distinguish substances with different degradation characteristics. Then, based on the input component concentration sequence, combined with flow rate data, sulfate concentration data, and temperature data, an anaerobic digestion reaction sub-model is used to simulate the biochemical reaction processes of hydrolysis and acidification of each organic component, acid and acetic acid production, and methanogenesis. The dynamic changes in the concentrations of each organic component, microorganisms, and dissolved methane are tracked to realize the complex multi-step biochemical processes within the septic tank. The transformation process is dynamically quantified; then, driven by the concentration of dissolved methane, the entire process of methane migration from the liquid phase to the headspace gas phase and release into the external environment is simulated using a mass transfer and exhalation sub-model, realizing the coupled simulation of the two key links of methane generation and exhalation; finally, the dynamic results of the three aspects of liquid-phase biochemistry, gas-phase mass transfer and exhalation are integrated to output a complete set of state variables, providing a comprehensive data foundation for the subsequent extraction of methane generation, dissolved concentration and exhalation flux, realizing multi-stage and multi-state collaborative simulation of the entire process from organic matter input to methane production and emission, significantly improving the internal consistency and comprehensiveness of the simulation results.

[0091] S203, based on the dynamic changes of various state variables within the target septic tank, uses the methane production and emission output method to extract time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux, obtaining the dynamic methane simulation results for the target septic tank. For details, please refer to... Figure 1 S103 of the illustrated embodiment will not be described again here.

[0092] This embodiment provides a method for simulating methane production and discharge in septic tanks, which can be used in wastewater treatment monitoring servers. Figure 3 This is a flowchart of a septic tank methane production and discharge simulation method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: S301, based on the acquired fixed structural parameters and time-series dynamic input data of the target septic tank, data preprocessing methods are used to obtain the basic dataset of the target septic tank. The fixed structural parameters include the septic tank volume and headspace volume. The time-series dynamic input data includes influent and effluent flow rate time series, influent and effluent chemical oxygen demand (COD) concentration time series, influent and effluent sulfate concentration time series, influent and effluent dissolved methane and gaseous methane time series, and temperature data. For details, please refer to [link to relevant documentation]. Figure 1 S101 of the illustrated embodiment will not be described again here.

[0093] S302, based on the target septic tank's baseline dataset, uses a validated dynamic simulation model of methane production and discharge to perform simulation calculations, obtaining the dynamic changes of various state variables within the target septic tank. For details, please refer to [link to relevant documentation]. Figure 1S102 of the illustrated embodiment will not be described again here.

[0094] S303. Based on the dynamic changes of various state variables in the target septic tank, the time series data of methane generation, dissolved methane concentration and gaseous methane emission flux are extracted using the methane production and emission output method to obtain the dynamic simulation results of methane in the target septic tank.

[0095] Specifically, S303 includes: S3031, based on the dynamic changes of various state variables in the target septic tank, the methane generation rate and cumulative generation amount of dissolved methane are obtained using the methane generation extraction method, thus obtaining time-series data of methane generation.

[0096] For example, S3031 above includes: c1. Based on the dynamic changes of various state variables in the target septic tank, the time series data of dissolved methane concentration and the concentration of relevant components involved in the methanogenic reaction are extracted using the time series feature extraction method to obtain the methane generation input parameter sequence. c2, based on the methane generation input parameter sequence, the dissolved methane generation rate at each simulation time is calculated using the methane generation extraction method to obtain the time series data of the methane generation rate; c3, based on the time-series data of methane generation rate, uses the time integration method to perform cumulative calculation to obtain the cumulative methane generation at each simulation time point, and outputs the time-series data of methane generation.

[0097] By extracting the concentration of dissolved methane and the concentrations of relevant components involved in the methanogenesis reaction from the dynamic changes of various state variables in the septic tank, a methane generation input parameter sequence is formed, providing necessary component data for the generation rate calculation. Then, based on the methane generation input parameter sequence, the dissolved methane generation rate at each simulation time is calculated, obtaining time-series data of the methane generation rate and quantifying the instantaneous intensity of the methane generation process. Finally, the methane generation rate is integrated over time to obtain the cumulative methane generation at each simulation time, outputting time-series data of methane generation. By simultaneously extracting the generation rate and cumulative amount, both the instantaneous dynamic characteristics of the methane generation process and the long-term cumulative trend of methane generation are reflected, providing complete generation-end input data for subsequent analysis of dissolved concentration and efflux flux.

[0098] S3032, based on the dynamic changes of the liquid phase state variables in the target septic tank, the liquid phase methane concentration value at each simulation time is obtained using the liquid phase concentration extraction method, thus obtaining the time series data of dissolved methane concentration.

[0099] S3033, based on the dynamic changes of the headspace state variables in the target septic tank, combined with the methane concentration difference inside and outside the inspection well, the methane emission flux calculation method is used to calculate the methane emission rate to the external environment at each simulation time, and the time series data of gaseous methane emission flux are obtained.

[0100] For example, S3033 above includes: d1, Based on the dynamic changes of the headspace state variables in the target septic tank, the concentration of gaseous methane in the headspace at each time moment is extracted using the parameter extraction method to obtain the time series data of headspace gaseous methane concentration; d2, based on the time series data of headspace methane concentration and combined with the atmospheric methane concentration outside the inspection well, the methane concentration difference inside and outside the inspection well at each time moment is simulated using the concentration difference calculation method to obtain the time series data of methane concentration difference; d3, based on the methane concentration difference time series data, combined with the diffusion area, diffusion distance and gas diffusion coefficient of the target septic tank manhole cover, the methane emission flux at each time moment is calculated using Fick's first law, and the methane emission rate time series data at each time moment is obtained. d4, combining the time-series data of methane emission rates at various times, simulates the cumulative methane emission at each time using the time integration method, and outputs the time-series data of gaseous methane emission flux.

[0101] First, the gaseous methane concentration at each moment is extracted from the dynamic results of the headspace state variables to form headspace concentration time-series data, providing a headspace-side concentration boundary for subsequent methane emission calculations. Then, combined with the atmospheric methane concentration outside the manhole, the concentration difference between the inside and outside at each moment is calculated to obtain methane concentration difference time-series data, reflecting the magnitude of the driving force of the methane emission process. Next, based on the concentration difference, diffusion area, diffusion distance, and gas diffusion coefficient, the emission rate at each moment is calculated using Fick's first law, converting the concentration gradient into a quantifiable emission flux. Finally, the emission rate is integrated over time to obtain the cumulative emission amount at each moment, outputting gaseous methane emission flux time-series data. This achieves complete quantification from methane concentration difference to emission rate to cumulative emission amount, providing a reliable calculation basis for intensity assessment and total emission accounting of methane generated in septic tanks into the atmosphere.

[0102] S3034 integrates time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux, and uses a time-series integration method to perform time alignment and format unification to obtain the dynamic simulation results of methane in the target septic tank.

[0103] By extracting the methane generation rate and cumulative generation amount based on the dynamic changes of various state variables, time-series data of methane generation amount is obtained, quantifying the intensity and accumulation characteristics of the methane production process in the septic tank. Then, the dissolved methane concentration at each time point is extracted from the liquid phase state variables to obtain time-series data of dissolved methane concentration, reflecting the dissolution and accumulation patterns of methane in the liquid phase. Next, the emission rate is calculated by combining headspace state variables and the methane concentration difference inside and outside the inspection well to obtain time-series data of gaseous methane emission flux, characterizing the dynamic characteristics of methane release from the liquid phase into the atmospheric environment. Finally, the three data are time-aligned and formatted to integrate into a dynamic methane simulation result for the target septic tank, achieving the coordinated extraction and system integration of output parameters for the entire process of methane production, dissolution, and emission, providing complete data support for quantitative assessment of methane emissions and formulation of emission reduction strategies.

[0104] This embodiment also provides a septic tank methane production and discharge simulation device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0105] This embodiment provides a device for simulating methane production and discharge in a septic tank, such as... Figure 4 As shown, it includes: The data preprocessing module 410 is used to process the acquired fixed structural parameters and time-series dynamic input data of the target septic tank using data preprocessing methods to obtain the basic dataset of the target septic tank. The fixed structural parameters include the septic tank volume and headspace volume. The time-series dynamic input data includes influent and effluent flow rate time series, influent and effluent chemical oxygen demand concentration time series, influent and effluent sulfate concentration time series, influent and effluent dissolved methane and gaseous methane time series, and temperature data. The dynamic simulation module 420 is used to perform simulation calculations based on the basic dataset of the target septic tank and the validated dynamic simulation model of methane production and discharge, so as to obtain the dynamic change results of each state variable in the target septic tank. The result output module 430 is used to extract time-series data of methane generation, dissolved methane concentration and gaseous methane emission flux based on the dynamic changes of various state variables in the target septic tank using the methane generation and emission output method, so as to obtain the dynamic simulation results of methane in the target septic tank.

[0106] In some alternative implementations, the dynamic simulation module 420 includes: The component splitting unit is used to split the chemical oxygen demand (COD) concentration data in the basic dataset of the target septic tank into the concentrations of each organic component and inert substance using the component splitting method to obtain the model input component concentration sequence; the organic components include carbohydrates, proteins, lipids, acetic acid and propionic acid; The data simulation unit is used to simulate the dynamic changes of the concentration of each organic component, each microorganism, and dissolved methane in the septic tank based on the concentration sequence of the input components of the model, combined with the flow data, sulfate concentration data, and temperature data in the basic dataset, using the anaerobic digestion reaction sub-model in the validated methane production and discharge dynamic simulation model. The data verification unit is used to simulate the dynamic changes of gaseous methane concentration and methane emission flux in the septic tank based on the dynamic changes of dissolved methane concentration using the methane mass transfer and emission sub-model in the verified methane production and emission dynamic simulation model. The results output unit is used to integrate the dynamic changes of the concentrations of various organic components, microorganisms, dissolved methane, gaseous methane, and methane emission flux, and output the dynamic changes of various state variables in the target septic tank.

[0107] In some optional implementations, the verification of the methane production and emission dynamic simulation model in the dynamic simulation module 420 specifically includes: Based on the acquired time-series dynamic input data, the data is divided using a data partitioning method to obtain a calibration dataset and a validation dataset. Based on the calibration dataset, the parameters of the dynamic simulation model of methane production and emissions are calibrated using the model parameter determination method to obtain candidate parameter combinations; Based on the validation dataset, a dynamic simulation model of methane production and emissions is run using candidate parameter combinations. The dynamic changes of each state variable output by the model are compared with the measured values ​​in the validation dataset to obtain the validation error. When the verification error is less than the preset error threshold, the candidate parameter combination is confirmed as the verified parameter combination, and the dynamic simulation model of methane production and emission of the verified parameter combination is output as the verified dynamic simulation model of methane production and emission.

[0108] In some optional implementations, based on the calibration dataset, the parameters of the dynamic simulation model of methane production and emissions are calibrated using model parameter determination methods to obtain candidate parameter combinations, including: Based on the prior value range of each model parameter, multiple parameter combinations are obtained using the Latin hypercube sampling method; For the dynamic simulation models of methane production and emission constructed using each set of parameters, the simulation results are compared with the measured values ​​in the calibration dataset using the error evaluation method. The results are divided into acceptable and unacceptable results, and the set of acceptable parameter groups is obtained. Based on the set of acceptable parameters, parameter sensitivity analysis is used to fix parameters below the sensitivity threshold to constant values, while parameters above or equal to the sensitivity threshold are resampled and calibrated to obtain the final candidate parameter combination.

[0109] In some alternative implementations, the result output module 430 includes: The first simulation unit is used to obtain the generation rate and cumulative generation of dissolved methane based on the dynamic changes of various state variables in the target septic tank, and to obtain time-series data of methane generation by using the methane generation extraction method. The second simulation unit is used to obtain the liquid methane concentration value at each simulation time based on the dynamic change results of the liquid phase state variables in the target septic tank and the liquid phase concentration extraction method, so as to obtain the time series data of dissolved methane concentration. The third simulation unit is used to calculate the methane emission rate to the external environment at each simulation time based on the dynamic change results of the headspace state variables in the target septic tank, combined with the methane concentration difference inside and outside the inspection well, and to obtain the time series data of gaseous methane emission flux. The results output unit integrates the time-series data of methane generation, dissolved methane concentration, and gaseous methane emission flux, and uses a time-series integration method to perform time alignment and format unification to obtain the dynamic simulation results of methane in the target septic tank.

[0110] In some alternative implementations, the first simulation unit is specifically used for: Based on the dynamic changes of various state variables in the target septic tank, the time series data of dissolved methane concentration and the concentration of relevant components involved in the methanogenic reaction are extracted using the time series feature extraction method to obtain the methane generation input parameter sequence; Based on the methane generation input parameter sequence, the methane generation rate at each simulation time was calculated using the methane generation extraction method, thus obtaining time-series data of the methane generation rate. Based on time-series data of methane generation rate, the cumulative methane generation at each simulation time is calculated using the time integration method, and the output is time-series data of methane generation.

[0111] In some alternative implementations, the third simulation unit is specifically used for: Based on the dynamic changes of the headspace state variables in the target septic tank, the concentration of gaseous methane in the headspace at each time moment is extracted using the parameter extraction method to obtain the time series data of headspace gaseous methane concentration. Based on the time series data of headspace methane concentration, combined with the atmospheric methane concentration outside the inspection well, the concentration difference calculation method is used to simulate the methane concentration difference inside and outside the inspection well at each time point, and the time series data of methane concentration difference is obtained. Based on the methane concentration difference time series data, combined with the diffusion area, diffusion distance and gas diffusion coefficient of the target septic tank manhole cover, the methane emission flux at each time moment is calculated using Fick's first law, and the methane emission rate time series data at each time moment is obtained. By combining the time-series data of methane emission rates at various times, the cumulative methane emission amount at each time is simulated using the time integration method, and the time-series data of gaseous methane emission flux is output.

[0112] The septic tank methane production and discharge simulation device provided in this embodiment of the invention can execute the septic tank methane production and discharge simulation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.

[0113] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0114] The following is a detailed reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from memory 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0115] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0116] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a memory 508, or installed from a ROM 502. When the computer program is executed by the processor 501, it performs the functions defined in the septic tank methane production and discharge simulation method of the embodiments of the present invention.

[0117] Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0118] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the septic tank methane production and discharge simulation method shown in the above embodiments is implemented.

[0119] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0120] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for simulating methane production and discharge in a septic tank, characterized in that, The method includes: Based on the acquired fixed structural parameters of the target septic tank and the time-series dynamic input data, the data is processed using data preprocessing methods to obtain the basic dataset of the target septic tank; the fixed structural parameters include the septic tank volume and headspace volume; the time-series dynamic input data includes influent and effluent flow rate time series, influent and effluent chemical oxygen demand concentration time series, influent and effluent sulfate concentration time series, influent and effluent dissolved methane and gaseous methane time series, and temperature data. Based on the basic dataset of the target septic tank, the dynamic changes of each state variable in the target septic tank are obtained by using the validated dynamic simulation model of methane production and discharge. Based on the dynamic changes of various state variables within the target septic tank, time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux are extracted using the methane production and emission output method, resulting in dynamic methane simulation results for the target septic tank.

2. The method according to claim 1, characterized in that, Based on the dynamic changes of various state variables within the target septic tank, time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux are extracted using a methane production and emission method to obtain dynamic methane simulation results for the target septic tank, including: Based on the dynamic changes of various state variables in the target septic tank, the generation rate and cumulative generation of dissolved methane are obtained using the methane generation extraction method, thus obtaining time-series data of methane generation. Based on the dynamic changes of the liquid phase state variables in the target septic tank, the liquid phase methane concentration values ​​at each simulation time were obtained using the liquid phase concentration extraction method, thus obtaining the time series data of dissolved methane concentration. Based on the dynamic changes of the headspace state variables in the target septic tank, and combined with the methane concentration difference inside and outside the inspection well, the methane emission flux calculation method is used to calculate the methane emission rate to the external environment at each simulation time, and the time series data of gaseous methane emission flux are obtained. By combining the time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux, a time-series integration method is used to align the time and unify the format, resulting in a dynamic simulation of methane in the target septic tank.

3. The method according to claim 2, characterized in that, Based on the dynamic changes of various state variables within the target septic tank, the methane generation rate and cumulative generation amount of dissolved methane are obtained using a methane generation extraction method, resulting in time-series data on methane generation, including: Based on the dynamic changes of various state variables in the target septic tank, the time series data of dissolved methane concentration and the concentration of relevant components involved in the methanogenic reaction are extracted using the time series feature extraction method to obtain the methane generation input parameter sequence; Based on the methane generation input parameter sequence, the dissolved methane generation rate at each simulation time is calculated using the methane generation extraction method to obtain time-series data of the methane generation rate. Based on the time-series data of the methane generation rate, the cumulative methane generation at each simulation time is calculated using the time integration method, and the output is the time-series data of methane generation.

4. The method according to claim 2, characterized in that, Based on the dynamic changes in the headspace state variables within the target septic tank, and combined with the methane concentration difference inside and outside the inspection well, the methane emission flux calculation method is used to calculate the methane emission rate to the external environment at each simulation time, obtaining time-series data of gaseous methane emission flux, including: Based on the dynamic changes of the headspace state variables in the target septic tank, the concentration of gaseous methane in the headspace at each time moment is extracted using the parameter extraction method to obtain the time series data of headspace gaseous methane concentration. Based on the time series data of headspace methane concentration, combined with the atmospheric methane concentration outside the inspection well, the methane concentration difference inside and outside the inspection well at each moment is simulated using the concentration difference calculation method to obtain the time series data of methane concentration difference. Based on the methane concentration difference time series data, combined with the diffusion area, diffusion distance and gas diffusion coefficient of the target septic tank cover, the methane emission flux at each time moment is calculated using Fick's first law, and the methane emission rate time series data at each time moment is obtained. By combining the time-series data of methane emission rates at various times, the cumulative methane emission amount at each time is simulated using the time integration method, and the time-series data of gaseous methane emission flux is output.

5. The method according to claim 1, characterized in that, The simulation, based on the target septic tank's baseline dataset, utilizes a validated dynamic simulation model for methane production and discharge to obtain the dynamic changes of various state variables within the target septic tank, including: Based on the chemical oxygen demand (COD) concentration data in the basic dataset of the target septic tank, the concentrations of each organic component and inert substance are separated using a component splitting method to obtain the model input component concentration sequence; the organic components include carbohydrates, proteins, lipids, acetic acid, and propionic acid; Based on the input component concentration sequence of the model, combined with the flow data, sulfate concentration data and temperature data in the basic dataset, the anaerobic digestion reaction sub-model in the validated methane production and discharge dynamic simulation model is used to simulate the dynamic changes of the concentrations of each organic component, each microorganism and dissolved methane in the septic tank. Based on the dynamic changes in dissolved methane concentration, the methane mass transfer and efflux sub-model in the validated methane production and emission dynamic simulation model were used to simulate the dynamic changes in gaseous methane concentration and methane efflux flux in the septic tank, and the results were obtained. Based on the combined results of the dynamic changes in the concentrations of each organic component, each microorganism, dissolved methane concentration, gaseous methane concentration, and methane emission flux, the output is the dynamic change results of each state variable within the target septic tank.

6. The method according to claim 1 or 5, characterized in that, The validation of the dynamic simulation model for methane production and emissions includes: Based on the acquired time-series dynamic input data, the data is divided using a data partitioning method to obtain a calibration dataset and a validation dataset. Based on the calibration dataset, the parameters of the methane production and emission dynamic simulation model are calibrated using the model parameter determination method to obtain candidate parameter combinations; Based on the validation dataset, a dynamic simulation model of methane production and emissions is run using candidate parameter combinations. The dynamic changes of each state variable output by the model are compared with the measured values ​​in the validation dataset to obtain the validation error. When the verification error is less than a preset error threshold, the candidate parameter combination is confirmed as a verified parameter combination, and the dynamic simulation model of methane production and emission of the verified parameter combination is output as the verified dynamic simulation model of methane production and emission.

7. The method according to claim 6, characterized in that, Based on the calibration dataset, the parameters of the methane production and emission dynamic simulation model are calibrated using a model parameter determination method to obtain candidate parameter combinations, including: Based on the prior value range of each model parameter, multiple parameter combinations are obtained using the Latin hypercube sampling method; For the dynamic simulation models of methane production and emission constructed using each set of parameters, the simulation results are compared with the measured values ​​in the calibration dataset using an error evaluation method, and the results are divided into acceptable and unacceptable results, and an acceptable parameter set is obtained. Based on the set of acceptable parameters, parameters below the sensitivity threshold are fixed to constant values ​​using parameter sensitivity analysis, while parameters above or equal to the sensitivity threshold are resampled and calibrated to obtain the final candidate parameter combination.

8. A septic tank methane production and discharge simulation device, characterized in that, The device includes: The data preprocessing module is used to process the acquired fixed structural parameters and time-series dynamic input data of the target septic tank using data preprocessing methods to obtain the basic dataset of the target septic tank. The fixed structural parameters include the septic tank volume and headspace volume. The time-series dynamic input data includes influent and effluent flow rate time series, influent and effluent chemical oxygen demand concentration time series, influent and effluent sulfate concentration time series, influent and effluent dissolved methane and gaseous methane time series, and temperature data. The dynamic simulation module is used to perform simulation calculations based on the basic dataset of the target septic tank and the validated dynamic simulation model of methane production and discharge, so as to obtain the dynamic change results of each state variable in the target septic tank. The results output module is used to extract time-series data on methane generation, dissolved methane concentration, and gaseous methane emission flux based on the dynamic changes of various state variables within the target septic tank using the methane generation and emission output method, thereby obtaining the dynamic simulation results of methane in the target septic tank.

9. An electronic device, characterized in that, include: A memory and a processor are interconnected, the memory storing computer instructions, and the processor executing the computer instructions to perform the septic tank methane production and discharge simulation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the septic tank methane production and discharge simulation method according to any one of claims 1 to 7.