Pig farm manure treatment process intelligent regulation method and system based on time series data

By collecting and analyzing the time-series operation data of pig farm manure treatment processes, a set of linkage control instructions is generated, which solves the problems of unstable efficiency and high energy consumption in existing manure treatment systems, realizes global intelligent control, and improves the system's operational efficiency and economy.

CN122151759APending Publication Date: 2026-06-05NAT CENT OF TECH INNOVATON FOR PIGNS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NAT CENT OF TECH INNOVATON FOR PIGNS
Filing Date
2026-03-06
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing pig farm manure treatment systems are unable to cope with complex operating conditions involving dynamic coupling of multiple factors, resulting in unstable treatment efficiency, high energy consumption, and fluctuating effluent quality. They also lack in-depth correlation analysis and forward-looking prediction of full-process time-series operation data.

Method used

By collecting real-time operating data of each process unit in the entire process of sewage treatment, performing coupled correlation analysis, extracting key feature vectors, and using a multi-objective collaborative optimization algorithm to generate a set of linkage control instructions, the operating parameters of each process unit are adjusted to achieve global intelligent control.

Benefits of technology

It improves the overall operational efficiency, stability, and economy of the sewage treatment system, and realizes the linkage and intelligent control of the sewage treatment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122151759A_ABST
    Figure CN122151759A_ABST
Patent Text Reader

Abstract

The application discloses a pig farm manure treatment process intelligent regulation and control method and system based on time sequence data, and the method comprises the following steps: collecting time sequence operation data of each process unit in the whole process of manure treatment in real time; performing coupling correlation analysis on the time sequence operation data, and predicting the evolution trend of the overall manure treatment efficiency and stability of the pig farm; based on the key feature vector and the evolution trend, generating a linkage regulation and control instruction set for the solid-liquid separation, anaerobic fermentation, aerobic treatment and sludge reflux links through a multi-objective collaborative optimization algorithm; and executing the linkage regulation and control instruction set to synchronously adjust the operation parameters of each process unit. According to the embodiment of the application, linkage intelligent regulation and control of the manure treatment process can be realized, and the overall operation efficiency, stability and economy of the treatment system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of pig farm manure treatment technology, and in particular, it is a method and system for intelligent control of pig farm manure treatment process based on time-series data. Background Technology

[0002] The rapid development of intensive livestock farming has made the efficient and stable treatment of pig farm manure a key challenge for environmental protection and sustainable industry development. Existing manure treatment systems largely rely on independent control of unit processes and manual adjustments based on experience, making it difficult to cope with complex operating conditions involving the dynamic coupling of multiple factors such as feed load and water quality fluctuations. Traditional control methods often lag behind real-time changes in process conditions, lacking in-depth correlation analysis and forward-looking prediction of the entire process's time-series operational data, easily leading to unstable treatment efficiency, high energy consumption, and fluctuating effluent quality. Although some automated control technologies have been applied to specific stages, they generally suffer from limitations such as insufficient system coordination, singular control objectives, and inability to achieve global optimization, hindering further improvements in the overall operating efficiency and economy of manure treatment processes. Summary of the Invention

[0003] The purpose of this invention is to provide a method and system for intelligent control of pig farm manure treatment process based on time-series data, so as to overcome the shortcomings of the prior art, realize the linkage intelligent control of manure treatment process, and improve the overall operating efficiency, stability and economy of the treatment system.

[0004] One embodiment of this application provides an intelligent control method for pig farm manure treatment processes based on time-series data, the method comprising: Real-time data collection of time-series operation data for each process unit in the entire process of sewage treatment, including solid-liquid separation efficiency sequence, anaerobic tank feed load sequence, aeration tank dissolved oxygen concentration sequence, and effluent water quality index sequence. The time-series operational data were subjected to coupled correlation analysis to extract key feature vectors reflecting the operational status of each process unit, and the evolution trend of the overall treatment efficiency and stability of pig farm manure was predicted. Based on the key feature vectors and the evolution trend, a set of linkage control instructions for solid-liquid separation, anaerobic fermentation, aerobic treatment and sludge return is generated through a multi-objective collaborative optimization algorithm. The aforementioned set of linkage control instructions is executed to synchronously adjust the operating parameters of each process unit, thereby achieving global intelligent control of the pig farm manure treatment process.

[0005] Another embodiment of this application provides an intelligent control system for pig farm manure treatment processes based on time-series data, the system comprising: The data acquisition module is used to collect real-time operating data of each process unit in the entire process of sewage treatment. The real-time operating data includes solid-liquid separation efficiency sequence, anaerobic tank feed load sequence, aeration tank dissolved oxygen concentration sequence, and effluent water quality index sequence. The extraction module is used to perform coupled correlation analysis on the time-series operation data, extract key feature vectors reflecting the operating status of each process unit, and predict the evolution trend of the overall treatment efficiency and stability of pig farm manure. The generation module is used to generate a set of linkage control instructions for solid-liquid separation, anaerobic fermentation, aerobic treatment and sludge return links based on the key feature vector and the evolution trend through a multi-objective collaborative optimization algorithm. The execution module is used to execute the linkage control instruction set, synchronously adjust the operating parameters of each process unit, and realize global intelligent control of the pig farm manure treatment process.

[0006] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.

[0007] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.

[0008] Compared with existing technologies, the present invention provides an intelligent control method for pig farm manure treatment process based on time-series data, which can realize the linkage intelligent control of manure treatment process and improve the overall operating efficiency, stability and economy of the treatment system. Attached Figure Description

[0009] Figure 1 A hardware structure block diagram of a computer terminal for an intelligent control method of pig farm manure treatment process based on time-series data, provided in an embodiment of the present invention; Figure 2 A flowchart illustrating an intelligent control method for pig farm manure treatment based on time-series data, provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an intelligent control system for pig farm manure treatment process based on time-series data, provided in an embodiment of the present invention. Detailed Implementation

[0010] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0011] This invention first provides an intelligent control method for pig farm manure treatment process based on time-series data. This method can be applied to electronic devices, such as computer terminals, specifically ordinary computers.

[0012] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for an intelligent control method of pig farm manure treatment process based on time-series data, provided in an embodiment of the present invention. (See diagram for reference.) Figure 1 As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.

[0013] See Figure 2 The present invention provides an intelligent control method for pig farm manure treatment process based on time-series data, which may include the following steps: S201, real-time acquisition of time-series operation data of each process unit in the entire process of sewage treatment, including solid-liquid separation efficiency sequence, anaerobic tank feed load sequence, aeration tank dissolved oxygen concentration sequence, and effluent water quality index sequence. Specifically, various types of IoT sensors can be deployed at the outlet of the solid-liquid separator, the feed inlet of the anaerobic tank, key areas of the aeration tank, and the final outlet to collect raw data such as solid removal rate, instantaneous flow rate, dissolved oxygen concentration, and chemical oxygen demand in real time, and generate raw sensor data streams. The core of this step is to deploy sensors throughout the entire process to capture key indicators in real time at each stage of sewage treatment, laying the foundation for time-series data construction. The specific implementation method is as follows: In conjunction with the pig farm manure treatment process chain, sensors are deployed according to the principle of "full unit coverage and key indicators" to ensure that data collection covers the entire process from solid-liquid separation, anaerobic fermentation, aerobic treatment, to effluent discharge. A solids removal rate sensor and an instantaneous flow sensor are deployed at the outlet of the solid-liquid separator. The solids removal rate sensor uses the optical scattering principle, with a measurement accuracy of ±1% and a range of 0-100%, capturing the separation effect of solid particles in the manure in real time. The instantaneous flow sensor uses the electromagnetic induction principle, adapted to the high viscosity characteristics of manure, with a range of 0-50 m³ / h and an accuracy of ±0.5 m³ / h, recording the flow rate of the separated manure.

[0014] A flow sensor and an organic matter concentration sensor are deployed at the anaerobic digester inlet. The flow sensor is the same model as the solid-liquid separator outlet sensor, enabling accurate calculation of the feed load. The organic matter concentration sensor uses a rapid biochemical oxygen demand (BOD) detection module with a detection range of 0-5000 mg / L and a response time of ≤30 seconds, simultaneously collecting the content of degradable organic matter in the feed to provide a basis for anaerobic fermentation load control. Three sets of dissolved oxygen (DO) concentration sensors and pH sensors are deployed in key areas of the aeration tank according to the principle of "uniform distribution at three points." The DO sensor has a range of 0-10 mg / L and an accuracy of ±0.1 mg / L, reflecting the oxygen supply status of the aerobic treatment in real time. The pH sensor has a range of 4-10 pH and an accuracy of ±0.1 pH, monitoring the stability of the acid-base environment in the aeration tank to prevent the activity of microorganisms from being affected.

