A mariculture multidimensional water quality prediction method, system and device
By preprocessing and feature extraction of multi-source heterogeneous data from marine ranches, and by using a weighted fusion of bidirectional long short-term memory networks and deep learning network models, the problems of poor adaptability and low accuracy of existing water quality prediction models in marine ranch environments have been solved. This has enabled high-precision water quality prediction, ensuring the scientific nature of aquaculture management and production safety.
Patent Information
- Application Number
- CN202611649508.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-23
- Publication Date
- 2026-11-24
AI Technical Summary
Existing water quality prediction models have poor adaptability and limited prediction accuracy in actual marine ranching environments, making it difficult to effectively capture short-term sudden changes and long-term cyclical patterns. This leads to improper aquaculture management and delayed early warnings, affecting production safety and efficiency.
A multi-dimensional water quality prediction method is adopted. By preprocessing multi-source heterogeneous data, features of high-frequency and low-frequency data are extracted by using a bidirectional long short-term memory network model and a deep learning network model, respectively. Combined with weighted fusion, high-precision water quality prediction data is output, taking into account both short-term fluctuations and long-term trends.
It improves the adaptability and accuracy of water quality forecasting, enabling it to accurately capture short-term sudden changes and long-term cyclical patterns, reduce early warning delays, and improve the scientific nature and production efficiency of aquaculture management.
Smart Images

