Multi-objective dynamic optimization decision method and system for aquaculture water body
By constructing a three-dimensional process tensor and feature fusion method, combined with a target long short-term memory network and dual-timescale hierarchical control decision, the problem of uncoordinated water quality regulation in factory farming was solved, achieving optimized effects in water quality stability, water conservation, and energy saving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI AGRICULTURAL UNIVERSITY
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-07
AI Technical Summary
In industrialized and high-density aquaculture scenarios, existing technologies lack quantitative predictions of future trends in water quality control, leading to uncoordinated control actions, increased energy consumption and water usage, and difficulty in simultaneously meeting the requirements of water quality stability, water conservation, and energy saving.
A multi-objective dynamic optimization decision-making method is adopted. By constructing a three-dimensional process tensor and performing feature fusion, the target long short-term memory network is used to generate water exchange control parameters and aeration control parameters. Combined with hierarchical control decision-making with dual time scales, the water quality control strategy is optimized.
It has improved the accuracy of water quality forecasting, achieved water and energy conservation while ensuring water quality, optimized water quality control strategies, and reduced energy consumption and water usage.
Smart Images

Figure CN122132783B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water quality control technology, and in particular to a multi-objective dynamic optimization decision-making method and system for aquaculture water bodies. Background Technology
[0002] In factory farming and high-density aquaculture scenarios, key water quality indicators such as dissolved oxygen, water temperature, pH, and ammonia nitrogen change continuously over time and are coupled with each other over time. The water condition usually exhibits an evolutionary characteristic of superimposed short-term fluctuations and slow drifts.
[0003] Current management often employs single threshold linkage rules or fixed water exchange plans and aeration levels for control. These methods rely on single-moment observations or static rules, lacking the ability to predict future trends. During periods of strong short-term fluctuations, false triggering and frequent start-stop cycles are common; during slow deterioration or cumulative increases, timely intervention is difficult, leading to prolonged high-load operation, increased energy and water consumption, and compromised water quality stability. Especially when water exchange and aeration have different timescales—water exchange being a low-frequency, high-cost, and delayed-effect control action, and aeration a high-frequency, low-cost, continuously adjustable, and fast-responding control action—without quantitative prediction and risk assessment of future water quality trends, these two actions can only be triggered independently based on their respective local rules, making coordination difficult. This amplifies the aforementioned asynchrony issues, making it difficult to simultaneously meet water quality constraints and achieve water and energy conservation. Summary of the Invention
[0004] Therefore, it is necessary to provide a multi-objective dynamic optimization decision-making method and system for aquaculture water bodies to address the above problems, which can save water and energy while ensuring water quality.
[0005] This application provides a multi-objective dynamic optimization decision-making method for aquaculture water bodies, the method comprising:
[0006] Acquire water quality time series data; the water quality time series data includes water quality observation data collected by the acquisition terminal according to a preset control cycle and the corresponding acquisition time;
[0007] The water quality time series data is constructed into a three-dimensional process tensor using time window length, number of segments, and data type as dimensions, respectively; the number of segments indicates the number of time segments in the water quality time series data after dividing the total time step according to the time window length.
[0008] Feature fusion is performed on the time window length dimension, the number of segments dimension, and the data type dimension of the three-dimensional process tensor to obtain the target feature sequence; wherein, the feature fusion includes at least: performing internal time aggregation operation within the segment depending on the current time step and the time steps before it for the time window length dimension; fusing historical segment features and current segment features for the number of segments dimension; and weighted fusion of features of multiple data types based on the coupling strength between variables for the data type dimension.
[0009] The target feature sequence is input into the target long short-term memory network for processing to obtain water quality prediction results, and water exchange control parameters and aeration control parameters are generated based on the water quality prediction results.
[0010] Furthermore, this application also provides a multi-objective dynamic optimization decision-making system for aquaculture water bodies, the system comprising:
[0011] The data acquisition module is used to acquire water quality time series data; the water quality time series data includes water quality observation data collected by the acquisition terminal according to a preset control cycle and the corresponding acquisition time;
[0012] The tensor construction module is used to construct a three-dimensional process tensor from the water quality time series data using the time window length, the number of segments, and the data type as dimensions, respectively; the number of segments is used to indicate the number of time segments in the water quality time series data after dividing the total time step according to the time window length.
[0013] The feature fusion module is used to perform feature fusion on the time window length dimension, the number of segments dimension, and the data type dimension of the three-dimensional process tensor respectively to obtain the target feature sequence; wherein, the feature fusion includes at least: performing internal time aggregation operation within the segment depending on the current time step and the time steps before it for the time window length dimension; fusing historical segment features and current segment features for the number of segments dimension; and weighted fusion of features of multiple data types according to the coupling strength between variables for the data type dimension.
[0014] The optimization decision module is used to input the target feature sequence into the target long short-term memory network for processing, obtain water quality prediction results, and generate water exchange control parameters and aeration control parameters based on the water quality prediction results.
[0015] Compared with the prior art, the technical solution provided in this application has the following advantages:
[0016] After acquiring water quality time series data, a three-dimensional process tensor is constructed using time window length, number of segments, and data type as dimensions. Then, for each dimension, feature fusion is performed on the data within that dimension to obtain a target feature sequence. Finally, this target feature sequence is input into a target long short-term memory (LSTM) network for processing to obtain water quality prediction results. These predictions are then used to generate water exchange and aeration control parameters. This approach, by constructing a three-dimensional process tensor and performing feature fusion across the three dimensions, allows the LSM network to extract data from these three dimensions, improving the accuracy of the water quality predictions generated. This, in turn, enables more precise adjustment of water exchange and aeration control parameters, thus achieving water and energy conservation while maintaining water quality. Attached Figure Description
[0017] Figure 1 A flowchart of a multi-objective dynamic optimization decision-making method for aquaculture water bodies according to an embodiment of the present invention is shown.
[0018] Figure 2 A schematic diagram of a dual-timescale causal feature encoding structure is shown in one embodiment of the present invention.
[0019] Figure 3 This illustration shows a schematic diagram of the structure of a memory unit in a target long short-term memory network according to an embodiment of this application.
[0020] Figure 4 This is a schematic diagram of the hierarchical control decision-making process proposed in an embodiment of the present invention.
[0021] Figure 5 This is a schematic diagram of the structure of a multi-objective dynamic optimization decision-making system for aquaculture water bodies provided in an embodiment of this application.
[0022] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention. Detailed Implementation
[0023] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0024] In factory-style and high-density aquaculture scenarios, key water quality indicators such as dissolved oxygen, water temperature, pH, and ammonia nitrogen continuously change over time and are coupled with each other over time. The water state typically exhibits an evolutionary characteristic of superimposed short-term fluctuations and slow drifts. Due to the significant time lag and cumulative effects of disturbances caused by factors such as feeding, stocking density, diurnal rhythms, and equipment operating conditions, water quality risks often begin to form before indicators reach thresholds. Simply relying on the "current observation value - threshold trigger" approach is insufficient to characterize the joint evolution trend and future direction of water quality variables, resulting in control strategies that are significantly passive and lagging. Existing management often uses single threshold linkage rules or fixed water exchange plans and fixed aeration levels for control, making it difficult to simultaneously meet water quality constraints and achieve water and energy conservation.
[0025] Therefore, to address the above problems, this application also provides a multi-objective dynamic optimization decision-making method for aquaculture water bodies. Figure 1 A flowchart of a multi-objective dynamic optimization decision-making method for aquaculture water bodies according to an embodiment of the present invention is shown, as follows: Figure 1 As shown, the method flow includes:
[0026] Step 101: Obtain water quality time series data.
[0027] The water quality time series data includes water quality observation data collected by the acquisition terminal according to a preset control cycle and the corresponding acquisition time.
[0028] In actual operation, the data acquisition terminal reads water quality observation data such as dissolved oxygen, water temperature, pH, ammonia nitrogen, nitrate, and turbidity according to a preset control cycle and records the corresponding acquisition time. Simultaneously, it reads the start / stop status of aeration equipment, aeration intensity feedback parameters, valve status of water exchange equipment, and water exchange flow feedback parameters, and records the current control commands and their execution confirmation information. The acquisition records are then checked for completeness, missing records and obviously abnormal records are marked, and valid records are written to storage.
[0029] Furthermore, after obtaining the aforementioned water quality observation data, the data can be time-aligned, anomaly corrected, and normalized to ensure that different indicators remain synchronized and comparable over time.
[0030] Specifically, in this embodiment, water quality observation data including the collection time can be resampled and time-aligned at a uniform sampling interval so that each variable corresponds to the same time on the same time axis; missing records are filled in using linear interpolation and missing markers are retained; obvious abnormal values are replaced using the median of adjacent time windows and abnormal markers are retained; subsequently, the collected data are normalized based on the minimum and maximum values of historical data to obtain normalized water quality time series data.
[0031] Step 102: Using the time window length, number of segments, and data type as dimensions, construct the water quality time series data into a three-dimensional process tensor.
[0032] The number of segments indicates the number of time segments in a water quality time series data after dividing the total time step according to the length of the time window.
[0033] In step 102, the water quality time series data can be divided into multiple continuous time segments according to the preset time window length. The three-dimensional process tensor is constructed using the time window length, the number of segments, and the data type as three dimensions. At this time, the three-dimensional process tensor can simultaneously characterize the short-term change characteristics within a single time segment, the long-term evolution trend between different time segments, and the correlation between multiple water quality indicators.
[0034] Specifically, in this embodiment of the application, deep feature extraction can be performed on the normalized water quality time series data. First, process fragmentation is performed, and the one-dimensional time series data is input... ( ,in For time step, Based on the physical process characteristics of aquaculture conditions (with variables as the dimension), it is reconstructed into a three-dimensional process tensor. Let the time window length for each operating condition segment be... The number of fragments The reconstructed three-dimensional process tensor is represented as .
[0035] At this point, the discrete time-point sequence (i.e., water quality time-series data) is transformed into a sequence of process segments with physical semantics (i.e., a three-dimensional process tensor), where the dimension... Represents the macroscopic evolution between segments, dimensions Characterizing the micro-dynamics within a fragment, dimension Characterizes the coupling relationship between multiple variables.
[0036] Step 103: Perform feature fusion on the time window length dimension, fragment number dimension, and data type dimension of the three-dimensional process tensor respectively to obtain the target feature sequence.
[0037] In this embodiment of the application, dynamic weight generation is first required, that is, for the first... For each fragment, its state summary component is extracted, and a dynamic weight reassembly specific to that fragment is generated through nonlinear mapping. The calculation formula is as follows:
[0038]
[0039] in, and These represent the state summary components extracted from the current segment; MLP stands for Multilayer Perceptron Network. ( ) is the Sigmoid activation function.
[0040] To achieve independent causal control across two time scales and maintain the adjustability of the cross-variable mapping, the 3D convolution kernel is decomposed into... Causal convolution along the axis, Causal convolution along the axis and along The channel hybrid operator of the axis is executed in three concatenated segments, thereby achieving intra-segment causal time aggregation based on the time window length dimension, cross-segment recursive aggregation based on the number of segments dimension, and cross-variable dynamic coupling fusion based on the data type dimension. To avoid confusion with inter-segment indexing, in the three-dimensional process tensor... Introducing a dual-time index structure: Let the segment number be denoted as . , indicating the first A process segment; let the time step within the segment be denoted as . , indicating a local time position within the segment.
[0041] Furthermore, step 103 includes the following three fusion processes:
[0042] First, along Causal convolution within the time frame (within a segment) is an internal time aggregation operation performed within a segment based on the length of the time window, depending on the current time step and the time steps before it. Specifically, it can perform internal time aggregation operations depending on the current time step and the time steps before it on the local time series within each time segment.
[0043] Specifically, in this embodiment, multiple zero data points can be padded before the start position of the time window length dimension; then, according to the dynamic convolution weights, a convolution kernel sliding operation is performed on the time window length dimension to perform local feature aggregation on the sequence within the time window; at this time, the dynamic convolution weights are used to indicate the weight values of each time point within the time window length; the above convolution kernel sliding operation is used to process each time step in sequence, and for each time step, the data of the current time step is fused with the data of the previous time step.
[0044] Furthermore, the specific execution logic of this fusion process is as follows: This aggregation process only applies to... Axis, not shaft and Cross-dimensional computation is introduced along the axis, thereby maintaining the independence of structural and variable dimensional representations between fragments. This is achieved through... The axis performs zero-padding only on the left and convolution operations along that axis, constructing a unidirectional temporal convolution structure. This ensures that the output at any given time point is calculated only from the current and previous time points within the same segment, excluding data from subsequent time points, thus structurally achieving causal constraints in the temporal direction within a segment. Specifically, the convolution kernel size is... The three-dimensional convolution operator is used to obtain the dynamic features within the segment. :
[0045]
[0046] in, Indicates only for Fill the left side of the axis; Indicates only Perform convolution operation in the axial direction and in shaft and The dimensions remain unchanged in the axial direction; These are the corresponding dynamic convolution weights, used to adjust the aggregation strength and response mode of time-dependent processes within a segment.
[0047] Second, along Causal convolution on the axis refers to the recursive aggregation of the feature sequences corresponding to each time segment in chronological order, based on the dimension of the number of segments, in order to fuse the features of historical segments with the features of the current segment.
[0048] Specifically, in this embodiment, the features within each time segment can be arranged in chronological order to construct a segment sequence; for each current segment feature, the current segment feature is fused with the recursive state of the previous segment by a gating coefficient to obtain the recursive state corresponding to the current segment.
[0049] Furthermore, the specific execution logic of this fusion process is as follows: This stage introduces cross-segment historical context without disrupting the intra-segment order structure. To this end, only... The axis performs unidirectional historical recursive aggregation, not shaft and The axis introduces cross-dimensional computation, thereby maintaining the independence of the dynamic representation within the fragment and the cross-variable mapping structure. Specifically, let the feature sequence within the fragment obtained in the previous stage be... Construction along The recursive state of the nth segment of the axis It also employs a gating mechanism to adaptively fuse historical states with the current segment:
[0050]
[0051] in, Initialize to zero; The dynamic features within the nth segment; This is a gating coefficient generated from the current segment, used to adjust the retention ratio of historical information across segments and the writing ratio of information in the current segment. This indicates element-wise multiplication.
[0052] Thirdly, along The channel mixing operator of the axis is to perform weighted fusion of features of multiple data types based on the coupling strength between variables in the dimension of data types. Specifically, it can perform normalization processing on the features of multiple data types at the same time position, and construct dynamic coupling relationship based on the coupling strength between variables, so as to perform weighted fusion of features of multiple data types according to the dynamic coupling relationship, thereby realizing cross-variable coupling mapping.
[0053] Specifically, in this embodiment, normalization processing can be performed on the features of multiple data types at the same time position to obtain normalized features; then, a dynamic coupling matrix between variables can be generated based on the normalized features in each time segment; then, a preset number of highly correlated elements can be retained in the dynamic coupling matrix to form a dynamic sparse coupling matrix; finally, the features of multiple data types in each time segment can be weighted and fused based on the dynamic sparse coupling matrix.
[0054] Furthermore, the specific execution logic of this fusion process is as follows: This stage establishes a dynamic sparse coupling relationship for the multivariate representations at the same time index, making the output features explicitly include inter-variable dependency information. Due to the variable axis... Since there is no chronological relationship and no future information leakage, no causal filling is applied at this stage; normalization and coupling mapping are only performed on the variable dimension.
[0055] Specifically, for all cross-segment variable features In each fixed Position along variable dimension Execution layer normalization yields normalized values for variable features across segments. :
[0056]
[0057] in, Indicates that in each fixed Location, in relation to variable dimensions The mean and variance were calculated and standardized to eliminate numerical instability caused by differences in the dimensions and scales of different variables.
[0058] Subsequently, the fragment-level summary is generated. The dynamic coupling matrix of each segment:
[0059]
[0060]
[0061] in, Indicates the first Variable characteristics of each segment; Indicates along The average of the axes yields the fragment-level summary of the nth fragment. ; This indicates that the input will be reshaped into the given shape; This is the unnormalized coupling matrix for the nth segment (i.e., the dynamic coupling matrix mentioned above), whose elements represent the coupling strength between variables.
[0062] To obtain a sparsely coupled structure, Keep each line before Find the maximum value and perform row normalization, where Preset value:
[0063]
[0064]
[0065] in, This means selecting elements from each row, specifically the largest element. Each element is represented and its position is preserved. The unnormalized coupling matrix of the nth segment is in the nth segment. The intermediate matrix after the maximum value; This means normalizing each row so that the sum of the weights of each row is 1, thus obtaining the dynamic sparse adjacency matrix for the nth segment. ; This indicates element-wise multiplication.
[0066] based on , for fragments Perform cross-variable coupling mapping at all time points within the time frame to obtain the target feature sequence. :
[0067]
[0068] in, and It is a learnable mapping matrix.
[0069] Furthermore, the target feature sequence obtained above can be sequentially input into the normalization layer and the deactivation layer for data processing, and then the processed result can be input into the target long short-term memory network for further processing.
[0070] Specifically, at each time point, the mean and variance are calculated along the feature dimension, and the corresponding feature vectors are standardized to distribute them within a uniform scale, thereby reducing the impact of amplitude differences caused by different variable dimensions and dynamic coupling mapping on subsequent gating calculations. After completing the layer normalization process, a random deactivation operation is applied to the feature sequence to suppress excessive co-adaptation among features. The feature sequence after the above normalization and deactivation processes is then fed as input into the improved LSTM network (i.e., the target long short-term memory network in this embodiment) for gating recursion. Figure 2 A schematic diagram of a dual-timescale causal feature encoding structure according to an embodiment of this application is shown. (The diagram is presented as follows...) Figure 2 The method shown (that is, the implementation method corresponding to step 103) can realize deep feature extraction of water quality time series data, thereby improving the accuracy of subsequent model inference through the target long short-term memory network.
[0071] Step 104: Input the target feature sequence into the target long short-term memory network for processing to obtain water quality prediction results, and generate water exchange control parameters and aeration control parameters based on the water quality prediction results.
[0072] In this step, the target feature sequence is input into the target long short-term memory network for processing to obtain water quality prediction results for a future period. Based on this, the water quality change trend and potential risks are assessed according to the prediction results, and water exchange control parameters and aeration control parameters are generated respectively.
[0073] Among them, the water exchange control parameters are used to guide low-frequency, high-cost, and lagging water exchange operations to achieve early intervention in water quality deterioration trends; the aeration control parameters are used to guide high-frequency, continuously adjustable aeration operations to achieve rapid response to short-term fluctuations.
[0074] Specifically, in a standard long short-term memory network unit, the forgetting gate is used to measure the memory state at the previous moment. The proportion of each dimension of information that should be retained, in order to suppress the interference of irrelevant historical information on the current calculation, is expressed as follows:
[0075]
[0076] in, Output for the forget gate. and These represent the input items respectively. With recursive terms The corresponding forget gate weight matrix, For bias vectors, This is the Sigmoid activation function.
[0077] In the time series of aquaculture water quality data, the scales of change for different variables vary significantly: dissolved oxygen often exhibits short-term fluctuations and rapid declines, water temperature and pH tend to drift slowly, while changes in ammonia nitrogen and nitrate typically show more pronounced cumulative and lagging effects. In this multi-timescale water quality evolution process, the model needs to continuously adjust the retention rate of historical information during the memory update phase to avoid over-remembering rapid changes or prematurely forgetting slow evolutionary processes. However, when the forget gate adopts a sigmoid form, its output tends to level off within a range close to 0 or 1, reducing the forget gate's responsiveness to input changes. This makes it difficult to finely adjust the memory retention ratio according to changes in water quality, thus limiting the ability to characterize multi-timescale changes.
[0078] Figure 3 A schematic diagram of the structure of a memory unit in a target long short-term memory network according to an embodiment of this application is shown. Figure 3 As shown, the target long short-term memory network in this embodiment rewrites the standard forget gate of the standard long short-term memory network unit from the sigmoid form to an exponential decay forget gate:
[0079]
[0080] in, For a moment The forget gate vector is used to control the memory state of the previous time step element by element. The retention rate of (i.e., long-term memory input); This is a water quality observation vector (i.e., the input at the current time) consisting of dissolved oxygen, water temperature, pH, ammonia nitrogen, and nitrate. The hidden state vector of the previous time step (i.e., the hidden layer input); and This is the weight matrix. It is the bias vector; This is the Softplus activation function, used to constrain the exponential term to be non-negative and to ensure stable training. It is a natural exponential function with base e. Therefore, the forgetting gate... The value of is always located in The range is continuously variable, which allows the model to weaken old memories more quickly under conditions of strong short-term disturbances such as dissolved oxygen, and to maintain more stable memory retention under conditions of hysteretic accumulation such as ammonia nitrogen and nitrate, thereby improving the adaptive modeling ability for changes at different scales.
[0081] To enable gating calculations to reference the most relevant historical change patterns under the current water quality conditions, this invention proposes a key-value memory retrieval and fusion mechanism. Water quality sequences in aquaculture water bodies may exhibit similar evolutionary segments under different operating conditions, such as a phased decline in dissolved oxygen, slow drift in water temperature and pH, and continuous accumulation or phased reversal of ammonia nitrogen and nitrate. This mechanism indexes and aggregates historical segments, allowing the current gating calculation to retrieve similar states from existing historical patterns and incorporate corresponding memory information.
[0082] Specifically, such as Figure 3 As shown, unlike the architecture of ordinary long short-term memory networks, the target long short-term memory network maintains a memory bank (or key-value memory bank) and stores each key vector in the memory bank.
[0083] At this time, as Figure 3 As shown, in the processing of the target long short-term memory network, a query vector needs to be generated based on the current water quality observation vector and the hidden state at the previous time step; then, attention weights are paid based on the similarity between the query vector and each key vector in the key-value memory; finally, the value vectors corresponding to each key vector are aggregated based on the similarity attention weights to obtain the retrieval vector.
[0084] Specifically, Figure 3 The target long short-term memory network shown maintains a memory bank of size K:
[0085]
[0086] in, For the first The key vector of each memory slot, This is the corresponding value vector. At time... The query vector is generated from the current water quality observation vector and the previous hidden state: For memory;
[0087]
[0088] It also calculates the similarity weights between the query vector and each memory key. :
[0089]
[0090] Based on this, the memory values are weighted and aggregated to obtain the retrieval vector. :
[0091]
[0092] in, Indicates time The generated query vector, and Indicates the first The and the first The key vector corresponding to each memory slot. This represents the corresponding value vector. Indicates time For the Attention weight for each memory slot This represents the retrieval vector obtained by weighted aggregation of memory values based on attention weights. Indicates the capacity of the key-value store. The feature dimensions representing the key vector and query vector; and These are the weight matrices used in the query vector calculation process; This is the water quality observation vector; The hidden state vector from the previous time step; This is the bias vector used in the query vector calculation process.
[0093] To ensure that the memory is updated over time, key-value pairs to be written are generated at each moment from the current water quality observation vector and the previous hidden state, and the key vector and value vector of the target slot are updated in an exponential sliding manner, so that the memory continuously reflects the statistical characteristics of recent water quality evolution segments.
[0094] After introducing the retrieval vector, it is incorporated into the gating calculation of the forget gate and the input gate, so that the forget gate is jointly determined by the current water quality observation, the hidden state at the previous time step, and the retrieval vector:
[0095]
[0096] in, For a moment The forget gate vector is used to control the memory state of the previous time step element by element. The retention ratio; This is the water quality observation vector; The hidden state vector from the previous time step; and This is the weight matrix; It is the bias vector; This is the Softplus activation function; To retrieve the weight matrix from the vector to the decay rate.
[0097] The input gate is rewritten after introducing the retrieval vector as follows:
[0098]
[0099] in, The input gate vector; , These are the weight matrices from the input term and the recursive term to the input gate, respectively; To retrieve the weight matrix from the vector to the input gate; It is the bias vector; This is the Sigmoid activation function.
[0100] Candidate memories are still calculated in the standard form:
[0101]
[0102] in, Candidate memory vectors; This is the weight matrix from the input items to the candidate memories; This is the weight matrix from the recursive terms to the candidate memories; For the corresponding bias vector; It is the hyperbolic tangent activation function.
[0103] The memory state is updated jointly by the memory state of the previous moment and the candidate memories generated at the current moment, and the update form is as follows:
[0104]
[0105] in, Indicates time The memory state vector (i.e.) Figure 3 (Long-term memory output in the middle) Indicates time The memory state vector, Represents the exponential forgetting gate vector. Represents the input gate vector. This indicates element-wise multiplication.
[0106] The output gate maintains the same update form as the hidden state, and its expression is:
[0107]
[0108] in, Represents the output gate vector. Indicates time The hidden state vector (i.e., the short-time memory output) is passed to the next time step as the output of the current time step, and serves as the hidden layer input of the next time step; The weight matrix from the input terms to the output gate. Let the recursive weight matrix from the hidden state to the output gate be . For the corresponding bias vector; It is the Sigmoid activation function. This is the hyperbolic tangent activation function. In addition to the modifications mentioned above, Figure 3 The principle of the intermediate memory unit is the same as that of the standard LSTM memory unit, and will not be discussed further here. Figure 3 The other parts of the memory unit will be described in detail.
[0109] In this embodiment, considering the characteristics of water quality changes being both continuous evolution and historical recurrence, the prediction output of the target long short-term memory network adopts a retrieval-enhanced prediction head structure, including a parameter mapping branch, a retrieval enhancement branch, and a fusion gating. The parameter mapping branch outputs the prediction result driven by the current state based on the hidden state at the last time step, the retrieval enhancement branch outputs the prediction result driven by historical similarity patterns based on the retrieval vector at the last time step, and the fusion gating is used to adaptively weight and sum the outputs of the parameter mapping branch and the retrieval enhancement branch to obtain a multi-step prediction sequence containing multiple evolutionary information as the final water quality prediction result.
[0110] The parameter mapping branch hides the state vector at the last time step. Using ReLU activation functions as input, intermediate representations are obtained through fully connected mappings. Its expression is:
[0111]
[0112] in, The hidden state vector at the final time step; From The weight matrix is represented in the middle. For the corresponding bias vector; This is the intermediate representation vector for the parameter mapping branch.
[0113] Then, a multi-step prediction sequence for the future is obtained through linear mapping. :
[0114]
[0115] in, From To the predicted sequence The weight matrix; For the corresponding bias vector; This is a multi-step prediction sequence for the future obtained based on a nonlinear mapping of the current state.
[0116] The retrieval enhancement branch retrieves the vector at the last time step. Using historical patterns as input, a multi-step prediction sequence for the future is obtained through linear mapping. Its expression is:
[0117]
[0118] in, The final time-time retrieval vector; From To the predicted sequence The weight matrix; For the corresponding bias vector; This is a multi-step prediction sequence for the future obtained based on historical similarity evolutionary patterns.
[0119] To achieve adaptive fusion of the two prediction results, a fusion gating mechanism is introduced. The gating coefficient vector... Depend on and After concatenation and mapping using an activation function, the final predicted output is represented as:
[0120]
[0121] in, This indicates vector concatenation; This is the gated mapping weight matrix; For the corresponding bias vector; Use the Sigmoid activation function; This is the gating coefficient vector.
[0122] The final predicted output is obtained by element-weighted fusion:
[0123]
[0124] in, This indicates element-wise multiplication. This is the final multi-step prediction output.
[0125] In this embodiment of the application, before using the aforementioned target long short-term memory network to predict water quality changes over multiple time steps, it is necessary to train the target long short-term memory network.
[0126] Specifically, in this embodiment, a real water quality sequence can be obtained first. Then, based on the real water quality sequence, water quality prediction results, parameter mapping branch prediction output, and retrieval enhancement branch prediction output, a loss value is calculated using a target loss function to update the parameters of the target long short-term memory network, thereby enabling the iteratively updated target long short-term memory network to predict future water quality.
[0127] Furthermore, in this embodiment, to prevent a single prediction branch from dominating the model training process, a dual-head joint loss function is constructed as the target loss function to simultaneously apply supervisory constraints to the fused prediction output, the parameter mapping branch prediction output, and the retrieval enhancement branch prediction output. The target loss function is defined as:
[0128]
[0129] in, This is a true water quality sequence. To fuse the predicted output, Predict the output for the parameter mapping branch. To retrieve enhanced branch prediction output, The weight coefficients of the auxiliary supervision terms for the parameter mapping branch. To retrieve the weight coefficients of the auxiliary supervision items for enhanced branches; Indicates the mean square error loss; This is the loss value. By simultaneously constraining the main output and branch outputs, we can guide the collaborative optimization of each prediction branch, avoiding over-reliance on a single path during training.
[0130] After obtaining the predicted sequence of water quality variables for multiple future steps, this application also constructs a hierarchical control decision structure with dual time scales. Figure 4 This is a schematic diagram of the hierarchical control decision-making process proposed in an embodiment of the present invention.
[0131] like Figure 4 As shown, specifically, after obtaining the predicted sequence of future multi-step water quality variables and the current equipment parameters for the same control period as input, a control decision-making strategy matching the dynamic characteristics of water quality is further constructed based on the water quality evolution trend and potential risk characteristics reflected in the prediction results. Considering that water exchange regulation usually has the characteristics of execution lag and long action period, while aeration regulation has the characteristics of fast response and continuous adjustment, if a unified control is adopted using a single time scale, it is easy to cause conflicts between suppressing rapid disturbances and maintaining long-term goals. Based on this, the control decision is divided into a dual-time-scale hierarchical strategy with an upper slow cycle and a lower fast cycle.
[0132] Let the length of the lower-level fast cycle be... The length of the upper slow cycle is And satisfy:
[0133]
[0134] in, Used to characterize the multiple between fast and slow periods. Represents a positive integer. At the start of each slow cycle, the upper layer generates a water exchange setting and maintains this target throughout the corresponding slow cycle; the lower layer outputs continuous aeration intensity based on real-time observations during each fast cycle, achieving smooth adjustment and rapid disturbance suppression. To ensure traceability and consistency of goals between the upper and lower layers, the timestamp is used to... Each fast cycle is assigned to the corresponding slow cycle index. ,in:
[0135]
[0136] This ensures that all fast-cycle state transitions within the same slow cycle are associated with the same upper-level action and coordination parameters. The upper and lower-level states and their corresponding actions are aligned and stored in the database according to this index, thereby forming a consistent binding of state-action-result within the same slow cycle. This avoids energy waste or water quality risk accumulation caused by inconsistent goals between upper and lower levels.
[0137] Within each lower-level fast cycle, the current lower-level state is input into the lower-level strategy network, outputting continuous aeration control actions corresponding to the aeration control parameters. These aeration control actions are continuous values with smooth changes to reduce additional energy consumption and equipment wear caused by frequent starts / stops or large fluctuations. At the start of each upper-level slow cycle, the upper-level strategy generates discrete water exchange levels and maps them to a preset set of water exchange frequencies, obtaining the water exchange control parameters used in the current slow cycle. Within this slow cycle, lower-level aeration adjustment is executed around the upper-level water exchange target boundary to ensure consistency between upper and lower-level control targets and improve project feasibility. After generating and executing the upper and lower-level control actions, the environmental state is updated: when the upper level triggers a water exchange operation, the water quality concentration state is updated based on the assumption of complete mixing; within the lower-level fast cycle, the dissolved oxygen state is dynamically updated according to the aeration control actions. After the state update is completed, the updated water quality data and corresponding energy consumption information are written to the storage unit, and the state input for the next cycle is constructed accordingly, forming a closed-loop structure of state-action-environment feedback. Within each lower-level fast cycle, the aeration control effect is quantitatively evaluated, simultaneously introducing energy consumption penalties, dissolved oxygen deviation penalties, and action change penalties. This ensures that the lower-level strategy gradually reduces aeration energy consumption and improves control smoothness while meeting dissolved oxygen stability constraints. At the end of each upper-level slow cycle, the overall operational effect within that slow cycle is comprehensively evaluated. The upper-level evaluation focuses on reflecting the long-term effects of the water exchange strategy and guides the strategy to achieve a balance between water conservation goals and water quality safety by penalizing water exchange costs and persistent water quality violations, rather than simply optimizing instantaneous indicators. After obtaining the evaluation results, the lower-level experience samples are written into the experience buffer, and the lower-level strategy network is updated using a continuous action reinforcement learning algorithm.
[0138] Lower-level policy updates are executed frequently in fast cycles, enabling the policy to quickly adapt to environmental disturbances and load changes, thus forming a stable real-time closed-loop control capability. At the end of each upper-level slow cycle, upper-level experience samples are used for upper-level policy updates. An alternating update mechanism reduces training instability caused by the coupling between upper and lower-level policies. Specifically, when updating the lower-level policy, the upper-level policy parameters are fixed to stabilize the target boundary, and when updating the upper-level policy, the lower-level policy parameters are frozen to ensure that the evaluation is based on stable execution behavior. After the system stabilizes, the upper and lower-level policies are updated alternately at a preset frequency to further improve overall control performance.
[0139] In summary, after acquiring water quality time series data, a three-dimensional process tensor is constructed using time window length, number of segments, and data type as dimensions. Then, for each dimension, feature fusion is performed on the data within that dimension to obtain a target feature sequence. Finally, this target feature sequence is input into a target long short-term memory (LSTM) network for processing to obtain water quality prediction results. These results are then used to generate water exchange and aeration control parameters. This approach, by constructing a three-dimensional process tensor and performing feature fusion across the three dimensions, allows the LSM network to extract data from these three dimensions, improving the accuracy of the water quality prediction results generated by the LSM network. This, in turn, enables more precise adjustment of water exchange and aeration control parameters, thereby conserving water and energy while ensuring water quality.
[0140] This application also provides a multi-objective dynamic optimization decision-making system for aquaculture water bodies. This device is used to implement the above embodiments and preferred embodiments, and 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.
[0141] This application provides a multi-objective dynamic optimization decision-making system for aquaculture water bodies. Figure 5 This is a schematic diagram of a multi-objective dynamic optimization decision-making system for aquaculture water bodies provided in an embodiment of this application. The device includes:
[0142] Data acquisition module 501 is used to acquire water quality time series data; the water quality time series data includes water quality observation data collected by the acquisition terminal according to a preset control cycle and the corresponding acquisition time;
[0143] Tensor construction module 502 is used to construct a three-dimensional process tensor from the water quality time series data using time window length, number of segments and data type as dimensions respectively; the number of segments is used to indicate the number of time segments in the water quality time series data after dividing the total time step according to the time window length.
[0144] The feature fusion module 503 is used to perform feature fusion on the time window length dimension, the number of segments dimension, and the data type dimension of the three-dimensional process tensor respectively to obtain the target feature sequence; wherein, the feature fusion includes at least: performing an internal time aggregation operation within the segment that depends on the current time step and the time steps before it for the time window length dimension; fusing historical segment features and current segment features for the number of segments dimension; and weighted fusion of features of multiple data types according to the coupling strength between variables for the data type dimension.
[0145] The optimization decision module 504 is used to input the target feature sequence into the target long short-term memory network for processing, obtain water quality prediction results, and generate water exchange control parameters and aeration control parameters based on the water quality prediction results.
[0146] In summary, after acquiring water quality time series data, a three-dimensional process tensor is constructed using time window length, number of segments, and data type as dimensions. Then, for each dimension, feature fusion is performed on the data within that dimension to obtain a target feature sequence. Finally, this target feature sequence is input into a target long short-term memory (LSTM) network for processing to obtain water quality prediction results. These results are then used to generate water exchange and aeration control parameters. This approach, by constructing a three-dimensional process tensor and performing feature fusion across the three dimensions, allows the LSM network to extract data from these three dimensions, improving the accuracy of the water quality prediction results generated by the LSM network. This, in turn, enables more precise adjustment of water exchange and aeration control parameters, thereby conserving water and energy while ensuring water quality.
[0147] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention. This electronic device can be a computer device used to execute the above-described method. Figure 6 As shown, the electronic device includes one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processor can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces).
[0148] The processor 10 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0149] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0150] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the use of the electronic device based on the display of a mini-program landing page. Furthermore, the memory 20 may include high-speed random access memory (RAM), and may also include non-transient memory, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device. The memory 20 may include volatile memory, such as RAM; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid-state drive; the memory 20 may also include combinations of the above types of memory.
[0151] The electronic device also includes a communication interface 30 for communicating with other devices or communication networks.
[0152] 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, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0153] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0154] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A multi-objective dynamic optimization decision-making method for aquaculture water bodies, characterized in that, The method includes: Acquire water quality time series data; the water quality time series data includes water quality observation data collected by the acquisition terminal according to a preset control cycle and the corresponding acquisition time; The water quality time series data is constructed into a three-dimensional process tensor using time window length, number of segments, and data type as dimensions, respectively; the number of segments is used to indicate the number of time segments in the water quality time series data after dividing the total time step according to the time window length. Feature fusion is performed on the time window length dimension, the number of segments dimension, and the data type dimension of the three-dimensional process tensor to obtain the target feature sequence; wherein, the feature fusion includes at least: performing internal time aggregation operation within the segment depending on the current time step and the time steps before it for the time window length dimension; fusing historical segment features and current segment features for the number of segments dimension; and weighted fusion of features of multiple data types based on the coupling strength between variables for the data type dimension. The target feature sequence is input into the target long short-term memory network for processing to obtain water quality prediction results, and water exchange control parameters and aeration control parameters are generated based on the water quality prediction results.
2. The method according to claim 1, characterized in that, The feature fusion of data within each dimension of the three-dimensional process tensor includes: For each time window, an internal time aggregation operation is performed on the local time series within each time segment, depending on the current time step and the time steps before it. For the dimension of the number of segments, the feature sequences corresponding to each time segment are recursively aggregated in chronological order to fuse the features of historical segments with the features of the current segment; For the data type dimension, normalization is performed on the features of multiple data types at the same time position, and dynamic coupling relationship is constructed based on the coupling strength between variables, so as to perform weighted fusion of features of multiple data types according to the dynamic coupling relationship.
3. The method according to claim 2, characterized in that, For each time segment, internal time aggregation operations are performed on the local time series, taking into account the length of the time window. Pad with multiple zero data points before the start of the time window length dimension; Based on the dynamic convolution weights, a convolution kernel sliding operation is performed along the time window length dimension to perform local feature aggregation on the sequence within the time window; the dynamic convolution weights are used to indicate the weight values at each time point within the time window length. The convolution kernel sliding operation is used to process each time step sequentially, and for each time step, the data of the current time step is fused with the data of the previous time step.
4. The method according to claim 2, characterized in that, Regarding the dimension of the number of segments, the feature sequences corresponding to each time segment are recursively aggregated in chronological order, including: Arrange the features within each time segment in chronological order to construct a segment sequence; for each current segment feature, use a gating coefficient to control the fusion of the current segment feature with the recursive state of the previous segment to obtain the recursive state corresponding to the current segment.
5. The method according to claim 2, characterized in that, The method involves normalizing features of multiple data types at the same time point for the data type dimension, and constructing dynamic coupling relationships based on the coupling strength between variables. This is followed by weighted fusion of features from multiple data types based on these dynamic coupling relationships, including: Normalization is performed on features of multiple data types at the same time location to obtain normalized features; A dynamic coupling matrix between variables is generated based on the normalized features within each time segment; A preset number of highly correlated elements are retained in the dynamic coupling matrix to form a dynamic sparse coupling matrix; The features of multiple data types in each time segment are weighted and fused based on the dynamic sparse coupling matrix.
6. The method according to any one of claims 1 to 5, characterized in that, The forgetting gate vector and input gate vector in the target long short-term memory network are represented by the following formulas: in, For a moment The forget gate vector is used to control the memory state of the previous time step element by element. The retention ratio; This is the water quality observation vector; The hidden state vector from the previous time step; and This is the weight matrix; It is the bias vector; This is the Softplus activation function; To retrieve the weight matrix from the vector to the decay rate; This represents the retrieval vector obtained by weighting and aggregating memory values based on attention weights. in, The input gate vector; , These are the weight matrices from the input term and the recursive term to the input gate, respectively; To retrieve the weight matrix from the vector to the input gate; It is the bias vector; Use the Sigmoid activation function; The memory state is updated using the following formula: in, Indicates time The memory state vector, Indicates time The memory state vector, This represents the candidate memory vector generated at the current time. Represents the exponential forgetting gate vector. Represents the input gate vector. This indicates element-wise multiplication. The retrieval vector is obtained by weighting the similarity of each key vector stored in the key-value memory based on the query vector and aggregating the corresponding value vectors.
7. The method according to claim 6, characterized in that, The prediction output of the target long short-term memory network includes a parameter mapping branch, a retrieval enhancement branch, and a fusion gating. The parameter mapping branch outputs a prediction result driven by the current state based on the hidden state at the last time step. The retrieval enhancement branch outputs a prediction result driven by historical similar patterns based on the retrieval vector at the last time step. The fusion gating is used to adaptively weight and fuse the two prediction results to obtain the water quality prediction result. The parameter mapping branch is represented by the following formula: in, The hidden state vector at the final time step; From To the middle indicates The weight matrix; For the corresponding bias vector; This is the intermediate representation vector for the parameter mapping branch; From To the predicted sequence The weight matrix; For the corresponding bias vector; This is a multi-step prediction sequence for the future obtained based on a nonlinear mapping of the current state; The retrieval enhancement branch is represented by the following formula: in, The final time-time retrieval vector; From To the predicted sequence The weight matrix; For the corresponding bias vector; This is a multi-step prediction sequence for the future obtained based on historically similar evolutionary patterns; The fusion gating is expressed by the following formula: in, This indicates vector concatenation; This is the gated mapping weight matrix; For the corresponding bias vector; Use the Sigmoid activation function; This is the gating coefficient vector; The water quality prediction results are expressed by the following formula: in, This indicates element-wise multiplication. This is the final multi-step prediction output.
8. The method according to claim 7, characterized in that, The target long short-term memory network maintains a key-value memory; the key-value memory stores each key vector and the corresponding value vector; the key-value memory is represented by the following formula: in, For the first The key vector of each memory slot, For the corresponding value vector; For key-value stores; This represents the capacity of the key-value store; The calculation process of the retrieval vector is represented by the following formula: in, This represents the corresponding value vector. Indicates time For the Pay attention to the weighting of the similarity between memory slots. This represents the retrieval vector obtained by weighting and aggregating memory values based on similarity attention weights; The calculation process of the similarity attention weight is expressed by the following formula: in, Pay attention to weights for similarity. and Indicates the first The and the first The key vector corresponding to each memory slot. Indicates the capacity of the key-value store. The feature dimensions representing the key vector and query vector; The process of generating the query vector is represented by the following formula: in, and These are the weight matrices used in the query vector calculation process; This is the water quality observation vector; The hidden state vector from the previous time step; This is the bias vector used in the query vector calculation process; Indicates time The generated query vector.
9. The method according to claim 8, characterized in that, The method further includes: Obtain the actual water quality sequence; Based on the real water quality sequence, the water quality prediction results, the parameter mapping branch prediction output, and the retrieval enhancement branch prediction output, the loss value is calculated through the target loss function to update the parameters of the target long short-term memory network. The target loss function is a bi-headed joint loss function that simultaneously applies supervised constraints to the fusion prediction output, the parameter mapping branch prediction output, and the retrieval enhancement branch prediction output. The target loss function is as follows: in, This is a true water quality sequence. To fuse the predicted output, Predict the output for the parameter mapping branch. To retrieve enhanced branch prediction output, The weight coefficients of the auxiliary supervision terms for the parameter mapping branch. To retrieve the weight coefficients of the auxiliary supervision items for enhanced branches; This represents the mean squared error loss; It is the loss value.
10. A multi-objective dynamic optimization decision-making system for aquaculture water bodies, characterized in that, The system includes: The data acquisition module is used to acquire water quality time series data; the water quality time series data includes water quality observation data collected by the acquisition terminal according to a preset control cycle and the corresponding acquisition time; The tensor construction module is used to construct a three-dimensional process tensor from the water quality time series data using the time window length, the number of segments, and the data type as dimensions, respectively; the number of segments is used to indicate the number of time segments in the water quality time series data after dividing the total time step according to the time window length. Feature fusion is performed on the time window length dimension, the number of segments dimension, and the data type dimension of the three-dimensional process tensor to obtain the target feature sequence; wherein, the feature fusion includes at least: performing internal time aggregation operation within the segment depending on the current time step and the time steps before it for the time window length dimension; fusing historical segment features and current segment features for the number of segments dimension; and weighted fusion of features of multiple data types based on the coupling strength between variables for the data type dimension. The optimization decision module is used to input the target feature sequence into the target long short-term memory network for processing, obtain water quality prediction results, and generate water exchange control parameters and aeration control parameters based on the water quality prediction results.