[0015] The final outlet is equipped with a chemical oxygen demand (COD) sensor, an ammonia nitrogen sensor, and a turbidity sensor. The COD sensor uses the potassium dichromate oxidation method, with a range of 0-2000 mg / L and an accuracy of ±5%, which reflects the residual amount of organic matter in the water. The ammonia nitrogen sensor has a range of 0-100 mg / L and an accuracy of ±0.5 mg / L, which monitors the nitrogen removal effect. The turbidity sensor has a range of 0-100 NTU and an accuracy of ±1 NTU, which reflects the clarity of the water. The three sensors together constitute the effluent water quality evaluation system.

[0016] Sensor sampling frequencies are set differently based on the importance of the indicators. Core indicators such as solids removal rate, dissolved oxygen (DO) concentration, and chemical oxygen demand (COD) are sampled once every 30 seconds, while auxiliary indicators such as instantaneous flow rate and pH are sampled once per minute. This avoids data redundancy caused by high-frequency sampling and information loss caused by low-frequency sampling. Collected data is encapsulated in the format "timestamp + sensor ID + indicator name + value + unit" to generate raw sensor data streams. Example data stream segments: {1719200000,SENSOR001, solids removal rate, 85.2%, %}, {1719200000,SENSOR005, dissolved oxygen concentration, 2.8 mg / L}, {1719200030,SENSOR010, chemical oxygen demand, 180 mg / L}. The data streams are uploaded to the industrial IoT platform in real time and temporarily stored as raw data files.

[0017] The raw sensor data stream is clock-synchronized and data-aligned. The network time protocol is used to unify the timestamps of the data acquisition from each sensor, and interpolation and resampling are performed at a fixed sampling frequency to generate a time-aligned standardized data sequence. The core of this step is to resolve the issue of time deviation and sampling frequency inconsistency among multiple sensors, thereby achieving data timing consistency. The specific implementation method is as follows: Clock synchronization is achieved using the Network Time Protocol (NTPv4). A local NTP server is set up and connected to a standard internet time source, with synchronization accuracy controlled within ±10 milliseconds to avoid timestamp discrepancies caused by clock drift between different sensors. Each sensor connects to the NTP server via an industrial Ethernet connection, and its clock is automatically calibrated every 5 minutes. Data acquisition is paused during calibration and resumed after calibration to ensure timestamp consistency. For raw data that has already been acquired, if the timestamp discrepancy exceeds 50 milliseconds, a backtracking correction is performed based on the server's standard time, adjusting the timestamp of the corresponding data to the most recent standard time point.

[0018] A fixed sampling frequency of 1 time per minute was determined. Original data from different sampling frequencies were resampled via interpolation to achieve a unified sampling frequency for all indicators. For data with a frequency higher than the fixed frequency (such as core indicators with a frequency of 1 time per 30 seconds), mean aggregation was used for resampling, averaging the values ​​of two adjacent data points to obtain the standardized data for the corresponding minute. For data with a frequency lower than the fixed frequency or missing data, linear interpolation was used to supplement the data, with the formula y = y1 + (x - x1) × (y2 - y1) / (x2 - x1), where x is the target time point, x1 and x2 are the time points of two adjacent valid data points, and y1 and y2 are the corresponding values, ensuring a seamless data sequence.

[0019] Taking the alignment of COD data at the effluent outlet with DO data in the aeration tank as an example, the original COD data was sampled once per minute, and the DO data was sampled once every 30 seconds. During resampling, the two DO data values ​​every two minutes were averaged to generate DO data once per minute. Then, based on the timestamp, all indicator data such as COD, DO, and flow rate within the same minute were correlated to form a multidimensional data set for a single time point. If a single indicator is missing at a certain time point (such as a 1-minute data gap due to a pH sensor malfunction), it is supplemented through linear interpolation. In the example, the pH value at 10:01 is 7.2, the pH value at 10:03 is 7.4, and the interpolation yields a pH value of 7.3 at 10:02.

[0020] After resampling and alignment, a time-aligned standardized data sequence is generated. The sequence is arranged in ascending order by timestamp, and each time point corresponds to a complete set of full-process indicator data, including 12 core indicators such as solid removal rate, instantaneous flow rate, DO concentration, and COD. The data format is uniformly "timestamp (yyyy-MM-ddHH:mm:ss) + value of each indicator + unit" to ensure the temporal consistency and completeness of subsequent data processing.

[0021] Anomaly detection and cleaning are performed on time-aligned standardized data sequences. A sliding window statistical method is applied to identify and remove outliers caused by sensor failures or signal interference, generating clean process operation data sequences. The core of this step is to filter out abnormal data using a sliding window strategy, eliminating errors caused by factors such as sensor malfunctions and signal interference, thus ensuring data reliability. The specific implementation method is as follows: The sliding window employs a fixed-length window strategy, with a window size set at 5 sampling points (i.e., 5 minutes) and a window step size of 1 sampling point (1 minute). This ensures that the standardized data sequence is scanned point by point, eliminating any outliers. During the window scanning process, the mean (μ) and standard deviation (σ) of the single indicator data within each window are calculated to construct a normal distribution statistical model. Data points exceeding the range of μ ± 3σ are identified as outliers. For non-normally distributed indicators (such as instantaneous flow rate, which is affected by fluctuations in sewage discharge), the quartile method is used to detect anomalies. The first quartile (Q1) and third quartile (Q3) of the data within the window are calculated, with the interquartile range IQR = Q3 - Q1. Data exceeding the range of Q1 - 1.5IQR or Q3 + 1.5IQR are identified as outliers.

[0022] In the example, a segment of the standardized DO concentration sequence in the aeration tank is [2.8, 2.9, 3.0, 6.5, 3.1], with a window mean μ = 3.46, standard deviation σ = 1.42, μ+3σ = 7.72, and μ-3σ = -0.8. 6.5 is within the normal range. If the data is [2.8, 2.9, 3.0, 8.0, 3.1], 8.0 exceeds μ+3σ (7.72) and is therefore considered an outlier. For continuous anomalies caused by sensor malfunctions (such as a sensor outputting a fixed value or exceeding its range for 10 consecutive minutes), these are directly identified as fault anomalies, marked, and removed in batches. For single-point anomalies caused by occasional signal interference, they are individually marked as interference anomalies, temporarily stored, and then verified a second time.

[0023] The abnormal data processing employs a "removal + supplementation" strategy. For data points identified as abnormal, the data is first removed. Then, based on two adjacent valid data points, cubic spline interpolation is used to supplement the missing value. Compared to linear interpolation, cubic spline interpolation can better fit the data change trend and avoid excessive deviation between the supplemented value and the actual operating state. In the example, the abnormal data point in the instantaneous flow sequence (10:03, 18.5 m³ / h, abnormal) has adjacent valid data points at 10:02 (12.3 m³ / h) and 10:04 (12.7 m³ / h). Through cubic spline interpolation, the flow value at 10:03 is supplemented to 12.5 m³ / h, which fits the normal fluctuation range.

[0024] After cleaning, the data sequence is validated for continuity to ensure no three or more consecutive data points are missing. Simultaneously, the data cleaning rate (abnormal data volume / original data volume) is calculated. If the cleaning rate exceeds 15%, a sensor fault warning is triggered, alerting staff to inspect the corresponding sensor. The final result is a clean process operation data sequence, with all data points conforming to the normal operating range of the sewage treatment process (e.g., solids removal rate 60%-90%, DO concentration 2-4 mg / L, COD effluent ≤100 mg / L), providing high-quality data input for subsequent classification and aggregation.

[0025] The clean process operation data sequence is classified and aggregated according to process unit, and a multi-dimensional time-series operation data matrix is ​​constructed to reflect solid-liquid separation efficiency, anaerobic tank feed load, dynamic changes in dissolved oxygen in aeration tank, and fluctuations in effluent water quality.

[0026] The core of this step is to classify and integrate cleanroom data according to process units, construct a structured multidimensional matrix, and adapt it to the subsequent coupled correlation analysis requirements. The specific implementation method is as follows: The sewage treatment process is divided into four main categories: solid-liquid separation unit, anaerobic tank unit, aeration tank unit, and effluent unit. Each unit corresponds to specific core indicators to ensure the classification is targeted and logical. The relevant indicators for the solid-liquid separation unit include solids removal rate, instantaneous flow rate, and moisture content of the separated solids; the relevant indicators for the anaerobic tank unit include feed load (calculated from instantaneous flow rate and organic matter concentration, unit: kgCOD / m³・d), tank temperature, and pH value; the relevant indicators for the aeration tank unit include DO concentration, aeration rate, and mixed liquor suspended solids concentration (MLSS); and the relevant indicators for the effluent unit include COD, ammonia nitrogen, turbidity, and pH value.

