Fish stress behavior detection method, device and equipment in red tide algae environment and medium

By employing multi-perspective collaborative monitoring and multi-source data fusion technology, the problem of accurately identifying fish stress behavior under red tide algae conditions has been solved, enabling real-time early warning and efficient detection, thereby improving the economic benefits of aquaculture.

CN120853223APending Publication Date: 2025-10-28CHINA AGRI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511007844.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify fish stress behaviors in red tide algae environments, exhibiting high false positive and false negative rates, making precise monitoring impossible. Furthermore, they lack multi-data fusion analysis and cross-media behavior correlation models.

Method used

Employing multi-view collaborative monitoring, algorithm optimization, and multi-source data fusion technology, images are collected at multiple depths from the water surface to the bottom of the pool. Visual and behavioral features are extracted using a detection model, and a self-attention mechanism is used for feature fusion. The results are then input into a classification model to determine the stress level.

Benefits of technology

It improved the accuracy of detecting fish stress behavior under red tide algae conditions, realized adaptive detection and real-time early warning in complex aquatic environments, reduced fish mortality and improved aquaculture efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120853223A_ABST
    Figure CN120853223A_ABST
Patent Text Reader

Abstract

The invention provides a fish stress behavior detection method in a red tide algae environment, and the method comprises the steps: collecting a plurality of groups of target images at a plurality of depth positions from a water surface to a pool bottom, and extracting the visual features of the target images based on a detection model; extracting a target fish school in the detection target image based on the detection model, identifying a motion trail of the target fish school, and extracting multiple behavior characteristics of the target fish school from the motion trail; the visual features, the multiple behavior features and the environment parameters in the red tide algae environment form a fusion sequence, and a fusion feature vector of the fusion sequence is extracted; and inputting the fusion feature vector into a classification model to obtain the stress level of the target fish school in the red tide algae environment. The invention further provides a fish stress behavior detection method, device and equipment in the red tide algae environment and a medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of computer vision and aquaculture technology, and more specifically, to a method, apparatus, equipment and medium for detecting fish stress behavior in a red tide algae environment. Background Technology

[0002] Aquaculture is a core pillar of global food security and fisheries economic development, highly dependent on the health of marine and inland water ecosystems. However, red tide disasters caused by the continuous degradation of nearshore ecosystems seriously threaten the sustainable development of aquaculture. Red tide algal blooms lead to water turbidity and reduced light, while releasing toxins that directly affect fish health, and fish stress behavior is an early signal of their health status. Traditional monitoring methods face severe challenges in red tide environments, and there is an urgent need to overcome the technical bottlenecks of multi-source data fusion and cross-media analysis to establish a precise and real-time monitoring system for fish stress behavior.

[0003] Current technologies for monitoring fish stress behavior mainly suffer from the following problems: First, red tide algae cause water turbidity and light scattering, limiting the field of view of a single camera and making it difficult to capture the behavioral dynamics of fish at different water depths; second, traditional algorithms are easily affected by light refraction and suspended particles, resulting in low fish detection accuracy and difficulty in accurately identifying stress behavior characteristics (such as abrupt turning and spiral swimming); third, existing technologies fail to integrate fish activity levels, movement trajectories, water quality parameters, and multi-view image data, leading to biased stress behavior judgments; fourth, the lack of cross-media behavior correlation models results in high false positive and false negative rates, making it difficult to reliably identify true stress behavior.

[0004] Furthermore, existing technologies lack multi-data fusion analysis, failing to comprehensively utilize multi-source data such as fish activity levels, movement trajectories, and abnormal swimming patterns, as well as image information from surface and underwater cameras. This makes it difficult to achieve a comprehensive assessment of stress behavior, resulting in biased judgments of fish stress behavior. Simultaneously, insufficient analysis of the correlation between surface and underwater behavior fails to effectively establish a correlation model between surface and underwater fish behavior, leading to high false positive and false negative rates. This makes it unreliable to detect the true stress behavior of fish and fails to meet the practical needs of aquaculture for precise monitoring of fish stress behavior in red tide algae environments. Summary of the Invention

[0005] In view of this, this disclosure provides a method, apparatus, equipment and medium for detecting fish stress behavior in red tide algae environments.

[0006] One aspect of this disclosure provides a method for detecting fish stress behavior in a red tide algae environment, comprising: acquiring multiple sets of target images at multiple depths from the water surface to the bottom of the pond; extracting visual features of the target images based on a detection model; extracting and detecting target fish groups in the target images based on the detection model; identifying the movement trajectory of the target fish groups; extracting multiple behavioral features of the target fish groups from the movement trajectory; constructing a fusion sequence by combining the visual features, the multiple behavioral features, and environmental parameters under the red tide algae environment; extracting a fusion feature vector from the fusion sequence; and inputting the fusion feature vector into a classification model to obtain the stress level of the target fish groups under the red tide algae environment.

