Fishery intelligent monitoring analysis and dynamic optimization method based on federated learning
Through federal comparative learning, gradient compression and personalized federal learning methods, the accuracy and real-time problems of fishery artificial intelligence in freshwater fisheries are solved, model updates are optimized, and the efficiency and effectiveness of intelligent monitoring of fisheries are improved.
Patent Information
- Application Number
- CN202510512706.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-04-23
AI Technical Summary
In freshwater fisheries, fishery artificial intelligence based on federal learning has problems such as poor accuracy, poor real-time performance and difficulty in model updates, especially due to challenges caused by factors such as data quality differences, uneven equipment performance and strong ecological dynamics.
On the premise of protecting data privacy, combined with federated comparison learning, gradient compression and personalized federated learning methods, we will improve characterization learning capabilities, reduce communication load, and balance the consistency of the global model with the personalized adaptation of local data.
It realizes that on the premise of protecting data privacy, the accuracy and real-time nature of fishery artificial intelligence are improved, the model update process is optimized, and the efficiency and effectiveness of distributed training are improved.
Smart Images

Figure CN120409625A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fishery artificial intelligence and federated learning, and more specifically, to a fishery intelligent monitoring analysis and dynamic optimization method based on federated learning. Background Art
[0002] With the intensification of global freshwater resource shortage and ecological protection, freshwater fishery is accelerating its transformation towards intelligence. Artificial intelligence (AI) technology has been applied to scenarios such as fish school monitoring (e.g., sonar imaging, drone inspection), water quality early warning (e.g., ammonia nitrogen concentration prediction), intelligent feeding (e.g., feed delivery optimization based on fish school density), and illegal fishing identification (e.g., electronic fence monitoring). Although federated learning (FL), as a distributed learning framework, alleviates the data silo problem through the mode of "data does not move while the model moves", it still faces the following technical bottlenecks in actual implementation:
[0003] Firstly, the poor accuracy of fishery artificial intelligence based on federated learning is caused by the complex data sources in freshwater fishery and the large differences in data quality among various participants; secondly, the poor real-time performance of fishery artificial intelligence based on federated learning is due to the large differences in the performance of edge devices and poor signal coverage; thirdly, the difficulty in updating the model of fishery artificial intelligence based on federated learning is caused by the strong dynamics and strong policy intervention of the fishery ecosystem. Summary of the Invention
[0004] To address the above technical problems, the present invention provides a fishery intelligent monitoring analysis and dynamic optimization method based on federated learning. To solve the problem of poor accuracy of fishery artificial intelligence based on federated learning, a federated contrastive learning method that enhances the representation learning ability of distributed training while protecting data privacy is adopted. To solve the problem of poor real-time performance of fishery artificial intelligence based on federated learning, a federated gradient compression method that reduces communication load and enhances robustness is adopted. To solve the problem of difficulty in updating the model of fishery artificial intelligence based on federated learning, a personalized federated learning method that balances the consistency of the global model and the personalized adaptation of local data is adopted.
[0005] In this framework, the contrastive learning method is mainly used to enhance the representation learning ability of the local model, the gradient compression method is used to reduce communication load and enhance robustness, while the personalized federated learning method is used to balance the consistency of the global model and the personalized adaptation of local data. Through the combination of these three methods, the system can achieve efficient distributed training and optimization while protecting data privacy.
[0006] The specific technical solution is as follows:
[0007] A fishery intelligent monitoring analysis and dynamic optimization method based on federated learning, comprising the following steps:
[0008] S1. Initialization of each fishery participant. Each participant (monitoring station, farm, research institution) initializes its local model according to its own data characteristics.
[0009] Monitoring station: Use a lightweight network (such as CNN) for feature extraction, suitable for real-time monitoring and data analysis.
[0010] Large-scale farm: Use a pre-trained deep learning model (such as ResNet) and fine-tune it, suitable for large-scale data and high-precision prediction.
[0011] Small-scale family farm: Use a simple multi-layer perceptron (MLP) model, suitable for small-scale data and basic management needs.
[0012] Fishery research institution: Use a complex model structure, including a time series processing module and a feature interaction layer, suitable for in-depth research on fish growth mechanisms.
[0013] S2. Local contrastive learning. The monitoring station collects local data, including water flow velocity, water temperature change, fish activity frequency, etc. Positive and negative sample pairs are generated through data augmentation (such as rotation, cropping) or sampling strategies. For example, positive sample pairs (similar water flow velocities) and negative sample pairs (different water flow velocities) are generated from the water flow velocity data. Use a lightweight neural network (such as convolutional neural network CNN or multi-layer perceptron MLP) to encode the features of the samples. These networks can map the input data to a high-dimensional feature space to better capture the inherent features of the data. The monitoring station can use CNN to extract the spatial and temporal features of the water flow velocity data.
[0014] The InfoNCE Loss (InfoNCE Loss) is used to maximize the similarity of positive sample pairs and minimize the similarity of negative sample pairs. The formula is as follows:
[0015]
[0016] represents the contrastive loss of the i-th sample. Adding a negative sign in front of the logarithmic function is a common mathematical transformation form. The logarithmic function has properties such as converting multiplicative relationships to additive relationships. Here, -log is used to convert the ratio of similarities into an optimizable loss value form. exp is the exponential function, that is, e x (e≈2.71828). d(·,·) is the similarity function (cosine similarity h i (x q ) and h i (x p ) are the model's responses to the query sample x q and the positive sample x pThe extracted feature representation. k is the number of negative samples, which represents the feature representation of the j-th negative sample extracted by the model, and calculates the similarity between the query sample feature h i (x q ) and the feature of the j-th negative sample .
[0017] Update the local model parameters through the gradient descent algorithm. The monitoring site can use the Adam optimizer to update the weights of the CNN to improve the accuracy of water flow speed prediction. Through these steps, local contrast learning can effectively enhance the model's representation learning ability, thus better utilizing local data for training in the federated learning framework.
[0018] S3. Gradient Compression. Each participant quantizes the local gradient, sets an 8-bit precision, and maps the floating-point gradient values to a finite set of discrete values. For example, if the gradient range is [-50, 50], the quantized gradient value q is calculated through the formula . Perform differential encoding on the quantized gradient, calculate the difference between adjacent gradient values and encode them for transmission to reduce the data transmission volume. Upload the compressed and encoded gradient to the central server through an encrypted channel.
[0019] S4. Central Server Processing. After receiving the compressed gradient, the central server performs a decoding operation to restore the quantized gradient value, and then dequantizes it to convert the discrete value back to a floating point number. The central server globally aggregates the decoded and dequantized gradients, using a weighted average method, and determines the weights according to the data volume and requirements of each participant. Update the global model parameters based on the aggregated gradient and encrypt and distribute them to each participant.
[0020] S5. Personalized Federated Learning. Model Update. After each participant receives the global model parameters, it updates the model according to its personalized needs.
[0021] Large-scale farms: According to their characteristics of large data volume and focus on fish growth prediction, use the adaptive learning rate algorithm for model update.
[0022] Small-scale family farms: According to their characteristics of small data volume and focus on aquaculture cost control, use the Adagrad optimization algorithm for model update.
[0023] Fishery research institutions: According to their need to deeply study the fish growth mechanism, use the Bayesian optimization algorithm for model update.
[0024] S6. Iterative Optimization. After each round of training, the system evaluates the model to determine whether the predefined performance metrics are achieved. The evaluation is usually carried out on the validation set, using multiple metrics (such as accuracy, mean squared error MSE, etc.) to measure the performance of the model. For the fish growth prediction model, the mean squared error may be used to evaluate the difference between the predicted value and the actual value; for the fish activity frequency prediction model, accuracy may be used to evaluate the classification accuracy. If the error of the model on the validation set does not reach the predefined threshold (error rate is lower than 5%, accuracy reaches more than 95%), the system will continue the next round of training. In personalized federated learning, the system dynamically adjusts the weights of the model parameters according to the data quality and contribution degree of each participant. Brief Description of the Drawings
[0025] Figure 1 is the step flow chart of a fishery intelligent monitoring system and optimization method based on federated learning of the present invention.
[0026] Figure 2 is the schematic diagram of the data flow of the system of the present invention. Detailed Embodiment
[0027] The drawings are only for illustrative purposes and should not be construed as a limitation of this patent;
[0028] For better illustration of this embodiment, some parts of the drawings will be omitted, enlarged or reduced, and do not represent the actual size;
[0029] For those skilled in the art, it is understandable that some well-known content descriptions in the drawings may be omitted.
[0030] The description of the positional relationship in the drawings is only for illustrative purposes and should not be construed as a limitation of this patent;
[0031] The technical solutions of the present invention will be further described below with reference to the drawings and embodiments.
[0032] As Figure 1 shown:
[0033] S1. Initialization of Each Fishery Participant. Each participant (monitoring station, farm, research institution) initializes the local model according to its own data characteristics.
[0034] Monitoring Station: Use a lightweight network (such as CNN) for feature extraction, which is suitable for real-time monitoring and data analysis.
[0035] Large Farm: Use a pre-trained deep learning model (such as ResNet) and fine-tune it, which is suitable for large-scale data and high-precision prediction.
[0036] Small-scale household farms: Use a simple multi-layer perceptron (MLP) model, suitable for small-scale data and basic management needs.
[0037] Fisheries research institutions: Use complex model structures, including time series processing modules and feature interaction layers, suitable for in-depth research on fish growth mechanisms.
[0038] S2. Local contrastive learning. Monitoring stations collect local data, including water flow velocity, water temperature changes, fish activity frequencies, etc. Generate positive and negative sample pairs through data augmentation (such as rotation, cropping) or sampling strategies. For example, generate positive sample pairs (similar water flow velocities) and negative sample pairs (different water flow velocities) from water flow velocity data. Use lightweight neural networks (such as convolutional neural network CNN or multi-layer perceptron MLP) to encode the features of the samples. These networks can map the input data to a high-dimensional feature space to better capture the inherent features of the data. Monitoring stations can use CNN to extract the spatial and temporal features of water flow velocity data.
[0039] Adopt InfoNCE Loss (Information Noise Contrastive Estimation Loss) to maximize the similarity of positive sample pairs and minimize the similarity of negative sample pairs. The formula is as follows:
[0040]
[0041] represents the contrastive loss of the i-th sample. Adding a negative sign in front of the logarithmic function is a common mathematical transformation form. The logarithmic function has properties such as converting multiplicative relationships into additive relationships. Here, -log is used to convert the ratio of similarities into an optimizable loss value form. exp is the exponential function, that is, e x (e≈2.71828). d(·,·) is the similarity function (cosine similarity ). h i (x q ) and h i (x p ) are the feature representations extracted by the model for the query sample x q and the positive sample x p respectively. k is the number of negative samples, represents the feature representation extracted by the model for the j-th negative sample , calculates the similarity between the query sample feature h i (x q ) and the j-th negative sample feature .
[0042] Update the local model parameters through the gradient descent algorithm. The monitoring site can use the Adam optimizer to update the weights of the CNN to improve the accuracy of water flow velocity prediction. Through these steps, local contrast learning can effectively enhance the model's representation learning ability, so as to better utilize local data for training in the federated learning framework.
[0043] S3. Gradient Compression. Each participant quantizes the local gradient, sets 8-bit precision, and maps the floating-point gradient values to a finite set of discrete values. For example, the gradient range is [-50, 50], and the quantized gradient value q is calculated through the formula Perform differential encoding on the quantized gradient, calculate the difference between adjacent gradient values and encode them for transmission to reduce the data transmission volume. Upload the compressed and encoded gradient to the central server through an encrypted channel.
[0044] S4. Central Server Processing. After receiving the compressed gradient, the central server performs a decoding operation to restore the quantized gradient value, and then dequantizes it to convert the discrete value back to a floating-point number. The central server globally aggregates the decoded and dequantized gradients, using a weighted average method, and determines the weights according to the data volume and requirements of each participant. Update the global model parameters based on the aggregated gradients and encrypt and distribute them to each participant.
[0045] S5. Personalized Federated Learning. Model Update. After each participant receives the global model parameters, it updates the model according to its personalized needs.
[0046] Large-scale farms: According to their characteristics of large data volume and focus on fish growth prediction, use the adaptive learning rate algorithm for model update.
[0047] Small family farms: According to their characteristics of small data volume and focus on aquaculture cost control, use the Adagrad optimization algorithm for model update.
[0048] Fisheries research institutions: According to their need to deeply study the fish growth mechanism, use the Bayesian optimization algorithm for model update.
[0049] S6. Iterative Optimization. After each round of training, the system evaluates the model to determine whether the predefined performance metrics are achieved. The evaluation is usually carried out on the validation set, using multiple metrics (such as accuracy, mean squared error MSE, etc.) to measure the performance of the model. For the fish growth prediction model, the mean squared error may be used to evaluate the difference between the predicted value and the actual value; for the fish activity frequency prediction model, accuracy may be used to evaluate the classification accuracy. If the error of the model on the validation set does not reach the predefined threshold (error rate lower than 5%, accuracy higher than 95%), the system will continue the next round of training. In personalized federated learning, the system dynamically adjusts the weights of the model parameters according to the data quality and contribution degree of each participant.
[0050] The schematic diagram of the system data flow of the entire fishery intelligent monitoring system and optimization method embodiment based on federated learning is as Figure 2 shown.
[0051] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the claims of the present invention.
Claims
1. A fishery intelligent monitoring analysis and dynamic optimization method based on federated learning, characterized in that, It includes the following steps: S1. Initialization of each fishery participant; each participant initializes its local model according to its respective data characteristics; the participants include monitoring stations, farms, and research institutions; S2. Local contrastive learning; the monitoring station collects local data, generates positive and negative sample pairs through data augmentation or sampling strategies; uses lightweight neural networks to encode the features of the samples; These networks can map the input data to a high-dimensional feature space and capture the intrinsic features of the data; S3. Gradient compression; each participant quantizes its local gradient, sets 8-bit precision, and maps the floating-point gradient values to a finite set of discrete values; performs differential encoding on the quantized gradient, calculates the difference between adjacent gradient values and encodes and transmits them to reduce the data transmission volume; uploads the compressed and encoded gradient to the central server through an encrypted channel; S4. Central server processing; after receiving the compressed gradient, the central server performs a decoding operation to restore the quantized gradient value, and then performs dequantization to convert the discrete value back to a floating-point number; The central server globally aggregates the decoded and dequantized gradients, using a weighted average method, and determines the weights according to the data volume and requirements of each participant; updates the global model parameters according to the aggregated gradients and encrypts and distributes them to each participant; S5. Personalized federated learning; Model update, after each participant receives the global model parameters, it updates the model according to its personalized needs; S6. Iterative optimization; after each round of training ends, the model is evaluated to determine whether the predetermined performance indicators are met; the evaluation is performed on the validation set, and multiple indicators are used to measure the performance of the model.
2. The fishery intelligent monitoring analysis and dynamic optimization method based on federated learning according to claim 1, wherein In S1; Monitoring station: uses a lightweight network for feature extraction, suitable for real-time monitoring and data analysis; Large farm: uses a pre-trained deep learning model and fine-tunes it, suitable for large-scale data and high-precision prediction; Small family farm: uses a simple multi-layer perceptron model, suitable for small-scale data and basic management needs; Fishery research institution: uses a complex model structure, including a time series processing module and a feature interaction layer, suitable for in-depth research on the fish growth mechanism.
3. A fishery intelligent monitoring, analysis and dynamic optimization method based on federated learning according to claim 1, characterized in that In S2, the monitoring station uses a CNN to extract the spatial and temporal features of water flow velocity data; Adopts the InfoNCE Loss (Information Noise Contrastive Estimation Loss) to maximize the similarity of positive sample pairs and minimize the similarity of negative sample pairs; the formula is as follows: denotes the contrastive loss of the i-th sample; -log is used to convert the ratio of similarities into an optimizable loss value form; d(·,·) is the similarity function; h i (x q ) and h i (x p ) are the feature representations extracted by the model for the query sample x q and the positive sample x p respectively; k is the number of negative samples, denotes the feature representation extracted by the model for the j-th negative sample ; d(h i (x q ), h i (x j n )) calculates the similarity between the query sample feature h i (x q ) and the j-th negative sample feature ; Updates the local model parameters through the gradient descent algorithm; The monitoring station uses the Adam optimizer to update the weights of the CNN.
4. A fishery intelligent monitoring, analysis and dynamic optimization method based on federated learning according to claim 1, characterized in that, In S5: Large farm: according to its characteristics of large data volume and focus on fish growth prediction, uses the adaptive learning rate algorithm for model update; Small family farm: according to its characteristics of small data volume and focus on aquaculture cost control, uses the Adagrad optimization algorithm for model update; Fishery research institution: according to its need for in-depth research on the fish growth mechanism, uses the Bayesian optimization algorithm for model update.
5. A fishery intelligent monitoring, analysis and dynamic optimization method based on federated learning according to claim 1, characterized in that, In S6: For the fish growth prediction model, the mean squared error is used to evaluate the difference between the predicted value and the actual value; for the fish activity frequency prediction model, the accuracy rate is used to evaluate the accuracy of classification. If the error of the model on the validation set does not reach the predetermined threshold, continue with the next round of training; in personalized federated learning, the weights of the model parameters are dynamically adjusted according to the data quality and contribution degree of each participant.
Citation Information
Patent Citations
Personalized federal learning method and device for processing unbalanced data
CN115344883A
Federal element learning image recognition method and system with enhanced noise robustness
CN117994635A
Wind power data anomaly detection method and system based on federated learning mechanism
CN118468186A
Federal self-supervised learning method for resisting motion blur
CN118675134A
Decentralized federated learning method and system based on personalized local differential privacy
CN118940857A