[0027] During the classification and aggregation process, a four-dimensional time-series operational data matrix is ​​constructed using timestamps as row indexes and related indicators of each unit as column indexes. This matrix corresponds to four major process units, with the matrix dimension being "time steps × number of indicators." The time steps represent the total number of sampling points in the cleanroom data sequence, and the number of indicators is set according to unit differences (3 indicators for solid-liquid separation units, 3 for anaerobic tank units, 3 for aeration tank units, and 4 for effluent units). Each element in the matrix corresponds to a cleanroom data value of "a specific time point × a specific indicator in a specific unit," and the data unit and sensor source are also labeled for easy traceability and analysis later.

[0028] In the example, the time-series data matrix for the solid-liquid separation unit uses timestamps (1719200000 to 1719200600, a total of 11 time steps) as row indices and solid removal rate, instantaneous flow rate, and solid moisture content as column indices. Matrix elements represent the clean data at the corresponding time points, such as (1719200000, solid removal rate) = 85.2% and (1719200000, instantaneous flow rate) = 12.3 m³ / h. The matrix is ​​also standardized by converting all indicator values ​​to floating-point format, with units uniformly labeled in the matrix column headers to eliminate format differences.

[0029] Finally, the multidimensional matrix is ​​checked for integrity and consistency to ensure that the time steps of each matrix are consistent, the timestamps are fully aligned, and no indicator data is missing. If a unit has newly added indicators or temporary sensor data, it is added to the corresponding matrix column to maintain the scalability of the matrix structure. The completed multidimensional time-series operational data matrix can be directly used for subsequent process unit coupling and correlation analysis, providing structured data support for extracting key features and predicting processing efficiency.

[0030] S202, Perform coupling correlation analysis on the time-series operation data, extract key feature vectors reflecting the operating status of each process unit, and predict the evolution trend of the overall treatment efficiency and stability of pig farm manure. Specifically, the multidimensional time-series operational data matrix can be normalized to eliminate the influence of different dimensions, and the dynamic time warping algorithm can be used to calculate the dynamic correlation strength between the solid-liquid separation efficiency sequence and the anaerobic tank feed load sequence, generating a coupling relationship map between processes. The core of this step is to eliminate dimensional differences and quantify the dynamic correlation between process units, laying a unified data foundation for subsequent feature extraction and trend analysis. The specific implementation method is as follows: The multidimensional time-series operational data matrix contains 13 indicators across four main units: solid-liquid separation, anaerobic tank, aeration tank, and effluent. The dimensions of each indicator differ significantly (e.g., solid removal rate is %, feed load is kgCOD / m³・d, DO concentration is mg / L), requiring normalization. The min-max normalization method maps all indicator values ​​to the [0,1] interval, with the formula x_norm=(x-x_min) / (x_max-x_min), where x is the original data, x_min is the historical minimum value of the indicator, and x_max is the historical maximum value. This method preserves the original data distribution characteristics and adapts to the limited fluctuation range of the sewage treatment process indicators. In the example, the original data for the solids removal rate sequence is [82.5%, 85.2%, 84.8%, 86.1%, 85.7%], with a historical minimum of 78.3% and a maximum of 90.1%, and the normalized sequence is [0.52, 0.72, 0.69, 0.78, 0.75]. The original data for the anaerobic digester feed load is [2.8, 3.1, 3.0, 3.2, 3.1] kgCOD / m³・d, with a historical minimum of 2.2 and a maximum of 3.8, and the normalized sequence is [0.43, 0.60, 0.55, 0.65, 0.60].

[0031] The dynamic time warping (DTW) algorithm is used to calculate the dynamic correlation strength between the solid-liquid separation efficiency sequence and the anaerobic tank feed load sequence. DTW can solve the correlation calculation problem of inconsistent time series data lengths and asynchronous rhythms. The core is to minimize the cumulative distance between the two sequences by finding the optimal time alignment path. First, a distance matrix is ​​constructed, where each element represents the Euclidean distance between corresponding data points of the two sequences. The formula is d(i,j)=|x(i)-y(j)|, where x is the normalized solid-liquid separation efficiency sequence, y is the normalized feed load sequence, and i and j are the data point indices of the two sequences, respectively. Then, the optimal path is searched through dynamic programming, with the path constraint set to a window width w=2 (i.e., the path deviates from the diagonal by no more than 2 data points) to avoid excessive path distortion. The cumulative distance formula is D(i,j)=d(i,j)+min(D(i-1,j),D(i,j-1),D(i-1,j-1)). Finally, the cumulative distance at the endpoint D(n,m) (where n and m are the lengths of the two sequences) is normalized and used as the correlation strength, with a value range of [0,1]. The closer the value is to 1, the stronger the correlation.

[0032] In the example, the two sequences, after normalization, are x=[0.52,0.72,0.69,0.78,0.75] and y=[0.43,0.60,0.55,0.65,0.60]. A 5×5 distance matrix is ​​constructed, and the distance of each element is calculated. The optimal path is searched through dynamic programming. The cumulative distance to the destination is D(5,5)=0.32. After normalization, the association strength is 1-0.32 / 1.5 (maximum possible cumulative distance)=0.79, indicating that the two are strongly associated. The correlation strength between other process unit sequences (such as the anaerobic tank feed load and the aeration tank DO concentration, and the aeration tank DO concentration and the effluent COD) is calculated using the same method to generate a coupling relationship map between processes. The map uses process units as nodes and correlation strength as edge weights. The depth of edge color corresponds to the strength of the correlation (dark color indicates strong correlation, and light color indicates weak correlation). In the example map, the edge "solid-liquid separation - anaerobic tank" is dark green (intensity 0.79), the edge "aeration tank - effluent" is dark green (intensity 0.81), and the edge "solid-liquid separation - aeration tank" is light green (intensity 0.45), clearly showing the coupling relationship between process units.

[0033] Based on the coupling relationship map between processes, principal component analysis is used to extract the feature components with the largest variance contribution rate from high-dimensional time series data, and generate the core feature vector after dimensionality reduction. The core of this step is to use Principal Component Analysis (PCA) to reduce dimensionality and remove redundancy, extracting key features that reflect the process operation status, thus simplifying the computational complexity of subsequent models. The specific implementation method is as follows: First, based on the coupling relationship graph, highly correlated indicator combinations with a correlation strength ≥ 0.6 are selected, and redundant indicators with weak correlations (strength < 0.4) are removed. In the example, the solid moisture content of the solid-liquid separation unit (correlation strength 0.38 with other units) and the internal temperature of the anaerobic tank unit (correlation strength 0.36) are removed, retaining 11 core indicators to form a high-dimensional time-series data subset. The data subset dimension is "time steps × 11" (time steps are 1440, corresponding to 24 hours in one day, 1 data point per minute). The data subset is then standardized (normalized data does not need to be processed again; only the data distribution is adjusted to a mean of 0 and a variance of 1) to ensure that the weights of each indicator are balanced in PCA.

[0034] Principal components were extracted using PCA, with the core steps being the calculation of the covariance matrix, the determination of eigenvalues ​​and eigenvectors, and the selection of principal components. The covariance matrix reflects the degree of linear correlation between indicators, and its formula is Cov(X,Y)=E[(XE[X])(YE[Y])], where E is the expected value. This yields an 11×11 covariance matrix, where the diagonal elements represent the variance of each indicator, and the off-diagonal elements represent the covariance between indicators. In the example, the covariance between solids removal rate and feed load is 0.62, and the covariance between DO concentration in the aeration tank and COD in the effluent is -0.73 (negative correlation; increased DO decreases decreased COD). Eigenvalue decomposition of the covariance matrix yields 11 eigenvalues ​​and corresponding 11 eigenvectors. Larger eigenvalues ​​indicate a stronger explanatory power for data variation by the principal components represented by the corresponding eigenvectors.

[0035] Sort the eigenvalues ​​from largest to smallest, calculate the variance contribution rate (eigenvalue / sum of all eigenvalues) and cumulative variance contribution rate of each principal component. Set the cumulative variance contribution rate threshold to 85%, and select the top k principal components whose cumulative contribution rate reaches the threshold as core feature components to ensure that most of the data variation information is retained. In the example, the variance contribution rates of the first 4 principal components are 38.2%, 25.7%, 12.3%, and 9.1%, respectively, with a cumulative contribution rate of 85.3%, which meets the threshold requirement. These 4 principal components are selected as core features. Each principal component is a linear combination of the original indicators, and the combination coefficient is an element of the corresponding feature vector. In the example, the expression of the first principal component is PC1 = 0.32 × solids removal rate + 0.28 × feed load + 0.25 × DO concentration - 0.21 × effluent COD + ... (the coefficients of other indicators are taken according to the feature vector), which mainly reflects the overall load and degradation efficiency of manure treatment; the second principal component mainly reflects the synergistic state of anaerobic fermentation and aerobic treatment.