[0007] According to embodiments of this disclosure, acquiring multiple sets of target images at multiple depths from the water surface to the bottom of the pool, and extracting visual features of the target images based on a detection model includes: acquiring the multiple sets of target images from four angles: above water, on the water surface, in the water, and at the bottom of the water; extracting feature points from the multiple sets of target images; calculating a mapping matrix from the camera coordinate system to the world coordinate system based on the feature points; projecting the target images onto a two-dimensional plane based on the mapping matrix to obtain a reprojected image; and inputting the reprojected image into the detection model for feature extraction to obtain the visual features of the target images.

[0008] According to embodiments of this disclosure, the step of inputting the reprojected image into the detection model for feature extraction to obtain the visual features of the target image includes: inputting the reprojected image into the global feature extraction branch, the first enhancement branch, and the second enhancement branch of the detection model respectively; the global feature extraction branch is used to extract global features of the reprojected image; the first enhancement branch obtains multi-scale context by performing dilated convolution calculation on the reprojected image; the second enhancement branch obtains noise-suppressed image features by suppressing noise in the reprojected image through an attention mechanism; and fusing the global features, the multi-scale context, and the noise-suppressed image features to obtain the visual features of the target image.

[0009] According to embodiments of this disclosure, the step of detecting a target fish group in a target image based on a detection model, identifying the movement trajectory of the target fish group, and extracting multiple behavioral features of the target fish group from the movement trajectory includes: inputting the visual features into the detection model, identifying the target fish group in the target image through feature matching, and obtaining a detection box of the target fish group, wherein when the turbidity of the water is greater than a first threshold, the matching threshold is lowered and the Soft-NMS algorithm is enabled to reduce missed detections of dense fish groups; identifying the movement trajectory of the target fish group based on the position of the detection box, wherein when there is occlusion and the confidence of the position of the detection box is lower than a second threshold, a multi-hypothesis tracking mechanism is activated to predict the trajectory and update the movement trajectory; and detecting multiple behavioral features in the movement trajectory based on sliding window technology.

[0010] According to an embodiment of this disclosure, identifying the movement trajectory of the target fish group based on the position of the detection box includes: performing a primary matching between the detection box and the features of an existing movement trajectory; when the similarity of the primary matching is lower than a third threshold, performing a secondary matching between the position of the detection box and the predicted position of the movement trajectory; when the similarity of the secondary matching is lower than a fourth threshold, matching the detection box with the rate of change of velocity and the rate of change of acceleration of the movement trajectory; and extending the movement trajectory based on the successfully matched detection box.

[0011] According to embodiments of this disclosure, the step of constructing a fusion sequence from the visual features, the multiple behavioral features, and environmental parameters under the red tide algae environment, and extracting the fusion feature vector of the fusion sequence includes: mapping the visual features, the multiple behavioral features, and environmental parameters under the red tide algae environment to the same dimension and then uniformly encoding them to form the fusion sequence; calculating a weight matrix reflecting the correlation strength between different types of features based on a multi-head attention mechanism using a self-attention mechanism; concatenating the weight matrix obtained by the multi-head attention mechanism; performing residual connections and layer normalization; and then extracting features through a feedforward neural network to obtain the fusion feature vector.

[0012] According to an embodiment of this disclosure, the step of inputting the fused feature vector into a classification model to obtain the stress level of the target fish population in a red tide algae environment includes: inputting the fused feature vector into a classification model to obtain the stress level; obtaining data associated with the stress level from the visual features, the multiple behavioral features, and environmental parameters in the red tide algae environment based on a preset feature mapping rule; and obtaining the warning level corresponding to the data associated with the stress level based on a preset warning rule.

[0013] Another disclosure provides a device for detecting fish stress behavior in a red tide algae environment, comprising: an image feature extraction module for acquiring multiple sets of target images at multiple depths from the water surface to the bottom of the pond, and extracting visual features of the target images based on a detection model; a behavior feature extraction module for extracting and detecting target fish groups in the target images based on the detection model, identifying the movement trajectory of the target fish groups, and extracting multiple behavior features of the target fish groups from the movement trajectory; a data fusion module for constructing a fusion sequence by combining the visual features, the multiple behavior features, and environmental parameters under the red tide algae environment, calculating a weight matrix reflecting the correlation strength between different types of features based on a self-attention mechanism, and extracting a fusion feature vector of the fusion sequence based on the weight matrix; and a behavior detection module for inputting the fusion feature vector into a classification model to obtain the stress level of the target fish groups under the red tide algae environment.

[0014] Another aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described above.

[0015] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are used to implement the method described above.

