A method, apparatus, equipment, medium, and system for determining water quality early warning levels.

CN122084852APending Publication Date: 2026-05-26CHONGQING YUANTONG ELECTRONICS TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING YUANTONG ELECTRONICS TECH DEV CO LTD
Filing Date
2026-03-27
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing water quality monitoring technologies suffer from slow response, incomplete indicators, and high reliance on manual intervention. They are unable to effectively monitor sudden water pollution incidents and struggle to identify unknown toxic substances and changes in water quality.

Method used

By acquiring real-time images of fish in the target aquarium, analyzing the individual and group behavior characteristics of the fish, and combining this with a preset status reference table, the water quality warning level is determined, enabling multi-target tracking and quantitative analysis of behavioral characteristics.

Benefits of technology

It has improved the timeliness and accuracy of water quality monitoring, provided technical support for the rapid response to sudden water pollution incidents, and reduced human and material costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122084852A_ABST
    Figure CN122084852A_ABST
Patent Text Reader

Abstract

This invention belongs to the technical field of water quality monitoring, and specifically relates to a method, apparatus, equipment, medium, and system for determining water quality early warning levels. The invention provides a method for determining water quality early warning levels, comprising: acquiring real-time images of a fish population in a target aquarium, wherein the target aquarium is connected to a target water area, and water from the target water area circulates in the target aquarium before entering the target water area; determining individual behavioral characteristics and school behavior characteristics of each fish within a preset time period based on the real-time images; determining the current state of the fish population in the target aquarium based on the individual and school behavior characteristics; and assigning a water quality early warning level to the target water area based on the current state. This method achieves multi-target tracking and quantitative analysis of behavioral characteristics, improving the timeliness and accuracy of monitoring, and providing technical support for rapid response to water pollution incidents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of water quality monitoring, and specifically relates to a method, device, equipment, medium and system for determining water quality early warning levels. Background Technology

[0002] Sudden water pollution incidents (such as heavy metal leaks and excessive organic matter) occur frequently, posing a serious threat to drinking water safety and the ecological environment. Emergency monitoring, as the "front line of defense" in incident response, directly determines the effectiveness of pollution control based on its timeliness and accuracy. Existing water quality monitoring technologies have significant shortcomings: 1. Traditional sampling and testing techniques: These rely on manual sampling at regular intervals, which are then sent to the laboratory for analysis using chromatography and mass spectrometry equipment. Although the detection accuracy is high, the response is slow (usually taking several hours to tens of hours), making it impossible to capture sudden changes in water quality. Furthermore, frequent sampling leads to high labor and material costs. 2. Sensor monitoring technology: It can only detect a limited number of known indicators such as pH, dissolved oxygen, and turbidity, and cannot identify unknown toxic substances. It is also easily affected by water impurities and temperature fluctuations, resulting in a high data drift rate (≥8%). 3. Artificial biological observation technology: Fish are raised in containers with access to water sources and their abnormal behavior (such as surfacing or erratic swimming) is observed manually. However, this method suffers from problems such as "intermittent monitoring" and "subjective judgment bias", and it is difficult to quantify behavioral characteristics and form a standardized early warning mechanism. Summary of the Invention

[0003] This invention provides a method for determining water quality warning levels, comprising: acquiring real-time images of a fish population in a target aquarium, wherein the target aquarium is connected to a target water area, and water from the target water area circulates in the target aquarium before entering the target water area; determining individual behavioral characteristics and school behavior characteristics of each fish within a preset time period based on the real-time images; determining the current state of the fish population in the target aquarium based on the individual and school behavior characteristics; and assigning a water quality warning level to the target water area based on the current state. This method achieves multi-target tracking and quantitative analysis of behavioral characteristics, improving the timeliness and accuracy of monitoring and providing technical support for rapid response to water pollution incidents.

[0004] To address the aforementioned technical problems, this application proposes five aspects.