[0036] The high-dimensional data at each time point is projected onto the selected k principal components, resulting in a k-dimensional core feature vector for each time point. In the example, the core feature vector has a dimension of 4, and the feature vector at a certain time point is [0.72, 0.58, 0.31, 0.24]. Each dimension of the vector corresponds to the score of the four principal components, with higher scores indicating more significant state reflected by the corresponding principal component. The core feature vector is validated by calculating the multiple correlation coefficient between the core features and the original indicators. A multiple correlation coefficient ≥ 0.7 is considered a valid feature. In the example, the multiple correlation coefficient between the core feature vector and the effluent COD is 0.82, and the multiple correlation coefficient with the solids removal rate is 0.79, ensuring that the core features accurately represent the key information of the original data. The generated core feature vector sequence provides input for the subsequent trend prediction model.

[0037] The core feature vector is input into a pre-trained long short-term memory network prediction model. This model learns the mapping relationship between feature changes and processing efficiency fluctuations in historical data, predicts the trajectory of changes in system processing efficiency and stability within a preset period in the future, and generates an evolution trend prediction curve. The core of this step is to utilize the temporal modeling capabilities of Long Short-Term Memory (LSTM) networks to predict future process performance and stability trends based on key features, providing a forward-looking basis for regulatory decisions. The specific implementation method is as follows: The pre-trained LSTM prediction model employs a three-layer structure (input layer, hidden layer, and output layer). The input layer has a dimension equal to the core feature vector dimension (k=4), the hidden layer has two neuron layers with 64 neurons each, and the output layer has a dimension of 2 (corresponding to processing efficiency and operational stability, respectively). Processing efficiency is represented by the effluent COD removal rate, and operational stability is represented by the fluctuation coefficient of each process parameter (the fluctuation coefficient is the ratio of the parameter's standard deviation to its mean). The model's pre-training dataset uses historical time-series data from the past three months, including the core feature vector sequence, the corresponding COD removal rate sequence, and the fluctuation coefficient sequence. During training, an adaptive moment estimation optimizer is used, with the mean squared error (MSE) as the loss function. The number of iterations is 1000, and the convergence threshold is MSE < 0.001. After pre-training, the model's fitting accuracy R² = 0.92, ensuring prediction reliability.

[0038] The project sets a future timeframe of 1 hour and a time resolution of 10 minutes, predicting the processing efficiency and stability for the next 6 time points. The core feature vector sequence is divided into time windows of size 60 (corresponding to 60 minutes of data). Using the core feature vector of the last time point within each window as input, the model learns the mapping relationship between historical window data and the subsequent 1-hour trend, outputting the COD removal rate and volatility coefficient for the next 6 time points. An attention mechanism is introduced during the prediction process, assigning higher attention weights (coefficient 1.2) to principal components with higher weights in the core feature vectors (such as the first principal component, with a variance contribution rate of 38.2%), strengthening the influence of key features on the prediction results and reducing interference from irrelevant information.

[0039] In the example, the input is the last window of the current core feature vector sequence. The model outputs a predicted COD removal rate for the next hour of [88.2%, 87.9%, 87.5%, 86.8%, 86.2%, 85.7%], showing a slow downward trend; the predicted fluctuation coefficient is [0.08, 0.09, 0.10, 0.11, 0.12, 0.13], showing a slow upward trend, indicating that the future process efficiency is gradually decreasing and the stability is gradually deteriorating, requiring early intervention. The prediction results are plotted as an evolution trend prediction curve, containing two curves: a COD removal rate trend curve (vertical axis is removal rate %, horizontal axis is future time point) and a fluctuation coefficient trend curve (vertical axis is fluctuation coefficient, horizontal axis is future time point). The curves are labeled with predicted values ​​and confidence intervals (95% confidence level, interval width ±1.5%), facilitating intuitive judgment of trend stability. Simultaneously, the prediction accuracy indicators are calculated, with the mean absolute error (MAE) controlled within ±2% and the root mean square error (RMSE) controlled within ±3%. If the error exceeds the threshold, a model calibration warning is triggered, and the model parameters are fine-tuned based on the latest data.

[0040] By integrating core feature vectors and evolution trend prediction curves, a comprehensive state descriptor containing current state features and future trend information is constructed.

[0041] The core of this step is to integrate current state and future trend information to construct a structured comprehensive descriptor, providing a comprehensive and unified input basis for subsequent multi-objective optimization. The specific implementation method is as follows: The integration logic is divided into three stages: feature extraction, dimension alignment, and information fusion. First, key trend features are extracted from the evolution trend prediction curve, including the trend slope (reflecting the rate of change), peak / trough values ​​(reflecting extreme states), steady-state value (the stable value at the end of the prediction period), and fluctuation amplitude (the difference between the maximum and minimum predicted values). In the example, the COD removal rate trend slope is -0.55% / 10 minutes (negative slope indicates a decrease), with a trough of 85.7%, a steady-state value of 85.7%, and a fluctuation amplitude of 2.5%; the operational stability trend slope is 0.01 / 10 minutes (positive slope indicates deterioration), with a peak of 0.13, a steady-state value of 0.13, and a fluctuation amplitude of 0.05. These trend features are quantified into an 8-dimensional vector and aligned with the core feature vector (4 dimensions) to form a 12-dimensional fusion feature base.

[0042] The core feature vector and trend feature vector are standardized and fused using a weighted summation method. The weight of the core feature vector is set to 0.4 (reflecting the current state), and the weight of the trend feature vector is set to 0.6 (reflecting future trends, prioritizing the adaptability of regulation to the future). The fusion formula is Desc = 0.4 × F_core + 0.6 × F_trend, where Desc is the comprehensive state descriptor, F_core is the core feature vector, and F_trend is the trend feature vector. During the fusion process, the feature values ​​of each dimension are normalized twice to ensure that the value range of each dimension of the descriptor is uniformly [0,1], avoiding any one dimension's excessively large value from dominating the fusion result.

[0043] To supplement the coupling state characteristics of the process units, based on the coupling relationship map, the mean and standard deviation of the correlation strength between each unit are calculated as two supplementary dimensions and incorporated into the comprehensive state descriptor, ultimately forming a 14-dimensional fixed-dimensional comprehensive state descriptor. In the example, the comprehensive state descriptor is [0.72, 0.58, 0.31, 0.24, 0.38, 0.22, 0.15, 0.41, 0.56, 0.33, 0.27, 0.45, 0.68, 0.12], with each dimension corresponding to: 4 core principal component scores, 4 COD removal rate trend features, 4 stability trend features, and 2 coupling state features.

[0044] The validity of the comprehensive state descriptors is verified by calculating the matching degree between the descriptors and the actual process operating state. The matching degree is measured by cosine similarity, and a threshold of ≥0.8 is considered valid. In the example, the matching degree is 0.86, which meets the requirements. The descriptors are also labeled with the source of features and their physical meaning, which facilitates the interpretation of subsequent optimization algorithms. This ensures that the algorithm can accurately combine the current state and future trends to generate control instructions, providing comprehensive and structured state support for global intelligent control.

[0045] S203, based on the key feature vector and the evolution trend, a set of linkage control instructions for solid-liquid separation, anaerobic fermentation, aerobic treatment and sludge return is generated through a multi-objective collaborative optimization algorithm; Specifically, based on the comprehensive state descriptor, an optimization mathematical model can be established with the objectives of minimizing energy consumption, maximizing processing efficiency, and maximizing operational stability, and the solid-liquid separator speed, anaerobic tank feed rate, aeration tank aeration rate, and sludge return ratio can be identified as decision variables. The core of this step is to transform the process control requirements into a quantitative mathematical model, and to construct an optimization framework that takes into account efficiency, energy consumption, and stability by associating decision variables with multi-objective functions. The specific implementation method is as follows: The comprehensive state descriptor is a 14-dimensional vector, containing current core process features (4 principal component scores), future trend features (8 trend indicators), and coupled state features (2 correlation indicators). Based on this, the optimization objectives and decision variables are clearly defined. The decision variables are selected as key adjustable parameters of the entire sewage treatment process, covering the four major process stages. Each variable is given a reasonable value range (based on equipment rated parameters and process experience): the solid-liquid separator speed (x1) ranges from 500 to 1500 r / min, with higher speeds resulting in higher solid removal rates but also higher energy consumption; the anaerobic digester feed rate (x2) ranges from 5 to 20 m³ / h, which needs to match the anaerobic fermentation load tolerance range (2.0-3.8 kg COD / m³・d); the aeration rate of the aeration tank (x3) ranges from 10 to 50 m³ / h, directly affecting DO concentration and aerobic degradation efficiency; and the sludge return ratio (x4) ranges from 20% to 80%, affecting the MLSS concentration and sludge age of the aeration tank.

[0046] Three objective functions are established, all in maximization form (energy consumption minimization is transformed into maximization by taking the negative sign). The first is the energy consumption minimization objective function f1(x), which encompasses the total energy consumption of the separator, feed pump, blower, and return pump. Based on the equipment's energy consumption characteristics, the formula is derived as: f1(x) = -[a1x1² + a2x2 + a3x3 + a4x4], where a1 is the separator's energy consumption coefficient (value 0.0001 kWh / (r²・min)), a2 is the feed pump's energy consumption coefficient (value 0.5 kWh / (m³・h)), a3 is the blower's energy consumption coefficient (value 0.8 kWh / (m³・h)), and a4 is the return pump's energy consumption coefficient (value 0.3 kWh / (%)). The negative sign transforms energy consumption minimization into objective maximization. Second, the objective function for maximizing treatment efficiency is f2(x), characterized by the effluent COD removal rate, and constructed in conjunction with the process coupling relationship: f2(x) = b1x1 + b2(1 / x2) + b3x3 - b4x4 + c, where b1 = 0.02 (positive coefficient of rotation speed on removal rate), b2 = 50 (negative coefficient of excessive feed rate inhibiting degradation), b3 = 0.3 (positive coefficient of aeration volume), b4 = 0.1 (negative coefficient of excessive reflux ratio), and c is the basic removal rate (70%). The function value range is 70%-95%. Third, the objective function for maximizing operational stability is f3(x), characterized by the reciprocal of the mean of the fluctuation coefficients of each parameter (the smaller the fluctuation, the higher the stability): f3(x) = 1 / [(σ1 + σ2 + σ3 + σ4) / 4], where σ1-σ4 are the fluctuation coefficients of x1-x4, derived from the trend characteristics in the comprehensive state descriptor. The function value range is 1-5, and the larger the value, the stronger the stability.

[0047] Constraints are set, divided into variable boundary constraints and process logic constraints. Variable boundary constraints refer to the range of values ​​for each decision variable, such as 500≤x1≤1500, 5≤x2≤20, etc. Process logic constraints are based on coupling relationships and trend predictions, such as anaerobic digester feed load constraints (x2×COD feed ≤ 3.8×V anaerobic digester, where V anaerobic digester is a fixed value of 50m³), aeration tank DO concentration constraints (derived from x3, 2≤DO≤4mg / L), and reflux ratio and MLSS constraints (x4×MLSS sludge ≥ 2000mg / L), ensuring that the optimization scheme conforms to the process operation rules. In the example, if the COD feed is 5000mg / L, x2≤(3.8×50) / 5=38m³ / h, satisfying the boundary constraint x2≤20, and the logic constraints are automatically satisfied.

[0048] A fitness function for a multi-objective collaborative optimization algorithm is constructed, and the evolution trend prediction results are incorporated as constraints into the function calculation to ensure that the optimization instructions not only improve the current state but also meet the requirements of future trends, thus obtaining a fitness evaluation function with trend constraints. The core of this step is to integrate multi-objective functions and trend constraints to construct a fitness function, thereby achieving synergy between optimizing the current state and adapting to future trends. The specific implementation method is as follows: First, the three objective functions are standardized to eliminate dimensional differences, mapping each function value to the interval [0,1]. The standardization formula is f_norm=(f-f_min) / (f_max-f_min), where f_min and f_max are the historical extreme values ​​of each function. In the example, f1(x) ranges from -150 to -50 before standardization, and its standardization f1_norm ranges from 0 to 1; f2(x) ranges from 70% to 95%, and its standardization f2_norm ranges from 0 to 1; f3(x) ranges from 1 to 5, and its standardization f3_norm ranges from 0 to 1.

[0049] Target weights are set based on process priority, with treatment efficiency having the highest priority (ensuring effluent meets standards), weight w2=0.4; energy consumption is the next highest priority (controlling operating costs), weight w1=0.3; and stability has a weight w3=0.3, with the sum of the weights being 1. A basic fitness function F0=w1×f1_norm+w2×f2_norm+w3×f3_norm is constructed, with the basic function value ranging from 0 to 1; higher values ​​result in better overall optimization.

[0050] The predicted trend is transformed into a trend constraint term and incorporated into the fitness function. The constraint term is set based on the slope and threshold of the predicted curve, penalizing schemes that do not meet the trend improvement requirements. If the trend prediction shows a future decrease in COD removal rate (slope k = -0.55% / 10 minutes), a trend constraint is set: the slope of the COD removal rate decrease in the next hour after adjustment must be ≤ k0 (k0 = -0.2% / 10 minutes, i.e., the decrease slows down), otherwise a penalty is applied. If the predicted stability deteriorates (slope k = 0.01 / 10 minutes), the stability slope after adjustment is constrained to ≤ 0 (no longer deteriorating). The trend constraint term C is calculated using the formula C = 1 - α × max(0, k_pred - k_constraint), where α is the penalty coefficient (value 0.5), k_pred is the predicted slope after adjustment, and k_constraint is the constraint threshold. C ranges from 0 to 1, with lower values ​​resulting in heavier penalties.

[0051] A fitness evaluation function with trend constraints, F = F0 × C, is constructed. The basic fitness is adjusted by the constraint term C. If the scheme meets the trend constraint, C = 1, and F = F0; if not, C < 1, and F decreases accordingly, thus achieving trend-based fitness screening. In the example, a certain scheme has a basic fitness of F0 = 0.75. After adjustment, the COD removal rate decreases at a slope of k_pred = -0.3% / 10 minutes, exceeding the constraint threshold k0 = -0.2%. C is calculated as 1 - 0.5 × (0.3 - 0.2) = 0.95, and the final fitness is F = 0.75 × 0.95 = 0.7125. Another scheme has F0 = 0.73 and k_pred = -0.18%, meeting the constraints, so C = 1 and F = 0.73, which is better than the first scheme. Simultaneously, a hard process constraint penalty is added. If a scheme violates variable boundaries or logical constraints, F is directly set to 0, and the scheme is eliminated, ensuring that the fitness function can accurately screen effective schemes.

[0052] A non-dominated sorting genetic algorithm is used to solve the fitness evaluation function with trend constraints, and a Pareto optimal solution set is searched in the solution space to generate a set of non-dominated candidate control schemes. The core of this step is to search for the optimal solution using the Non-Dominated Sorting Genetic Algorithm (NSGA-III) to generate a Pareto optimal solution set, taking into account the selection of non-dominated solutions for multiple objectives. The specific implementation is as follows: In the algorithm initialization phase, real-number encoding is used to encode the decision variables. Each individual corresponds to a set of control schemes, with an encoding length of 4 (corresponding to x1-x4). The population size is set to 50 (to balance search efficiency and diversity), and the number of iterations is set to 100 (to ensure convergence). The initial population uses uniform distribution sampling, randomly generating 50 individuals within the range of decision variable values ​​to avoid local optima caused by initial population clustering. In the example, an initial individual is encoded as [800, 12, 30, 40], corresponding to a rotation speed of 800 r / min, a feed rate of 12 m³ / h, an aeration rate of 30 m³ / h, and a reflux ratio of 40%.

[0053] In the non-dominated sorting stage, individuals in the population are stratified and sorted according to their fitness function values. The first stratum represents the Pareto optimal solution (no other individual is better than this individual in all objectives). Subsequent strata are then divided according to dominance relationships, defined as follows: if the F-value of individual A is greater than or equal to that of individual B, and A's standardized value on at least one objective function is better than B's, then A dominates B. After sorting, the crowding degree of each individual is calculated. Crowding degree reflects the density of individuals in the solution space; a higher crowding degree indicates a sparser solution in that region. Individuals with high crowding degree are retained to maintain the diversity of the solution set. The crowding degree is calculated as: Crowding degree = Σ|f_i+1-f_i-1| (where f_i is the standardized value of an individual on each objective).

[0054] Genetic operations include selection, crossover, and mutation. Selection employs a roulette wheel selection method combined with an elite retention strategy. The roulette wheel method allocates selection probabilities based on individual fitness percentages, while the elite retention strategy directly preserves the top 10% of high-quality individuals to the next generation, preventing the loss of superior genes. Crossover uses simulated binary crossover with a crossover probability of 0.8 and a crossover coefficient of 2. A crossover factor is randomly generated, and the codes of two parent individuals are linearly combined to generate offspring. In the example, parent 1 [800,12,30,40] and parent 2 [900,10,35,35] may produce offspring [840,11.2,32,38] after crossover. Mutation uses polynomial mutation with a mutation probability of 0.05 and a mutation coefficient of 5. The individual codes are randomly perturbed to ensure population diversity. In the example, individual [800,12,30,40] may mutate to [820,12,28,42].

[0055] During the iteration process, after sorting and genetic operations, the parent and offspring populations are merged, and non-dominated sorting and crowding calculations are performed again. The top 50 high-quality individuals are retained as the next generation population until the iteration count reaches 100. After convergence, the first-level Pareto optimal solution is extracted from the final population, generating a Pareto optimal solution set. The solution set contains 10-15 non-dominated candidate control schemes, each with different objective trade-offs (e.g., some schemes have low energy consumption but slightly lower efficiency, while others have high efficiency but slightly higher energy consumption). In the example, scheme 1 in the solution set has F=0.82, x1=950r / min, x2=10m³ / h, x3=32m³ / h, and x4=35%, which has lower energy consumption; scheme 2 has F=0.81, x1=1050r / min, x2=8m³ / h, x3=38m³ / h, and x4=30%, which has higher processing efficiency.

[0056] The scheme with the highest comprehensive score is selected from the candidate control schemes, and it is decoded into a specific set of linkage control instructions for each process link.

[0057] The core of this step is to select the optimal solution through comprehensive scoring, decode abstract decision variables into specific instructions that the equipment can execute, and realize the transformation of optimization results into control actions. The specific implementation method is as follows: A comprehensive scoring system is constructed, supplementing the fitness function value with two additional dimensions: goal achievement and constraint satisfaction, forming a three-dimensional scoring model. The comprehensive score is S = 0.6 × F + 0.2 × G + 0.2 × H, where F is the fitness function value, G is the goal achievement (the average of the standardized values ​​of the three goals), and H is the constraint satisfaction (H = 1 if there is no constraint violation, and H decreases by 0.2 for each constraint violation, with a minimum of 0.6). During the scoring process, solutions with H = 1 (no constraint violation) are prioritized, then sorted in descending order of S value, and the solution with the highest S value is selected as the optimal control solution, ensuring both feasibility and overall optimality. In the example, Pareto solution 1 has F=0.82, G=0.85, H=1, and a comprehensive score S=0.6×0.82+0.2×0.85+0.2×1=0.822; solution 2 has F=0.81, G=0.88, H=1, and a comprehensive score S=0.6×0.81+0.2×0.88+0.2×1=0.814. Solution 1 has a higher comprehensive score and is therefore determined to be the optimal solution.

[0058] The optimal solution is decoded, converting the values ​​of decision variables x1-x4 into specific control commands for each process stage equipment. The decoding process combines equipment characteristics with the mapping relationship between process parameters to ensure the commands are accurate and executable. For example, the solid-liquid separator speed x1 = 950 r / min is decoded as a speed setting command, corresponding to the target value of the motor speed controller, while also specifying the speed adjustment rate (50 r / min·min) to avoid sudden speed changes that could impact the equipment. The anaerobic tank feed rate x2 = 10 m³ / h, with the feed pump being frequency-controlled, is decoded as a pump frequency setting command. Based on the pump flow-frequency curve, 10 m³ / h corresponds to a frequency of 30 Hz (pump rated frequency 50 Hz, maximum flow rate 20 m³ / h), while also setting a flow stability threshold (±0.5 m³ / h). The aeration rate x in the aeration tank... 3 = 32 m³ / h, decoded as a blower power setting command. Based on the aeration volume-power curve, 32 m³ / h corresponds to a power of 45 kW (blower rated power 75 kW, maximum aeration volume 50 m³ / h), synchronously linked to DO concentration feedback adjustment (automatically increasing aeration volume when DO is below 2 mg / L); sludge return ratio x4 = 35%, decoded as a sludge return valve opening command. A 35% return ratio corresponds to a valve opening of 40° (valve full opening 90°, linear mapping), setting the opening adjustment rate (5° / min) to avoid sudden changes in sludge volume affecting the stability of the aeration tank.

[0059] The decoded instructions from each stage are integrated to generate a coordinated control instruction set. This set is categorized by process unit and includes information such as instruction number, equipment name, control parameters, target value, adjustment rate, and feedback threshold, facilitating equipment execution and monitoring. In the example, the coordinated control instruction set segments are: Solid-liquid separation unit instruction 1-1, the equipment is a solid-liquid separator, the control parameter is rotational speed, the target value is 950 r / min, the adjustment rate is 50 r / min·min, and the feedback threshold is ±20 r / min; Anaerobic tank unit instruction 2-1, the equipment is a feed pump, the control parameter is frequency, the target value is 30 Hz, the adjustment rate is 5 Hz / min, and the feedback threshold is ±1 Hz. The instruction set undergoes logical verification to ensure that the adjustment directions of each instruction are coordinated (e.g., when the feed rate decreases, the aeration rate decreases synchronously and appropriately to avoid energy waste), ultimately generating a standardized coordinated control instruction set that can be directly sent to the equipment controller.

[0060] S204, execute the aforementioned linkage control instruction set, synchronously adjust the operating parameters of each process unit, and realize global intelligent control of the pig farm manure treatment process.

[0061] Specifically, the linkage control instruction set can be parsed and the settings of the solid-liquid separator speed, the frequency of the anaerobic tank feed pump, the power of the aeration tank blower, and the opening of the sludge return valve can be sent to the programmable logic controller of the corresponding process unit to generate the underlying equipment control commands. The core of this step is to complete the format parsing and targeted distribution of the instruction set, build a communication bridge between the upper-layer optimized instructions and the lower-layer device control, and ensure that the instructions are accurately adapted to the controllers of each process unit. The specific implementation method is as follows: The linkage control instruction set is packaged according to process units, including four main modules: instruction header, parameter body, checksum, and feedback requirements. The instruction header indicates the instruction number and execution priority (divided into emergency control level 1 and routine control level 2). The parameter body includes the equipment name, control parameters, target value, adjustment rate, and feedback threshold. The checksum is used to verify the integrity of instruction transmission and avoid signal interference that could cause instruction distortion. The parsing process uses an instruction parser that processes the instructions according to the logic of "unit splitting - parameter extraction - format conversion". First, the instruction set is split into four main units: solid-liquid separation, anaerobic tank, aeration tank, and sludge return. Then, the core control parameters are extracted from the instructions of each unit. Finally, the parameter format is converted into a binary instruction format that can be recognized by the corresponding PLC.

[0062] Taking the instruction set corresponding to the optimal control scheme as an example, the core instructions of each unit after analysis are as follows: Solid-liquid separation unit, the equipment is a solid-liquid separator, the control parameter is rotation speed, the target value is 950 r / min, the adjustment rate is 50 r / min·min (the rotation speed is increased / decreased by no more than 50 r / min per minute to avoid sudden changes in rotation speed impacting the mechanical structure of the equipment), and the feedback threshold is ±20 r / min (if the actual rotation speed deviates from the target value beyond this range, a feedback alarm should be triggered); Anaerobic tank unit, the equipment is a feed pump, the control parameter is the frequency converter, the target value is 30 Hz (corresponding to a feed rate of 10 m³ / h), the adjustment rate is 5 Hz / min, and the feedback threshold is ±1 Hz; Aeration tank unit, the equipment is a blower, the control parameter is output power, the target value is 45 kW (corresponding to an aeration rate of 32 m³ / h), the adjustment rate is 5 kW / min, and the feedback threshold is ±2 kW; Sludge return unit, the equipment is a return valve, the control parameter is opening degree, the target value is 40° (corresponding to a return ratio of 35%), the adjustment rate is 5° / min, and the feedback threshold is ±2°.

[0063] Industrial-grade communication protocols are used for command issuance. The PLCs corresponding to the solid-liquid separator and blower communicate via Modbus TCP protocol with a transmission rate of 100Mbps and communication latency controlled within 50 milliseconds. The PLCs corresponding to the feed pump and reflux valve use RS-485 bus communication to meet the anti-interference requirements of complex on-site conditions. During the issuance process, commands are sent in order of execution priority. Emergency control commands occupy the communication channel first, while regular control commands are queued for transmission. At the same time, each issued command is acknowledged. If no PLC acknowledgement is received within 50 milliseconds, the command is automatically resent. If no acknowledgement is received after 3 resentments, a communication fault warning is triggered, prompting personnel to check the communication link.

[0064] After receiving the instructions, the PLC of each process unit generates the underlying equipment control commands, converting the target parameter values ​​and adjustment rates into drive signals that the actuators can recognize. For example, the PLC of the solid-liquid separator converts the 950r / min speed command into a motor drive pulse signal, and the pulse frequency is proportional to the speed. The PLC of the feed pump converts the 30Hz frequency command into a frequency converter control signal, and achieves flow control by adjusting the voltage and frequency, ensuring that the underlying commands accurately match the equipment drive requirements.

[0065] Each process unit's PLC receives and executes control commands, driving actuators, including motors, pumps, fans, and valves, to perform corresponding mechanical actions, adjusting process parameters to target set values, and generating parameter adjustment execution feedback signals. The core of this step is to drive the actuator through the PLC to precisely adjust the process parameters, while simultaneously collecting execution status data to generate feedback signals, forming a closed-loop control of "command-execution-feedback". The specific implementation method is as follows: After receiving the speed control command, the PLC of the solid-liquid separation unit drives the separator motor through the motor driver. The motor starts using a soft start method, and the initial speed adaptively adjusts the acceleration rate based on the difference between the current actual speed and the target value. For example, if the current speed is 800 r / min and the target value is 950 r / min, the speed increases at a rate of 50 r / min per minute, increasing by 10 r / min every 12 seconds, gradually approaching the target value. During motor operation, the speed sensor collects the actual speed in real time and feeds it back to the PLC for comparison with the target value. If the deviation exceeds ±20 r / min, the PLC automatically adjusts the drive signal to correct the speed. For example, if the actual speed is 975 r / min, exceeding the upper limit threshold, the PLC issues a deceleration command, reducing the motor drive pulse frequency until the speed stabilizes within the target range. After parameter adjustment, the PLC generates a feedback signal, including the execution status (success / failure), the actual stable speed, adjustment time, and equipment operating current. The feedback signal is marked with a timestamp and command number for easy traceability.

[0066] After receiving the frequency conversion command, the PLC of the anaerobic digester feed pump sends a control signal to the frequency converter. The frequency converter adjusts the output voltage frequency to change the pump speed, thereby controlling the feed rate. If the current frequency is 25Hz and the target value is 30Hz, the frequency is increased at a rate of 5Hz / min, increasing by 1Hz every 12 minutes. Simultaneously, the flow sensor collects the feed rate in real time and feeds it back to the PLC for comparison with the target rate of 10m³ / h, forming a closed-loop flow control to avoid discrepancies between frequency adjustment and actual flow rate. If the flow rate deviation exceeds ±0.5m³ / h due to changes in manure viscosity, the PLC automatically corrects the frequency. For example, if the actual flow rate is 9.3m³ / h, lower than the target value, the PLC sends a frequency increase command to fine-tune the frequency to 30.5Hz to compensate for the viscosity effect. After adjustment, the feedback signal includes the actual frequency, stable feed rate, frequency converter operating temperature, and pump vibration value, ensuring safe equipment operation.

[0067] After receiving the power control command, the PLC of the aeration tank blower adjusts the impeller speed through the blower controller to control the aeration output. The blower uses a graded speed regulation method during startup to avoid motor overload caused by sudden power changes. If the current power is 35kW and the target value is 45kW, it increases at a rate of 5kW / min, increasing by 5kW every minute. Simultaneously, the DO sensor collects the DO concentration in the aeration tank in real time, linked to the target DO concentration of 3mg / L. If the DO concentration is below 2mg / L, the PLC automatically increases the blower power (1kW increase for every 0.1mg / L decrease in DO); if it is above 4mg / L, the power is reduced, achieving linkage and adaptation between aeration volume and DO concentration. After adjustment, the feedback signal includes actual power, stable aeration volume, DO concentration, and blower inlet and outlet pressure.

[0068] After receiving the opening control command, the PLC of the sludge return valve drives the electric valve actuator to operate. The valve opening is adjusted at a rate of 5° / min. If the current opening is 30° and the target value is 40°, it will gradually open to the target position over 2 minutes. During valve operation, the position sensor collects the opening value in real time and feeds it back to the PLC for calibration. If the opening deviation exceeds ±2°, the actuator automatically corrects its action. For example, if the actual opening is 42.5°, exceeding the upper limit threshold, the actuator drives the valve to close by 0.5° until it stabilizes. The feedback signal includes the actual opening, return ratio, valve operation noise, and sealing status to ensure stable operation of the return system.

[0069] By aggregating feedback signals from various actuators in real time through an industrial IoT platform, the actual execution progress and effect of linkage control commands are monitored, and a global control execution status monitoring report is generated.

[0070] The core of this step is to achieve end-to-end status aggregation and monitoring through an IoT platform, evaluate the control effect, provide data support for subsequent control optimization, and form a global intelligent control closed loop. The specific implementation method is as follows: The industrial IoT platform comprises four main modules: data acquisition, real-time monitoring, anomaly alerts, and report generation. Employing an edge computing architecture, edge nodes are deployed in each process unit to collect feedback signals uploaded by the PLC in real time. The acquisition frequency is matched to the command execution progress; during parameter adjustment, the acquisition frequency is once every 10 seconds, decreasing to once per minute after stabilization, balancing real-time monitoring with data redundancy. The edge nodes preprocess the feedback signals, filtering out instantaneous fluctuations caused by signal interference, and smoothing them using a moving average method with a window size of three data points to ensure data reliability.

[0071] The platform's real-time monitoring interface is displayed in sections by process unit. Core monitoring indicators include instruction execution progress (adjustment completion percentage), deviation between actual parameters and target values, equipment operating status (normal / warning / fault), and energy consumption data. Color coding is used to distinguish equipment operating status: green indicates normal (parameter deviation ≤ feedback threshold), yellow indicates a warning (deviation exceeds the threshold but can be automatically corrected), and red indicates a fault (deviation exceeds the threshold and cannot be automatically corrected). For example, if the solid-liquid separator's speed is stable at 948 r / min with a deviation of 2 r / min, the status is displayed in green. If mechanical jamming prevents the speed from increasing to 950 r / min, and the actual speed is 920 r / min with a deviation of 30 r / min, the status is displayed in red. The platform immediately triggers an audible and visual warning and simultaneously pushes the warning information to the operator's terminal, indicating the faulty equipment, abnormal parameters, and suggested handling solutions.

[0072] The evaluation of the control effect adopts a multi-dimensional indicator system, including instruction execution rate (number of instructions completed / total number of instructions), parameter compliance rate (number of devices with parameters within the target threshold after stabilization / total number of devices), processing efficiency improvement rate (COD removal rate after control - COD removal rate before control), and energy consumption change rate (energy consumption per unit processing capacity after control - energy consumption per unit processing capacity before control). In the example, all four instructions were adjusted and completed, with an instruction execution rate of 100%; all device parameters stabilized within the target threshold, with a parameter compliance rate of 100%; the COD removal rate before control was 86.2%, and after control it was 88.5%, an improvement rate of 2.6%; the energy consumption per unit processing capacity decreased from 0.8 kWh / m³ to 0.75 kWh / m³, a decrease rate of 6.25%, indicating a good control effect.

[0073] The platform generates a global control execution status monitoring report at fixed intervals (hourly). The report includes a control overview (instruction number, execution time, priority), execution details for each unit (equipment status, parameter change curves, feedback information), control effect evaluation (multi-dimensional indicator values, trend analysis), and anomaly handling records (number of warnings, cause of failure, and handling result). The report uses a standardized format, annotates key data and trend charts, and supports automatic push to management terminals for real-time monitoring of process operation status. If the control effect does not meet expectations (e.g., processing efficiency improvement rate is less than 1%), the report automatically marks items requiring optimization, providing a basis for improvement in the next round of time-series data collection and control instruction generation, forming a closed-loop optimization of global intelligent control.

[0074] Another embodiment of the present invention provides an intelligent control system for pig farm manure treatment processes based on time-series data, see [link to relevant documentation]. Figure 3 The system may include: The data acquisition module 301 is used to collect real-time time-series operation data of each process unit in the entire process of sewage treatment. The time-series operation data includes solid-liquid separation efficiency sequence, anaerobic tank feed load sequence, aeration tank dissolved oxygen concentration sequence, and effluent water quality index sequence. The extraction module 302 is used to perform coupled correlation analysis on the time-series operation data, extract key feature vectors reflecting the operating status of each process unit, and predict the evolution trend of the overall treatment efficiency and stability of pig farm manure. The generation module 303 is used to generate a set of linkage control instructions for solid-liquid separation, anaerobic fermentation, aerobic treatment and sludge return links based on the key feature vector and the evolution trend through a multi-objective collaborative optimization algorithm. The execution module 304 is used to execute the linkage control instruction set, synchronously adjust the operating parameters of each process unit, and realize the global intelligent control of the pig farm manure treatment process.

[0075] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0076] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0077] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A method for intelligent control of pig farm manure treatment process based on time-series data, characterized in that, The method includes: Real-time data collection of time-series operation data for each process unit in the entire process of sewage treatment, including solid-liquid separation efficiency sequence, anaerobic tank feed load sequence, aeration tank dissolved oxygen concentration sequence, and effluent water quality index sequence. The time-series operational data were subjected to coupled correlation analysis to extract key feature vectors reflecting the operational status of each process unit, and the evolution trend of the overall treatment efficiency and stability of pig farm manure was predicted. Based on the key feature vectors and the evolution trend, a set of linkage control instructions for solid-liquid separation, anaerobic fermentation, aerobic treatment and sludge return is generated through a multi-objective collaborative optimization algorithm. The aforementioned set of linkage control instructions is executed to synchronously adjust the operating parameters of each process unit, thereby achieving global intelligent control of the pig farm manure treatment process.