[0016] According to embodiments of this disclosure, the detection accuracy of fish stress behavior in red tide algae environments is improved through multi-view collaborative monitoring, algorithm optimization, multi-source data fusion, and dynamic tracking technology, achieving adaptive detection and real-time early warning in complex aquatic environments. Attached Figure Description

[0017] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0018] Figure 1 This illustration schematically shows a method for detecting fish stress behavior in a red tide algae environment according to an embodiment of the present disclosure;

[0019] Figure 2 A multi-view simulation diagram is schematically shown according to an embodiment of the present disclosure;

[0020] Figure 3 A schematic diagram illustrating a model detection flowchart according to an embodiment of the present disclosure is shown.

[0021] Figure 4 This illustration schematically depicts a real-time early warning system and graded detection according to an embodiment of the present disclosure;

[0022] Figure 5 A block diagram illustrating the detection of fish stress behavior in a red tide algae environment according to embodiments of the present disclosure is shown; and

[0023] Figure 6 A block diagram of an electronic device 600 suitable for implementing a robot according to an embodiment of the present disclosure is shown schematically. Detailed Implementation

[0024] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0027] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0028] like Figure 1 As shown, this disclosure provides a method for detecting fish stress behavior in a red tide algae environment, including S1 to S4.

[0029] S1: Collect multiple sets of target images at various depths from the water surface to the bottom of the pool, and extract the visual features of the target images based on the detection model.

[0030] In this embodiment of the disclosure, reference is made to Figure 2A four-layer three-dimensional sensing network was deployed in aquaculture areas prone to red tides: a 180° wide-angle infrared camera (model: FLIR A35) was mounted at the top, using a waterproof gimbal to achieve 360° scanning; a blue-green light camera (Optris PI450) with an anti-algae coating was placed at a depth of 20cm in the surface layer; a dual-spectrum camera (visible light + near-infrared) was installed at 40cm in the middle layer, supporting simultaneous acquisition in the 450-900nm band; and an underwater camera (Insta360 Pro 2) with a pressure resistance of 100m was deployed at the bottom layer, equipped with an optical lens with a resolution of 512×512 pixels. The four layers of equipment achieved microsecond-level time alignment through the PTP clock synchronization protocol (IEEE 1588), and a fiber optic ring network (transmission rate of 10Gbps) was used to construct the data transmission link.

[0031] In this embodiment, a five-parameter water quality sensor (YSI 6600V2) is also deployed to collect dissolved oxygen (accuracy ±0.1 mg / L), turbidity (±2 NTU), temperature (±0.5℃), pH value (±0.01), and conductivity (±1%) in real time. A flow cytometer (BD FACSVerse) is used to monitor algal density, which can identify 12 species of red tide algae such as Alexandrium and Karenia, with a detection limit of 1×10³ cells / L. A weather station (HOBO U30-NRC) is deployed simultaneously to collect parameters such as light intensity and wind speed. All sensors are connected to the edge computing unit via the Modbus-RTU protocol, with a sampling frequency of 1 time / 10 seconds.

[0032] S1 includes S101 to S103.

[0033] S101 acquires multiple sets of target images from four angles: above water, on the water surface, in the water, and at the bottom of the water, and extracts feature points from the multiple sets of target images.

[0034] In this embodiment, the Zhang calibration method is used in conjunction with a three-dimensional target (60cm×60cm×40cm) for system calibration: 200 sets of target images are collected at different depths from the water surface to the bottom of the pool, and feature points are extracted using the Harris corner detection algorithm.

[0035] S102 calculates the mapping matrix from the camera coordinate system to the world coordinate system based on feature points, and projects the target image onto a two-dimensional plane based on the mapping matrix to obtain the reprojected image.

[0036] In this embodiment, an eight-parameter transformation model (including rotation matrix R, translation vector T, scaling factor s, and shear parameter) is used to establish the mapping relationship between the camera coordinate system and the world coordinate system. The parameters are solved iteratively using the Levenberg-Marquardt optimization algorithm to achieve a reprojection error of < 0.8 pixels. Time synchronization adopts a master-slave clock architecture, with the master clock deployed at the shore control unit and the slave clocks integrated at each sensor node. The IEEE 1588 protocol is used to achieve a network-wide time deviation of < 5ms.

[0037] S103, input the reprojected image into the detection model for feature extraction to obtain the visual features of the target image.

[0038] In this embodiment, algae particle noise in the image is first eliminated by bilateral filtering (7 pixels in diameter, spatial standard deviation 15, and range standard deviation 30). Then, the multi-scale Retinex algorithm (MSR) is used to enhance image contrast. For water turbidity caused by red tides, a physical model-based dehazing algorithm is introduced to recover a clear image by estimating the atmospheric light value A and transmittance t(x).

[0039]