[0005] In a first aspect, this application provides a method for determining a water quality warning level, comprising: acquiring a real-time image of a fish group in a target aquarium, wherein the target aquarium is connected to a target water area, and water in the target water area circulates in the target aquarium before entering the target water area; determining individual behavioral characteristics and fish group behavioral characteristics of each fish within a preset time period based on the real-time image; determining the current state of the fish group in the target aquarium based on the individual behavioral characteristics and the fish group behavioral characteristics; and determining the water quality warning level of the target water area based on the current state.

[0006] In some embodiments, determining the individual behavioral characteristics and school behavioral characteristics of each fish within a preset time period based on the real-time image includes: acquiring historical trajectory information of each fish; determining the current trajectory information of each fish in the school based on the real-time image and the historical trajectory information; and determining the individual behavioral characteristics and school behavioral characteristics of each fish within a preset time period based on the current trajectory information of each fish.

[0007] In some embodiments, determining the current state of the fish population in the target aquarium based on the individual behavioral characteristics and the fish population behavioral characteristics includes: obtaining a preset state reference table, the state reference table including individual behavioral characteristic reference values ​​and fish population behavioral characteristic reference values ​​corresponding to each state; and determining the current state of the fish population based on the individual behavioral characteristics, the fish population behavioral characteristics, and the state reference table.

[0008] In some embodiments, determining the current trajectory information of each fish in the school based on the real-time image and the historical trajectory information includes: predicting the predicted position of the target fish in the real-time image based on the historical trajectory information; determining the current actual position of the target fish in the real-time image based on the predicted position; and determining the current trajectory information of the target fish based on the current actual position and the historical trajectory information.

[0009] In some embodiments, determining the individual behavioral characteristics and school behavioral characteristics of each fish based on the current trajectory information of each fish includes: acquiring a preset period duration and a historical moment in the previous period for determining the individual behavioral characteristics and school behavioral characteristics; determining a target moment in the next period for determining the individual behavioral characteristics and school behavioral characteristics based on the historical moment and the period duration; when the current moment reaches the target moment, determining the current swimming speed of the target fish in the current period based on the target trajectory information between the historical moment and the target moment in the current trajectory information; and based on... The current acceleration of the target fish is determined by the current swimming speed and the historical swimming speed of the target fish in the previous cycle; the current suspension time of the target fish is determined by the number of cycles in which the swimming speed meets the preset conditions within the preset time range; the individual behavioral characteristics of the target fish are determined by the current suspension time, the current swimming speed, and the current acceleration; the fish dispersion and fish center distance of the fish group are determined by the current trajectory information of each target fish within the preset time range at each moment within the preset time range; and the fish group behavioral characteristics are determined by the fish dispersion and fish center distance.

[0010] In some implementations, determining the current actual location of the target fish in the real-time image based on the predicted location includes: when the fish cannot be found in the real-time image based on the predicted location, acquiring the appearance features of the target fish; searching for fish in the real-time image with a similarity exceeding a preset threshold based on the appearance features as the target fish; when the target fish is not present in the real-time image, using the predicted location as the current actual location; and when the target fish is present in the real-time image, determining the current actual location based on the current location of the target fish in the real-time image.

[0011] Secondly, this application proposes a device for determining water quality warning levels, comprising: a first acquisition module for acquiring real-time images of a group of fish in a target aquarium, wherein the target aquarium is connected to a target water area, and water in the target water area circulates in the target aquarium before entering the target water area; a first determination module for determining individual behavioral characteristics and group behavioral characteristics of each fish within a preset time period based on the real-time images; a second determination module for determining the current state of the group of fish in the target aquarium based on the individual behavioral characteristics and the group behavioral characteristics; and a first warning module for determining the water quality warning level of the target water area based on the current state.

[0012] Thirdly, this application proposes a computer electronic production apparatus, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the methods described in the first aspect.

[0013] Fourthly, this application proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects of the claims.