2. The method according to claim 1, characterized in that, The real-time acquisition of time-series operational data for each process unit in the entire sewage treatment process includes solid-liquid separation efficiency sequences, anaerobic tank feed load sequences, aeration tank dissolved oxygen concentration sequences, and effluent water quality index sequences, including: Multiple types of IoT sensors are deployed at the outlet of the solid-liquid separator, the feed inlet of the anaerobic tank, key areas of the aeration tank, and the final outlet to collect raw data such as solid removal rate, instantaneous flow rate, dissolved oxygen concentration, and chemical oxygen demand in real time, and generate raw sensor data streams. The raw sensor data stream is clock-synchronized and data-aligned. The network time protocol is used to unify the timestamps of the data acquisition from each sensor, and interpolation and resampling are performed at a fixed sampling frequency to generate a time-aligned standardized data sequence. Anomaly detection and cleaning are performed on time-aligned standardized data sequences. A sliding window statistical method is applied to identify and remove outliers caused by sensor failures or signal interference, generating clean process operation data sequences. The clean process operation data sequence is classified and aggregated according to process unit, and a multi-dimensional time-series operation data matrix is ​​constructed to reflect solid-liquid separation efficiency, anaerobic tank feed load, dynamic changes in dissolved oxygen in aeration tank, and fluctuations in effluent water quality.