[0040] Where I(x) is the input image, J(x) is the dehazed image, the transmittance t(x) is estimated through the dark channel prior, and the atmospheric light value A is taken as the maximum value of the first 0.1% of pixels in the dark channel image. The peak signal-to-noise ratio (PSNR) of the processed image is improved by 12-15 dB, and the structural similarity (SSIM) is improved by 0.25-0.32.

[0041] In this embodiment, target image detection is performed using an improved RT-DETR. The RT-DETR framework incorporates a three-branch feature fusion structure. The main branch (global feature extraction branch) uses CSPDarknet53 to extract global features. The enhancement branch (first enhancement branch) obtains multi-scale context through dilated convolutions (rate = 2, 3, 5). The second enhancement branch introduces an attention mechanism (SE module) to suppress algal background interference. The reprojected image is input into the global feature extraction branch, the first enhancement branch, and the second enhancement branch of the detection model, respectively. The global feature extraction branch extracts global features from the reprojected image, the first enhancement branch obtains multi-scale context from the reprojected image, and the second enhancement branch suppresses noise in the reprojected image. For small target detection (body length < 5cm) in red tide environments, cross-layer connections are added to the Feature Pyramid Network (FPN), fusing the features of layer P2 (stride = 4) with layers P3-P5 to achieve fusion of global features, multi-scale context, and noise-suppressed image features, thus obtaining the visual features of the target image.

[0042] S2, based on the detection model, extracts the target fish group in the target image, identifies the movement trajectory of the target fish group, and extracts multiple behavioral features of the target fish group from the movement trajectory.

[0043] In this embodiment, the detection model uses actually collected image data as the training set, which contains bounding boxes for various abnormal fish behaviors. The training process employs cosine annealing learning rate scheduling, with an initial learning rate of 1e-4, a batch size of 16, and 200 iterations. The loss function uses a weighted combination:

[0044]

[0045] Where Lcls is the classification loss, Lbox is the bounding box regression loss, Liou is the IoU loss, Ldist is the feature distance loss, λ1=1.5, λ2=2.0, and λ3=0.8.

[0046] In this embodiment, visual features are input into the detection model, and target fish groups in the target image are identified through feature matching to obtain detection boxes for the target fish groups. When the water turbidity is greater than a first threshold, the matching threshold is lowered, and the Soft-NMS algorithm is enabled to reduce missed detections of dense fish groups. For example, when the water turbidity > 50 NTU, the detection threshold is automatically lowered from 0.5 to 0.3, and Soft-NMS (sigma=0.6) is enabled to reduce missed detections of dense fish groups. Parallel processing of 32 channels of 1080P video is achieved on an NVIDIA A100 graphics card, with a single-frame inference time of < 50ms.

[0047] In this embodiment, the movement trajectory of the target fish group is identified based on the position of the detection box. Specifically, a triple matching strategy is introduced on the basis of traditional DeepSORT to determine whether the detection box position is correct in order to extend the movement trajectory. The triple matching strategy includes:

[0048] Perform a preliminary matching between the detection box and the features of the existing motion trajectory;

[0049] When the similarity of the primary match is lower than the third threshold, a secondary match is performed between the position of the detection box and the predicted position of the motion trajectory.

[0050] When the similarity of the secondary match is lower than the fourth threshold, the detection box is matched with the rate of change of velocity and the rate of change of acceleration of the motion trajectory.

[0051] Extend the motion trajectory based on the successfully matched detection boxes.

[0052] For example, appearance features (such as ReID feature vectors) and shape features are used to calculate similarity for initial matching, with a suggested third threshold of 0.65. When feature matching fails, a motion model is used to predict the location of the fish swarm. The prediction method can be Kalman filtering, and the IOU or Euclidean distance between the predicted location and the actual detection box is calculated. A suggested fourth threshold is 8 pixels. When location matching also fails, the velocity change rate (Δv) and acceleration change rate (Δa) of the detection box are calculated and compared with the historical motion patterns of the trajectory. After matching, the motion trajectory is updated based on the current location of the detection box.

[0053] To address the target occlusion problem in red tide environments, a dynamic trajectory confidence adjustment model is designed:

[0054]

[0055] Where Ct is the current frame trajectory confidence, α=0.7 is the occlusion attenuation coefficient, ot is the occlusion rate (0-1), β=0.3 is the matching gain coefficient, and mt is the matching degree (0-1).

[0056] When occlusion exists and the confidence level of the detection box position is below a second threshold, a multi-hypothesis tracking (MHT) mechanism is activated to predict the trajectory and update the motion trajectory. For example, when the confidence level is below 0.25, the MHT mechanism is enabled to re-associate the target through trajectory prediction over 8 forward frames, thereby improving the trajectory preservation rate in occluded scenarios.