[0014] Fifthly, this application proposes a water quality early warning system, comprising: a fish tank, a school of fish, an image acquisition device, and an electronic production device as described in the third aspect; the fish tank is connected to a target water area, so that water in the target water area circulates in the fish tank before entering the target water area; the school of fish is placed in the fish tank; the image acquisition device is used to acquire real-time images of the school of fish in the fish tank and transmit the real-time images to the electronic production device.

[0015] This invention provides a method for determining water quality warning levels, comprising: acquiring real-time images of a fish population in a target aquarium, wherein the target aquarium is connected to a target water area, and water from the target water area circulates in the target aquarium before entering the target water area; determining individual behavioral characteristics and school behavior characteristics of each fish within a preset time period based on the real-time images; determining the current state of the fish population in the target aquarium based on the individual and school behavior characteristics; and assigning a water quality warning level to the target water area based on the current state. This method achieves multi-target tracking and quantitative analysis of behavioral characteristics, improving the timeliness and accuracy of monitoring and providing technical support for rapid response to water pollution incidents. Attached Figure Description

[0016] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, and these illustrative descriptions do not constitute a limitation on the embodiments.

[0017] Figure 1 The main flowchart of a method for determining water quality early warning levels provided in this application embodiment; Figure 2 A main structural block diagram of a water quality early warning level determination device provided in an embodiment of this application; Figure 3 A structural block diagram of a computer electronic production equipment provided in this application embodiment; Figure 4 This is a main structural block diagram of a water quality early warning system provided in an embodiment of this application. Detailed Implementation

[0018] Sudden water pollution incidents (such as heavy metal leaks and excessive organic matter) occur frequently, posing a serious threat to drinking water safety and the ecological environment. Emergency monitoring, as the "front line of defense" in incident response, directly determines the effectiveness of pollution control based on its timeliness and accuracy. Existing water quality monitoring technologies have significant shortcomings: 1. Traditional sampling and testing techniques: These rely on manual sampling at regular intervals, which are then sent to the laboratory for analysis using chromatography and mass spectrometry equipment. Although the detection accuracy is high, the response is slow (usually taking several hours to tens of hours), making it impossible to capture sudden changes in water quality. Furthermore, frequent sampling leads to high labor and material costs. 2. Sensor monitoring technology: It can only detect a limited number of known indicators such as pH, dissolved oxygen, and turbidity, and cannot identify unknown toxic substances. It is also easily affected by water impurities and temperature fluctuations, resulting in a high data drift rate (≥8%). 3. Artificial biological observation technology: Fish are raised in containers with access to water sources and their abnormal behavior (such as surfacing or erratic swimming) is observed manually. However, this method suffers from problems such as "intermittent monitoring" and "subjective judgment bias", and it is difficult to quantify behavioral characteristics and form a standardized early warning mechanism.

[0019] To address the aforementioned technical problems, this invention proposes a method for determining water quality early warning levels. The implementation details of the method for determining water quality early warning levels in this embodiment are described below. The following content is only for ease of understanding and is not necessary for implementing this solution.

[0020] Example 1: like Figure 1 As shown, this application provides a method for determining water quality early warning levels. This method is applicable to electronic production equipment, which can be a server, mobile terminal, computer, cloud platform, etc. The data processing functionality provided in this application embodiment can be implemented by the processor of the electronic production equipment calling program code, wherein the program code can be stored in a computer storage medium. The method for determining water quality early warning levels includes: Step S1: Obtain a real-time image of the fish in the target aquarium, which is connected to the target water area. The water in the target water area circulates in the target aquarium before entering the target water area.

[0021] This application connects the fish tank to a water area, making the fish tank part of the water body. Raising fish in the tank facilitates observation of their activity in the target water area. The impact of the water quality on organisms in the target water area can be determined by observing the fish's activity within the tank. Compared to conventional water quality component testing, this biological detection method does not require specifying which components and their concentrations affect organisms; instead, it directly determines whether the current water quality affects organisms by observing their activity. Because this application requires observing the activity of organisms in the water, real-time images of the fish are needed. These images are used to assess the fish's condition in the target water area. Since the fish used for water quality testing are located in a fish tank connected to the target water area, real-time images of the fish in the tank can be easily obtained using any existing technology.