3. The method according to claim 2, characterized in that, The process of performing coupled correlation analysis on the time-series operational data, extracting key feature vectors reflecting the operational status of each process unit, and predicting the evolution trend of the overall treatment efficiency and stability of pig farm manure includes: The multidimensional time-series operation data matrix is ​​normalized to eliminate the influence of different dimensions, and the dynamic time warping algorithm is used to calculate the dynamic correlation strength between the solid-liquid separation efficiency sequence and the anaerobic tank feed load sequence, generating a coupling relationship map between processes. Based on the coupling relationship map between processes, principal component analysis is used to extract the feature components with the largest variance contribution rate from high-dimensional time series data, and generate the core feature vector after dimensionality reduction. The core feature vector is input into a pre-trained long short-term memory network prediction model. This model learns the mapping relationship between feature changes and processing efficiency fluctuations in historical data, predicts the trajectory of changes in system processing efficiency and stability within a preset period in the future, and generates an evolution trend prediction curve. By integrating core feature vectors and evolution trend prediction curves, a comprehensive state descriptor containing current state features and future trend information is constructed.

4. The method according to claim 3, characterized in that, Based on the key feature vectors and the evolution trend, a multi-objective collaborative optimization algorithm is used to generate a set of coordinated control instructions for solid-liquid separation, anaerobic fermentation, aerobic treatment, and sludge return processes, including: Based on the comprehensive state descriptor, an optimization problem mathematical model is established with the objectives of minimizing energy consumption, maximizing treatment efficiency, and maximizing operational stability. The solid-liquid separator speed, anaerobic tank feed rate, aeration rate of aeration tank, and sludge return ratio are identified as decision variables. A fitness function for a multi-objective collaborative optimization algorithm is constructed, and the evolution trend prediction results are incorporated as constraints into the function calculation to ensure that the optimization instructions not only improve the current state but also meet the requirements of future trends, thus obtaining a fitness evaluation function with trend constraints. A non-dominated sorting genetic algorithm is used to solve the fitness evaluation function with trend constraints, and a Pareto optimal solution set is searched in the solution space to generate a set of non-dominated candidate control schemes. The scheme with the highest comprehensive score is selected from the candidate control schemes, and it is decoded into a specific set of linkage control instructions for each process link.

