Unmanned aerial vehicle-based animal ai recognition management method and system
By employing multi-drone swarm collaborative operations and intelligent identification technology, the real-time performance and efficiency issues of existing drone animal management systems have been resolved, enabling efficient animal identification and dynamic fence management, and improving the scientific and humane aspects of animal management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FORESTRY BUREAU OF LIANSHAN ZHUANG & YAO AUTONOMOUS COUNTY
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-09
AI Technical Summary
Existing drone-based animal management systems lack multi-drone collaborative intelligence, making it difficult to simultaneously achieve wide-area search, accurate identification, and continuous tracking. Data processing is not real-time, resulting in low overall efficiency and an inability to achieve efficient animal management.
The system employs a multi-drone swarm to work collaboratively, using a multimodal sensor array to collect data and generate a heat map of suspected animal locations. This data is then combined with an animal recognition model for detailed image data analysis to predict animal movement trajectories and generate a virtual electronic fence. Finally, it utilizes acoustic devices for intelligent intervention.
It enables rapid animal identification and population counting, generates dynamic fences based on animal activity trends, improves management efficiency, reduces the limitations of traditional fixed fences, and avoids excessive disturbance or harm to animals.
Smart Images

Figure CN122176574A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of animal management technology, specifically to an animal AI recognition and management method and system based on unmanned aerial vehicles (UAVs). Background Technology
[0002] Currently, most existing technical solutions rely on single-machine operation, lacking collaborative swarm intelligence. A single drone, limited by its endurance, payload, and sensor configuration, struggles to simultaneously handle multiple tasks such as wide-area search, precise identification, and continuous tracking. Data processing largely depends on ground stations or the cloud, resulting in transmission delays and insufficient real-time performance. More importantly, the lack of intelligent linkage between different stages leads to overall low efficiency, hindering efficient animal management. Therefore, designing an efficient detection and management method has become a pressing technical problem for those skilled in the art. Summary of the Invention
[0003] To address the aforementioned shortcomings, this invention discloses an AI-based animal identification and management method using unmanned aerial vehicles (UAVs), which enables efficient and comprehensive animal management based on UAVs.
[0004] The first aspect of this invention discloses an animal AI recognition and management method based on unmanned aerial vehicles (UAVs), comprising: In a wide-area scanning mission, a first UAV cluster uses a multimodal sensor group to collect animal activity data in the target area and generates a heat map of suspected animal locations based on the animal activity data, wherein the multimodal sensor group includes a thermal infrared imager. In response to the generation of a heat map of suspected animal locations, a second drone swarm performs a pinpoint confirmation task on the heat map area and collects detailed image data of the animals. The detailed image data is input into the animal recognition model to output the species category, number, and behavioral status of the animal; Based on the species category and the behavioral state, the corresponding animal movement prediction model is called from the model library and combined with real-time environmental data to predict the animal's movement trajectory within a future time window; The third drone cluster is controlled to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range, and the third drone cluster is equipped with a sound wave device; the sound wave device is used to adjust the working parameters of the sound wave device according to the animal species and status when it detects that an animal has reached the virtual boundary. Output the species, number, and status information of the identified animals.
[0005] As an optional implementation, in the first aspect of the present invention, the step of using a second drone cluster to perform a pinpoint confirmation task on a hotspot area and collect detailed image data of the animal includes: Control the second drone cluster to execute an acoustic stimulation pattern over the target area, the acoustic stimulation pattern including a preset frequency sequence, intensity gradient and time interval; The drone was equipped with a high-resolution camera and a thermal infrared imager to continuously collect image sequences of the animal's response to the acoustic stimuli. Animal response feature parameters are extracted from the response image sequence, including auditory orientation response time, duration of vigilant gaze, amplitude of posture change, escape reaction speed, and vocal response characteristics. The extracted response feature parameters are input into a pre-trained response feature recognition model, which outputs the animal's species category, individual identification, and current stress state.
[0006] As an optional implementation, in a first aspect of the present invention, the extraction of animal response feature parameters from the response image sequence includes: The animal's posture features are extracted from the image, including head turning angle, neck elevation angle, and ear orientation. Extracting surface temperature changes and thermal signal displacement features of animals from thermal infrared images; Calculate the animal's response latency, movement speed, and acceleration from consecutive frame images; After controlling the second drone swarm to execute acoustic stimulation patterns over the target area, the method further includes: During the stimulation process, the animal's stress response indicators are monitored in real time, and the current stress level is calculated; The intensity of the stimulus in the next moment is dynamically adjusted based on the current stress level. , in, For adjustment coefficients, The maximum allowable stress level for the corresponding animal; At the current stimulus level, For the current stimulus intensity parameter, The intensity of the stimulus at the next moment; When the stress level exceeds the preset threshold, the stimulation will be automatically paused and the system will enter observation mode. Record the response data of different individuals to different stimulus intensities.
[0007] As an optional implementation, in a first aspect of the present invention, after inputting the detailed image data into an animal recognition model to output the species category, quantity, and behavioral state of the animal, the method further includes: A multi-scale object detection network is used to detect animals in images, and outputs the bounding box, species category and detection confidence of each detected object; the multi-scale object detection network contains multiple detection branches of different scales, which are used to detect animals of different body sizes. Based on the species category of each detected target, the corresponding morphological analysis model is invoked to extract the characteristic parameters of the species from consecutive frame images; the characteristic parameters include body aspect ratio, contour complexity, motion trajectory features, and population distribution density; Based on the spatial relationships and temporal motion characteristics of multiple detection targets, the interaction behaviors between different species are identified. For each detected target, calculate its morphological anomaly index, displacement anomaly index, and group deviation index; when the morphological anomaly index exceeds a first threshold, trigger a second-level judgment; when the displacement anomaly index exceeds a second threshold, trigger a third-level judgment; when the group deviation index exceeds a third threshold, accumulate the abnormal response value; when the abnormal response value exceeds an alarm threshold, generate an abnormal warning message for the target. The detection area is divided into multiple functional zones, and the distribution quantity and residence time of each species in different functional zones are counted to generate a resource occupation heatmap for each species. Based on the proportion of each species, the evenness of spatial distribution, and the frequency of cross-species interactions, a mixed-species ecological balance index is calculated. When the balance index is lower than a preset balance threshold, suggestions for adjusting the mixed-species structure are generated.
[0008] As an optional implementation, in the first aspect of the present invention, for each detected target, its morphological anomaly index, displacement anomaly index, and group deviation index are calculated; when the morphological anomaly index exceeds a first threshold, a second-level judgment is triggered; when the displacement anomaly index exceeds a second threshold, a third-level judgment is triggered; when the group deviation index exceeds a third threshold, an abnormal response value is accumulated; when the abnormal response value exceeds an alarm threshold, abnormal early warning information for the target is generated, including: When an animal is detected, a tracking rectangle is generated for each animal, and the rectangle's coordinate parameters, size parameters, diagonal parameters, aspect ratio parameters, animal identification, and timestamp are continuously recorded to construct historical sliding window data for each animal. Based on the changes in the aspect ratio, area, and diagonal direction of the rectangle, the morphological abnormality index of each animal is calculated. When the morphological abnormality index exceeds the first preset threshold, a second-level judgment is triggered; Based on the animal's velocity mutation, trajectory tortuosity, and displacement stagnation, the displacement anomaly index of each animal is calculated; When the displacement anomaly index exceeds the second preset threshold, a third-level judgment is triggered; The cumulative response index for each animal is calculated based on the frequency of occurrence and decay factor of historical anomalous events. When the cumulative response index exceeds a third preset threshold, an abnormal warning message for the animal is generated; Based on the abnormal state of all animals in the area, a population abnormality index is calculated. When the population abnormality index exceeds a fourth preset threshold, an environmental risk warning is generated.
[0009] As an optional implementation, in the first aspect of the present invention, the morphological anomaly index is calculated in the following manner: , in, This is a morphological abnormality index. Let be the aspect ratio of the bounding box of the i-th target at time t. This is the standard aspect ratio for this species. For the target area, This is the historical average area. For the target attitude angle, The historical average attitude angle, This is a species-specific weighting coefficient; The displacement anomaly index is calculated as follows: , in, This is the displacement anomaly index. For the target instantaneous velocity, The target is the historical average speed; The trajectory tortuosity represents the ratio of the actual path length to the linear displacement. The displacement stagnation index represents the ratio of the maximum displacement to the average displacement. This is the species-specific weighting coefficient. To prevent division by the smallest quantity; The group deviation index is calculated as follows: , in, This is the group deviation index. The target is the distance to the nearest neighbor of the same species. The average nearest neighbor distance for all individuals of this species. For the target local density, This represents the average local density of the species. The mixed-culture ecological balance index is calculated as follows: , Where E represents the mixed-species ecological balance index. This is a vector representing the actual population proportion of each species. Let U be the optimal population ratio vector recommended for this mixed-species farming model, and U be the spatial distribution uniformity. For the frequency of interspecies conflict events, For the frequency of cross-species interactions, These are the weighting coefficients, and .
[0010] As an optional implementation, in a first aspect of the present invention, inputting the detailed image data into an animal recognition model to output the number of animals includes: For each target pixel in the input image, calculate its Euclidean distance to the nearest target boundary, and perform a parameter transformation on the distance value to generate an inverse Euclidean distance transformation map; the parameter transformation adopts a nonlinear mapping function. The inverse Euclidean distance transform graph with the parameters is fused with the original image features and input into a high-dimensional axial attention module; the high-dimensional axial attention module independently calculates attention weights on the height axis and the width axis respectively; A multi-scale feature decoding network is used to progressively upsample the encoded features to restore them to the original image resolution, generating a high-quality density map; the value of each pixel in the density map represents the target count contribution at that location; Local peak detection is performed on the density map to extract local maxima as the target center location; the number of local maxima is counted to obtain the total number of animals in the image; the density map is integrated and summed to obtain the count verification value.
[0011] As an optional implementation, in the first aspect of the present invention, the calculation formula for the parametric Euclidean distance inverse transform graph is: , in, For any pixel location in the image, This is the Euclidean distance from the pixel to the nearest target boundary. This is the focal length factor. The offset parameter is used when p is at the target center. Larger, and The value approaches 1 when p is located at the target boundary or background region. Smaller, and Approaching 0; The Euclidean distance to the nearest target boundary is calculated as follows: For a binary target mask image, where the pixel value of the target region is 1 and the pixel value of the background region is 0, the distance value of each pixel is calculated through a distance transformation algorithm.
[0012] As an optional implementation, in a first aspect of the present invention, the control of the third UAV swarm to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range includes: Plan closed or semi-closed virtual fence paths; the virtual fence paths consist of a series of three-dimensional space waypoints; Based on the length of the virtual fence path and the required sound pressure level, a corresponding number of drones are deployed along the fence path to form a continuous sound barrier; a set distance is maintained between each drone to ensure that the sound field coverage is seamless; wherein, when setting the set distance, the drone flight speed and the animal movement speed are dynamically set. Each deployed drone is equipped with a sound wave emitting device, and the sound wave frequency, intensity, and emission mode are set; the sound wave frequency is selected according to the auditory characteristics of the target animal, and the intensity is dynamically adjusted according to the environmental background noise and the desired repulsion effect; When an animal in an abnormal state is detected in the group, the acoustic barrier parameters of the virtual fence and the deployment position of the drone are dynamically adjusted according to the type and severity of the abnormality and the location of the animal. The system monitors the animal's position relative to the virtual fence in real time, and triggers a corresponding response mechanism when an animal is detected approaching or penetrating the fence.
[0013] A second aspect of this invention discloses an animal AI recognition and management system based on unmanned aerial vehicles (UAVs), comprising: Scanning module: used by the first UAV cluster in a wide-area scanning mission to collect animal activity data in the target area using a multimodal sensor group, and generate a heat map of the suspected animal locations based on the animal activity data, wherein the multimodal sensor group includes a thermal infrared imager; Response module: Used to respond to the generation of a heat map of the suspected location of the animal, and the second drone cluster performs a pinpoint confirmation task on the heat map area to collect detailed image data of the animal; Recognition module: used to input the detailed image data into the animal recognition model to output the species category, quantity and behavioral status of the animal; Prediction module: Based on the species category and the behavioral state, it calls the corresponding animal movement prediction model from the model library and combines it with real-time environmental data to predict the animal's movement trajectory within a future time window; Control module: Used to control the third drone cluster to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range, and the third drone cluster is equipped with a sound wave device; the sound wave device is used to adjust the working parameters of the sound wave device according to the animal species and status when it detects that an animal has reached the virtual boundary. Output module: Used to output the species, number, and status information of the identified animals.
[0014] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The method described in this invention not only enables rapid animal species identification and population counting, but also generates virtual electronic fences based on predicted animal movement trajectories and user-defined ranges, comprehensively considering both animal activity trends and human management needs. This dynamic fence setting method can be adjusted according to the real-time behavior of animals, avoiding the limitations of traditional fixed fences. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the animal AI recognition and management method based on unmanned aerial vehicles (UAVs) disclosed in an embodiment of the present invention. Figure 2 This is a schematic diagram of the process for acquiring fine images disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of the process for conducting mixed-culture recommendation testing as disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram of the process for accurate quantity detection disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of the electronic fence generation process disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an animal AI recognition and management system based on a drone, provided in an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] It should be noted that the terms first, second, third, fourth, etc., in the specification and claims of this invention are used to distinguish different objects, not to describe a specific order. The terms used in the embodiments of this invention include and have, and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0019] Example 1 Please see Figure 1 , Figure 1 This is a flowchart illustrating the AI-based animal identification and management method using drones disclosed in this invention. The execution entity of the method described in this embodiment is a software and / or hardware-based entity that can receive relevant information via wired or / or wireless means and send certain instructions. It may also have processing and storage capabilities. This entity can control multiple devices, such as remote physical servers or cloud servers and related software, or local hosts or servers and related software that perform operations on devices located in a specific location. In some scenarios, it can also control multiple storage devices, which may be located in the same or different locations as the devices. Figure 1 As shown, this drone-based AI-powered animal identification and management method includes the following steps: S101: In a wide-area scanning mission, the first UAV cluster uses a multimodal sensor group to collect animal activity data in the target area and generates a heat map of the suspected animal locations based on the animal activity data, wherein the multimodal sensor group includes a thermal infrared imager. S102: In response to the generation of a heat map of the suspected location of the animal, the second drone cluster performs a pinpoint confirmation task on the heat map area and collects detailed image data of the animal; S103: Input the detailed image data into the animal recognition model to output the species category, quantity, and behavioral status of the animal; S104: Based on the species category and the behavioral state, call the corresponding animal movement prediction model from the model library, and combine it with real-time environmental data to predict the animal's movement trajectory within a future time window; S105: Control the third drone cluster to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range, and the third drone cluster is equipped with a sound wave device; the sound wave device is used to adjust the working parameters of the sound wave device according to the animal species and status when it detects that an animal has reached the virtual boundary. S106: Output the identified animal species, number, and status information.
[0020] In practical applications, the above methods can be applied to two scenarios: one is livestock management, such as the grazing management of cattle and sheep; the other is the management of wild animals, which enables the management of wild animals in a region.
[0021] Specifically, the first drone swarm utilizes a multimodal sensor array to collect animal activity data in the target area during a wide-area scanning mission, generating heatmaps of suspected animal locations. Thermal infrared imagers can effectively capture thermal radiation signals emitted by animals in complex environments (such as at night or in densely vegetated areas). The multimodal sensor array integrates multiple data sources, improving the comprehensiveness and accuracy of data collection. The generated heatmaps can quickly pinpoint areas where animals may appear, providing direction for subsequent precise monitoring and significantly improving monitoring efficiency. The second drone swarm performs a pinpoint confirmation task on the heatmap areas, collecting detailed image data of the animals. This phased task allocation—first narrowing the scope through wide-area scanning, then pinpoint confirmation—avoids blind searching, making monitoring more precise and providing a high-quality data foundation for accurate animal identification.
[0022] By combining real-time environmental data, the movement trajectory of animals can be predicted within a future time window. This prediction method, based on a comprehensive analysis of multiple factors, fully considers the animal's behavioral habits and the influence of the environment on its movement, making the prediction results more scientific and reasonable. It helps to grasp the animal's activity dynamics in advance and provides a basis for subsequent management measures.
[0023] The third drone swarm generates a virtual electronic fence based on predicted movement trajectories and user-defined areas. This method allows for flexible adjustment of the fence's range according to the animals' actual activities and user needs, eliminating the need for large-scale construction and dismantling like traditional physical fences, thus reducing management costs and minimizing impact on the animals' habitat. The drone swarm's acoustic devices adjust operating parameters based on animal species and condition when detecting animals approaching the virtual boundary. Different animal species have varying sensitivities and reactions to sound waves, and different animal states (such as fear or calm) require different acoustic intervention methods. This intelligent parameter adjustment method more effectively guides animal behavior, avoiding excessive disturbance or harm, and achieving more humane and scientific animal management.
[0024] More preferably, the step of having the second drone cluster perform a pinpoint confirmation task on the hotspot area and collect detailed image data of the animals includes: S1021: Control the second UAV cluster to execute an acoustic stimulation pattern over the target area, the acoustic stimulation pattern including a preset frequency sequence, intensity gradient and time interval; S1022: Continuously acquire image sequences of the animal's response to the acoustic stimulus using a high-resolution camera and thermal infrared imager mounted on a drone; S1023: Extract animal reaction feature parameters from the reaction image sequence, the reaction feature parameters including auditory orientation response time, vigilant gaze duration, postural change amplitude, escape reaction speed and vocal response characteristics; S1024: Input the extracted response feature parameters into the pre-trained response feature recognition model, and output the animal's species category, individual identification, and current stress state.
[0025] Traditional animal identification relying solely on visual image features has limitations, especially for animals with similar appearances or in complex environments. However, by introducing acoustic stimulus patterns, image sequences of animal responses to acoustic stimuli are collected, and response characteristic parameters such as auditory orientation response time, duration of vigilant gaze, amplitude of posture changes, escape reaction speed, and vocal response features are extracted. These parameters provide a new dimension of identification from the perspective of animal behavioral responses, complementing visual image features and significantly improving the accuracy and reliability of animal identification. For example, different species of animals may exhibit significant differences in their response characteristics to the same acoustic stimulus; even animals with similar appearances may have different auditory orientation response times and escape reaction speeds, thus helping to more accurately distinguish animal species.
[0026] By analyzing the characteristic parameters of an animal's response to acoustic stimuli and combining them with a pre-trained response feature recognition model, it is possible to identify individual animals. Each animal may exhibit certain uniqueness in its behavioral responses, which can be further differentiated using the above method.
[0027] The accurate identification of animal species, individual characteristics, and current stress status in these embodiments of the invention provides a scientific basis for the formulation of animal management strategies. For example, in wildlife conservation areas, the appropriate monitoring frequency and level of interference can be determined based on the animal's stress status, avoiding adverse effects from over-monitoring; in zoos or farms, understanding the individual animal's identity and stress level helps in personalized feeding management and health monitoring, improving animal welfare.
[0028] More preferably, the extraction of animal response feature parameters from the response image sequence includes: The animal's posture features are extracted from the image, including head turning angle, neck elevation angle, and ear orientation. Extracting surface temperature changes and thermal signal displacement features of animals from thermal infrared images; Calculate the animal's response latency, movement speed, and acceleration from consecutive frame images; After controlling the second drone swarm to execute acoustic stimulation patterns over the target area, the method further includes: During the stimulation process, the animal's stress response indicators are monitored in real time, and the current stress level is calculated; The intensity of the stimulus in the next moment is dynamically adjusted based on the current stress level. , in, For adjustment coefficients, The maximum allowable stress level for the corresponding animal; At the current stimulus level, For the current stimulus intensity parameter, The intensity of the stimulus at the next moment; When the stress level exceeds the preset threshold, the stimulation will be automatically paused and the system will enter observation mode. Record the response data of different individuals to different stimulus intensities.
[0029] Specifically, during stimulation, the animal's stress response indicators are monitored in real time, and the current stress level is calculated. The stimulation intensity is then dynamically adjusted based on the current stress level, achieving intelligent and personalized stimulation patterns. This allows for reasonable changes in stimulation intensity based on the animal's real-time stress state. This dynamic adjustment method avoids overstimulation that could harm the animal, while ensuring that the stimulation can continuously and effectively elicit a response, improving the quality and efficiency of data collection.
[0030] Extracting postural features such as head turning angle, neck tilt angle, and ear orientation from images allows for a comprehensive and detailed depiction of the animal's postural changes in response to acoustic stimuli. These postural features reflect the animal's perception and reaction direction to the stimulus. Extracting surface temperature changes and thermal signal displacement features from thermal infrared images provides a unique perspective for assessing the animal's stress state. Surface temperature changes are a crucial indicator of physiological stress response in animals; when stimulated, hormone levels fluctuate, leading to corresponding changes in surface temperature. Calculating dynamic motion parameters such as response latency, movement speed, and acceleration from consecutive frames quantifies the animal's dynamic response to acoustic stimuli. The automatic pause of stimulation and entry into observation mode when the stress level exceeds a preset threshold fully embodies the principle of animal protection. The preset threshold is based on research into animal physiological and behavioral characteristics, ensuring stimulation is within the animal's tolerance range. Once the stress level exceeds the threshold, it indicates the animal may be in a state of over-stress; pausing stimulation at this point prevents further harm.
[0031] More preferably, after inputting the detailed image data into the animal recognition model to output the species category, quantity, and behavioral status of the animal, the method further includes: S1031: A multi-scale target detection network is used to detect animals in the image, and the bounding box, species category and detection confidence of each detected target are output; the multi-scale target detection network contains multiple detection branches of different scales, which are used to detect animals of different body sizes respectively; S1032: Based on the species category of each detected target, call the corresponding morphological analysis model to extract the feature parameters of the species from the continuous frame images; the feature parameters include body aspect ratio, contour complexity, motion trajectory features and population distribution density; S1033: Identify the interaction behaviors between different species based on the spatial positional relationships and temporal motion characteristics of multiple detected targets; S1034: For each detected target, calculate its morphological anomaly index, displacement anomaly index, and group deviation index; when the morphological anomaly index exceeds the first threshold, trigger the second-level judgment; when the displacement anomaly index exceeds the second threshold, trigger the third-level judgment; when the group deviation index exceeds the third threshold, accumulate the abnormal response value; when the abnormal response value exceeds the alarm threshold, generate abnormal early warning information for the target. S1035: Divide the detection area into multiple functional zones, count the distribution quantity and residence time of each species in different functional zones, and generate a resource occupation heatmap for each species. S1036: Calculate the mixed-species ecological balance index based on the proportion of each species, the evenness of spatial distribution, and the frequency of cross-species interactions. When the balance index is lower than a preset balance threshold, generate suggestions for adjusting the mixed-species structure.
[0032] Specifically, for each detection target, its morphological abnormality index, displacement abnormality index, and group deviation index are calculated. The morphological abnormality index reflects whether there are abnormal changes in the animal's body shape, such as swelling or deformation; the displacement abnormality index monitors whether the animal's movement trajectory deviates from the normal range, such as sudden acceleration or change of direction; the group deviation index is used to determine whether the animal's behavior within the group is abnormal, such as separation from the group or inconsistent behavior. By calculating these three dimensions of abnormality indices, the abnormal state of the animal can be comprehensively assessed, and potential problems can be detected in a timely manner.
[0033] The hierarchical judgment and early warning mechanism of this invention can progressively investigate and handle anomalies based on their severity, avoiding unnecessary warnings triggered by minor anomalies while ensuring that serious anomalies receive timely attention and handling. For example, a slight exceedance of the morphological abnormality index may simply be a normal physiological change in the animal, and a second-level judgment can further confirm whether measures are needed. However, when multiple abnormal indices exceed the standard simultaneously, causing the abnormal response value to exceed the alarm threshold, it indicates that the animal may have a serious health problem or be under external threat, requiring timely generation of early warning information and corresponding protective measures.
[0034] During implementation, the monitoring area is divided into multiple functional zones, and the distribution and dwell time of each species in different functional zones are statistically analyzed. Different functional zones play different roles in the ecosystem, such as foraging areas, habitats, and breeding grounds. By statistically analyzing the distribution of each species in different functional zones, we can understand the animals' utilization and preferences for different resources, providing a scientific basis for ecological protection and management. For example, if a significant reduction in the dwell time of a certain animal in a foraging area is found, it may indicate insufficient food resources in that area, requiring measures to increase food supply or protect the foraging environment.
[0035] Resource utilization heatmaps for each species are generated to visually represent their distribution across different functional zones. The heatmaps use color intensity to indicate species density; darker colors indicate a higher species population or longer dwell time in that area. This visualization method allows managers to quickly and intuitively understand animal resource utilization, identify potential problems and hotspots, and facilitate the development of targeted management strategies and conservation measures.
[0036] In this embodiment of the invention, a mixed-species ecological balance index is calculated based on the population proportions, spatial distribution evenness, and frequency of interspecies interactions. In a mixed-species ecosystem, the population proportions, spatial distribution, and interactions among species are crucial for maintaining ecological balance. Imbalances in population proportions may lead to overbreeding or extinction of certain species; uneven spatial distribution may affect resource utilization and ecological functions among species; and abnormal frequency of interspecies interactions may disrupt the stability and harmony of the ecosystem. By calculating the mixed-species ecological balance index, the balance state of the mixed-species ecosystem can be comprehensively assessed, providing a quantitative basis for adjusting the mixed-species structure.
[0037] More preferably, for each detected target, its morphological anomaly index, displacement anomaly index, and group deviation index are calculated; when the morphological anomaly index exceeds a first threshold, a second-level judgment is triggered; when the displacement anomaly index exceeds a second threshold, a third-level judgment is triggered; when the group deviation index exceeds a third threshold, an abnormal response value is accumulated; when the abnormal response value exceeds an alarm threshold, abnormal early warning information for the target is generated, including: When an animal is detected, a tracking rectangle is generated for each animal, and the rectangle's coordinate parameters, size parameters, diagonal parameters, aspect ratio parameters, animal identification, and timestamp are continuously recorded to construct historical sliding window data for each animal. Based on the changes in the aspect ratio, area, and diagonal direction of the rectangle, the morphological abnormality index of each animal is calculated. When the morphological abnormality index exceeds the first preset threshold, a second-level judgment is triggered; Based on the animal's velocity mutation, trajectory tortuosity, and displacement stagnation, the displacement anomaly index of each animal is calculated; When the displacement anomaly index exceeds the second preset threshold, a third-level judgment is triggered; The cumulative response index for each animal is calculated based on the frequency of occurrence and decay factor of historical anomalous events. When the cumulative response index exceeds a third preset threshold, an abnormal warning message for the animal is generated; Based on the abnormal state of all animals in the area, a population abnormality index is calculated. When the population abnormality index exceeds a fourth preset threshold, an environmental risk warning is generated.
[0038] Specifically, the morphological abnormality index for each animal is calculated based on changes in the aspect ratio, area, and diagonal direction of the rectangle. An animal's normal morphology typically remains relatively stable over a certain period, but it can change when it becomes ill, injured, or subjected to external disturbances. Changes in aspect ratio reflect whether the animal's body proportions are imbalanced; for example, some animals may become emaciated when sick, resulting in a significant change in the aspect ratio. Changes in area directly reflect increases or decreases in the animal's size, possibly due to swelling or emaciation. Changes in diagonal direction help detect abnormalities in the animal's posture, such as tilting or twisting. By comprehensively considering these parameters to calculate the morphological abnormality index, we can more accurately determine whether an animal's morphology is abnormal, providing strong support for the timely detection of animal health problems. The displacement abnormality index for each animal is calculated based on abrupt changes in velocity, trajectory tortuosity, and degree of displacement stagnation.
[0039] The cumulative response index for each animal is calculated based on the frequency of historical anomalous events and a decay factor. Animal anomalous behaviors may not occur in isolation, and the frequency of historical anomalous events can reflect long-term behavioral patterns and health conditions. Frequent anomalous behavior in an animal may indicate underlying health problems or ongoing environmental threats. The introduction of a decay factor considers the gradual reduction in the impact of anomalous events over time, making the cumulative response index more accurately reflect the animal's current state.
[0040] Based on the abnormal states of all animals within a region, a population anomaly index is calculated. In an ecosystem, animal behavior and states are often interconnected. An abnormality in a single animal may only be a localized phenomenon, while population anomalies may reflect problems in the entire ecological or aquaculture environment. By calculating the population anomaly index, we can gain a holistic understanding of the health status and behavioral patterns of animals within a region and identify potential population problems. For example, if a large number of animals in a region simultaneously exhibit morphological or displacement abnormalities, it may indicate the presence of pollutants, disease transmission, or abnormal climate factors in the environment.
[0041] When the population anomaly index exceeds the fourth preset threshold, an environmental risk warning is generated. The population anomaly index provides a quantitative basis for environmental risk assessment. When the index exceeds the preset threshold, it indicates that the population anomaly has reached a certain level and may have a serious impact on the ecological environment or aquaculture production. Timely generation of environmental risk warnings at this point can prompt relevant personnel to take swift measures, such as checking environmental quality, isolating sick animals, and adjusting aquaculture management, to reduce environmental risks and ensure the stability of the ecosystem and the smooth operation of aquaculture production.
[0042] More preferably, the morphological anomaly index is calculated in the following manner: , in, This is a morphological abnormality index. Let be the aspect ratio of the bounding box of the i-th target at time t. This is the standard aspect ratio for this species. For the target area, This is the historical average area. For the target attitude angle, The historical average attitude angle, This is a species-specific weighting coefficient; The displacement anomaly index is calculated as follows: , in, This is the displacement anomaly index. For the target instantaneous velocity, The target is the historical average speed; The trajectory tortuosity represents the ratio of the actual path length to the linear displacement. The displacement stagnation index represents the ratio of the maximum displacement to the average displacement. This is the species-specific weighting coefficient. To prevent division by the smallest quantity; The group deviation index is calculated as follows: , in, This is the group deviation index. The target is the distance to the nearest neighbor of the same species. The average nearest neighbor distance for all individuals of this species. For the target local density, This represents the average local density of the species. The mixed-culture ecological balance index is calculated as follows: , Where E represents the mixed-species ecological balance index. This is a vector representing the actual population proportion of each species. Let U be the optimal population ratio vector recommended for this mixed-species farming model, and U be the spatial distribution uniformity. For the frequency of interspecies conflict events, For the frequency of cross-species interactions, These are the weighting coefficients, and .
[0043] The morphological anomaly index in this invention comprehensively considers three dimensions of morphological features: the aspect ratio of the bounding box, the target area, and the target pose angle. The aspect ratio of the bounding box reflects the basic proportions of the animal's body. Different species have relatively stable standard aspect ratios. When the actual aspect ratio deviates significantly from the standard value, it may indicate an abnormality in the animal's body shape, such as injury or disease leading to body deformation. Changes in the target area can reflect the expansion or contraction of the animal's body; for example, the area will change accordingly when an animal is injured and swollen or starving and emaciated. The target pose angle reflects the animal's body posture. Abnormal changes in the pose angle may indicate that the animal is unable to move easily, is frightened, or is in a state of discomfort. The calculation of area and pose angle uses a comparison with historical averages. This approach considers the natural fluctuations in animal morphology that may exist at different times. By comparing with historical averages, normal morphological changes and abnormal changes can be distinguished. Simultaneously, the differences are standardized to make the indicators of different dimensions comparable, facilitating the comprehensive calculation of the morphological anomaly index. A species-specific weighting coefficient is introduced, as different species have different sensitivities to anomalies in their morphological characteristics.
[0044] The displacement anomaly index of this invention assesses animal displacement anomalies from three aspects: instantaneous velocity change, trajectory tortuosity, and displacement stagnation. The difference between instantaneous velocity and historical average velocity reflects abrupt changes in the animal's movement speed, which may be caused by factors such as fright, chasing prey, or physical discomfort. Trajectory tortuosity is measured by the ratio of actual path length to linear displacement; an excessively tortuous trajectory may indicate that the animal is encountering difficulties in finding food or avoiding obstacles, or is in a state of confusion or panic. The displacement stagnation index reflects the animal's movement over a certain period of time; an excessively high stagnation index may indicate that the animal's movement is obstructed, it is trapped, or it is abnormally in a resting state. The group deviation index assesses an animal's deviation from the group using two indicators: the distance between the target and its nearest neighbor of the same species, and the target's local density. The distance between the target and its nearest neighbor reflects the animal's spatial position within the group; a significant deviation from the group's average nearest neighbor distance may indicate that the animal is separated from the group or is located on the edge. The target's local density reflects the density of other individuals of the same species surrounding the animal; the difference between this local density and the group's average local density reflects whether the animal is clustered or dispersed within the group. By combining these two indicators, the degree of animal deviation from the group can be quantified, allowing for the timely detection of abnormal individuals within the group.
[0045] The mixed-species ecological balance index of this invention comprehensively assesses the balance of a mixed-species ecosystem from three aspects: species abundance ratio, spatial evenness of distribution, and interspecies interactions. Species abundance ratio reflects the relative abundance of different species in the ecosystem. When the actual abundance ratio deviates significantly from the recommended optimal ratio, it may lead to uneven resource allocation in the ecosystem, affecting ecological balance. Spatial evenness of distribution measures the spatial distribution of species; even distribution helps to fully utilize resources and reduce competition and conflict between species. The frequency of interspecies conflict events and interactions reflects the interaction relationships between different species; frequent conflicts may disrupt the stability of the ecosystem. By comprehensively considering these factors, the balance of a mixed-species ecosystem can be comprehensively and accurately assessed.
[0046] More preferably, such as Figure 4 As shown, the detailed image data is input into the animal recognition model to output the number of animals, including: S103a: For each target pixel in the input image, calculate its Euclidean distance to the nearest target boundary, and perform parameter transformation on the distance value to generate an inverse Euclidean distance transformation map; the parameter transformation adopts a nonlinear mapping function; S103b: The inverse Euclidean distance transform graph of the parameters is fused with the original image features and input into the high-dimensional axial attention module; the high-dimensional axial attention module independently calculates the attention weights on the height axis and the width axis respectively; S103c: Through a multi-scale feature decoding network, the encoded features are gradually upsampled to restore the original image resolution, generating a high-quality density map; the value of each pixel in the density map represents the target count contribution at that location; S103d: Perform local peak detection on the density map and extract local maxima as the target center position; count the number of local maxima to obtain the total number of animals in the image; perform integral summation on the density map to obtain the count verification value.
[0047] Specifically, calculating the Euclidean distance from each target pixel to the nearest target boundary accurately describes the relative positional relationship between the target pixel and the boundary. This distance information is crucial for distinguishing between the interior and boundary regions of a target, helping subsequent models better understand the shape and contour features of the target. For example, in animal images, different animals have different shapes; using Euclidean distance can accurately capture the edge details of the animal's body, providing a more accurate basis for subsequent statistical analysis.
[0048] In this embodiment of the invention, a nonlinear mapping function is used to perform parameter transformation on the distance values, generating an inverse Euclidean distance transformation graph. Nonlinear transformation can highlight key features in the distance information and enhance the differences between different distance values. Compared with linear transformation, nonlinear transformation can better adapt to complex image scenes, making it easier for the model to capture important information near the target boundary. For example, in animal images, pixels at the animal's body edge are close to the boundary; nonlinear transformation can amplify the differences between these pixels and other pixels, thereby improving the model's ability to recognize the target boundary.
[0049] Fusing the inverse Euclidean distance (IET) map with the original image features combines two different types of information. The original image features contain basic information such as the target's color and texture, while the IET map provides information about the target's boundaries and shape. By fusing these two features, the model can obtain a more comprehensive and richer representation of the target, thereby improving its ability to identify and count animals. For example, in animal images with complex backgrounds, the original image features may be affected by background interference, while boundary information can help the model more accurately locate the animal target and reduce the influence of the background.
[0050] The high-dimensional axial attention module independently calculates attention weights on both the height and width axes. This design allows the model to focus more on important regions and features in the image. Calculating attention weights independently on the height and width axes captures key information in the vertical and horizontal directions respectively, avoiding interference between information in different directions. For example, in images of animal groups, the distribution of different animals may vary in the height and width directions. Through axial attention calculation, the model can more accurately focus on the location of each animal, improving counting accuracy.
[0051] Multi-scale feature decoding networks restore encoded features to the original image resolution through progressive upsampling, preserving feature information at different scales. During encoding, the model extracts features at different levels, including low-level edge and texture features and high-level semantic features. Multi-scale decoding allows these features to be fused together, generating a more accurate and detailed density map. For example, in animal images, low-level features help the model accurately locate animal edges, while high-level features help the model understand the animal's overall shape and posture, thus improving the quality of the density map.
[0052] In the generated density map, the value of each pixel represents the target count contribution at that location. This representation intuitively reflects the distribution of targets in the image. Compared to traditional target detection methods, density maps do not require explicit detection of the bounding box of each target. Instead, they count the number of targets through pixel-level count contributions, which better handles situations where targets overlap and are densely distributed. For example, in images of densely packed animal groups, traditional target detection methods may result in missed or false detections, while density maps can more accurately count the number of targets corresponding to each pixel, improving the accuracy of the count.
[0053] Local peak detection (LoPD) on density maps, extracting local maxima as target center locations, can accurately pinpoint the center of each animal. LoPD algorithms identify regions in the density map with the highest counting contribution, which typically correspond to the animal's center. This method avoids positioning errors caused by overlapping or irregular shapes, improving target localization accuracy. For example, in images where animals are close together or overlapping, LoPD can accurately locate the center of each animal, providing an accurate basis for subsequent counts.
[0054] The total number of animals in an image is determined by counting local maxima (local maxima), while a verification count is obtained by integrating and summing the density map. This dual counting method improves the reliability of the counting results. The local maxima counting method is based directly on the detection of the target center location, while the density map integration and summation method counts the number of targets in the image as a whole. By comparing the results of these two methods, the accuracy of the counting can be verified, reducing counting errors caused by algorithmic errors or image noise. For example, if the counting results obtained by the two methods differ significantly, it may indicate a problem in the target detection or density map generation process, requiring further inspection and adjustment of the algorithm parameters.
[0055] Specifically, the high-dimensional axial attention module includes: Height axis attention submodule: Divides the input feature map into multiple strips along the height dimension, independently computes self-attention within each strip, and captures long-distance dependencies in the vertical direction; Width axis attention submodule: Divides the input feature map into multiple strips in the width dimension, independently computes self-attention within each strip, and captures long-distance dependencies in the horizontal direction; Feature fusion submodule: Weighted fusion of height axis attention output and width axis attention output to obtain enhanced features that simultaneously contain contextual information from both axes.
[0056] The calculation formula for the height axis attention submodule is as follows: , in, , , This is the query, key, and value matrix corresponding to the i-th stripe; To obtain the feature dimensions of the query vector and key vector, the outputs of all stripes are concatenated along the height axis to obtain the height-axis attention output. ; The formula for calculating the width axis attention submodule is: , in, , , This is the query, key, and value matrix corresponding to the j-th stripe; To obtain the feature dimensions of the query vector and key vector, the outputs of all stripes are concatenated along the width axis to obtain the width axis attention output. ; The calculation formula for the feature fusion submodule is as follows: ,in, is a learnable fusion weight parameter, initialized to 0.5; X is the input feature map, which retains the original information through residual connections.
[0057] More preferably, the formula for calculating the inverse Euclidean distance graph is: , in, For any pixel location in the image, This is the Euclidean distance from the pixel to the nearest target boundary. This is the focal length factor. The offset parameter is used when p is at the target center. Larger, and The value approaches 1 when p is located at the target boundary or background region. Smaller, and Approaching 0; The Euclidean distance to the nearest target boundary is calculated as follows: For a binary target mask image, where the pixel value of the target region is 1 and the pixel value of the background region is 0, the distance value of each pixel is calculated through a distance transformation algorithm.
[0058] This invention generates a target mask image by binarizing the target image, where the target region's pixel value is 1 and the background region's pixel value is 0. This binarization simplifies image information, allowing the distance transform algorithm to focus only on distinguishing the target and background regions without processing complex color, texture, and other information. In animal images, the animal's body is marked as the target region (pixel value 1), and the background is marked as the non-target region (pixel value 0). The distance transform algorithm can quickly and accurately calculate the Euclidean distance from each pixel to the nearest target boundary. For example, for an image containing multiple animals and a complex background, binarization simplifies the problem to calculating the distance from black (background) pixels to white (target) pixel boundaries, significantly improving computational efficiency.
[0059] The distance transformation algorithm can accurately calculate the Euclidean distance from each pixel to the nearest target boundary. This algorithm considers the spatial relationships between pixels, traversing all pixels in the image to find the shortest path from each pixel to the target boundary and calculating its distance.
[0060] More preferably, such as Figure 5 As shown, the process of controlling the third drone swarm to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range includes: S1051: Plan a closed or semi-closed virtual fence path; the virtual fence path consists of a series of three-dimensional space waypoints; S1052: Based on the length of the virtual fence path and the required sound pressure level, dispatch a corresponding number of drones to deploy along the fence path to form a continuous sound barrier; maintain a set distance between each drone to ensure that the sound field coverage is seamless; wherein, when setting the set distance, the drone flight speed and animal movement speed are combined for dynamic setting. S1053: Equip each deployed drone with a sound wave emitting device, and set the sound wave frequency, intensity and emission mode; the sound wave frequency is selected according to the auditory characteristics of the target animal, and the intensity is dynamically adjusted according to the environmental background noise and the required repulsion effect; S1054: When an animal in an abnormal state is detected in the group, the acoustic barrier parameters of the virtual fence and the deployment position of the drone are dynamically adjusted according to the type, severity and location of the abnormality. S1055: Real-time monitoring of the animal's position relative to the virtual fence; when an animal is detected approaching or penetrating the fence, a corresponding response mechanism is triggered.
[0061] In this embodiment of the invention, drones are used to achieve dynamic virtual fence management; animal management is achieved by combining specific terrain and conditions. Existing virtual fences are based on fixed fence devices, and the animal's GPS location is used to determine whether it has crossed the fence. Although this can be dynamically set on the platform, there are two problems: one is positional deviation, and the other is that it can only provide remote warnings. On the other hand, if a fixed point is set, it is easy to set up on-site alarms, but the deployment cost is relatively high and the mobility is not strong. The solution of this embodiment of the invention sets one end of the electronic fence on the drone, and combines the drone's positioning and the animal's position to provide a gradual alarm; preventing excessive fright.
[0062] The drone integrating sound waves in this invention has several advantages: it facilitates animal detection, animal herding, and animal fencing; and because it is mounted on a drone, the area that a single drone can act as a fence is relatively large, which greatly reduces the cost of use and facilitates its widespread adoption.
[0063] When an animal in an abnormal state is detected in the group, the sound barrier of the virtual fence is adjusted according to the state; the sound barrier design is flexible, for example, the relative position between each drone and the parameters of the sound wave device at the drone can be dynamically adjusted, and then the virtual fence is set according to the specific situation.
[0064] Specifically, the planning of closed or semi-closed virtual fence paths can be flexibly adjusted according to specific animal management scenarios. Closed paths are suitable for scenarios requiring complete enclosure of a specific area to prevent animals from entering or escaping, such as protecting rare plant areas from wildlife damage. In scenarios where only partial guidance or restriction of animal movement is needed, such as guiding animals along specific pathways, semi-closed paths are more appropriate. This flexibility allows virtual electronic fences to be widely applied in various geographical environments and animal management tasks.
[0065] A virtual fence path consists of a series of three-dimensional waypoints, which can more accurately describe the location information in actual space compared to two-dimensional path planning. In complex natural environments, the terrain may have undulations, obstacles, etc., and three-dimensional waypoints can take these factors into account, enabling drones to fly along precise paths, thereby ensuring the accurate generation of virtual fences.
[0066] By scheduling the appropriate number of drones based on the length of the virtual fence path and the required sound pressure level, resources can be allocated rationally, avoiding waste or shortage. If the fence path is long or a higher sound pressure level is required to achieve a deterrent effect, more drones are scheduled; conversely, the number of drones is reduced. This on-demand scheduling method can improve the utilization efficiency of drone swarms and reduce operating costs. For example, when building a virtual fence in a small area with low sound pressure level requirements, only a small number of drones need to be scheduled, avoiding the idleness of too many drones.
[0067] By dynamically setting the spacing between drones based on their flight speed and the animals' movement speed, a seamless sound field coverage can be ensured. When drones fly faster or animals move slower, the spacing between drones can be increased; conversely, the spacing can be decreased. This dynamic adjustment guarantees that the sound barrier continuously and effectively covers the entire virtual fence area under any circumstances, preventing animals from passing through gaps. For example, when repelling slow-moving groups of animals, drones can maintain a larger spacing, ensuring sound field coverage while reducing drone energy consumption; while when repelling fast-moving animals, a smaller spacing ensures the continuity of the sound barrier.
[0068] When an animal exhibiting abnormal behavior is detected within a group, the acoustic barrier parameters of the virtual fence and the deployment location of drones are dynamically adjusted based on the type and severity of the abnormality and the animal's location. This allows for timely responses to various emergencies and ensures animal safety. For example, if an animal is found to be injured or sick and unable to respond to sound waves like a normal animal, the sound wave intensity in the vicinity can be reduced to prevent further harm. Simultaneously, the deployment location of drones can be adjusted to enhance monitoring and protection of that area.
[0069] This dynamic adjustment mechanism allows virtual fences to change in real time according to actual conditions, improving their adaptability and flexibility. In situations where animal group behavior is complex and changeable, such as sudden changes in movement direction or splitting / gathering, dynamically adjusting acoustic barrier parameters and drone deployment positions ensures that the virtual fence can always effectively manage and drive away animals. For example, when an animal group splits into multiple smaller groups, the deployment of drones can be adjusted accordingly to ensure that each smaller group is covered by the virtual fence.
[0070] In this embodiment of the invention, the real-time monitoring of the animal's position relative to the virtual fence allows for timely understanding of the animal's movement, ensuring the effectiveness of the virtual fence management. Continuous monitoring reveals whether an animal is approaching or penetrating the fence, enabling timely intervention. For example, if an animal is detected approaching the fence, sound wave emission can be amplified in advance as an early warning; if the animal has already penetrated the fence, a rapid response mechanism can be triggered to prevent further penetration.
[0071] When an animal is detected approaching or penetrating the fence, a corresponding response mechanism is triggered to quickly address various unexpected situations and prevent the animal from damaging the target area or harming itself. The response mechanism may include amplifying sound wave emissions, adjusting the drone's flight path, and issuing alarms to notify management personnel. For example, in protected crop areas, if an animal is found penetrating the fence and entering the farmland, sound wave emissions are immediately amplified, and management personnel are notified to handle the situation on-site, thus preventing the animal from damaging the crops in a timely manner.
[0072] In this embodiment of the invention, drone fence optimization can also be performed in conjunction with actual movement status. Since complete enclosure is not required, dynamic virtual fence planning can be achieved at a lower cost by combining movement speed and flight speed to divide the corresponding area coverage.
[0073] The method described in this invention not only enables rapid animal species identification and population counting, but also generates virtual electronic fences based on predicted animal movement trajectories and user-defined ranges, comprehensively considering both animal activity trends and human management needs. This dynamic fence setting method can be adjusted according to the real-time behavior of animals, avoiding the limitations of traditional fixed fences.
[0074] Example 2 Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of the drone-based animal AI recognition and management system disclosed in an embodiment of the present invention. Figure 6 As shown, the drone-based animal AI recognition and management system may include: Scanning module 21: used by the first UAV cluster in a wide-area scanning mission to collect animal activity data in the target area using a multimodal sensor group, and generate a heat map of the suspected animal locations based on the animal activity data, wherein the multimodal sensor group includes a thermal infrared imager; Response module 22: In response to the generation of a heat map of the suspected location of the animal, the second UAV cluster performs a pinpoint confirmation task on the heat map area and collects detailed image data of the animal; Recognition module 23: used to input the detailed image data into the animal recognition model to output the species category, quantity and behavioral status of the animal; Prediction module 24: is used to call the corresponding animal movement prediction model from the model library according to the species category and the behavioral state, and combine it with real-time environmental data to predict the animal's movement trajectory within a future time window; Control module 25: Used to control the third drone cluster to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range, and the third drone cluster is equipped with a sound wave device; the sound wave device is used to adjust the working parameters of the sound wave device according to the animal species and status when it detects that an animal has reached the virtual boundary. Output module 26: Used to output the species, number, and status information of the identified animals.
[0075] The method described in this invention not only enables rapid animal species identification and population counting, but also generates virtual electronic fences based on predicted animal movement trajectories and user-defined ranges, comprehensively considering both animal activity trends and human management needs. This dynamic fence setting method can be adjusted according to the real-time behavior of animals, avoiding the limitations of traditional fixed fences.
[0076] The above provides a detailed description of the drone-based animal AI identification and management method, system, electronic device, and storage medium disclosed in the embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for animal AI recognition and management based on unmanned aerial vehicles (UAVs), characterized in that, include: In a wide-area scanning mission, a first UAV cluster uses a multimodal sensor group to collect animal activity data in the target area and generates a heat map of suspected animal locations based on the animal activity data, wherein the multimodal sensor group includes a thermal infrared imager. In response to the generation of a heat map of suspected animal locations, a second drone swarm performs a pinpoint confirmation task on the heat map area and collects detailed image data of the animals. The detailed image data is input into the animal recognition model to output the species category, number, and behavioral status of the animal; Based on the species category and the behavioral state, the corresponding animal movement prediction model is called from the model library and combined with real-time environmental data to predict the animal's movement trajectory within a future time window; The third drone cluster is controlled to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range, and the third drone cluster is equipped with a sound wave device; the sound wave device is used to adjust the working parameters of the sound wave device according to the animal species and status when it detects that an animal has reached the virtual boundary. Output the species, number, and status information of the identified animals.
2. The method for animal AI recognition and management based on unmanned aerial vehicles as described in claim 1, characterized in that, The task of pinpointing and confirming hotspot areas by the second drone cluster, and collecting detailed image data of the animals, includes: Control the second drone cluster to execute an acoustic stimulation pattern over the target area, the acoustic stimulation pattern including a preset frequency sequence, intensity gradient and time interval; The drone was equipped with a high-resolution camera and a thermal infrared imager to continuously collect image sequences of the animal's response to the acoustic stimuli. Animal response feature parameters are extracted from the response image sequence, including auditory orientation response time, duration of vigilant gaze, amplitude of posture change, escape reaction speed, and vocal response characteristics. The extracted response feature parameters are input into a pre-trained response feature recognition model, which outputs the animal's species category, individual identification, and current stress state.
3. The method for animal AI recognition and management based on unmanned aerial vehicles as described in claim 2, characterized in that, The extraction of animal response feature parameters from the response image sequence includes: The animal's posture features are extracted from the image, including head turning angle, neck elevation angle, and ear orientation. Extracting surface temperature changes and thermal signal displacement features of animals from thermal infrared images; Calculate the animal's response latency, movement speed, and acceleration from consecutive frame images; After controlling the second drone swarm to execute acoustic stimulation patterns over the target area, the method further includes: During the stimulation process, the animal's stress response indicators are monitored in real time, and the current stress level is calculated; The intensity of the stimulus in the next moment is dynamically adjusted based on the current stress level. , in, For adjustment coefficients, The maximum allowable stress level for the corresponding animal; At the current stimulus level, The current stimulus intensity parameter, The intensity of the stimulus at the next moment; When the stress level exceeds the preset threshold, the stimulation will be automatically paused and the system will enter observation mode. Record the response data of different individuals to different stimulus intensities.
4. The method for animal AI recognition and management based on unmanned aerial vehicles as described in claim 1, characterized in that, After inputting the detailed image data into the animal recognition model to output the species category, quantity, and behavioral status of the animal, the method further includes: A multi-scale object detection network is used to detect animals in images, and outputs the bounding box, species category and detection confidence of each detected object; the multi-scale object detection network contains multiple detection branches of different scales, which are used to detect animals of different body sizes. Based on the species category of each detected target, the corresponding morphological analysis model is invoked to extract the characteristic parameters of the species from consecutive frame images; the characteristic parameters include body aspect ratio, contour complexity, motion trajectory features, and population distribution density; Based on the spatial relationships and temporal motion characteristics of multiple detection targets, the interaction behaviors between different species are identified. For each detected target, calculate its morphological anomaly index, displacement anomaly index, and group deviation index; when the morphological anomaly index exceeds a first threshold, trigger a second-level judgment; when the displacement anomaly index exceeds a second threshold, trigger a third-level judgment; when the group deviation index exceeds a third threshold, accumulate the abnormal response value; when the abnormal response value exceeds an alarm threshold, generate an abnormal warning message for the target. The detection area is divided into multiple functional zones, and the distribution quantity and residence time of each species in different functional zones are counted to generate a resource occupation heatmap for each species. Based on the proportion of each species, the evenness of spatial distribution, and the frequency of cross-species interactions, a mixed-species ecological balance index is calculated. When the balance index is lower than a preset balance threshold, suggestions for adjusting the mixed-species structure are generated.
5. The method for animal AI recognition and management based on unmanned aerial vehicles as described in claim 4, characterized in that, For each detected target, its morphological anomaly index, displacement anomaly index, and population deviation index are calculated; when the morphological anomaly index exceeds a first threshold, a second-level judgment is triggered; when the displacement anomaly index exceeds a second threshold, a third-level judgment is triggered; when the population deviation index exceeds a third threshold, the abnormal response value is accumulated. When the abnormal response value exceeds the alarm threshold, an abnormal early warning message for the target is generated, including: When an animal is detected, a tracking rectangle is generated for each animal, and the rectangle's coordinate parameters, size parameters, diagonal parameters, aspect ratio parameters, animal identification, and timestamp are continuously recorded to construct historical sliding window data for each animal. Based on the changes in the aspect ratio, area, and diagonal direction of the rectangle, the morphological abnormality index of each animal is calculated. When the morphological abnormality index exceeds the first preset threshold, a second-level judgment is triggered; Based on the animal's velocity mutation, trajectory tortuosity, and displacement stagnation, the displacement anomaly index of each animal is calculated; When the displacement anomaly index exceeds the second preset threshold, a third-level judgment is triggered; The cumulative response index for each animal is calculated based on the frequency of occurrence and decay factor of historical anomalous events. When the cumulative response index exceeds a third preset threshold, an abnormal warning message for the animal is generated; Based on the abnormal state of all animals in the area, a population abnormality index is calculated. When the population abnormality index exceeds a fourth preset threshold, an environmental risk warning is generated.
6. The method for animal AI recognition and management based on unmanned aerial vehicles as described in claim 5, characterized in that, The morphological anomaly index is calculated as follows: , in, This is a morphological abnormality index. Let be the aspect ratio of the bounding box of the i-th target at time t. This is the standard aspect ratio for this species. For the target area, This is the historical average area. For the target attitude angle, The historical average attitude angle, This is the species-specific weighting coefficient; The displacement anomaly index is calculated as follows: , in, This is the displacement anomaly index. For the target instantaneous velocity, The target is the historical average speed; The trajectory tortuosity represents the ratio of the actual path length to the linear displacement. The displacement stagnation index represents the ratio of the maximum displacement to the average displacement. This is the species-specific weighting coefficient. To prevent division by the smallest quantity; The group deviation index is calculated as follows: , in, This is the group deviation index. The target is the distance to the nearest neighbor of the same species. The average nearest neighbor distance for all individuals of this species. For the target local density, This represents the average local density of the species. The mixed-culture ecological balance index is calculated as follows: , Where E represents the mixed-species ecological balance index. Let be a vector representing the actual population proportion of each species. Let U be the optimal population ratio vector recommended for this mixed-species farming model, and U be the spatial distribution uniformity. For the frequency of interspecies conflict events, For the frequency of cross-species interactions, These are the weighting coefficients, and .
7. The method for animal AI recognition and management based on unmanned aerial vehicles as described in claim 1, characterized in that, The detailed image data is input into the animal recognition model to output the number of animals, including: For each target pixel in the input image, calculate its Euclidean distance to the nearest target boundary, and perform a parameter transformation on the distance value to generate an inverse Euclidean distance transformation map; the parameter transformation adopts a nonlinear mapping function. The inverse Euclidean distance transform graph with the parameters is fused with the original image features and input into a high-dimensional axial attention module; the high-dimensional axial attention module independently calculates attention weights on the height axis and the width axis respectively; A multi-scale feature decoding network is used to progressively upsample the encoded features to restore them to the original image resolution, generating a high-quality density map; the value of each pixel in the density map represents the target count contribution at that location; Local peak detection is performed on the density map to extract local maxima as the target center location; the number of local maxima is counted to obtain the total number of animals in the image; the density map is integrated and summed to obtain the count verification value.
8. The method for animal AI recognition and management based on unmanned aerial vehicles as described in claim 7, characterized in that, The formula for calculating the inverse Euclidean distance graph is as follows: , in, For any pixel location in the image, This is the Euclidean distance from the pixel to the nearest target boundary. This is the focal length factor. The offset parameter is used when p is at the target center. Larger, and The value approaches 1 when p is located at the target boundary or background region. Smaller, and Approaching 0; The Euclidean distance to the nearest target boundary is calculated as follows: For a binary target mask image, where the pixel value of the target region is 1 and the pixel value of the background region is 0, the distance value of each pixel is calculated through a distance transformation algorithm.
9. The method for animal AI recognition and management based on unmanned aerial vehicles as described in claim 1, characterized in that, The control of the third drone swarm to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range includes: Plan closed or semi-closed virtual fence paths; the virtual fence paths consist of a series of three-dimensional space waypoints; Based on the length of the virtual fence path and the required sound pressure level, a corresponding number of drones are deployed along the fence path to form a continuous sound barrier; a set distance is maintained between each drone to ensure that the sound field coverage is seamless; wherein, when setting the set distance, the drone flight speed and the animal movement speed are dynamically set. Each deployed drone is equipped with a sound wave emitting device, and the sound wave frequency, intensity, and emission mode are set; the sound wave frequency is selected according to the auditory characteristics of the target animal, and the intensity is dynamically adjusted according to the environmental background noise and the desired repulsion effect; When an animal in an abnormal state is detected in the group, the acoustic barrier parameters of the virtual fence and the deployment position of the drone are dynamically adjusted according to the type and severity of the abnormality and the location of the animal. The system monitors the animal's position relative to the virtual fence in real time, and triggers a corresponding response mechanism when an animal is detected approaching or penetrating the fence.
10. An animal AI recognition and management system based on unmanned aerial vehicles (UAVs), characterized in that, include: Scanning module: used by the first UAV cluster in a wide-area scanning mission to collect animal activity data in the target area using a multimodal sensor group, and generate a heat map of the suspected animal locations based on the animal activity data, wherein the multimodal sensor group includes a thermal infrared imager; Response module: Used to respond to the generation of a heat map of the suspected location of the animal, and the second drone cluster performs a pinpoint confirmation task on the heat map area to collect detailed image data of the animal; Recognition module: used to input the detailed image data into the animal recognition model to output the species category, quantity and behavioral status of the animal; Prediction module: Based on the species category and the behavioral state, it calls the corresponding animal movement prediction model from the model library and combines it with real-time environmental data to predict the animal's movement trajectory within a future time window; Control module: Used to control the third drone cluster to generate a virtual electronic fence according to the predicted movement trajectory and the user-defined range, and the third drone cluster is equipped with a sound wave device; the sound wave device is used to adjust the working parameters of the sound wave device according to the animal species and status when it detects that an animal has reached the virtual boundary. Output module: Used to output the species, number, and status information of the identified animals.