[0022] Step S2: Determine the individual behavioral characteristics of each fish and the school behavioral characteristics of the fish within a preset time period based on the real-time images.

[0023] In some embodiments, step S2, "determining the individual behavioral characteristics and school behavioral characteristics of each fish within a preset time period based on the real-time image," includes: Step S21: Obtain the historical trajectory information of each fish.

[0024] Step S22: Determine the current trajectory information of each fish in the school of fish based on the real-time image and the historical trajectory information.

[0025] In some embodiments, step S22, "determining the current trajectory information of each fish in the school based on the real-time image and the historical trajectory information," includes: Step S221: Predict the predicted position of the target fish in the real-time image based on the historical trajectory information.

[0026] Step S222: Determine the current actual position of the target fish in the real-time image based on the predicted position.

[0027] To observe the activity of fish in a target water area, it is necessary to determine the actual movement trajectory of the fish in the aquarium, i.e., the current trajectory information in this application. Generally, existing technologies require feature recognition to determine the correspondence between each fish in each image, thus forming the trajectory information for each fish. However, this method requires frequent identification of individual appearance features in the images, resulting in a large workload and high resource consumption. To reduce resource consumption, this application uses the existing historical trajectory information of each fish to predict the position of the target fish in the next frame image. Then, image recognition is used to determine whether there is a fish at the predicted position to track each fish. If so, the fish at the predicted position in the image is considered the target fish to be tracked. At this point, the actual position of the target fish in the image is determined, i.e., the current actual position. The current actual position is then fused with the historical trajectory information to form the current trajectory information of the target fish. In this application, the image recognition only identifies whether there are fish in the area, without needing to further determine the specific appearance features of each fish. Compared with directly determining the relationship between each fish in each image through appearance features, this application adopts a prediction-then-recognition approach, which can greatly improve the data processing speed and save resources.

[0028] Of course, tracking a target fish by predicting its location is not always successful. After all, fish move in three-dimensional space and are easily obscured. Therefore, no matter how many image acquisition devices are deployed or how many real-time images are acquired from multiple directions simultaneously, it cannot be guaranteed that every fish will appear in the real-time image. Thus, the method in this application may also result in tracking loss.

[0029] In some embodiments, step S222, "determining the current actual position of the target fish in the real-time image based on the predicted position," includes: Step S2221: When a fish cannot be found in the real-time image according to the predicted location, obtain the appearance features of the target fish.

[0030] Step S2222: Based on the appearance characteristics, find fish in the real-time image whose similarity exceeds a preset threshold as the target fish.

[0031] Step S2223: When the target fish is not present in the real-time image, the predicted position is taken as the current actual position.

[0032] Step S2224: When the target fish is present in the real-time image, determine the current actual position of the target fish in the real-time image.

[0033] Step S223: Determine the current trajectory information of the target fish based on the current actual location and the historical trajectory information.

[0034] When tracking loss occurs, it's usually because the target fish is obstructed by other fish or objects, preventing it from being captured in the real-time image. In this case, the fish cannot be found at the predicted location in the real-time image. Only visual feature recognition can be used to determine if the target fish is present in the real-time image. If the target fish is not present, it means it is obstructed. In this situation, the predicted location is used as the current actual location to form the current trajectory information. When the target fish is re-identified in the real-time image at a certain moment using visual feature recognition, its actual location can be determined as the current actual location. Furthermore, to avoid the tracking loss affecting subsequent tracking of the target fish, when the target fish is re-identified after being lost, the latest actual location is used to correct the trajectory information formed from the predicted location in the historical trajectory information. This ensures that the historical trajectory information is as accurate as possible, guaranteeing the accuracy of the predicted location.