5. The method according to claim 4, characterized in that, The execution of the linkage control instruction set, synchronously adjusting the operating parameters of each process unit to achieve global intelligent control of the pig farm manure treatment process, includes: The linkage control instruction set is analyzed, and the set values ​​of the solid-liquid separator speed, the frequency of the anaerobic tank feed pump, the power of the aeration tank blower, and the opening degree of the sludge return valve are sent to the programmable logic controllers of the corresponding process units to generate the underlying equipment control commands. Each process unit's PLC receives and executes control commands, driving actuators, including motors, pumps, fans, and valves, to perform corresponding mechanical actions, adjusting process parameters to target set values, and generating parameter adjustment execution feedback signals. By aggregating feedback signals from various actuators in real time through an industrial IoT platform, the actual execution progress and effect of linkage control commands are monitored, and a global control execution status monitoring report is generated.

6. A smart control system for pig farm manure treatment process based on time-series data, characterized in that, The system includes: The data acquisition module is used to collect real-time operating data of each process unit in the entire process of sewage treatment. The real-time operating data includes solid-liquid separation efficiency sequence, anaerobic tank feed load sequence, aeration tank dissolved oxygen concentration sequence, and effluent water quality index sequence. The extraction module is used to perform coupled correlation analysis on the time-series operation data, extract key feature vectors reflecting the operating status of each process unit, and predict the evolution trend of the overall treatment efficiency and stability of pig farm manure. The generation module is used to generate a set of linkage control instructions for solid-liquid separation, anaerobic fermentation, aerobic treatment and sludge return links based on the key feature vector and the evolution trend through a multi-objective collaborative optimization algorithm. The execution module is used to execute the linkage control instruction set, synchronously adjust the operating parameters of each process unit, and realize global intelligent control of the pig farm manure treatment process.