[0057] After obtaining the motion trajectory, multiple behavioral features in the trajectory are detected using a sliding window technique (e.g., window size of 32 frames, step size of 8 frames), generating a behavioral feature sequence for subsequent analysis. These behavioral features can specifically include 28 features, categorized as follows: basic motion features: swimming speed, acceleration, turning angle, and oscillation frequency; group behavior features: nearest neighbor distance, group density, dispersion, and clustering index; and anomalous behavior features: number of spiral swimming events, frequency of rapid collisions, percentage of stationary time, and vertical migration rate. Spiral swimming detection uses trajectory curvature analysis; a spiral behavior is defined as 6 consecutive frames with a curvature > 0.12 pixels / frame². Rapid collisions are detected through velocity mutation detection (Δv > 2.5 standard deviations).

[0058] In this embodiment of the disclosure, the workflow diagrams of the RT-DETR detection model and the Deepsort trajectory tracking model are as follows: Figure 3 .

[0059] S3 constructs a fusion sequence from visual features, multiple behavioral features, and environmental parameters under the red tide algae environment, and extracts the fusion feature vector of the fusion sequence.

[0060] In this embodiment, a Transformer-based multi-source fusion model is constructed to map visual features, multiple behavioral features, and environmental parameters (such as dissolved oxygen, turbidity, algal density, and temperature) under red tide algae conditions to the same dimension and encode them uniformly to form a fusion sequence. The model learns the association weights of different data types using a self-attention mechanism. The core calculation formula involves the query, key, and value matrices Q, K, and V, as well as the key vector dimension dk. The model learns the association weights of different data types through a self-attention mechanism, and the core calculation formula is:

[0061]

[0062] Where Q, K, and V are the query, key, and value matrices, respectively, and dk is the dimension of the key vector. A dynamic weight matrix W is obtained through training. When the red tide index > 3.5, the weight of dissolved oxygen data is automatically increased to 65%, turbidity data to 25%, and visual features to 10%. When the red tide index ≤ 3.5, the weight of visual features is increased to 50%, environmental parameters to 40%, and behavioral features to 10%.

[0063] The dynamic weight matrix W is obtained through training. When the red tide index is > 3.5, the weight of dissolved oxygen data is automatically increased to 65%, the weight of turbidity data is increased to 25%, and the weight of visual features is adjusted to 10%. When the red tide index is ≤ 3.5, the weight of visual features is increased to 50%, the weight of environmental parameters is 40%, and the weight of behavioral features is 10%.

[0064] In this embodiment, the Transformer architecture processes multidimensional data as follows: First, different types of input data (256-dimensional visual feature vectors output by RT-DETR, standardized environmental parameters such as dissolved oxygen / turbidity / algae density / temperature, and 28-dimensional behavioral feature vectors) are unified to the same dimension through linear mapping. Then, positional encoding is added according to the temporal or type relationship of the data to retain relative positional information, forming a unified input sequence. Subsequently, a self-attention mechanism is used to calculate the correlation strength between elements in the sequence. A dynamic weight matrix is ​​generated through query (Q), key (K), and value (V) matrix operations and the softmax function. This process can capture the global correlation between visual, environmental, and behavioral features (such as the relationship between biological aggregation patterns and turbidity, and the relationship between spiral swimming frequency and dissolved oxygen concentration). To enrich feature interaction, a self-attention mechanism based on a multi-head attention mechanism is used to calculate the weight matrix reflecting the correlation strength between different types of features. The multi-head attention mechanism processes the correlation information of multiple subspaces in parallel, and the resulting weight matrices are concatenated. After residual connections and layer normalization, feature extraction is performed through a feedforward neural network to obtain a fused feature vector. The final output fused feature vector comprehensively represents the inherent correlation pattern of multi-source data and can be directly used for subsequent tasks—such as red tide stress level determination.

[0065] S4. Input the fused feature vector into the classification model to obtain the stress level of the target fish population in the red tide algae environment.

[0066] In this embodiment, the fused feature vector is input into the classification model SVM, which classifies the organisms into levels based on predefined thresholds or learned decision boundaries. The level is then mapped to a continuous stress index by the regression model. The evolution of biological states is inferred by combining trends in environmental parameters (e.g., predicting changes in organism swimming speed based on dissolved oxygen decline). The entire process adaptively adjusts the importance of different data types using a dynamic weight matrix (e.g., increasing the weight of environmental parameters when the red tide index is high), achieving collaborative decision support from multiple information sources.

[0067] Specifically, S4 includes S401 to S403.

[0068] S401, input the fused feature vector into the classification model to obtain the stress level.