[0035] Specifically, in this application, when determining the current actual position of each fish, DLA-34 can be used as the backbone network to extract image features. A CBAM attention mechanism is added to the feature extraction layer to enhance the feature weights of the fish body region (areas with significant differences in grayscale values ​​compared to the water). The output layer uses a "center heatmap branch" to locate the fish's center coordinates, a "boundary box offset branch" to correct the detection box position deviation, and a "target size branch" to output the width and height of the fish detection box, ultimately obtaining the two-dimensional coordinates of the fish in each frame. That is, the real-time image is first identified to determine the two-dimensional coordinates of each fish in the real-time image. Then, based on the predicted position of each fish, similar or identical coordinates are searched in the two-dimensional coordinates of each fish in the real-time image, which are used as the current actual position in this application. When a fish cannot be found in the real-time image based on its predicted position, it indicates a loss, and in this case, appearance feature recognition is required for each fish in the real-time image.

[0036] Step S23: Determine the individual behavioral characteristics and the school behavioral characteristics of each fish within a preset time period based on the current trajectory information of each fish.

[0037] In some embodiments, step S23, "determining the individual behavioral characteristics and the school behavioral characteristics of each fish within a preset time period based on the current trajectory information of each fish," includes: Step S231: Obtain the preset cycle duration and the historical moment when the individual behavioral characteristics and fish school behavioral characteristics were determined in the previous cycle.

[0038] Step S232: Determine the target time for determining individual behavioral characteristics and fish school behavioral characteristics in the next cycle based on the historical time and the cycle duration.

[0039] Step S233: When the target time is reached at the current time, the current swimming speed of the target fish in the current cycle is determined according to the target trajectory information between the historical time and the target time in the current trajectory information.

[0040] Step S234: Determine the current acceleration of the target fish based on the current swimming speed and the historical swimming speed of the target fish in the previous cycle.

[0041] Step S235: Determine the current suspension time of the target fish based on the number of cycles in which the swimming speed meets the preset conditions within the preset time range.

[0042] Step S236: Determine the individual behavioral characteristics of the target fish based on the current suspension duration, the current swimming speed, and the current acceleration.

[0043] Step S237: Determine the fish dispersion and fish center distance of the fish group at each moment within the preset time period based on the current trajectory information of each target fish within the preset time period.

[0044] Step S238: Determine the fish school behavior characteristics based on the fish school dispersion and the fish school center distance.

[0045] When water quality is poor, or when it affects the activities of organisms, it impacts the activity of fish schools. Fish activity is characterized by the behavioral characteristics of each individual fish and the school as a whole. Different fish species exhibit different behavioral habits, and each fish adheres to these habits. However, fish movement is self-controlled, meaning that a fish's behavior in the current water quality cannot be determined by its instantaneous movements. Therefore, it's necessary to assess the fish's behavior over a period of time. This application sets a time frame, or a cycle, which can be 10 seconds. The target fish's swimming speed within a 10-second timeframe is determined by its trajectory information. Swimming speed is a fundamental behavioral characteristic of fish. The acceleration of the target fish between two adjacent cycles can be obtained from the swimming speed of those two cycles; the individual acceleration of the target fish is also a behavioral characteristic. In addition, fish do not swim continuously; they also need to hover and rest. However, the swimming speed in each cycle is used to determine whether the fish is swimming or hovering. When the swimming speed in a certain cycle is less than a preset threshold, the target fish is considered to be in a hovering state. In this application, the preset threshold is 0.1 cm / s. The fish's hovering rest is not simply a matter of hovering once and then swimming continuously until it gets tired and then continuing to hover and rest. The duration of a single hovering session may be random; it may be hovering for multiple consecutive cycles, or it may be hovering in several cycles with intervals between them. Therefore, this application also needs to determine whether the target fish is swimming or hovering in each cycle based on the swimming speed in each cycle within the preset duration range. Multiplying the number of cycles in a hovering state by the duration of the cycle gives the hovering duration of the target fish within the preset duration range. The hovering duration is also one of the individual behavioral characteristics of the fish. Thus, the current swimming speed, current acceleration, and current hovering duration of each fish constitute the individual behavioral characteristics of the fish.