7. The system according to claim 6, characterized in that, The acquisition module is specifically used for: Multiple types of IoT sensors are deployed at the outlet of the solid-liquid separator, the feed inlet of the anaerobic tank, key areas of the aeration tank, and the final outlet to collect raw data such as solid removal rate, instantaneous flow rate, dissolved oxygen concentration, and chemical oxygen demand in real time, and generate raw sensor data streams. The raw sensor data stream is clock-synchronized and data-aligned. The network time protocol is used to unify the timestamps of the data acquisition from each sensor, and interpolation and resampling are performed at a fixed sampling frequency to generate a time-aligned standardized data sequence. Anomaly detection and cleaning are performed on time-aligned standardized data sequences. A sliding window statistical method is applied to identify and remove outliers caused by sensor failures or signal interference, generating clean process operation data sequences. The clean process operation data sequence is classified and aggregated according to process unit, and a multi-dimensional time-series operation data matrix is ​​constructed to reflect solid-liquid separation efficiency, anaerobic tank feed load, dynamic changes in dissolved oxygen in aeration tank, and fluctuations in effluent water quality.

8. The system according to claim 7, characterized in that, The extraction module is specifically used for: The multidimensional time-series operation data matrix is ​​normalized to eliminate the influence of different dimensions, and the dynamic time warping algorithm is used to calculate the dynamic correlation strength between the solid-liquid separation efficiency sequence and the anaerobic tank feed load sequence, generating a coupling relationship map between processes. Based on the coupling relationship map between processes, principal component analysis is used to extract the feature components with the largest variance contribution rate from high-dimensional time series data, and generate the core feature vector after dimensionality reduction. The core feature vector is input into a pre-trained long short-term memory network prediction model. This model learns the mapping relationship between feature changes and processing efficiency fluctuations in historical data, predicts the trajectory of changes in system processing efficiency and stability within a preset period in the future, and generates an evolution trend prediction curve. By integrating core feature vectors and evolution trend prediction curves, a comprehensive state descriptor containing current state features and future trend information is constructed.

9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method of any one of claims 1-5 when it is run.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1-5.