[0069] First, single-feature threshold detection is used (e.g., dissolved oxygen below 2.5 mg / L and algae density above 1 × 10⁻⁶ at the input of the fusion network). 5The system triggers a primary warning based on the number of cells / L, quickly locating single-dimensional anomalies. Secondly, based on the feature correlations learned by the dynamic weight fusion network (such as the coupling pattern between low dissolved oxygen values ​​and the spiral swimming frequency exceeding 3 times / minute in behavioral features), the stress level is determined through multi-feature correlation analysis. The cross-modal correlations captured by the Transformer model (such as the weight ratio between environmental parameters and abnormal behavior) are embedded into the judgment logic to enhance the reliability of the judgment based on multi-dimensional feature interactions. Finally, the time-series behavioral feature sequence output by the dynamic weight fusion network (generated through sliding window technology) is used to predict the stress development trend in the next hour based on the LSTM model, realizing the seamless connection from fused data input to hierarchical judgment. The system encompasses the following characteristics: movement characteristics (average swimming speed, normal range 15-35 cm / s; severe stress threshold below 8 cm / s or above 60 cm / s); population characteristics (population dispersion, normal range 0.25-0.6; severe stress threshold above 0.9); abnormal behavior (spiral swimming frequency, normal range below 1.5 times / minute; severe stress threshold above 6 times / minute); and environmental parameters (dissolved oxygen concentration, normal range 5-8 mg / L; severe stress threshold below 2 mg / L; algal density, normal range below 1 × 10⁻⁶). 4 cells / L, severe stress threshold higher than 1×10 5 Indicators such as cells / L directly correspond to the 28-dimensional behavioral features and 4 environmental parameters input to the dynamic weight fusion network, forming a closed loop of "data acquisition - feature fusion - hierarchical determination" to achieve accurate classification and determination of fish stress status.

[0070] S402, based on preset feature mapping rules, obtains data related to stress level from visual features, multiple behavioral features, and environmental parameters under red tide algae environment.

[0071] In this embodiment, the system first receives a fusion feature vector output by a dynamic weighted fusion network. This vector includes visual features (biological distribution patterns represented by a 256-dimensional vector) processed by a Transformer model, standardized environmental parameters (dissolved oxygen, turbidity, etc.), 28-dimensional behavioral features (such as spiral swimming frequency, population dispersion, etc.), and dynamic weight matrix information (reflecting the correlation strength of different data types). Simultaneously, it receives three levels of results for hierarchical determination of stress behavior. The primary warning signal corresponds to the threshold breakthrough of a single indicator in the fusion feature vector (such as dissolved oxygen < 2.5 mg / L), and the stress level obtained by multi-feature association corresponds to the coupling mode of cross-modal indicators in the fusion features (such as low dissolved oxygen value + spiral swimming frequency > 3 times / minute). The trend predicted by the LSTM model is derived from the time sequence of the fusion features (a behavioral feature sequence generated by a sliding window). Next, the system uses preset feature mapping rules to associate specific indicators in the fused feature vector with the judgment dimensions of the three-level results one by one. For example, the dissolved oxygen value in the fused feature directly matches the single feature threshold of the primary warning; the association weights of environmental parameters and behavioral features in the fused feature (from the dynamic weight matrix) correspond to the coupling strength of multi-feature association analysis; and the temporal features of the fused feature (such as behavioral changes over 32 consecutive frames) correspond to the trend basis of LSTM prediction. During this process, the system adjusts the association focus according to the dynamic weight matrix. When the red tide index > 3.5, it focuses on matching environmental parameters such as dissolved oxygen and turbidity in the fused feature with the primary warning and multi-feature association results; when the red tide index ≤ 3.5, it focuses on the association between visual features, behavioral features, and the three-level results. Ultimately, the system integrates these correlated information into a comprehensive judgment criterion that includes "real-time indicator values ​​- cross-modal correlation strength - future trend probability". The real-time indicator values ​​come from the original data of the fused feature vector, the cross-modal correlation strength comes from the matching of dynamic weights and multi-feature correlation levels, and the future trend probability comes from the prediction results of the LSTM model based on the fused feature time series, providing structured basic data for subsequent early warning threshold matching.

[0072] S403, based on preset early warning rules, obtain the early warning level corresponding to the data associated with the stress level.

[0073] In this embodiment of the disclosure, reference is made to Figure 4 The warning levels are as follows: Blue warning (potential stress) corresponds to an algal density of 5-10 × 10³ cells / L or mild abnormal behavior (such as spiral swimming once / minute) in the fusion characteristics; Yellow warning (mild stress) corresponds to an algal density of 1-5 × 10³ cells / L. 4 cells / L or spiral swimming 1-2 times / minute; Orange alert (moderate stress) corresponds to an algal density of 5-10 × 10⁶ cells / L.4 Cells / L or spiral swimming 3-5 times / minute; red alert (severe stress) is associated with algal density > 10×10⁻⁶. 4 The fusion feature pattern of cells / L with spiral swimming > 5 times / minute and population dispersion > 0.85 is used to simultaneously call the feature correlation learned by the dynamic weight fusion network during the threshold determination process (such as emphasizing environmental parameter weight when the red tide index is high, and emphasizing behavioral and visual features when it is low), which enhances the accuracy of the early warning.