[0046] For a school of fish, it exhibits discrete and center-distance characteristics. Both discrete and center-distance characteristics can be calculated using the positional information of each fish at the same moment. Therefore, the dispersion and center-distance of the school within a preset time range can be determined based on the current trajectory information of each fish. Then, the dispersion and center-distance within the preset time range are processed to obtain representative school dispersion and school center-distance, thus constituting the school's behavioral characteristics. The school dispersion is calculated as the average distance from the three-dimensional coordinates of all fish to the school center (the average of the X, Y, and Z coordinates of all fish). The school center-distance is calculated as the second-order central moment of the school's coordinate set, M = (1 / N)×Σ[(Xi-X̄)²+(Yi-Ȳ)²+(Zi-Z̄)²] (where N is the number of fish).

[0047] Step S3: Determine the current state of the fish population in the target aquarium based on the individual behavioral characteristics and the fish population behavioral characteristics.

[0048] In some embodiments, step S3, "determining the current state of the fish population in the target aquarium based on the individual behavioral characteristics and the school behavioral characteristics," includes: Step S31: Obtain a preset state reference table, which includes individual behavioral characteristic reference values ​​and fish school behavioral characteristic reference values ​​corresponding to each state.

[0049] Step S32: Determine the current state of the fish group based on the individual behavioral characteristics, the fish group behavioral characteristics, and the state reference table.

[0050] When water quality affects the survival of fish, the fish population will exhibit changes in its state, which will be reflected in the fish's behavioral characteristics, as well as the individual behavioral characteristics of each fish. When water quality threatens the fish's lives, the fish may show signs of agitation, weakness, or even death. When the threat of water quality to the fish is relatively small, the fish will show agitation. When the water quality in which the fish are located is heavily polluted, the fish's vitality will decrease, their physical strength will weaken, and they will exhibit slower swimming speed and increased suspension time. Therefore, in order to determine the degree of water pollution, this application needs to first determine the current state of the fish population. Thus, this application pre-defines a state reference table, which pre-defines reference values ​​for individual behavioral characteristics and fish population behavioral characteristics corresponding to various states. The current state of the fish population can be determined by using these reference values ​​and the characteristic values ​​of individual and fish population behavioral characteristics.

[0051] Step S4: Determine the water quality warning level for the target water area based on the current status.

[0052] This application also includes a pre-defined table showing the correspondence between warning levels and fish school status. A yellow water quality warning is issued when the fish school is determined to be agitated; an orange warning is issued when the fish school is determined to be weakened; and a red warning is issued when fish deaths are detected. Deaths are not determined by individual or school-wide behavioral characteristics but can be directly detected during real-time image processing. For example, detecting a fish turning belly-up indicates death. This belly-up detection can be achieved by identifying the relative positions of the belly and back of each fish during image recognition. Since the brightness of the belly image is greater than that of the back image, the brightness relationship of each fish's image can be used to determine if it is dead.

[0053] The table below is the early warning rule table formed by merging the correspondence table and the status reference table. The table describes in detail the judgment conditions for various fish school states.

[0054] This invention provides a method for determining water quality early warning levels, comprising: acquiring real-time images of a fish population in a target aquarium, wherein the target aquarium is connected to a target water area, and water from the target water area circulates in the target aquarium before entering the target water area; determining individual behavioral characteristics and school behavior characteristics of each fish within a preset time period based on the real-time images; determining the current state of the fish population in the target aquarium based on the individual behavioral characteristics and the school behavior characteristics; and assigning a water quality early warning level to the target water area based on the current state. This method solves the problems of "delayed response, incomplete indicators, and high reliance on manual intervention" in existing water quality emergency monitoring technologies, achieving multi-target tracking and quantitative analysis of behavioral characteristics, improving monitoring timeliness and accuracy, and providing technical support for rapid response to water pollution incidents.