Figure CN123158345A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of water quality monitoring, and in particular to a method, system and equipment for multidimensional water quality prediction in marine ranches. Background Technology
[0002] Marine ranching, as an important form of modern aquaculture, has developed rapidly worldwide in recent years. Through systematic ecological management and large-scale artificial reef construction, it has effectively improved the propagation and harvesting efficiency of marine biological resources. With the continuous expansion of aquaculture scale and the increase in intensification, water quality management has become a core element determining the economic benefits and ecological sustainability of marine ranching. Therefore, achieving accurate water quality prediction and proactive regulation is of great significance for ensuring production safety.
[0003] Currently, the industry commonly employs sensor networks combined with time-series predictive models for water quality monitoring and early warning. These systems rely on multi-parameter water quality sensors deployed in aquaculture areas to collect water quality parameters in real time and build predictive models based on historical data, aiming to detect water quality anomalies early. With the development of artificial intelligence technology, recurrent neural networks, due to their strong short-term time-series modeling capabilities, have been widely applied to water quality prediction tasks, improving the real-time performance and accuracy of predictions to some extent. However, these water quality prediction models have poor adaptability and limited prediction accuracy in actual marine ranching environments. Summary of the Invention
[0004] The purpose of this application is to provide a multi-dimensional water quality prediction method, system and equipment for marine ranches, so as to solve the problems of poor adaptability and limited prediction accuracy of existing water quality prediction models in actual marine ranch environments.
[0005] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a multi-dimensional water quality prediction method for marine ranches, including: The acquired multi-source heterogeneous data is preprocessed to obtain a standardized time-series dataset; wherein the multi-source heterogeneous data includes water quality time-series data, environmental time-series data and aquaculture activity data, and the preprocessing includes at least normalization processing; Water quality time series data in the standardized time series dataset is divided into high-frequency data subsets and input into a pre-trained bidirectional long short-term memory network model. Water quality is then predicted through the bidirectional long short-term memory network model, and the first water quality prediction data is output. Environmental time-series data and aquaculture activity data in the standardized time-series dataset are divided into low-frequency data subsets and input into a pre-trained deep learning network model adapted for time series prediction. Water quality prediction is performed through the deep learning network model and a second water quality prediction data is output. The first and second water quality prediction data are weighted and fused to obtain the final water quality prediction data.
[0006] Optionally, the step of dividing the environmental time-series data and aquaculture activity data in the standardized time-series dataset into a low-frequency data subset and inputting it into a pre-trained deep learning network model adapted for time-series prediction, and performing water quality prediction through the deep learning network model to output second water quality prediction data, specifically includes: Environmental time series data Data on aquaculture activities The sequences are concatenated along the time dimension to form a combined input sequence. ; For combined input sequences Perform a linear mapping to output a vector sequence with the same dimension as the deep neural network model; Perform sinusoidal position encoding on each vector in the vector sequence to obtain the input sequence; The input sequence is fed into a pre-trained deep learning network model adapted for time series prediction. The deep learning network model is used to predict water quality and outputs second water quality prediction data.
[0007] Optionally, the step of performing sinusoidal position encoding on each vector in the vector sequence to obtain the input sequence specifically includes: Calculate the position code of the pos-th position in the vector sequence according to the following position coding formula: ; ; Where pos represents the index of the token in the vector sequence. Indicates a dimension index. The dimension of the vectors in the vector sequence; The positional encoding at each pos position is added element-wise to the pos-th embedding vector in the vector sequence to obtain the input sequence with time information.
[0008] Optionally, the deep learning network model adapted for time series prediction adopts the Transformer model; The encoder structure of the Transformer model contains four encoding layers. Each encoding layer includes a multi-head self-attention sub-layer and a feedforward neural network sub-layer. The input of the feedforward neural network sub-layer of each encoding layer is the output of its multi-head self-attention sub-layer, and the input of the multi-head self-attention sub-layer of the next encoding layer is the output of the feedforward neural network sub-layer of the previous encoding layer.
[0009] Optionally, the multi-dimensional water quality prediction method for marine ranches further includes: While outputting the first water quality prediction data through the bidirectional long short-term memory network model, a first feature vector is also output; wherein, the first feature vector is the final time step output by the Dropout layer connected to the output of the second layer of the bidirectional LSTM of the bidirectional long short-term memory network model, which is input into the high-frequency data subset. Forward hidden state Backward hidden state at the initial time step Feature vectors formed by splicing , This represents the output dimension of the first bidirectional LSTM layer. While outputting the second water quality prediction data through the deep learning network model, a second feature vector is also output; where the second feature vector is the output vector corresponding to the [CLS] marker at the beginning of the output sequence of the encoder of the Transformer model; Before the weighted fusion of the first water quality prediction data and the second water quality prediction data, the first feature vector and the second feature vector are dynamically weighted, and the first dynamic weight coefficient and the second dynamic weight coefficient are output. The weighted fusion of the first water quality prediction data and the second water quality prediction data specifically includes: Based on the first dynamic weighting coefficient and the second dynamic weighting coefficient, the first water quality prediction data and the second water quality prediction data are weighted and fused according to the following formula: ; in, This is the first water quality prediction data output by the bidirectional long short-term memory network model. This is the first dynamic weighting coefficient. This is the second water quality prediction data output by the deep learning network model. This is the second dynamic weighting coefficient. This is the final water quality prediction data.
[0010] Optionally, the step of dynamically assigning weights to the first feature vector and the second feature vector, and outputting the first dynamic weight coefficient and the second dynamic weight coefficient, specifically includes: The first feature vector and the second feature vector are dynamically weighted by an optimization algorithm, and the first dynamic weight coefficient and the second dynamic weight coefficient are output.
[0011] Optionally, the optimization algorithm employs an improved fireworks algorithm; In the improved fireworks algorithm, when generating Gaussian mutated sparks based on the mutation operator, for each fireworks position... The location of the Gaussian mutation spark is calculated using the following formula: ; in, The location of the generated Gaussian mutation spark. This is the step size factor, which controls the amplitude of variation; is the Cauchy mutation operator, which is a random number that follows a standard Cauchy distribution; In the improved fireworks algorithm, when generating explosive sparks based on the fitness of each firework, the explosion amplitude of each individual is... Calculate using the following formula: ; in, For the maximum explosion amplitude, For the first The adaptability of the fireworks The minimum fitness of the current population. To prevent zero items.
[0012] Optionally, the multi-dimensional water quality prediction method for marine ranches further includes: Based on a pre-set early warning mechanism, water quality anomalies are monitored for the predicted final water quality values at multiple future time steps, and an early warning is triggered when water quality anomalies occur.
[0013] Secondly, this application provides a multi-dimensional water quality prediction system for marine ranches, including: The data acquisition module is used to acquire multi-source heterogeneous data; wherein, the multi-source heterogeneous data includes water quality time-series data, environmental time-series data, and aquaculture activity data; The data processing module is used for: The multi-source heterogeneous data is preprocessed to obtain a standardized time-series dataset; wherein the preprocessing includes at least normalization processing. Water quality time series data in the standardized time series dataset is divided into high-frequency data subsets and input into a pre-trained bidirectional long short-term memory network model. The bidirectional long short-term memory network model performs water quality prediction based on the high-frequency data subsets and outputs the first water quality prediction data. Environmental time-series data and aquaculture activity data in the standardized time-series dataset are divided into low-frequency data subsets and input into a pre-trained deep learning network model adapted for time series prediction. The deep learning network model performs water quality prediction based on the low-frequency data subsets and outputs second water quality prediction data. The first and second water quality prediction data are weighted and fused to obtain the final water quality prediction data.
[0014] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the multi-dimensional water quality prediction method for marine ranching as described above.
[0015] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a multi-dimensional water quality prediction method, system, and device for marine ranches. Since water quality time-series data reflects short-term fluctuations and sudden events, while environmental time-series data reflects long-term trends and cyclical patterns, providing management intervention information for aquaculture activities, this application acquires multi-source heterogeneous data including water quality time-series data, environmental time-series data, and aquaculture activity data. This provides a reliable data foundation for subsequent water quality prediction, enabling water quality prediction to simultaneously consider short-term fluctuations, long-term trends, and management interventions, initially ensuring adaptability and prediction accuracy in actual marine ranch environments. Preprocessing the acquired multi-source heterogeneous data ensures comparability of data from different sources in subsequent feature extraction. By dividing the water quality time-series data in the standardized time-series dataset into a high-frequency subset and the remaining data into a low-frequency subset, the high-frequency subset is input into a pre-trained bidirectional long short-term memory (BSSM) network model. This allows the BSSM network model to fully extract the short-term fluctuation features of the high-frequency water quality time-series data. Water quality prediction is then performed through the BSSM network model, outputting the first water quality prediction data, providing high-precision data representing short-term fluctuations and sudden events for subsequent final water quality prediction. Input: By inputting a subset of low-frequency data into a pre-trained deep learning network model adapted for time-series data prediction, the deep learning network model can fully extract the long-term dependencies and periodic patterns of the low-frequency data subset. The deep learning network model performs water quality prediction and outputs second water quality prediction data, providing a high-precision input representing the long-term dependencies and periodic patterns for subsequent final water quality prediction. By weighted fusion of the first and second water quality prediction data, the final water quality prediction data is obtained, ensuring that the generation of the final water quality prediction data takes into account both short-term fluctuations and long-term trends. Thus, the water quality prediction method of this application embodiment can not only effectively capture short-term sudden changes in water quality time-series data, but also effectively capture long-term periodic patterns on a daily, weekly, or even monthly basis (such as seasonal ocean current changes, rainfall cycles, interannual water temperature variations, etc.). At the same time, it can also accurately predict aquaculture activity data anomalies caused by sudden events in aquaculture activities (such as a sharp increase in ammonia nitrogen concentration in the short term after feeding, or a sudden drop in salinity caused by heavy rain, etc.), further improving the adaptability and prediction accuracy in actual marine ranch environments, making the predicted future water quality data more accurate.
[0016] In summary, the multi-dimensional water quality prediction method for marine ranches in this application improves the adaptability and prediction accuracy in actual marine ranch environments, and solves the problems of poor adaptability and limited prediction accuracy of existing technologies in actual marine ranch environments. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating a multi-dimensional water quality prediction method for marine ranches, provided as an embodiment of this application; Figure 2 This is a schematic diagram of the preprocessing flow for multi-source heterogeneous data provided in an embodiment of this application; Figure 3 A schematic block diagram of the architecture of a bidirectional long short-term memory network model provided in an embodiment of this application. Figure 4 A detailed flowchart illustrating the multi-level early warning mechanism and information push provided in an embodiment of this application; Figure 5 A schematic diagram of the functional modules of a multi-dimensional water quality prediction system for marine ranches provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] Most existing water quality prediction models rely on a single type of neural network structure, such as using BLSTM to process short-term high-frequency data. Their modeling focus is concentrated on local water quality changes within a few hours, making it difficult to effectively capture long-term periodic patterns on a daily, weekly, or even monthly basis, such as the deep-seated impacts of seasonal ocean current changes, rainfall cycles, and interannual water temperature variations on water quality parameters, resulting in limited prediction accuracy. Simultaneously, these models are weak in responding to sudden events in aquaculture activities. For example, traditional single models often exhibit prediction lag or significant bias in cases of a sharp increase in ammonia nitrogen concentration shortly after feeding or a sudden drop in salinity due to heavy rain, making them poorly adaptable to actual marine ranching environments. These technical problems can lead to serious consequences in practical applications. On the one hand, the inability to accurately predict long-term periodic water quality changes prevents aquaculture managers from preparing in advance for conditions such as low salinity during the rainy season and high temperatures in summer, potentially causing stress and even large-scale mortality in farmed organisms. On the other hand, delayed early warnings of sudden water quality anomalies can cause managers to miss optimal intervention opportunities, such as failing to promptly increase oxygenation or adjust feeding strategies, leading to increased aquaculture losses. Furthermore, insufficient accuracy in prediction models can lead to false alarms and missed alarms, reducing the reliability and availability of early warning systems and severely impacting the efficiency of production management and the scientific nature of decision-making. Therefore, there is an urgent need for a high-precision water quality prediction method capable of simultaneously capturing both short-term sudden changes and long-term cyclical patterns to address the problems of poor adaptability and limited prediction accuracy of existing technologies in actual marine ranching environments.
[0022] In one exemplary embodiment, such as Figure 1 As shown, a multi-dimensional water quality prediction method for marine ranches is provided. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is described using a terminal as an example, including the following steps 101 to 104. Wherein: Step 101: Preprocess the acquired multi-source heterogeneous data to obtain a standardized time-series dataset, wherein the multi-source heterogeneous data includes water quality time-series data, environmental time-series data, and aquaculture activity data.
[0023] In this embodiment, the water quality time-series data is high-frequency water quality time-series data, continuously and automatically collected by a sensor network deployed in the aquaculture area. The sampling period for the water quality time-series data can range from 1 second to 30 minutes, preferably 1 minute. Water quality parameters (dissolved oxygen, ammonia nitrogen, water temperature, etc.) can change significantly within minutes under events such as feeding, heavy rain, and equipment start-up and shutdown. Minute-level sampling is sufficient to characterize their short-term fluctuations and sudden event characteristics. The environmental time-series data is low-frequency environmental time-series data, collected by environmental monitoring stations. The sampling period for the environmental time-series data can range from 1 hour to 24 hours, preferably 6 hours. Environmental parameters such as ocean currents, rainfall, and water temperature have daily, weekly, and monthly variation cycles. Hourly sampling is sufficient to fully characterize their long-term trends and periodic patterns; higher sampling frequencies would only increase redundancy. Aquaculture activity data is event-triggered discrete data, manually entered when aquaculture management events (feeding, oxygenation, water changes, etc.) occur. There is no fixed sampling frequency; the recording frequency is generally 1 to 4 times per day. The distinction between high and low frequency is based on the characteristic time scale of the physical process depicted by the data: short-term fluctuations in water quality parameters are measured in minutes to hours, while trend changes in environmental parameters are measured in days to months.
[0024] The acquired multi-source heterogeneous data includes water quality time series data, environmental time series data, and aquaculture activity data. This ensures that water quality time series data reflects short-term fluctuations and emergencies, while environmental time series data reflects long-term trends and cyclical patterns. It also provides management intervention information for aquaculture activity data, thereby providing a reliable data foundation for subsequent dynamic weight fusion and water quality prediction.
[0025] In multi-source heterogeneous data acquisition, the first step is to obtain high-frequency water quality data sequences, i.e., water quality time-series data, from the sensor network. ,in, This indicates the total number of water quality data sampling points. The dimensions representing water quality data include at least one of water temperature, dissolved oxygen, and ammonia nitrogen. Simultaneously, low-frequency environmental data sequences, i.e., environmental time-series data, are obtained from environmental monitoring stations. ,in, This indicates the total number of environmental data sampling time points. The dimensions representing environmental data include codes for feed intake, stocking density, and equipment status. Environmental data includes at least one of ocean current data, rainfall data, and temperature, while also acquiring aquaculture activity data from a manual data entry system. ,in, The dimensions representing aquaculture activity data include at least one of the following: feed quantity, stocking density, and equipment status codes. Equipment status includes at least the start / stop status, operating power, and cumulative operating time of aerators, circulating water pumps, and feeders, used to characterize the human intervention in water quality caused by aquaculture management activities. For example, equipment status may include aerator on / off status, aerator operating power (kW), and feeder single feeding action and feeding rate.
[0026] The operation of aquaculture equipment directly and rapidly disturbs water quality: the operation of aerators causes dissolved oxygen to rise rapidly in a short period of time; the operation of feeders increases uneaten feed and metabolic products, leading to a sharp increase in ammonia nitrogen concentration within a few hours; the operation of circulating water pumps changes the local water exchange rate. These water quality mutations caused by management interventions cannot be inferred from environmental time-series data (natural factors such as ocean currents and rainfall). The equipment status must be explicitly input into the model as management intervention information so that the model can predict water quality mutations caused by human intervention. This is one of the objectives of this application, which is to "take into account short-term fluctuations, long-term trends, and management interventions".
[0027] Preprocessing includes at least normalization, which ensures that data from different sources are comparable in subsequent feature extraction by preprocessing the acquired multi-source heterogeneous data.
[0028] Step 102: Divide the water quality time series data in the standardized time series dataset into high-frequency data subsets and input them into a pre-trained bidirectional long short-term memory network model. Use the bidirectional long short-term memory network model to perform water quality prediction and output the first water quality prediction data.
[0029] In the embodiments of this application, such as Figure 3 As shown, in the specific architecture of the Bidirectional Long Short-Term Memory (BLSTM) network model, the high-frequency data subset of the input... First, the process passes through a first-layer bidirectional LSTM. The forward LSTM of the first-layer bidirectional LSTM then computes the computation at each time step. Forward hidden state Backward LSTM computes each time step Backward hidden state , The output dimension of the first-layer bidirectional LSTM is concatenated to form the output of each time step. The output of the first LSTM layer then enters the first Dropout layer, where some neurons' outputs are set to zero based on a set random dropout rate (e.g., 0.3) to prevent overfitting. Subsequently, the output data from the first Dropout layer is fed into the second bidirectional LSTM layer, which has an output dimension of [missing information]. / 2, The forward LSTM of the second-layer bidirectional LSTM computes each time step. Forward hidden state Backward LSTM computes each time step Backward hidden state After concatenation, the output of each time step of the second-layer bidirectional LSTM is obtained. The output of the second bidirectional LSTM layer then enters the second Dropout layer. Based on the set random dropout rate (i.e., random inactivation rate, such as 0.3), some neuron outputs are set to zero to prevent overfitting. Then, based on the output of the second Dropout layer, feature vector generation is performed: the final time step of the second Dropout layer's output is taken. Forward hidden state Backward hidden state at the initial time step ,right and The first feature vector is formed by concatenating the features. The first feature vector is fed into the fully connected output layer, and then processed by Y. BLSTM =W o ·V BLSTM +b o This is mapped to the first water quality prediction data (i.e., the BLSTM sub-model prediction value). Among them, W o ∈{ }, b o ∈{ }, This indicates the dimension of the first water quality prediction data, for example, setting... =4, corresponding to four water quality parameters (such as dissolved oxygen, ammonia nitrogen concentration, pH value and total phosphorus concentration).
[0030] The embodiments of this application are as follows: No specific limitations are set; you can configure it according to your actual needs. Preferred settings. The value is 128 to ensure the accuracy of water quality data prediction.
[0031] Step 103: Divide the environmental time series data and aquaculture activity data in the standardized time series dataset into low-frequency data subsets and input them into a pre-trained deep learning network model adapted for time series prediction. Use the deep learning network model to perform water quality prediction and output the second water quality prediction data.
[0032] Step 104: Weighted fusion of the first water quality prediction data and the second water quality prediction data to obtain the final water quality prediction data.
[0033] This application embodiment does not impose a specific limitation on the order of steps 102 and 103, which can be set according to actual needs. Step 102 can be executed first, followed by step 103, or step 103 can be executed first, followed by step 102, or steps 102 and 103 can be executed simultaneously.
[0034] Implementing steps 101 to 104 above, since water quality time-series data reflects short-term fluctuations and sudden events, while environmental time-series data reflects long-term trends and cyclical patterns, providing management intervention information for aquaculture activity data, acquiring multi-source heterogeneous data including water quality time-series data, environmental time-series data, and aquaculture activity data provides a reliable data foundation for subsequent water quality prediction. This allows water quality prediction to simultaneously consider short-term fluctuations, long-term trends, and management interventions, initially ensuring adaptability and prediction accuracy in actual marine ranching environments. Preprocessing the acquired multi-source heterogeneous data ensures comparability of data from different sources in subsequent feature extraction. By dividing the water quality time-series data in the standardized time-series dataset into a high-frequency data subset and the remaining data into a low-frequency data subset, the high-frequency data subset is input into a pre-trained bidirectional long short-term memory (BSSM) network model. This enables the BSSM network model to fully extract the short-term fluctuation characteristics of the high-frequency water quality time-series data. Water quality prediction is then performed through the BSSM network model, outputting the first water quality prediction data, providing high-precision input representing short-term fluctuations and sudden events for subsequent final water quality prediction. A subset of low-frequency data is input into a pre-trained deep learning network model adapted for time-series data prediction. The deep learning network model can fully extract the long-term dependencies and periodic patterns of the low-frequency data subset. Water quality prediction is performed through the deep learning network model, and the second water quality prediction data is output, providing a high-precision input representing the long-term dependencies and periodic patterns for the subsequent final water quality prediction. By weighted fusion of the first and second water quality prediction data, the final water quality prediction data is obtained, ensuring that the generation of the final water quality prediction data takes into account both short-term fluctuations and long-term trends. Thus, the water quality prediction method of this application embodiment can not only effectively capture short-term sudden changes in water quality time-series data, but also effectively capture long-term periodic patterns on a daily, weekly, or even monthly basis (such as seasonal ocean current changes, rainfall cycles, and interannual water temperature variations). At the same time, it can also accurately predict aquaculture activity data anomalies caused by sudden events in aquaculture activities (such as a sharp increase in ammonia nitrogen concentration in the short term after feeding, or a sudden drop in salinity caused by heavy rain). This further improves the adaptability and prediction accuracy in actual marine ranching environments, making the predicted future water quality data more accurate.
[0035] In summary, the multi-dimensional water quality prediction method for marine ranches in this application improves the adaptability and prediction accuracy in actual marine ranch environments, and solves the problems of poor adaptability and limited prediction accuracy of existing technologies in actual marine ranch environments.
[0036] In another exemplary embodiment of this application, the preprocessing described above further includes data cleaning before normalization.
[0037] In this embodiment of the application, data cleaning is performed on the acquired multi-source heterogeneous data, that is, the above-mentioned water quality data sequence is cleaned. Environmental data sequence and aquaculture activity data sequences Perform data cleaning.
[0038] In another exemplary embodiment of this application, the data cleaning described above includes missing value imputation and abnormal data correction.
[0039] In this embodiment of the application, the above-mentioned water quality data sequence Environmental data sequence and aquaculture activity data sequences Missing data were filled using time series linear interpolation, specifically: For any missing time point Based on adjacent known time points and Data values and Calculate interpolation : .
[0040] For the above water quality data sequence Environmental data sequence and aquaculture activity data sequences For outlier data, the Isolation Forest algorithm is used for detection. Specifically, multiple random trees are constructed to calculate the isolation score of each data value in each sequence. Outliers with scores exceeding a critical threshold are corrected by replacing them with the mean of the nearest time points.
[0041] After the data cleaning is completed, each data point in each sequence is normally processed independently, mapping data of different dimensions and magnitudes to a unified interval [0,1].
[0042] The normalization formula is as follows: ; in, For any parameter in each sequence, and These are the minimum and maximum values of the parameter in historical data, respectively, to ensure that data from different sources are comparable in subsequent feature extraction.
[0043] After the above preprocessing, a standardized time-series dataset is generated, including a standardized water quality dataset. Standardized environment dataset and standardized aquaculture activity datasets .
[0044] Standardized time-series datasets can be directly used for subsequent dual-channel (high-frequency and low-frequency) time-series feature extraction, ensuring that high-frequency water quality time-series data reflects short-term fluctuations and sudden events, while low-frequency environmental time-series data reflects long-term trends and cyclical patterns. This provides management intervention information for aquaculture activity data, thereby providing a reliable data foundation for subsequent dynamic weight fusion and water quality prediction.
[0045] In another exemplary embodiment of this application, such as Figure 2 As shown, the above preprocessing includes data alignment before normalization and after data cleaning.
[0046] In this embodiment, data alignment is based on the time step of the water quality time series data after data cleaning, and interpolation matching is performed on the environmental time series data and aquaculture activity data after data cleaning according to the time step.
[0047] Finally, the historical minimum values of each parameter were extracted from the aligned water quality time series data, environmental time series data, and aquaculture activity data. and maximum value Each data point in the aligned water quality time series data, environmental time series data, and aquaculture activity data is independently normalized.
[0048] In another exemplary embodiment of this application, the random dropout rate of each Dropout layer of the BLSTM model is set to 0.3, that is, with a 30% probability, some neuron outputs are set to zero to prevent overfitting.
[0049] In another exemplary embodiment of this application, stochastic gradient descent is used to optimize the mean squared error loss function during the BLSTM model training process, and the predicted value is calculated through forward propagation. Compared with the true value The differences are then analyzed, and the weights of the LSTM and fully connected layers are adjusted through backpropagation. This allows the BLSTM model to fully extract the short-term fluctuation characteristics of high-frequency water quality data, providing high-precision input for subsequent dynamic weight fusion and water quality prediction. The loss function is... ,in, These are the model's predicted values. is the true value, and N is the number of training samples. To prevent overfitting, Dropout is applied to the output of each LSTM layer during training to ensure that the BLSTM model has stronger generalization ability in feature extraction, thereby providing a stable and accurate high-frequency temporal feature representation for subsequent dynamic weight fusion.
[0050] In another exemplary embodiment of this application, stochastic gradient descent with a batch size of 32 is used during the training of the BLSTM model. In each round of training, all training samples are divided into several batches for parameter updates. The training cycle is 200 rounds. The initial learning rate is set to 0.001. After every 50 rounds, the learning rate is reduced to 0.5 of the original value to accelerate convergence in the early stage of training and refine and optimize parameters in the later stage.
[0051] In another exemplary embodiment of this application, step 103 specifically includes steps 201 to 204. Wherein: Step 201, process environmental time series data Data on aquaculture activities The sequences are concatenated along the time dimension to form a combined input sequence. .
[0052] Step 202, combine the input sequences Perform a linear mapping to output a vector sequence with the same dimensions as the deep neural network model.
[0053] Among them, for combined input sequences Performing linear mappings specifically includes: The combined input sequences are processed through a learnable fully connected projection layer. At each time step ( ) 3D row vectors projected onto the Transformer model Dimensional space: E=X combined ·W e +b e ; Among them, W e ∈{ } is the projection weight matrix, b e ∈{ } represents the bias vector, and both are learnable parameters obtained from model training; E∈{ } represents the output vector sequence, where the vector dimension at each time step is equal to the dimension of the deep neural network model. Consistent.
[0054] Taking a marine ranch as an example: Environmental time series data dimension =5 (ocean current velocity, ocean current direction, rainfall, surface water temperature, air temperature), dimensions of aquaculture activity data =3 (feeding amount, stocking density, equipment status code), then each time step of the combined input sequence is an 8-dimensional vector; take d model =512, W e It is an 8×512 matrix, b e The vector is 512-dimensional, and the 8-dimensional vector at each time step is mapped to a 512-dimensional vector by the Transformer model; if the total number of aligned time steps is... =720 (with 6-hour intervals and 180 days), then the output is a vector sequence of 720×512, and then proceeds to the sine position encoding in step 203.
[0055] Step 203: Perform sinusoidal position encoding on each vector in the vector sequence to obtain the input sequence.
[0056] In this embodiment, the Transformer's multi-head self-attention mechanism exhibits permutation invariance to the input sequence: the association weights of each vector in the sequence are calculated solely from the vector content, regardless of the vector's order within the sequence; that is, the attention output remains unchanged even after shuffling the input order. The core information of environmental time-series data and aquaculture activity data (seasonal cycles of ocean currents, the temporal cumulative effect of rainfall, and the causal relationship between feeding and ammonia nitrogen elevation) is precisely contained within the temporal order. Without injecting location information, the model cannot distinguish between "feeding before exceeding the standard" and "exceeding the standard before feeding," making it impossible to learn long-term trends and cyclical patterns. Therefore, explicit location encoding must be introduced to inject the absolute / relative location information of each time step into the input vector.
[0057] The reason for choosing sinusoidal position coding (instead of learnable position coding or other forms) is as follows: (1) Deterministic function, zero additional training parameters: PE is calculated by a deterministic function of pos and dimension index i, without increasing the number of model parameters, which is beneficial for preventing overfitting in marine ranching scenarios with limited sample size; (2) Learnable relative position: The sine and cosine channels of different frequencies make PE(pos+k) a linear function of PE(pos), and the model can easily learn the relative time interval of "k time steps apart", which is crucial for modeling water quality patterns with daily, weekly and monthly cycles. (3) Bounded range: The range of sine and cosine is [-1,1], which matches the magnitude of the embedded vector after the maximum-minimum normalization, and can be directly added element by element without destroying the data distribution; (4) Length extrapolation: The positional encoding can still be directly calculated for longer sequences that have not appeared during training, which facilitates the expansion of the prediction window in actual deployment; (5) Periodic fit: The periodic properties of the sine and cosine functions are naturally compatible with the daily, weekly, and seasonal cycles of marine ranch environmental data, which is conducive to the model capturing periodic patterns.
[0058] Step 204: Input the input sequence into a pre-trained deep learning network model adapted for time series prediction, perform water quality prediction through the deep learning network model, and output the second water quality prediction data.
[0059] In another exemplary embodiment of this application, step 203 specifically includes steps 301 to 302. Wherein: Step 301: Calculate the position code for each position pos in the vector sequence according to the following position coding formula: ; ; Where pos represents the position index of the token in the vector sequence (e.g., the 0th, 1st, etc.). This represents the dimension index (starting from 0), corresponding to the 1st dimension of the embedding vector. or dimension, Indicates the first position at pos. Dimensional positional encoding value, Indicates the first position at pos. Dimensional positional encoding value, The vector dimension in the vector sequence ensures that the model can utilize the relative and absolute positional information of the elements in the vector sequence.
[0060] Step 302: Add the position code at each pos position to the pos-th embedded vector in the vector sequence element by element to obtain the input sequence with time information.
[0061] In another exemplary embodiment of this application, the deep learning network model adapted for time series prediction described above employs the Transformer model.
[0062] In this embodiment, the encoder structure of the Transformer model comprises four encoding layers, each including a multi-head self-attention sublayer and a feedforward neural network sublayer. The input to the feedforward neural network sublayer of each encoding layer is the output of its multi-head self-attention sublayer. The input to the multi-head self-attention sublayer of the next encoding layer is the output of the feedforward neural network sublayer of the previous encoding layer.
[0063] The multi-head self-attention sublayer generates a weighted representation by calculating the association weights between each vector in the input sequence and other vectors, as shown in the formula: Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. The dimension of the key vector.
[0064] The multi-head attention sublayer computes the multi-head self-attention output in parallel and maps the concatenated vector obtained by concatenating the multi-head self-attention output back to the multi-head attention sublayer through a linear mapping. Dimensionality enables the model to capture feature relationships across different subspaces. After processing by each multi-head attention sublayer, enhanced feature representations are obtained at each time step of the sequence. Subsequently, the output of each multi-head attention sublayer is input to the feedforward neural network sublayer for nonlinear mapping. Stability is ensured by concatenating the nonlinear mapping result of the feedforward neural network sublayer with its input residuals and then performing layer normalization. After the encoder processing is complete, the output vector corresponding to the [CLS] marker at the beginning of the encoder's output sequence is used as the second feature vector. This vector comprehensively reflects the long-term trends and periodic patterns of low-frequency environmental changes and aquaculture activities on water quality, providing stable and representative low-frequency characteristic information for subsequent dynamic weight fusion.
[0065] The Transformer model employs a single encoder with a dual-task output structure: the output vector V corresponds to the [CLS] marker at the beginning of the encoder's output sequence. Transformer ∈{ }, on the one hand, it is used as the second feature vector The output is used for dynamic weight allocation; on the other hand, V Transformer The data is fed into the fully connected prediction head and mapped to the second water quality prediction data Y according to the following formula. Transformer : Y Transformer =W p ·V Transformer +b p ; Among them, W p ∈{ } represents the prediction head weight matrix, b p ∈{ } is the bias vector, Y Transformer ∈{ During training, the actual water quality values corresponding to the time windows of the combined input sequences are used as supervision labels. The encoder and prediction head are jointly trained using the mean squared error loss consistent with BLSTM, so that the output vector V corresponding to the [CLS] label... Transformer It simultaneously carries two types of information: "long-term trend representation" and "water quality prediction".
[0066] In another exemplary embodiment of this application, in the specific parameter settings of the Transformer model, the input combination sequence First, adjust the model dimensions using a linear mapping. The hidden layer dimension of the feedforward neural network is set to This allows each time step to learn high-dimensional nonlinear features through the feedforward network.
[0067] The number of heads in the multi-head self-attention sub-layer is set to h=8, and the query, key, and value dimensions of each attention head are all 8. To ensure that the total output dimension remains the same .
[0068] During training, the Adam optimizer is used to update the model parameters. The optimizer hyperparameters are: , , The gradient step size is adaptively adjusted by estimating the first and second moments.
[0069] Learning rate according to formula Dynamic adjustment, among which, This represents the current number of training steps. To establish a warm-up step count, the learning rate is linearly increased in the early stages of training to accelerate convergence. After reaching the warm-up step count, the learning rate is then adjusted accordingly. The decay is used to ensure stability during the later stages of training optimization.
[0070] With the above settings, the Transformer model can fully extract the long-term dependencies and periodic patterns of low-frequency environmental time-series data and aquaculture activity sequences, and output a second feature vector. This provides a high-quality low-frequency feature representation for subsequent dynamic weight fusion.
[0071] In another exemplary embodiment of this application, the above-described multi-dimensional water quality prediction method for marine ranches further includes steps 401 to 403. Wherein: Step 401: While outputting the first water quality prediction data through the bidirectional long short-term memory network model, output the first feature vector that can simultaneously characterize the short-term fluctuations and sudden disturbances of the water quality time series data.
[0072] Step 402: While outputting the second water quality prediction data through the deep learning network model, output a second feature vector that can simultaneously characterize the long-term trend and periodic pattern of environmental time series data as well as the management intervention information of aquaculture activity data.
[0073] Step 403, before step 104, for the first feature vector Second eigenvector Perform dynamic weight allocation and output the first dynamic weight coefficient and the second dynamic weight coefficient.
[0074] In this embodiment, the sum of the first dynamic weighting coefficient and the second dynamic weighting coefficient is equal to 1. The first dynamic weighting coefficient represents the contribution weight of high-frequency features in the final prediction, and the second dynamic weighting coefficient represents the contribution weight of low-frequency features in the final prediction, ensuring that the fused prediction value takes into account both short-term fluctuations and long-term trends.
[0075] Accordingly, the above-mentioned weighted fusion of the first and second water quality prediction data specifically includes: Based on the first dynamic weighting coefficient and the second dynamic weighting coefficient, the first water quality prediction data and the second water quality prediction data are weighted and fused according to the following formula: ; in, This is the first water quality prediction data output by the bidirectional long short-term memory network model. This is the first dynamic weighting coefficient. This is the second water quality prediction data output by the deep learning network model. This is the second dynamic weighting coefficient. , This is the final water quality prediction data.
[0076] The evolution of water quality in marine ranches is a non-stationary process. The relative importance of high-frequency short-term fluctuations and low-frequency long-term trends changes in real time depending on the operating conditions: during periods of sudden events such as feeding, heavy rain, and equipment start-up and shutdown, water quality is mainly dominated by short-term disturbances, and the high-frequency features of the BLSTM branch are more reliable, so α should be increased; during periods of stable evolution such as seasonal changes and periodic ocean current changes, water quality is mainly dominated by long-term trends, and the low-frequency features of the Transformer branch are more reliable, so β should be increased. If the weights are fixed, they can only be adapted to a certain average operating condition, and will inevitably introduce systematic biases under other operating conditions. Therefore, the embodiments of this application are based on the first feature vector of the current input. Second eigenvector Dynamic weight allocation is performed, and the first and second dynamic weight coefficients matching the current operating conditions are calculated so that the weights reflect the relative information content and reliability of the two features at the current moment. Compared to fixed weights, the dynamic weights in this embodiment have the following advantages: (1) Adaptive to non-stationary environment: The dynamic weights are adjusted sample by sample according to the input features. In the case of sudden water quality anomalies, the dynamic weights can automatically increase the proportion of high-frequency branches, which significantly reduces the prediction lag and peak bias during the sudden event period. (2) Direct optimization objective: Dynamic weights directly optimize the final prediction accuracy using the mean square error of the validation set as the fitness function, while fixed weights (such as equal weights of 0.5 / 0.5 or set based on experience) have no accuracy guarantee; (3) Unbiased fusion: The constraint α+β=1 (β=1-α) ensures that the fused prediction is a convex combination of the two predictions and does not produce a systematic bias. This is a property that must be satisfied even with fixed arbitrary weights and is naturally maintained by dynamic optimization. (4) Interpretability of operating conditions: The values of α and β themselves reflect the dominant factors of the current water quality evolution (short-term disturbances or long-term trends), providing additional decision-making information for aquaculture management.
[0077] In summary, the embodiments of this application take into account both short-term fluctuations and long-term trends, thereby improving adaptability and prediction accuracy.
[0078] In another exemplary embodiment of this application, step 403 above dynamically assigns weights to the first feature vector and the second feature vector, and outputs the first dynamic weight coefficient and the second dynamic weight coefficient, specifically including: Step 501: Dynamically assign weights to the first feature vector and the second feature vector using an optimization algorithm, and output the first dynamic weight coefficient and the second dynamic weight coefficient.
[0079] In another exemplary embodiment of this application, the above optimization algorithm employs an improved fireworks algorithm.
[0080] Accordingly, step 501 specifically includes steps 601 to 604. Wherein: Step 601: Randomly initialize N fireworks within the interval [0,1].
[0081] In this embodiment of the application, each firework corresponds to a candidate weight solution, and each candidate weight solution corresponds to a set of first dynamic weight coefficient α and second dynamic weight coefficient β values.
[0082] Step 602, perform the generation operation: Explosion sparks are generated based on the fitness of each firework, and Gaussian mutation sparks are generated based on the mutation operator.
[0083] In this embodiment of the application, the upper limit of the number of explosion sparks is: Sparks are randomly distributed along the weight space, forming new candidate solutions to explore local optima. Simultaneously, Gaussian mutation sparks are generated, with an upper limit on the number of Gaussian mutation sparks. By applying small random perturbations to the weights, population diversity is increased, preventing the population from getting trapped in local optima.
[0084] Step 603: After performing the generation operation, calculate the fitness value of each explosion spark and Gaussian mutation spark based on the fitness function.
[0085] Step 604: Check if the termination condition is met. If it is met, stop the search and select the individual with the largest fitness value from the current candidate set as the optimal solution. Otherwise, select N individuals from the current candidate set as the next generation of fireworks and return to steps 602 to 604 until the termination condition is met. The current candidate set includes the current generation of explosion sparks, Gaussian mutation sparks and fireworks.
[0086] The termination conditions include a first termination condition, a second termination condition, or a third termination condition. The first termination condition includes: the current iteration count reaches a preset maximum iteration count G (e.g., G=100). The second termination condition includes: the improvement in the optimal fitness value over K consecutive generations (preferably K=10) is less than a preset threshold δ (preferably δ=10). -6 The second termination condition indicates that the population has converged, and further iteration yields no benefit. The third termination condition includes: the validation set precision (MSE) corresponding to the current best individual is lower than the preset target precision (MSE). target MSE target The accuracy can be set according to the required level after normalization of water quality parameters, such as setting MSE. target =0.001. Meeting the third termination condition indicates that the weights have reached the required prediction accuracy, and early termination is necessary to save computational resources.
[0087] The first dynamic weight coefficient α and the second dynamic weight coefficient β corresponding to the individual with the largest fitness value in the current candidate set are the optimal weight coefficient α. * β * ,β * =1-α * .
[0088] The candidate set includes explosive sparks (generated by local fine-grained search), Gaussian mutation sparks (generated by Cauchy mutation global exploration), and previous generation fireworks (elite retention). Selecting the best from all candidates ensures that no high-quality solutions from any source are missed.
[0089] In this embodiment, to ensure that excellent information from the fireworks population can be passed on to the next generation, after generating explosive sparks and Gaussian mutation sparks, the algorithm selects N individuals from the candidate set as the next generation of fireworks. Assuming the candidate set is K, the individual with the highest fitness value in the candidate set will be deterministically selected as the next generation of fireworks (elite strategy). Then, a roulette wheel selection method is used to select the remaining N-1 fireworks from the candidate set. The roulette wheel selection probability is calculated using fitness normalization: p i =fitness i / Σ j fitness j p i Let fitness represent the probability of choosing the i-th individual in the candidate set using roulette. i Let fitness be the fitness value of the i-th individual. j Let be the fitness value of the j-th individual in the candidate set.
[0090] In this embodiment, the historical standardized time-series dataset is divided into a training set, a validation set, and a test set in chronological order, with a preferred ratio of 7:1.5:1.5. This chronological division is crucial and cannot be randomly shuffled—water quality data is a time series, and random division would cause the training set to include information from after the validation set's time point, leading to future information leakage and rendering the weight optimization results ineffective in actual deployment.
[0091] The training set is used for parameter training of the bidirectional long short-term memory network model and the deep learning network model, while the validation set is used to improve the weight optimization of the fireworks algorithm: each candidate weight solution (α,β) performs a fusion prediction Y on the validation set samples. final =α·Y BLSTM +β·Y Transformer Calculate the fusion prediction value Y final The mean squared error (MSE) between the actual water quality values on the validation set and the actual values on the validation set is substituted into fitness = 1 / (MSE + ε) to obtain the fitness. That is, the MSE on the validation set is the direct target of weight optimization, so that the obtained weights are oriented towards the generalization error rather than the training error, thus avoiding overfitting of the weights on the training data of the two-branch model. The test set is used for the final prediction accuracy evaluation.
[0092] Within the number of iterations G=100, the fitness of each candidate weight solution is continuously evaluated and individuals with high fitness are retained, and the system is gradually adjusted. α and β To minimize the MSE of the validation set. The final output is the dynamic weight coefficients. and This is used to weight and fuse high-frequency and low-frequency feature vectors, so that the fused features can fully take into account both short-term fluctuations and long-term trends, providing an optimized feature combination for the water quality prediction generation stage, thereby improving prediction accuracy and early warning reliability.
[0093] In another exemplary embodiment of this application, the fitness function of the improved fireworks algorithm is: ; in, For fitness value, For each individual (fireworks, explosive sparks, or Gaussian variant sparks) α and β The mean square error between the final water quality prediction data obtained by weighted fusion of the first and second eigenvectors and the actual value. To smooth out the term and prevent the denominator from being zero, which would lead to excessively large fitness values, the fitness value is strictly monotonically negatively correlated with the mean squared error (MSE) of the validation set. Therefore, the individual with the largest fitness value is the individual with the smallest MSE in the validation set, which is the weight combination that maximizes the accuracy of the weighted fusion prediction.
[0094] In another exemplary embodiment of this application, to enhance the global search capability, a Cauchy mutation operator is introduced into the improved fireworks algorithm. Step 602 above, generating Gaussian mutation sparks based on the mutation operator, specifically includes: For each fireworks location The location of the Gaussian mutation spark is calculated using the following formula: ; in, The location of the generated Gaussian mutation spark. This is the step size factor, which controls the amplitude of variation; The Cauchy mutation operator is a random number that follows a standard Cauchy distribution. The long tail characteristic of the Cauchy distribution enables the algorithm to escape local optima and increases its global exploration capability.
[0095] In another exemplary embodiment of this application, in step 602 above, when generating the explosion spark based on the fitness of each firework, a dynamic mapping explosion amplitude strategy is adopted, and the explosion amplitude of each individual... Based on fitness-based dynamic allocation, the calculation formula is as follows: ; in, For the maximum explosion amplitude, For the first The adaptability of the fireworks The minimum fitness of the current population. To prevent zero terms, ensure that the denominator is not zero.
[0096] This strategy allows high-fitness individuals to generate larger sparks, enabling them to fully explore high-potential areas, while low-fitness individuals generate smaller sparks, reducing ineffective searches in low-potential areas.
[0097] By combining the Cauchy mutation operator with the dynamic mapping explosion amplitude, the algorithm maintains both local fine-grained search capability and enhances global jump capability during the iteration process, thereby improving convergence speed and optimization accuracy, and making the dynamic weight coefficients more efficient. and It converges more quickly to the optimal value that minimizes the mean square error of the validation set, providing high-quality feature fusion for subsequent water quality prediction.
[0098] In another exemplary embodiment of this application, the above-described multi-dimensional water quality prediction method for marine ranches further includes: Step 701: Based on the preset early warning mechanism, monitor the final water quality prediction values for multiple future time steps for water quality anomalies, and trigger an early warning when water quality anomalies occur.
[0099] In another exemplary embodiment of this application, the final water quality prediction data includes dissolved oxygen value or ammonia nitrogen concentration, and the preset early warning mechanism includes a first-level early warning mechanism or a multi-level early warning mechanism.
[0100] Accordingly, if the early warning mechanism adopts a Level 1 early warning mechanism, then step 701 above specifically includes: If the dissolved oxygen value in the final water quality prediction data is lower than the first safety threshold or the ammonia nitrogen concentration is higher than the second safety threshold (i.e., water quality parameter threshold judgment), it indicates water quality abnormality and triggers a preset warning. The first safety threshold is preferably 5 mg / L, and the second safety threshold is preferably 0.5 mg / L.
[0101] In another exemplary embodiment of this application, if the above-mentioned multi-level early warning mechanism adopts a three-level early warning mechanism, such as Figure 4 As shown, step 701 above specifically includes: If the dissolved oxygen value in the final water quality prediction data is lower than the first safety threshold (i.e., water quality parameter threshold judgment), it indicates that the water quality is abnormal, and a level one warning is triggered (i.e., matching the warning level). If the dissolved oxygen concentration in the final water quality prediction data is lower than the third safety threshold or the ammonia nitrogen concentration is higher than the second safety threshold (i.e., water quality parameter threshold judgment), it indicates that the water quality is abnormal, and a level II warning is triggered (i.e., matching the warning level); among which, the third safety threshold is preferably 4 mg / L; If the dissolved oxygen concentration in the final water quality prediction data is lower than the fourth safety threshold or the ammonia nitrogen concentration is higher than the fifth safety threshold (i.e., water quality parameter threshold judgment), it indicates that the water quality is abnormal, and a level three warning is triggered (i.e., matching the warning level); wherein, the fourth safety threshold is preferably 3 mg / L, and the fifth safety threshold is preferably 1.0 mg / L.
[0102] In this embodiment of the application, a multi-level early warning mechanism is established to classify and manage water quality anomalies of different severity levels.
[0103] In another exemplary embodiment of this application, the warning is defined to include a preset warning, a first-level warning, a second-level warning, and a third-level warning. Triggering the warning includes: The system generates corresponding early warning information and sends it to users simultaneously through multiple channels.
[0104] In this embodiment of the application, the warning signal is defined by the indicator function as follows: ,in, For indicator functions, The safety thresholds for each data point in the final water quality prediction data are defined as follows: when any water quality parameter in the final water quality prediction data exceeds the corresponding safety threshold, Output 1 to trigger an alert; otherwise, An output of 0 indicates a normal state.
[0105] By integrating high-frequency and low-frequency prediction results to generate accurate water quality forecasts, key water quality anomalies are promptly transformed into actionable early warning signals, providing real-time decision support for marine ranch management, enabling dynamic monitoring and safety early warning of the aquaculture environment, and improving the intelligence level and risk prevention and control capabilities of aquaculture management.
[0106] In another exemplary embodiment of this application, the above-mentioned method of simultaneously sending early warning information to users through multiple channels specifically includes: The warning is displayed in a preset color and preset form (flashing red) through a graphical user interface; Notify the pre-set administrator's mobile phone via SMS; Send detailed alert reports to the default administrator email address.
[0107] The early warning report includes the name and predicted value of the water quality parameter exceeding the standard, the expected time of exceeding the standard, the predicted duration of the exceeding the standard, and the recommended treatment measures, so that managers can fully understand the abnormal situation and take timely intervention actions.
[0108] Specifically, the expected time of exceeding the standard is determined according to steps A through C. Wherein: Step A: Obtain the final water quality prediction sequence for the next H time steps predicted using a rolling multi-step prediction method. (t0+1), (t0+2),…, (t0+H)}; where t0 is the current time, the interval between adjacent prediction time steps is Δt, Δt is consistent with the sampling period of high-frequency water quality time series data, preferably 1 minute to 30 minutes, and H is preferably covering the next 24 to 72 hours.
[0109] Step B: Starting from time t0+1 of the final water quality prediction sequence, the final water quality prediction data is processed step by step. Each water quality parameter in (t) is compared with its corresponding safety threshold, and the first time t exceeding the standard is determined based on the comparison results. first : t first =min{t: (t)>Threshold} or t first =min{t: (t) <Threshold}; in, (t)>Threshold indicates the time step. t Final water quality prediction data If any upper limit water quality parameter in (t) exceeds the corresponding safety threshold Threshold, (t) represents the time step t final water quality prediction data any one of the lower-limit water quality parameters in (t) is lower than the corresponding safety threshold Threshold; the upper-limit water quality parameters include ammonia nitrogen concentration, and the lower-limit water quality parameters include dissolved oxygen value.
[0110] Step C: based on the first exceeding time t first determine the predicted exceeding time ΔT: ΔT=t first -t0; If the final water quality prediction data for all H predicted future time steps do not exceed the standard, the warning report shall be marked with "No exceeding risk within the prediction window".
[0111] Specifically, the predicted exceeding time is determined according to the following Step D to Step E. Wherein: Step D: continue searching backward from t first determine the time t when the final water quality prediction data (t) first falls back within the corresponding safety threshold Threshold end : t end =min{t>t first : (t)≤Threshold} or t end =min{t>t first : (t)≥Threshold}; Wherein, (t)≤Threshold represents the time step t final water quality prediction data any one of the upper-limit water quality parameters in (t) does not exceed the corresponding safety threshold Threshold, (t)≥Threshold represents the time step t final water quality prediction data any one of the lower-limit water quality parameters in (t) is not lower than the corresponding safety threshold Threshold.
[0112] Step E: based on t end determine the predicted exceeding duration D1 or the number of adopted periods D2 of exceeding duration: D1=(t end -t first ); D2=(t end -t first ) / Δt; If within the prediction window H If (t) does not show a decline, the duration is marked as "≥H·Δt", indicating that the actual duration may exceed the prediction window. It is recommended to raise the warning level by one level and shorten the execution interval of the next prediction.
[0113] The recommended treatment measures should be determined according to the following steps: Suggested treatment measures are extracted from the corresponding treatment measure library for each triggered warning. Each warning level (preset warning, Level 1 warning, Level 2 warning, and Level 3 warning) has a pre-set corresponding treatment measure library, and each library stores the corresponding suggested treatment measures. For example, the treatment measure library for Level 1 warning contains measures such as: turn on the aerator and reduce the feeding rate; the treatment measure library for Level 2 warning contains measures such as: start the biological filter and adjust the stocking density; and the treatment measure library for Level 3 warning contains measures such as: urgently transfer the cultured organisms and fully activate the purification equipment.
[0114] In this embodiment of the application, rapid response and visual management of water quality anomalies are achieved through graded early warning and multi-channel information dissemination, enabling precise monitoring and timely control of risks to marine ranches under high-frequency fluctuations and long-term trend changes, thereby improving the safety of the aquaculture environment and management efficiency.
[0115] In another exemplary embodiment of this application, the final water quality prediction data also includes pH value and total phosphorus concentration, wherein the total phosphorus concentration is an upper limit type water quality parameter, and the pH value is both an upper limit type water quality parameter and a lower limit type water quality parameter.
[0116] Accordingly, if the early warning mechanism adopts a Level 1 early warning mechanism, then step 701 above also includes: If the pH value in the final predicted water quality data is less than the sixth safety threshold or greater than the seventh safety threshold, or if the total phosphorus concentration in the final predicted water quality data is greater than the eighth safety threshold, a preset warning will be triggered. The sixth safety threshold is preferably 6.5, the seventh safety threshold is preferably 8.5, and the eighth safety threshold is preferably 0.2 mg / L.
[0117] Based on the same inventive concept, this application also provides a marine ranching multi-dimensional water quality prediction system for implementing the above-mentioned multi-dimensional water quality prediction method for marine ranching. The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the marine ranching multi-dimensional water quality prediction system provided below can be found in the limitations of the marine ranching multi-dimensional water quality prediction method above, and will not be repeated here.
[0118] In one exemplary embodiment, such as Figure 5 As shown, a multi-dimensional water quality prediction system 80 for marine ranches is provided, comprising: The data acquisition module 801 is used to acquire multi-source heterogeneous data; wherein, the multi-source heterogeneous data includes water quality time series data, environmental time series data and aquaculture activity data; Data processing module 802 is used for: The multi-source heterogeneous data is preprocessed to obtain a standardized time-series dataset; wherein the preprocessing includes at least normalization processing. Water quality time series data in the standardized time series dataset is divided into high-frequency data subsets and input into a pre-trained bidirectional long short-term memory network model. The bidirectional long short-term memory network model performs water quality prediction based on the high-frequency data subsets and outputs the first water quality prediction data. Environmental time-series data and aquaculture activity data in the standardized time-series dataset are divided into low-frequency data subsets and input into a pre-trained deep learning network model adapted for time series prediction. The deep learning network model performs water quality prediction based on the low-frequency data subsets and outputs second water quality prediction data. The first and second water quality prediction data are weighted and fused to obtain the final water quality prediction data.
[0119] In another exemplary embodiment of this application, the preprocessing described above further includes data cleaning before normalization.
[0120] For details regarding data cleaning of the acquired multi-source heterogeneous data in this application embodiment, please refer to the description of the above method embodiment.
[0121] In another exemplary embodiment of this application, the preprocessing described above includes data alignment before normalization and after data cleaning.
[0122] For details regarding data alignment of the acquired multi-source heterogeneous data in this application embodiment, please refer to the description in the above method embodiment.
[0123] In another exemplary embodiment of this application, regarding the aspect of dividing environmental time-series data and aquaculture activity data in a standardized time-series dataset into low-frequency data subsets and inputting them into a pre-trained deep learning network model adapted for time-series prediction, and performing water quality prediction through the deep learning network model to output second water quality prediction data, the aforementioned data processing module 802 is specifically used for: Environmental time series data Data on aquaculture activities The sequences are concatenated along the time dimension to form a combined input sequence. ; For combined input sequences Perform a linear mapping to output a vector sequence with the same dimension as the deep neural network model; Perform sinusoidal position encoding on each vector in the vector sequence to obtain the input sequence; The input sequence is fed into a pre-trained deep learning network model adapted for time series prediction. The deep learning network model is used to predict water quality and outputs second water quality prediction data.
[0124] In another exemplary embodiment of this application, regarding the aspect of performing sinusoidal position encoding on each vector in the vector sequence to obtain the input sequence, the aforementioned data processing module 802 is specifically used for: Calculate the position code for each position pos in the vector sequence using the following position encoding formula: ; ; Where pos represents the position index of the token in the vector sequence (e.g., the 0th, 1st, etc.). This represents the dimension index (starting from 0), corresponding to the 1st dimension of the embedding vector. or dimension, Indicates the first position at pos. Dimensional positional encoding value, Indicates the first position at pos. Dimensional positional encoding value, The vector dimension in the vector sequence ensures that the model can utilize the relative and absolute position information of the elements in the vector sequence; The positional encoding at each pos position is added element-wise to the pos-th embedding vector in the vector sequence to obtain the input sequence with time information.
[0125] In another exemplary embodiment of this application, the deep learning network model adapted for time series prediction described above employs the Transformer model.
[0126] For details regarding the Transformer model in this application embodiment, please refer to the description in the above method embodiment, which will not be repeated here.
[0127] In another exemplary embodiment of this application, the data processing module 802 described above is further configured to: Train the BLSTM model using the following configuration: During the training of the BLSTM model, stochastic gradient descent is used to optimize the mean squared error loss function, and the predicted value is calculated through forward propagation. Compared with the true value The differences are then analyzed, and the weights of the LSTM and fully connected layers are adjusted through backpropagation. This allows the BLSTM model to fully extract the short-term fluctuation characteristics of high-frequency water quality data, providing high-precision input for subsequent dynamic weight fusion and water quality prediction. The loss function is... ,in, These are the model's predicted values. is the true value, and N is the number of training samples. To prevent overfitting, Dropout is applied to the output of each LSTM layer during training to ensure that the BLSTM model has stronger generalization ability in feature extraction, thereby providing a stable and accurate high-frequency temporal feature representation for subsequent dynamic weight fusion.
[0128] In another exemplary embodiment of this application, the data processing module 802 described above is further configured to: Train the BLSTM model using the following configuration: During the training of the BLSTM model, stochastic gradient descent with a batch size of 32 is used. In each training round, all training samples are divided into several batches for parameter updates. The training cycle is 200 rounds. The initial learning rate is set to 0.001. After every 50 rounds, the learning rate is reduced to 0.5 to accelerate convergence in the early stage of training and refine and optimize the parameters in the later stage.
[0129] In another exemplary embodiment of this application, the data processing module 802 described above is further configured to: While outputting the first water quality prediction data through the bidirectional long short-term memory network model, the first feature vector that can simultaneously characterize the short-term fluctuations and sudden disturbances of water quality time series data is also output. While outputting the second water quality prediction data through the deep learning network model, it also outputs a second feature vector that can simultaneously characterize the long-term trend and periodic pattern of environmental time series data as well as the management intervention information of aquaculture activity data. Before weighted fusion of the first and second water quality prediction data, the first feature vector... Second eigenvector Perform dynamic weight allocation and output the first dynamic weight coefficient and the second dynamic weight coefficient; Based on the first dynamic weighting coefficient and the second dynamic weighting coefficient, the first water quality prediction data and the second water quality prediction data are weighted and fused according to the following formula: ; in, This is the first water quality prediction data output by the bidirectional long short-term memory network model. This is the first dynamic weighting coefficient. This is the second water quality prediction data output by the deep learning network model. This is the second dynamic weighting coefficient. , This is the final water quality prediction data.
[0130] In this embodiment, the sum of the first dynamic weighting coefficient and the second dynamic weighting coefficient is equal to 1. The first dynamic weighting coefficient represents the contribution weight of high-frequency features in the final prediction, and the second dynamic weighting coefficient represents the contribution weight of low-frequency features in the final prediction, ensuring that the fused prediction value takes into account both short-term fluctuations and long-term trends.
[0131] In another exemplary embodiment of this application, for the first feature vector Second eigenvector The data processing module 802, which performs dynamic weight allocation and outputs the first and second dynamic weight coefficients, is specifically used for: The first feature vector and the second feature vector are dynamically weighted by an optimization algorithm, and the first dynamic weight coefficient and the second dynamic weight coefficient are output.
[0132] In another exemplary embodiment of this application, the above optimization algorithm employs an improved fireworks algorithm.
[0133] Accordingly, regarding the aspect of dynamically assigning weights to the first feature vector and the second feature vector through an optimization algorithm, and outputting the first dynamic weight coefficient and the second dynamic weight coefficient, the aforementioned data processing module 802 is specifically used for: N fireworks are randomly initialized in the interval [0,1]; each firework corresponds to a candidate weight solution, and each candidate weight solution corresponds to a set of first dynamic weight coefficient α and second dynamic weight coefficient β values; Perform the generation operation: Explosion sparks are generated based on the fitness of each firework, and Gaussian mutation sparks are generated based on the mutation operator. After the generation operation is performed, the fitness value of each explosion spark and Gaussian mutation spark is calculated based on the fitness function. Check if the termination condition is met. If it is, stop the search and select the individual with the largest fitness value from the current candidate set as the optimal solution. Otherwise, select N individuals from the current candidate set as the next generation of fireworks, return to execute the generation operation and its subsequent steps, until the termination condition is met. The current candidate set includes the current generation of explosion sparks, Gaussian mutation sparks and fireworks.
[0134] The termination conditions include a first termination condition, a second termination condition, or a third termination condition. The first termination condition includes: the current iteration count reaches a preset maximum iteration count G (e.g., G=100). The second termination condition includes: the improvement in the optimal fitness value over K consecutive generations (preferably K=10) is less than a preset threshold δ (preferably δ=10). -6 The second termination condition indicates that the population has converged, and further iteration yields no benefit. The third termination condition includes: the validation set precision (MSE) corresponding to the current best individual is lower than the preset target precision (MSE). target MSE target The accuracy can be set according to the required level after normalization of water quality parameters, such as setting MSE. target =0.001. Meeting the third termination condition indicates that the weights have reached the required prediction accuracy, and early termination is necessary to save computational resources.
[0135] The first dynamic weight coefficient α and the second dynamic weight coefficient β corresponding to the individual with the largest fitness value in the current candidate set are the optimal weight coefficient α. * β * ,β * =1-α * .
[0136] In this embodiment of the application, the fitness function of the improved fireworks algorithm, the Gaussian mutated sparks generated based on the mutation operator, and the calculation formula for the explosion amplitude of each individual when generating explosive sparks are detailed in the above method embodiments, and will not be repeated here.
[0137] In another exemplary embodiment of this application, the above-mentioned multi-dimensional water quality prediction system 80 for marine ranching further includes: The early warning module 803 is used to: monitor water quality anomalies based on a preset early warning mechanism for the predicted final water quality values at multiple future time steps, and trigger an early warning when water quality anomalies occur.
[0138] In another exemplary embodiment of this application, the final water quality prediction data includes dissolved oxygen value or ammonia nitrogen concentration, and the preset early warning mechanism includes a first-level early warning mechanism or a multi-level early warning mechanism.
[0139] Accordingly, if the early warning mechanism adopts a first-level early warning mechanism, and for the aspect of monitoring water quality anomalies based on the preset early warning mechanism for the final water quality prediction values at multiple future time steps, and triggering an early warning when water quality anomalies occur, the aforementioned early warning module 803 is specifically used for: If the dissolved oxygen level in the final water quality prediction data is lower than the first safety threshold or the ammonia nitrogen concentration is higher than the second safety threshold, it indicates an abnormal water quality and triggers a preset warning. The first safety threshold is preferably 5 mg / L, and the second safety threshold is preferably 0.5 mg / L.
[0140] In another exemplary embodiment of this application, if the above-mentioned multi-level early warning mechanism adopts a three-level early warning mechanism, for the aspect of monitoring water quality anomalies based on the preset early warning mechanism for the final water quality prediction values at multiple future time steps, and triggering an early warning when water quality anomalies occur, the above-mentioned early warning module 803 is specifically used for: If the dissolved oxygen value in the final water quality prediction data is lower than the first safety threshold, it indicates an abnormal water quality and triggers a Level 1 warning. If the dissolved oxygen concentration in the final water quality prediction data is lower than the third safety threshold or the ammonia nitrogen concentration is higher than the second safety threshold, it indicates an abnormal water quality and triggers a level II warning; the third safety threshold is preferably 4 mg / L. If the dissolved oxygen concentration in the final water quality prediction data is lower than the fourth safety threshold or the ammonia nitrogen concentration is higher than the fifth safety threshold, it indicates an abnormal water quality and triggers a level three warning. The fourth safety threshold is preferably 3 mg / L and the fifth safety threshold is preferably 1.0 mg / L.
[0141] In another exemplary embodiment of this application, the warning is defined to include a preset warning, a first-level warning, a second-level warning, and a third-level warning. Regarding the triggering of the warning, the warning module 803 is specifically used for: The system generates corresponding early warning information and sends it to users simultaneously through multiple channels.
[0142] In another exemplary embodiment of this application, regarding the aspect of synchronously sending corresponding early warning information to users through multiple channels, the aforementioned early warning module 803 is specifically used for: The warning is displayed in a preset color and preset form (flashing red) through a graphical user interface; Notify the pre-set administrator's mobile phone via SMS; Send detailed alert reports to the default administrator email address.
[0143] The early warning report includes the name and predicted value of the water quality parameter exceeding the standard, the expected time of exceeding the standard, the predicted duration of the exceeding the standard, and the recommended treatment measures, so that managers can fully understand the abnormal situation and take timely intervention actions.
[0144] The methods for determining the expected time of exceeding the standard, the predicted duration of exceeding the standard, and the recommended handling measures are detailed in the above-described method embodiments and will not be repeated here.
[0145] In another exemplary embodiment of this application, the final water quality prediction data also includes pH value and total phosphorus concentration, wherein the total phosphorus concentration is an upper limit type water quality parameter, and the pH value is both an upper limit type water quality parameter and a lower limit type water quality parameter.
[0146] Accordingly, if the early warning mechanism adopts a first-level early warning mechanism, and in terms of monitoring water quality anomalies for the predicted final water quality values at multiple future time steps based on the preset early warning mechanism, and triggering an early warning when water quality anomalies occur, the aforementioned early warning module 803 is also used for: If the pH value in the final predicted water quality data is less than the sixth safety threshold or greater than the seventh safety threshold, or if the total phosphorus concentration in the final predicted water quality data is greater than the eighth safety threshold, a preset warning will be triggered. The sixth safety threshold is preferably 6.5, the seventh safety threshold is preferably 8.5, and the eighth safety threshold is preferably 0.2 mg / L.
[0147] In another exemplary embodiment of this application, the data acquisition module 801 specifically includes: Sensor networks are used to acquire high-frequency time-series water quality data. Environmental monitoring stations are used to collect low-frequency environmental time-series data; The manual data entry system is used to obtain manually entered data on aquaculture activities.
[0148] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data for a multi-dimensional water quality prediction method for marine ranching. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a multi-dimensional water quality prediction method for marine ranching.
[0149] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0150] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0151] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0152] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0153] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0154] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0155] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0156] 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.
[0157] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for multi-dimensional water quality prediction of a marine ranching, characterized by, The multi-dimensional water quality prediction method for marine ranches includes: The acquired multi-source heterogeneous data is preprocessed to obtain a standardized time-series dataset; wherein the multi-source heterogeneous data includes water quality time-series data, environmental time-series data and aquaculture activity data, and the preprocessing includes at least normalization processing; Water quality time series data in the standardized time series dataset is divided into high-frequency data subsets and input into a pre-trained bidirectional long short-term memory network model. Water quality is then predicted through the bidirectional long short-term memory network model, and the first water quality prediction data is output. Environmental time-series data and aquaculture activity data in the standardized time-series dataset are divided into low-frequency data subsets and input into a pre-trained deep learning network model adapted for time series prediction. Water quality prediction is performed through the deep learning network model and a second water quality prediction data is output. The first and second water quality prediction data are weighted and fused to obtain the final water quality prediction data.
2. The method of claim 1, wherein, The process of dividing environmental time-series data and aquaculture activity data in a standardized time-series dataset into a low-frequency data subset and inputting it into a pre-trained deep learning network model adapted for time-series prediction, and then using the deep learning network model to perform water quality prediction based on the low-frequency data subset and output second water quality prediction data, specifically includes: Environmental time-series data Farming activity data Concatenating in the time dimension, forming combined input sequences ; For combined input sequences Perform a linear mapping to output a vector sequence with the same dimension as the deep neural network model; Perform sinusoidal position encoding on each vector in the vector sequence to obtain the input sequence; The input sequence is fed into a pre-trained deep learning network model adapted for time series prediction. The deep learning network model is used to predict water quality and outputs second water quality prediction data.
3. The multi-dimensional water quality prediction method for marine ranches according to claim 2, characterized in that, The step of performing sinusoidal position encoding on each vector in the vector sequence to obtain the input sequence specifically includes: Calculate the position code of the pos-th position in the vector sequence according to the following position coding formula: ; ; Where pos represents the index of the token in the vector sequence. Indicates a dimension index. The dimension of the vectors in the vector sequence; The positional encoding at each pos position is added element-wise to the pos-th embedding vector in the vector sequence to obtain the input sequence with time information.
4. The multi-dimensional water quality prediction method for marine ranches according to claim 1, characterized in that, The deep learning network model adapted for time series prediction adopts the Transformer model; The encoder structure of the Transformer model contains four encoding layers. Each encoding layer includes a multi-head self-attention sub-layer and a feedforward neural network sub-layer. The input of the feedforward neural network sub-layer of each encoding layer is the output of its multi-head self-attention sub-layer, and the input of the multi-head self-attention sub-layer of the next encoding layer is the output of the feedforward neural network sub-layer of the previous encoding layer.
5. The multi-dimensional water quality prediction method for marine ranches according to claim 4, characterized in that, Also includes: While outputting the first water quality prediction data through the bidirectional long short-term memory network model, a first feature vector is also output; wherein, the first feature vector is the final time step output by the Dropout layer connected to the output of the second layer of the bidirectional LSTM of the bidirectional long short-term memory network model, which is input into the high-frequency data subset. Forward hidden state Backward hidden state at the initial time step Feature vectors formed by splicing , This represents the output dimension of the first bidirectional LSTM layer. While outputting the second water quality prediction data through the deep learning network model, a second feature vector is also output; where the second feature vector is the output vector corresponding to the [CLS] marker at the beginning of the output sequence of the encoder of the Transformer model; Before the weighted fusion of the first water quality prediction data and the second water quality prediction data, the first feature vector and the second feature vector are dynamically weighted, and the first dynamic weight coefficient and the second dynamic weight coefficient are output. The weighted fusion of the first water quality prediction data and the second water quality prediction data specifically includes: Based on the first dynamic weighting coefficient and the second dynamic weighting coefficient, the first water quality prediction data and the second water quality prediction data are weighted and fused according to the following formula: ; in, This is the first water quality prediction data output by the bidirectional long short-term memory network model. This is the first dynamic weighting coefficient. This is the second water quality prediction data output by the deep learning network model. This is the second dynamic weighting coefficient. This is the final water quality prediction data.
6. The multi-dimensional water quality prediction method for marine ranches according to claim 5, characterized in that, The dynamic weight allocation of the first feature vector and the second feature vector, and the output of the first dynamic weight coefficient and the second dynamic weight coefficient, specifically includes: The first feature vector and the second feature vector are dynamically weighted by an optimization algorithm, and the first dynamic weight coefficient and the second dynamic weight coefficient are output.
7. The multi-dimensional water quality prediction method for marine ranches according to claim 6, characterized in that, The optimization algorithm employs an improved fireworks algorithm; In the improved fireworks algorithm, when generating Gaussian mutated sparks based on the mutation operator, for each fireworks position... The location of the Gaussian mutation spark is calculated using the following formula: ; in, The location of the generated Gaussian mutation spark. This is the step size factor, which controls the amplitude of variation; is the Cauchy mutation operator, which is a random number that follows a standard Cauchy distribution; In the improved fireworks algorithm, when generating explosive sparks based on the fitness of each firework, the explosion amplitude of each individual is... Calculate using the following formula: ; in, For the maximum explosion amplitude, For the first The adaptability of the fireworks The minimum fitness of the current population. To prevent zero items.
8. The multi-dimensional water quality prediction method for marine ranches according to claim 1, characterized in that, Also includes: Based on a pre-set early warning mechanism, water quality anomalies are monitored for the predicted final water quality values at multiple future time steps, and an early warning is triggered when water quality anomalies occur.
9. A multi-dimensional water quality prediction system for marine ranches, characterized in that, The marine ranch multi-dimensional water quality prediction system includes: The data acquisition module is used to acquire multi-source heterogeneous data; wherein, the multi-source heterogeneous data includes water quality time-series data, environmental time-series data, and aquaculture activity data; The data processing module is used for: The multi-source heterogeneous data is preprocessed to obtain a standardized time-series dataset; wherein the preprocessing includes at least data cleaning and normalization. Water quality time series data in the standardized time series dataset is divided into high-frequency data subsets and input into a pre-trained bidirectional long short-term memory network model. Water quality is then predicted through the bidirectional long short-term memory network model, and the first water quality prediction data is output. Environmental time-series data and aquaculture activity data in the standardized time-series dataset are divided into low-frequency data subsets and input into a pre-trained deep learning network model adapted for time series prediction. Water quality prediction is performed through the deep learning network model and a second water quality prediction data is output. The first and second water quality prediction data are weighted and fused to obtain the final water quality prediction data.
10. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the multidimensional water quality prediction method for marine ranching as described in any one of claims 1-8.