[0074] The application of the processing results runs through the entire early warning process: After an early warning is triggered, the system automatically generates a comprehensive report containing algae distribution heatmaps, fish behavior trajectory animations, and environmental parameter trend curves based on the visualized information (biological distribution, behavioral trajectory) and time-series data (environmental parameter trends, behavioral feature sequences) in the fused feature vector. This report is pushed synchronously across multiple platforms (response time <10 minutes). Simultaneously, the fused feature sequence is input into the Bi-LSTM behavior prediction model. Combined with the environmental-behavioral correlation data from the previous 8 hours, the model predicts the stress development trend for the next 2 hours with an accuracy of 88.3%, providing a forward-looking basis for decision-making. The decision support system then links the stress level in the fused features with the expert knowledge base and automatically matches response strategies according to the early warning level. For a blue early warning, it suggests starting intensive water quality monitoring and sampling based on subtle fluctuations in environmental parameters in the fused features. For a yellow early warning, it suggests starting an aerator (power 50%) based on dissolved oxygen status. For an orange early warning, it suggests reducing feeding and preparing for water exchange based on group behavior characteristics and environmental trends. For a red early warning, it triggers an automatic water exchange program (water exchange rate 40%) based on severe stress characteristics and notifies personnel. In its application in the Ningbo Meishan Bay Demonstration Zone, the system has reduced fish mortality caused by red tides by 68% and increased aquaculture efficiency by 42% through efficient processing and application of integrated multidimensional data. The average annual economic benefit per hectare of aquaculture water surface has increased by 180,000 yuan. It has formed a complete closed loop of "data fusion - hierarchical judgment - early warning decision-making", achieving a technological breakthrough from three-dimensional perception to intelligent decision-making and promoting the digital transformation of aquaculture.

[0075] Figure 5 A block diagram of a fish stress behavior detection device under red tide algae environment according to an embodiment of the present disclosure is shown schematically.

[0076] like Figure 5 As shown, the fish stress behavior detection device 500 under red tide algae environment includes an image feature extraction module 510, a behavior feature extraction module 520, a data fusion module 530, and a behavior detection module 540.

[0077] The image feature extraction module 510 is used to acquire multiple sets of target images at multiple depths from the water surface to the bottom of the pool, and extract the visual features of the target images based on the detection model.

[0078] The behavior feature extraction module 520 is used to extract target fish groups in the target image based on the detection model, identify the movement trajectory of the target fish groups, and extract multiple behavior features of the target fish groups from the movement trajectory.

[0079] The data fusion module 530 is used to construct a fusion sequence from visual features, multiple behavioral features and environmental parameters under the red tide algae environment, calculate a weight matrix that reflects the correlation strength between different types of features based on the self-attention mechanism, and extract the fusion feature vector of the fusion sequence based on the weight matrix.

[0080] The behavior detection module 540 is used to input the fused feature vector into the classification model to obtain the stress level of the target fish population in the red tide algae environment.

[0081] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-a-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.

[0082] For example, any plurality of the image feature extraction module 510, behavior feature extraction module 520, data fusion module 530, and behavior detection module 540 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of the present disclosure, at least one of the image feature extraction module 510, behavior feature extraction module 520, data fusion module 530, and behavior detection module 540 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the image feature extraction module 510, behavior feature extraction module 520, data fusion module 530, and behavior detection module 540 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.

[0083] It should be noted that the fish stress behavior detection device part in the embodiments of this disclosure corresponds to the fish stress behavior detection method part in the embodiments of this disclosure. For the specific description of the fish stress behavior detection device part in the red tide algae environment, please refer to the fish stress behavior detection method part in the red tide algae environment, which will not be repeated here.

[0084] Figure 6 A block diagram of an electronic device suitable for implementing the methods described above, according to embodiments of the present disclosure, is illustrated schematically. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0085] like Figure 6As shown, an electronic device 600 according to an embodiment of this disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.

[0086] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0087] According to embodiments of this disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.

[0088] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by processor 601, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0089] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0090] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0091] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.

[0092] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the method for detecting fish stress behavior in a red tide algae environment provided in the embodiments of this disclosure.

[0093] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0094] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0095] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0097] The above describes the embodiments of the present disclosure. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for detecting fish stress behavior under red tide algae conditions, comprising: Multiple sets of target images were acquired at various depths from the water surface to the bottom of the pool, and visual features of the target images were extracted based on a detection model. Based on the detection model, target fish groups in the target image are extracted and detected, the movement trajectory of the target fish groups is identified, and multiple behavioral features of the target fish groups are extracted from the movement trajectory. The visual features, the multiple behavioral features, and environmental parameters under the red tide algae environment are used to construct a fusion sequence, and the fusion feature vector of the fusion sequence is extracted. The fused feature vector is input into the classification model to obtain the stress level of the target fish population under the red tide algae environment.