[0055] Example 2: Based on the foregoing embodiments, this application provides a device for determining water quality early warning levels. The various modules and units included in the device can be implemented by a processor in a computer device; of course, they can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0056] like Figure 2 As shown, a device for determining water quality early warning levels includes: a first acquisition module 1, a first determination module 2, a second determination module 3, and a first early warning module 4.

[0057] The first acquisition module 1 is used to acquire real-time images of the fish in the target aquarium, which is connected to a target water area. Water from the target water area circulates in the target aquarium before entering the target water area. The first determination module 2 is used to determine the individual behavioral characteristics and school behavioral characteristics of each fish within a preset time period based on the real-time images. The second determination module 3 is used to determine the current state of the fish in the target aquarium based on the individual behavioral characteristics and the school behavioral characteristics. The first warning module 4 is used to issue a water quality warning level for the target water area based on the current state.

[0058] The various modules in the aforementioned water quality early warning level determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the device in hardware form or independently of it, or stored in the memory of the processing device in software form, so that the processor can call and execute the operations corresponding to each module. It should be noted that the module division in this embodiment is illustrative and only represents a logical functional division; in actual implementation, there may be other division methods.

[0059] Example 3: Thirdly, this application provides a computer electronic production device, such as... Figure 3 As shown, it includes: at least one processor 901; and a memory 902 communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions executable by the at least one processor 901, the instructions being executed by the at least one processor 901 to enable the at least one processor 901 to execute a drilling early warning method in the above embodiments.

[0060] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.

[0061] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.

[0062] In addition, the computer device may include (but is not limited to) a data bus, an input / output (I / O) bus, a display, and input / output devices (e.g., keyboard, mouse, speakers, etc.).

[0063] The processor can communicate with external devices via the I / O bus through wired or wireless networks.

[0064] In one embodiment, the at least one computer-executable instruction may also be compiled into or comprise a software product / computer program product, wherein one or more computer-executable instructions are executed by a processor to perform the steps of the various functions and / or methods in the embodiments described herein.

[0065] Example 4: Fourthly, this application proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the first aspects.

[0066] Computer-readable storage media can be implemented by any type of volatile or non-volatile storage device or a combination thereof. Computer-readable storage media may include, but are not limited to, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, and computer storage media (e.g., hard disks, floppy disks, solid-state drives, removable disks, CD-ROMs, DVD-ROMs, Blu-ray discs, etc.).

[0067] Computer-readable storage media may also store at least one computer-executable program / instruction, such as computer-readable instructions. Computer-readable storage media include, but are not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Computer-readable storage media may include, for example, read-only memory (ROM), hard disk, flash memory, etc. For example, a non-transitory computer-readable storage medium may be connected to a computing device such as a computer, and then, when the computing device executes the computer-readable instructions stored on the computer-readable storage medium, the various methods described above can be performed.

[0068] Example 5: Fifthly, such as Figure 4 As shown, this application proposes a water quality early warning system, including: a fish tank 100, a school of fish, an image acquisition device 200, and an electronic production device 900 as described in the first aspect.

[0069] The fish tank 100 is connected to the target water area, so water from the target water area circulates in the fish tank before entering the target water area. The fish are placed in the fish tank 100. The image acquisition device 200 is used to acquire real-time images of the fish in the fish tank 100 and transmit the real-time images to the electronic production equipment 900.

[0070] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0071] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0072] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0073] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0074] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this 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 marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive 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 and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0075] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a controller to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0076] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein.

[0077] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.

Claims

1. A method for determining water quality early warning levels, characterized in that, include: Acquire real-time images of fish in a target aquarium, which is connected to a target body of water, and the water in the target body of water circulates in the target aquarium before entering the target body of water; Based on the real-time images, determine the individual behavioral characteristics and school behavior characteristics of each fish within a preset time period; The current state of the fish population in the target aquarium is determined based on the individual behavioral characteristics and the fish school behavioral characteristics. The water quality warning level for the target water area is determined based on the current status.

2. The method according to claim 1, characterized in that, The step of determining the individual behavioral characteristics and school behavior characteristics of each fish within a preset time period based on the real-time images includes: Obtain the historical trajectory information of each fish; The current trajectory information of each fish in the school is determined based on the real-time image and the historical trajectory information; Based on the current trajectory information of each fish, determine the individual behavioral characteristics of each fish and the school behavioral characteristics of the fish within a preset time period.

3. The method according to claim 1, characterized in that, Determining the current state of the fish population in the target aquarium based on the individual behavioral characteristics and the school behavior characteristics includes: Obtain a preset state reference table, which includes individual behavioral characteristic reference values ​​and fish school behavioral characteristic reference values ​​corresponding to each state; The current state of the fish school is determined based on the individual behavioral characteristics, the fish school behavioral characteristics, and the state reference table.

4. The method according to claim 2, characterized in that, Determining the current trajectory information of each fish in the school based on the real-time image and the historical trajectory information includes: Predict the target fish's predicted position in the real-time image based on the historical trajectory information; The current actual location of the target fish is determined in the real-time image based on the predicted location; The current trajectory information of the target fish is determined based on the current actual location and the historical trajectory information.

5. The method according to claim 2, characterized in that, The step of determining the individual behavioral characteristics and the school behavioral characteristics of each fish based on the current trajectory information of each fish includes: Obtain the preset cycle duration and the historical moments of the previous cycle to determine individual and school behavior characteristics; Based on the historical time and the cycle duration, determine the target time for determining individual and fish school behavior characteristics in the next cycle; When the target time is reached at the current time, the current swimming speed of the target fish in the current cycle is determined based on the trajectory information between the historical time and the target time in the current trajectory information; The current acceleration of the target fish is determined based on the current swimming speed and the historical swimming speed of the target fish in the previous cycle; The current suspension time of the target fish is determined based on the number of cycles in which the swimming speed meets the preset conditions within a preset time range; The individual behavioral characteristics of the target fish are determined based on the current suspension duration, the current swimming speed, and the current acceleration. The dispersion and center distance of the fish swarm at each moment within the preset time period are determined based on the current trajectory information of each target fish within the preset time period. The fish school behavior characteristics are determined based on the fish school dispersion and the fish school center distance.

6. The method according to claim 4, characterized in that, Determining the current actual position of the target fish in the real-time image based on the predicted position includes: When a fish cannot be found in the real-time image based on the predicted location, the appearance features of the target fish are obtained; Based on the appearance characteristics, fish with a similarity exceeding a preset threshold in the real-time image are selected as the target fish. When the target fish is not present in the real-time image, the predicted position is taken as the current actual position; When the target fish is present in the real-time image, the current actual position of the target fish in the real-time image is determined.

7. A device for determining water quality early warning levels, characterized in that, include: The first acquisition module is used to acquire real-time images of fish in a target aquarium, wherein the target aquarium is connected to a target water area, and the water in the target water area circulates in the target aquarium before entering the target water area. The first determining module is used to determine the individual behavioral characteristics and school behavioral characteristics of each fish within a preset time period based on the real-time image. The second determining module is used to determine the current state of the fish in the target aquarium based on the individual behavioral characteristics and the fish school behavioral characteristics; The first early warning module is used to determine the water quality warning level of the target water area based on the current status.

8. A computer electronic production equipment, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6.

10. A water quality early warning system, characterized in that, include: Fish tank, fish, image acquisition equipment, and electronic production equipment as described in claim 8; The fish tank is connected to the target water area, so the water in the target water area circulates in the fish tank and then enters the target water area. The fish are placed in the fish tank; The image acquisition device is used to acquire real-time images of the fish in the aquarium and transmit the real-time images to the electronic production equipment.