2. The method according to claim 1, wherein, The process of acquiring multiple sets of target images at various depths from the water surface to the bottom of the pool, and extracting visual features from the target images based on a detection model, includes: Collect multiple sets of target images from four angles: above water, on the water surface, in water, and at the bottom of water, and extract feature points from the multiple sets of target images; Based on the feature points, a mapping matrix from the camera coordinate system to the world coordinate system is calculated. Based on the mapping matrix, the target image is projected onto a two-dimensional plane to obtain a reprojected image. The reprojected image is input into the detection model for feature extraction to obtain the visual features of the target image.

3. The method according to claim 2, wherein, The step of inputting the reprojected image into the detection model for feature extraction to obtain the visual features of the target image includes: The reprojected image is input into the global feature extraction branch, the first enhancement branch, and the second enhancement branch of the detection model, respectively. The global feature extraction branch is used to extract global features of the reprojected image. The first enhancement branch obtains multi-scale context by performing dilated convolution on the reprojected image. The second enhancement branch obtains noise-suppressed image features by suppressing noise in the reprojected image through an attention mechanism. By fusing the global features, the multi-scale context, and the noise-suppressed image features, the visual features of the target image are obtained.

4. The method according to claim 1, wherein, The method of detecting target fish groups in the target image based on a detection model, identifying the movement trajectories of the target fish groups, and extracting multiple behavioral features of the target fish groups from the movement trajectories includes: The visual features are input into the detection model, and the target fish group in the target image is identified by feature matching to obtain the detection box of the target fish group. When the turbidity of the water is greater than the first threshold, the matching threshold is reduced and the Soft-NMS algorithm is enabled to reduce the missed detection of dense fish groups. The movement trajectory of the target fish group is identified based on the position of the detection box. When there is occlusion and the confidence of the position of the detection box is lower than the second threshold, a multi-hypothesis tracking mechanism is activated to predict the trajectory and update the movement trajectory. Multiple behavioral features in the motion trajectory are detected based on the sliding window technique.

5. The method according to claim 4, wherein, The step of identifying the movement trajectory of the target fish group based on the position of the detection frame includes: Perform a preliminary matching between the detection box and the features of the existing motion trajectory; When the similarity of the primary match is lower than the third threshold, the position of the detection box is matched with the predicted position of the motion trajectory for a secondary match. When the similarity of the secondary match is lower than the fourth threshold, the detection box is matched with the velocity change rate and acceleration change rate of the motion trajectory; The motion trajectory is extended based on the successfully matched detection box.

6. The method according to claim 1, wherein, The step of constructing a fusion sequence from the visual features, the multiple behavioral features, and environmental parameters under the red tide algae environment, and extracting the fusion feature vector of the fusion sequence includes: The visual features, the multiple behavioral features, and environmental parameters under the red tide algae environment are mapped to the same dimension and then uniformly encoded to form the fusion sequence. The weight matrix, which reflects the correlation strength between different types of features, is calculated based on the multi-head attention mechanism. The weight matrix obtained by the multi-head attention mechanism is concatenated, and after residual connection and layer normalization, feature extraction is performed through a feedforward neural network to obtain the fused feature vector.

7. The method according to claim 1, wherein, The step of inputting the fused feature vector into the classification model to obtain the stress level of the target fish population in the red tide algae environment includes: The fused feature vector is input into the classification model to obtain the stress level; Based on preset feature mapping rules, data associated with the stress level are obtained from the visual features, the multiple behavioral features, and environmental parameters under the red tide algae environment; The warning level is obtained based on the preset warning rules and the data associated with the stress level.

8. A device for detecting fish stress behavior under red tide algae conditions, comprising: The image feature extraction module is used to acquire multiple sets of target images at multiple depths from the water surface to the bottom of the pool, and extract the visual features of the target images based on the detection model. The behavior feature extraction module is used to extract and detect target fish groups in the target image based on the detection model, identify the movement trajectory of the target fish groups, and extract multiple behavior features of the target fish groups from the movement trajectory; The data fusion module is used to construct a fusion sequence from the visual features, the multiple behavioral features, and environmental parameters under the red tide algae environment, calculate a weight matrix that reflects the correlation strength between different types of features based on the self-attention mechanism, and extract the fusion feature vector of the fusion sequence based on the weight matrix. The behavior detection module is used to input the fused feature vector into the classification model to obtain the stress level of the target fish group in the red tide algae environment.

9. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Blue-green algae image recognition method and system based on hierarchical self-adaption and domain driving

    CN121330405A