Risk animal individual determination method and device, equipment and storage medium

By constructing a graph database to record risk interaction behaviors between individual animals, and utilizing multi-hop path query and risk scoring algorithms, the problem of delayed disease early warning in existing technologies has been solved, enabling early identification of at-risk animal individuals and improving the intelligence and foresight of disease prevention and control.

CN122050880APending Publication Date: 2026-05-15INTELLIGENT EQUIPMENT RESEARCH CENTER BEIJING ACADEMY OF AGRICULTURE AND FORESTRY SCIENCES +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INTELLIGENT EQUIPMENT RESEARCH CENTER BEIJING ACADEMY OF AGRICULTURE AND FORESTRY SCIENCES
Filing Date
2025-12-24
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Current technology is unable to provide early warnings before the spread of diseases, resulting in a serious lag in disease early warning.

Method used

By constructing a graph database to record risk interactions between individual animals, and using multi-hop path queries and risk scoring algorithms, potential high-risk animal individuals can be identified, and disease transmission chains can be identified in advance.

Benefits of technology

It enables early identification of at-risk animal individuals, improves the foresight and intelligence of disease prevention and control, and can proactively and dynamically trace potential disease transmission chains, avoiding delayed disease early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122050880A_ABST
    Figure CN122050880A_ABST
Patent Text Reader

Abstract

The invention provides a method, device and equipment for determining a risk animal individual and a storage medium, and relates to the technical field of automatic detection.The method comprises the steps that under the condition that a target animal individual is marked as a definite case or a suspected case in epidemic disease transmission, multi-hop path query is carried out in a graph database with the target animal individual as a query starting point, obtaining at least one candidate risk animal individual which is directly or indirectly associated with the target animal individual in a preset time window; for each candidate risky animal individual, determining a risk score of the candidate risky animal individual based on the interaction frequency, the behavior type, the starting moment and the duration corresponding to the candidate risky animal individual; a risk animal individual is determined from the at least one candidate risk animal individual based on each risk score. According to the invention, risk animal individuals can be identified in advance, so that epidemic disease early warning can be carried out in advance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic detection technology, and in particular to a method, apparatus, device, and storage medium for identifying at-risk animal individuals. Background Technology

[0002] In large-scale farms, disease spreads rapidly and can cause huge economic losses. With the development of computer vision technology, some technologies are now attempting to apply it to the automated monitoring of animal behavior, replacing the traditional prevention and control model that relies on manual inspections and reporting after symptoms are detected.

[0003] Currently, by deploying binocular or depth cameras in farms and combining them with 3D pose estimation networks (such as VoxelPose) to reconstruct the three-dimensional skeleton of individual animals, basic behaviors such as lying down, standing, and walking can be identified based on the reconstructed three-dimensional skeleton. Thus, based on these behaviors, it can be determined whether each individual animal has contracted a disease.

[0004] However, the above methods identify whether an animal is sick by its individual behavior, which has the problem of not being able to provide early warnings before the spread of the disease, resulting in a serious lag in disease early warning. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and storage medium for identifying at-risk animal individuals, in order to address the shortcomings of existing technologies that cannot provide early warnings before the spread of diseases, resulting in serious delays in disease warnings. This invention aims to identify at-risk animal individuals in advance, thereby enabling early disease warnings.

[0006] This invention provides a method for identifying at-risk animal individuals, comprising: When a target animal individual is marked as a confirmed or suspected case of disease transmission, a multi-hop path query is performed in the graph database starting from the target animal individual to obtain at least one candidate risk animal individual that is directly or indirectly associated with the target animal individual within a preset time window. The graph database is defined as follows: each animal individual is a node, and whether a risk interaction occurs between two animal individuals is defined as the edge between the nodes corresponding to the two animal individuals. The attributes of the edge are the number of interactions, the type of behavior, the start time of the risk interaction, and the duration of the risk interaction between the two animal individuals. For each candidate risk animal individual, a risk score is determined based on the number of interactions, behavior type, start time, and duration of the interaction. Based on each of the aforementioned risk scores, risk animal individuals are identified from at least one of the aforementioned candidate risk animal individuals.

[0007] According to a method for determining risky animal individuals provided by the present invention, the step of determining a risk score for a candidate risky animal individual based on the number of interactions, behavior type, start time, and duration of the interaction includes: From the graph database, query the number of target interactions, target behavior types, target start time, and target duration of direct or indirect risk interaction behaviors between the candidate risk animal individual and the target animal individual; Based on the target behavior type, a behavior type weight is determined, which is used to characterize the degree of danger that the target behavior type poses to the spread of the disease; Based on the target start time and the target duration, a time decay factor is determined. The time decay factor is used to characterize the degree of decay of the impact of the risk interaction behavior that occurs directly or indirectly between the candidate risk animal individual and the target animal individual on the spread of the disease. The risk score of the candidate risk animal individual is determined based on the target interaction count, the behavior type weight, and the time decay factor.

[0008] According to a method for determining at-risk animal individuals provided by the present invention, the method further includes: Find at least one target video clip related to the at-risk animal individual from a video library, the video library including multiple video clips, the video clips being videos containing risky interactive behaviors between animal individuals; Output each target video segment in order of the occurrence time of the risky interactive behavior contained therein, from most recent to oldest.

[0009] According to a method for determining at-risk animal individuals provided by the present invention, the method further includes: Acquire video streams for multiple individual animals; For each video frame in the video stream, the position of each individual animal is determined based on the video frame; Based on the location of each of the animal individuals, determine whether risky interaction behavior occurs between any two animal individuals; If it is determined that there is a risk interaction behavior between two individual animals, determine the number of interactions, the type of behavior, the start time of the risk interaction behavior, and the duration of the risk interaction behavior; The graph database is constructed using each of the animal individuals as nodes, whether risky interaction occurs between any two animal individuals as an edge, and the number of interactions, the type of behavior, the start time of the risky interaction, and the duration of the risky interaction as edge attributes.

[0010] According to a method for determining risky animal individuals provided by the present invention, determining whether risky interaction behavior occurs between any two animal individuals based on the location of each animal individual includes: Based on the location of each of the animal individuals, determine the distance between any two animal individuals; Two animal individuals whose distance is less than a preset distance threshold are identified as candidate animal pairs; Based on the key point recognition network, the mouth key points and buttock key points of each animal in the candidate animal pair are determined; A region of interest (ROI) image is determined from the video frame, the ROI image containing the mouth key points and buttock key points of each animal individual in the candidate animal pair; Based on the ROI images of the candidate animal pairs in each of the video frames, it is determined whether risky interaction behavior occurs between the candidate animal pairs.

[0011] According to a method for determining risky animal individuals provided by the present invention, the step of determining whether risky interaction behavior occurs between candidate animal individual pairs based on the ROI images of the candidate animal individuals in each of the video frames includes: The ROI images corresponding to each of the multiple video frames are input into the temporal action recognition model to obtain the behavior recognition result output by the temporal action recognition model. The behavior recognition result is used to characterize whether risky interaction behavior occurs between the candidate animal individuals. The temporal action recognition model is trained based on sample videos containing two sample animal individuals, with whether the two sample animal individuals have risky interaction behavior as the label.

[0012] According to a method for determining risky animal individuals provided by the present invention, a graph database is constructed by using each animal individual as a node, whether a risky interaction occurs between any two animal individuals as an edge, and the attributes of the risky interaction, such as the number of interactions, the type of behavior, the start time of the risky interaction, and the duration of the risky interaction, as edge attributes. The method includes: For each of the aforementioned individual animals, a sub-image containing that individual animal is extracted from the video frame; The sub-image is input into the individual recognition model to obtain the animal individual's identity ID output by the individual recognition model. The individual recognition model is trained based on sample images of multiple sample animal individuals, with the identity ID of each sample animal individual as a label. The graph database is constructed by using the individual animal IDs as nodes, whether risky interaction occurs between any two individual animals as edges, and the number of interactions, behavior type, start time of the risky interaction, and duration of the risky interaction as edge attributes.

[0013] The present invention also provides a device for identifying individuals of animals at risk, comprising: The query module is used to perform multi-hop path queries in a graph database when a target animal individual is marked as a confirmed or suspected case of disease transmission. Starting from the target animal individual, the module obtains at least one candidate risk animal individual that is directly or indirectly associated with the target animal individual within a preset time window. The graph database uses each animal individual as a node, and the edge between the nodes corresponding to the two animal individuals is defined by whether a risk interaction occurs between them. The attributes of the edge are the number of interactions, the type of interaction, the start time of the risk interaction, and the duration of the risk interaction. The determination module is used to determine the risk score of each candidate risk animal individual based on the number of interactions, behavior type, start time, and duration of the candidate risk animal individual. The determining module is further configured to determine a risk animal individual from at least one of the candidate risk animal individuals based on each of the risk scores.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for determining an individual at risk as described above.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for determining risk animal individuals as described above.

[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for determining risk animal individuals as described above.

[0017] The present invention provides a method, apparatus, device, and storage medium for determining risky animal individuals. When a target animal individual is marked as a confirmed or suspected case of disease transmission, a multi-hop path query is performed in a graph database starting from the target animal individual. This yields at least one candidate risky animal individual that is directly or indirectly associated with the target animal individual within a preset time window. For each candidate risky animal individual, a risk score is determined based on the number of interactions, behavior type, start time, and duration of the interaction. Based on these risk scores, the risky animal individual is determined from the at least one candidate risky animal individual. The graph database uses animal individuals as nodes, with the presence or absence of risky interactions between two animal individuals as edges between their corresponding nodes. The attributes of these edges are the number of interactions, behavior type, start time, and duration of the risky interaction. Based on the structured storage and multi-hop query capabilities of graph databases, it is possible to proactively and dynamically trace the potential transmission chain of diseases, rather than relying on passive identification after the onset of the disease. Therefore, it is possible to identify at-risk animal individuals in advance, thereby achieving the goal of preventing the spread of diseases in advance, enabling early disease warnings, and improving the foresight and intelligence level of disease prevention and control in group-housed animals. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is one of the flowcharts illustrating the method for determining risky animal individuals provided in an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of the structure of a graph database provided in an embodiment of the present invention.

[0021] Figure 3 This is a schematic diagram illustrating the construction process of a graph database provided in an embodiment of the present invention.

[0022] Figure 4 This is the second flowchart illustrating the method for determining risky animal individuals provided in this embodiment of the invention.

[0023] Figure 5 This is a schematic diagram of the device for identifying risky animal individuals provided in an embodiment of the present invention.

[0024] Figure 6This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0026] Currently, computer vision technology, combined with 3D pose estimation networks, can reconstruct the three-dimensional outline or skeleton of an individual animal and identify its basic behaviors such as lying down, walking, and standing. By analyzing changes in these behaviors, the health status of the animal can be determined. However, this method identifies diseased animals based on individual behavior, failing to identify at-risk animals before a large-scale outbreak, thus hindering disease early warning and resulting in a significant delay.

[0027] In view of the above-mentioned problems, this invention proposes a method for identifying risky animal individuals. In this method, risky interaction behaviors occur between animal individuals, and a graph database is constructed based on the identification results. The nodes of the graph database are each animal individual, and the edges represent risky interaction behaviors between corresponding two animal individuals. The attributes of the edges include the number of interactions, the type of behavior, the start time of the risky interaction behavior, and the duration of the risky interaction behavior between the two animal individuals. Once a target animal individual with a confirmed or suspected case is identified, it can be traced based on the graph database, thereby screening out risky animal individuals that are directly or indirectly related to the target animal individual. Thus, risky animal individuals can be identified in advance based on the interaction behaviors between animal individuals, achieving the purpose of preventing the spread of disease in advance and enabling early disease warning.

[0028] The following is combined with Figures 1 to 4 The method for determining risky animal individuals provided in this embodiment of the invention is described below. This invention can be applied to scenarios requiring automated health monitoring and disease risk early warning for group-housed animals, such as large-scale dairy / beef cattle farms, pig farms, sheep farms, and other livestock production environments. The execution entity of this method can be electronic equipment such as camera devices, terminal devices, computers, servers, server clusters, or specially designed risky animal individual determination devices. It can also be a risky animal individual determination device installed in such electronic equipment, which can be implemented through software, hardware, or a combination of both.

[0029] Figure 1 This is one of the flowcharts illustrating the method for determining risky animal individuals provided in this embodiment of the invention, such as... Figure 1 As shown, the method includes: Step 101: If the target animal individual is marked as a confirmed or suspected case of disease transmission, use the target animal individual as the starting point to perform a multi-hop path query in the graph database to obtain at least one candidate risk animal individual that is directly or indirectly related to the target animal individual within a preset time window.

[0030] The graph database uses individual animals as nodes, with the presence or absence of risky interactions between two individuals forming the edges between their corresponding nodes. The attributes of these edges include the number of interactions, the type of interaction, the start time of the risky interaction, and the duration of the risky interaction.

[0031] Specifically, within a breeding enclosure, if a target animal is identified as a confirmed or suspected case of disease transmission, in order to promptly identify the disease transmission chain and implement preventative disease control measures, a multi-hop path query can be performed in a pre-constructed graph database, starting with that target animal, to find at least one candidate at-risk animal. This multi-hop path query means that when searching for candidate at-risk animals in the graph database, the search goes beyond simply finding animals with direct risk interactions with the target animal; it also involves second-hop, third-hop, and other searches to identify animals that further engage in risk interactions with these direct contacts. Through multiple path queries, potential and indirect transmission chains can be identified, resulting in a more comprehensive pool of candidate at-risk animals.

[0032] Furthermore, candidate risk animal individuals are those that have a direct or indirect connection with the target animal individual within a preset time window. This includes animal individuals with direct risk-altering interactions with the target animal individual within the preset time window, as well as those with indirect risk-altering interactions. The preset time window allows setting the time range for the query, such as tracing contact records from the past 7 days. This avoids numerous useless queries, saves system resources, and ensures the timeliness of the query results.

[0033] Graph databases are created based on the behavior of individual animals over historical time periods. For example, by collecting video streams of individual animals over a historical period and analyzing each frame of the video stream, it can identify whether risky interactions have occurred between individual animals. This records the identifier (ID) of the animal that engaged in the risky interaction, the number of interactions, the type of behavior, the start time of the interaction, and the duration of the interaction. Using the individual animal IDs as nodes, when a risky interaction occurs between the animals corresponding to two nodes, an edge is constructed between these two nodes. The edge's attributes include the number of interactions, the type of behavior, the start time of the interaction, and the duration of the interaction.

[0034] The interaction count indicates the frequency of risky interactive behaviors between the two animal individuals within a historical period. The types of behaviors include head licking, rear end licking, and oral-rear end licking.

[0035] Figure 2 This is a schematic diagram of the structure of the graph database provided in an embodiment of the present invention, such as... Figure 2 As shown, the graph database uses a directed graph structure of nodes and edges to represent the risk interactions and disease transmission relationships between animal individuals. Each circular node represents an animal individual, and the label within the node serves as its unique identifier. The directed arrows between nodes represent edges, indicating risk interactions from one animal individual to another. The direction of the arrows indicates the initiator and receiver of the risk interaction, and the edges include attributes such as the number of interactions, the type of behavior in each interaction, the start time of each interaction, and the duration of each interaction.

[0036] When querying candidate at-risk animal individuals through graph databases, starting with the marked "sick individual", it is associated with "ID1 close contact individual" and "ID5 close contact individual" through direct risk interaction behavior. "ID1 close contact individual" and "ID5 close contact individual" are then associated with other close contact individuals (such as ID8, ID32, ID11), thereby uncovering indirect transmission chains.

[0037] Risky interactions can include species-specific, highly infectious behaviors such as licking, sniffing, and biting, and the types can be determined based on the animal species. Step 102: For each candidate risk animal individual, determine the risk score of the candidate risk animal individual based on the number of interactions, behavior type, start time and duration of the interaction.

[0038] In this step, for each queried candidate at-risk animal individual, the number of interactions, behavior type, start time, and duration are retrieved from the graph database. Based on these factors and their respective weights, a risk score is determined for each candidate at-risk animal individual. A higher risk score indicates a higher potential risk level for the candidate at-risk animal individual in the disease transmission chain.

[0039] The weights corresponding to the number of interactions, behavior type, start time, and duration can be preset or dynamically adjusted according to the actual situation. The weights can be used to characterize the importance of the corresponding parameters in the spread of the epidemic.

[0040] Step 103: Based on each risk score, identify the risk animal individuals from at least one candidate risk animal individual.

[0041] In this step, after determining the risk score for each candidate animal, those with risk scores higher than a preset score are identified as high-risk animals. The preset score can be dynamically set based on experience, the transmission characteristics of the disease, and the risk level the ranch can tolerate. For example, for highly contagious diseases, the risk score can be set to a lower value to broaden the monitoring scope and ensure no potential risks are missed; for diseases with lower transmissibility, the preset score can be increased to screen out higher-risk animal individuals.

[0042] Once the at-risk animal individuals are identified, their individual IDs will be output to facilitate precise isolation by management personnel.

[0043] The method for determining risky animal individuals provided in this invention involves, when a target animal individual is marked as a confirmed or suspected case of disease transmission, using the target animal individual as the starting point, performing a multi-hop path query in a graph database to obtain at least one candidate risky animal individual that has a direct or indirect association with the target animal individual within a preset time window. For each candidate risky animal individual, a risk score is determined based on the number of interactions, behavior type, start time, and duration of the interaction. Based on each risk score, the risky animal individual is determined from the at least one candidate risky animal individual. The graph database uses animal individuals as nodes, with the presence or absence of risky interaction behavior between two animal individuals as the edges between the corresponding nodes, and the number of interactions, behavior type, start time, and duration of the risky interaction behavior between two animal individuals as the attributes of the edges. Based on the structured storage and multi-hop query capabilities of graph databases, it is possible to proactively and dynamically trace the potential transmission chain of diseases, rather than relying on passive identification after the onset of the disease. Therefore, it is possible to identify at-risk animal individuals in advance, thereby achieving the goal of preventing the spread of diseases in advance, enabling early disease warnings, and improving the foresight and intelligence level of disease prevention and control in group-housed animals.

[0044] For example, based on the above embodiments, when determining the risk score of a candidate risk animal individual based on the number of interactions, behavior type, start time, and duration of the interaction, it can be done in the following way: From the graph database, query the number of target interactions, target behavior types, target start times, and target durations of direct or indirect risk interactions between candidate risk animal individuals and target animal individuals. Based on the target behavior type, determine the behavior type weight, which is used to characterize the degree of danger of the target behavior type to disease transmission. Based on the target start time and target duration, determine the time decay factor, which is used to characterize the degree of attenuation of the impact of direct or indirect risk interactions between candidate risk animal individuals and target animal individuals on disease transmission. Based on the number of target interactions, behavior type weights, and time decay factors, determine the risk score of candidate risk animal individuals.

[0045] Specifically, for each candidate risk animal individual found, the number of target interactions, target behavior type, target start time, and target duration corresponding to each edge will be extracted from all the associated paths between the candidate risk animal individual and the target animal individual in the graph database.

[0046] For each target behavior type corresponding to an edge, the weight of the behavior type will be determined based on the pre-defined correspondence between the behavior type and the degree of risk of disease transmission. The higher the degree of risk of disease transmission, the greater the weight of the behavior type. For example, "head-buttock licking" carries a significantly higher risk of transmission than "head-to-head licking" because it may involve contact with areas of high concentration of pathogens such as feces. Therefore, the behavior type "head-buttock licking" has the highest weight, while the behavior type "close contact with unlicked areas" has the lowest weight.

[0047] For each edge, the target start time and target duration can be used to determine the time decay factor. This time decay factor is used to characterize the degree of decay of the risk impact of risk interaction behavior on the current time of disease transmission. The earlier the target start time and the longer the target duration, the smaller the corresponding time decay factor.

[0048] Based on the target interaction count, behavior type weight, and time decay factor corresponding to each edge, the risk score corresponding to that edge can be determined. For example, the target interaction count, behavior type weight, and time decay factor can be multiplied together, and the product can be used as the risk score corresponding to that edge.

[0049] For a candidate risk animal individual, the risk score can be obtained by traversing all the associated paths between the candidate risk animal individual and the target animal individual, that is, by summing the risk scores obtained from each edge, and finally obtaining the risk score of the candidate risk animal individual.

[0050] In the above embodiments, since the weight of the behavior type can be determined based on the target behavior type, the actual impact differences of different risky interactions on disease transmission can be quantified, thereby accurately reflecting the danger of different interaction methods. Furthermore, a time decay factor can be determined based on the target's start time and duration, making the risk assessment more consistent with epidemiological patterns, i.e., recent, long-term contact has a higher potential transmission risk than long-term, short-term contact. Further, the risk score of candidate risk animal individuals can be determined based on the number of target interactions, the behavior type weight, and the time decay factor, resulting in a high accuracy of the final risk score, thus enabling a precise quantitative assessment of disease transmission risk.

[0051] For example, based on the above embodiments, in order to facilitate verification by management personnel, at least one target video segment related to the risky animal individual can be found from the video library. The video library includes multiple video segments, which are videos containing risky interactive behaviors between animal individuals. The target video segments are output in order of the occurrence time of the risky interactive behaviors contained in each target video segment from the most recent to the oldest.

[0052] Specifically, when recording risky interactions between individual animals, if a risky interaction is determined to have occurred between two individuals, in addition to recording the number of interactions, behavior type, start time, and duration to construct a graph database, video clips containing such interactions can be stored in a video library. The video library can then store the correspondence between the individual animal's ID and the video identifier of the video clip containing that individual.

[0053] After identifying at least one at-risk animal individual, at least one target video clip corresponding to the individual's identity ID can be retrieved from the video library based on the aforementioned correspondence. These target video clips contain content related to risky interactions between the at-risk animal individual and other animal individuals.

[0054] These target video clips are sorted from most recent to oldest based on the occurrence time of the risky interactions they contain. The sorted clips are then displayed in a list or timeline format on the interface. This allows managers to quickly and intuitively review the basis for risk assessments, supporting rapid decision-making.

[0055] The specific construction methods of the graph databases involved in the above embodiments will be described in detail below.

[0056] By acquiring video streams of multiple individual animals, determining the position of each animal based on each video frame, and then determining whether any two animals engage in risky interaction behavior based on their positions, and if risky interaction behavior is determined, then determining the number of interactions, the type of behavior, the start time of the interaction, and the duration of the interaction. A graph database is constructed using each animal as a node, the presence or absence of risky interaction behavior between any two animals as an edge, and the number of interactions, the type of behavior, the start time of the interaction, and the duration of the interaction as edge attributes.

[0057] Specifically, a global camera array can be deployed on the top of the animal enclosures to capture real-time video streams of multiple animals. For each video frame in the video stream captured within a historical time period, a lightweight object detection model is used to detect and track the animals within the video frames. For example, a deep learning-based object detection model (such as the YOLO series algorithms) can identify and locate the position of each animal in each frame. Subsequently, a multi-object tracking algorithm can be used to assign a persistent and unique temporary tracking ID to each detected animal and associate its motion trajectory with the video sequence, thereby determining the motion trajectory of the same animal in consecutive frames. The historical time period can be set based on experience or actual conditions, such as the past 7 days or the past half month.

[0058] Furthermore, based on the movement trajectories of individual animals, it can be determined whether risky interaction behavior occurs between any two individual animals. For example, a pre-trained action recognition model can be used to identify whether risky interaction behavior occurs between two individual animals.

[0059] When a risky interaction is identified between two individual animals, their individual IDs are determined, and the type of interaction, the start time of the interaction, and the duration of the interaction are recorded. For each risky interaction, this information is organized into a standardized time record. The event record format is {Initiator ID, Receiver ID, Behavior Type, Start Time, Duration Frames}. This event record, as a structured data unit, is uniformly written into the time-series database and the graph database. It is used to construct interaction edges with time-series attributes between nodes and also serves as the input event stream for subsequent epidemiological models. It supports operations such as filtering by time window, weighting by behavior weight, and aggregating by contact frequency, achieving a standardized transformation from raw perception to computable transmission events.

[0060] In addition, the number of interactions between two individual animals during a historical period can be recorded, and these interaction counts can also be written into the event logs mentioned above.

[0061] When constructing the graph database, each animal individual is treated as a node. When a risky interaction occurs between any two animals corresponding to any two nodes, an edge is constructed between the nodes corresponding to these two animals. The attributes of this edge include the number of interactions between the two animals, the type of interaction, the start time of the risky interaction, and the duration of the risky interaction. In this way, a graph database can be constructed as follows: Figure 2 The graph database shown.

[0062] In the above embodiments, by constructing a graph database, the contact between individual animals can be characterized in real time and accurately, thereby transforming dynamic and complex group social relationships into a structured graph database, which improves the efficiency of subsequent identification of risky individual animals.

[0063] For example, when constructing a graph database, for each individual animal, a sub-image containing the individual animal is extracted from the video frame. The sub-image is input into the individual recognition model to obtain the individual animal identification ID output by the individual recognition model. The individual recognition model is trained based on sample images of multiple sample animal individuals, using the individual animal identification IDs of each sample animal individual as labels. The individual animal identification IDs are used as nodes, and whether risky interaction occurs between any two animal individuals is used as an edge. The attributes of the risky interaction are the number of interactions, the type of behavior, the start time of the risky interaction, and the duration of the risky interaction. The graph database is constructed in this way.

[0064] Specifically, multiple sample images of individual animals in the breeding pens are collected. These images are taken from multiple angles or contain unique features, such as facial features or side profiles. For dairy cows, images of back patterns can also be collected. Each sample image is pre-labeled with the individual animal's ID, which serves as the image's tag. These multiple sample images are input into an initial individual recognition model to obtain predicted IDs. The predicted IDs are compared with the tag information to obtain loss information. Based on this loss information, the model parameters of the initial individual recognition model are adjusted. This process is repeated until the loss information is minimized or the preset number of iterations is reached. The final model obtained is then determined as the individual recognition model.

[0065] When constructing nodes in the graph database, for each individual animal, a sub-image containing that individual animal can be extracted from the video frame and input into the trained individual recognition model to obtain the predicted identity ID of the individual animal output by the individual recognition model. The predicted identity ID of each individual animal is then used as a node in the graph database.

[0066] The above methods enable contactless and automated identification of individual animals, and based on this, a graph database of nodes with clear identification can be constructed, thereby ensuring the accuracy of subsequent transmission chain tracing.

[0067] For example, based on the above embodiments, when determining whether risky interaction behavior occurs between any two animal individuals based on the location of each animal individual, the distance between any two animal individuals can be determined based on the location of each animal individual. Two animal individuals whose distance is less than a preset distance threshold are identified as candidate animal individual pairs. Based on a key point recognition network, the mouth key points and buttock key points of each animal individual in the candidate animal individual pair are determined. The region of interest (ROI) image is determined from the video frame. After the ROI image contains the mouth key points and buttock key points of each animal individual in the candidate animal individual pair, the risky interaction behavior between the candidate animal individual pairs is determined based on the ROI images of the candidate animal individual pairs in each video frame.

[0068] Specifically, Figure 3 This is a schematic diagram of the graph database construction process provided in an embodiment of the present invention, such as... Figure 3 As shown, after determining the position of each individual animal based on the acquired image frames, the distance between any two individual animals is determined based on their positions. For example, the distance between the center points of any two individual animals can be determined. When the distance is less than a preset distance threshold H, it indicates that the two individual animals may come into contact. To reduce the amount of computational data, two individual animals with a distance less than the preset distance threshold H can be identified as candidate pairs. Subsequent further evaluation can be performed only on the selected candidate pairs.

[0069] For each candidate animal pair, a pre-trained keypoint recognition network can be invoked to identify the mouth and rump keypoints of each animal in the candidate pair, and to crop the Region of Interest (ROI) image from each video frame. For example, Figure 3 As shown in ROI_1 and ROI_2, the cropped ROI images contain the mouth keypoints and buttock keypoints of each animal in the candidate animal pair.

[0070] For any candidate animal pair, based on multiple frames of ROI images containing that pair, the actions of the two animals in the candidate pair can be identified through edge computing units and a cloud server to determine whether a risky interaction has occurred between them. If a risky interaction is identified, the two animals in the candidate pair will be identified by their IDs, and the type of interaction, start time, and keyframes containing the risky interaction will be recorded. The interaction chain will then be generated through a group-raised animal disease early warning and monitoring system, thereby constructing a graph database.

[0071] In this embodiment, identifying candidate animal pairs effectively reduces subsequent computational load and saves system resources. Furthermore, cropping the ROI image eliminates irrelevant content, focusing the identification on key body parts where interaction may occur (such as the mouth and buttocks). This significantly reduces the computational complexity of subsequent models while greatly improving the accuracy and robustness of risky interactive behavior identification.

[0072] For example, when determining whether risky interaction behavior occurs between candidate animal pairs based on the ROI images of candidate animal individuals in each video frame, the ROI images corresponding to each of the multiple video frames can be input into the temporal action recognition model to obtain the behavior recognition result output by the temporal action recognition model. The behavior recognition result is used to characterize whether risky interaction behavior occurs between candidate animal pairs. The temporal action recognition model is trained on an initial temporal action recognition model based on a sample video containing two sample animal individuals, with the label of whether the two sample animal individuals have engaged in risky interaction behavior.

[0073] Specifically, multiple sample videos can be collected in advance, each containing two individual animal samples. The sample videos are labeled according to whether the two individual animal samples engage in risky interaction behavior. If risky interaction behavior occurs, the behavior type also needs to be labeled to obtain tag information.

[0074] Multiple sample videos are input into an initial temporal action recognition model to obtain the predicted behavior recognition results output by the initial temporal action recognition model. This predicts whether two sample animal individuals will engage in risky interaction behavior. If risky interaction behavior occurs, the predicted interaction type is also output. After obtaining loss information based on the predicted behavior recognition results and label information, the model parameters of the initial temporal action recognition model can be adjusted according to the loss information. The above process is repeated until the loss information is minimized or the number of repetitions reaches a preset number. The final model obtained is then determined as the temporal action recognition model.

[0075] After obtaining multiple ROI images, a lightweight tracking algorithm is used to maintain the stability of the ROI images. These multiple ROI images are then input into the pre-trained temporal action recognition model to obtain the behavior recognition results output by the model. These results include whether risky interaction occurred between candidate animal pairs and, if so, the type of interaction. The interaction types are categorized into four types: a. Head-to-head interaction without licking; b. Head-to-head interaction with licking; c. Head-to-hip interaction with licking; d. No dangerous behavior occurred.

[0076] In addition, after obtaining the above behavior recognition results, keyframe video clips with interaction types including a, b, and c can be automatically stored, which can facilitate staff to trace and confirm the epidemic in the future.

[0077] In this embodiment, a temporal action recognition model is used to identify whether risky interactive behaviors occur between candidate animal pairs. This model can accurately identify dynamic and continuous interactive actions such as "licking," rather than relying solely on static spatial relationships, thereby greatly improving the accuracy and reliability of risky interactive behavior recognition.

[0078] In the above embodiments, the high-precision model can be activated again when necessary for the target detection model, individual recognition model and temporal action recognition model. For example, when candidate animal pairs have been screened out by distance threshold and it is necessary to accurately confirm their identities and classify high-risk behaviors, the high-precision model can be used to effectively control the computational load.

[0079] Figure 4 This is a second schematic flowchart of the method for determining risky animal individuals provided in an embodiment of the present invention, as shown below. Figure 4 As shown, taking dairy cows as an example, nine high-definition global shutter network cameras are deployed at the four corners and center of the top of a dairy farm's cow pen (approximately 30 m × 20 m), with a frame rate of 25 fps and a resolution of 1920 × 1080, forming a seamless coverage. The captured video streams are input to an edge computing unit and a cloud server (NVIDIA Jetson AGX Orin). Using the YOLOv8 individual cow detection model combined with ByteTrack, multi-target tracking is achieved, outputting the coordinates of each cow. When the center-to-center distance between any two cows is less than a preset distance threshold of 1.2 meters (H = 1.2 m), the HRNet-W48 keypoint model is used to locate the heads and hindquarters of these two cows. A Region of Interest (ROI) image is cropped from each frame, and this ROI image is tracked by DeepSORT. Multiple frames of ROI images are input into the TimeSformer-Lite action recognition network to identify licking behavior.

[0080] Cattle IDs are matched to a registration library using a fine-grained pattern recognition model based on a ResNet-50 backbone (10 back images are collected for each cattle). Each interaction event is recorded as structured data, including initiator ID, receiver ID, behavior type, start time, and duration (number of frames). This data is then written into the Neo4j graph database of the cattle disease early warning and monitoring system using Cypher statements. A graph database is constructed, and keyframes containing risky interaction behaviors are stored to support web-based visualization and querying. This graph database can provide close contact tracing data for diseases such as foot-and-mouth disease that are transmitted through licking.

[0081] After a sick cow appears in a dairy farm, the graph database can be used to trace at-risk animal individuals who have had direct or indirect contact with the sick cow. This breaks through the passive model of "first the disease occurs, then the tracing occurs" and advances the warning window to the moment the behavior occurs, which helps to improve the timeliness of prevention and control.

[0082] This invention achieves automatic identification and dynamic early warning of risky social behaviors and transmission risks in group-housed animals, outperforming traditional methods that rely on manual observation or wearable devices. Furthermore, it eliminates the need to equip each individual animal with a sensor, reducing hardware costs and animal stress. The hierarchical perception architecture ensures operational stability in complex group-housed scenarios. The introduction of a graph database makes the construction of transmission chains efficient and intuitive, supporting rapid decision-making by farm managers. In addition, this invention is highly practical and has broad prospects for widespread application.

[0083] The apparatus for identifying risky animal individuals provided by the present invention will be described below. The apparatus for identifying risky animal individuals described below can be referred to in correspondence with the method for identifying risky animal individuals described above.

[0084] Figure 5 This is a schematic diagram of the structure of the device for determining individual animals at risk provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the device 500 for identifying the individual animal at risk includes: The query module 11 is used to perform multi-hop path queries in the graph database when the target animal individual is marked as a confirmed or suspected case of disease transmission, starting from the target animal individual, to obtain at least one candidate risk animal individual that is directly or indirectly related to the target animal individual within a preset time window. The graph database is defined as follows: each animal individual is a node, the edge between the nodes corresponding to the two animal individuals is defined as whether a risk interaction occurs between the two animal individuals, and the attributes of the edge are the number of interactions, the type of behavior, the start time of the risk interaction, and the duration of the risk interaction between the two animal individuals. The determination module 12 is used to determine the risk score of each candidate risk animal individual based on the number of interactions, behavior type, start time and duration of the candidate risk animal individual. The determining module 12 is further configured to determine a risk animal individual from at least one of the candidate risk animal individuals based on each of the risk scores.

[0085] In one example embodiment, the determining module 12 is specifically used for: From the graph database, query the number of target interactions, target behavior types, target start time, and target duration of direct or indirect risk interaction behaviors between the candidate risk animal individual and the target animal individual; Based on the target behavior type, a behavior type weight is determined, which is used to characterize the degree of danger that the target behavior type poses to the spread of the disease; Based on the target start time and the target duration, a time decay factor is determined. The time decay factor is used to characterize the degree of decay of the impact of the risk interaction behavior that occurs directly or indirectly between the candidate risk animal individual and the target animal individual on the spread of the disease. The risk score of the candidate risk animal individual is determined based on the target interaction count, the behavior type weight, and the time decay factor.

[0086] In one example embodiment, the device further includes an output module, wherein: The query module 11 is further configured to search for at least one target video segment related to the risky animal individual from the video library, wherein the video library includes multiple video segments, and the video segments are videos containing risky interactive behaviors between animal individuals; The output module is used to output each of the target video segments in order of the occurrence time of the risky interactive behaviors contained in each target video segment from the most recent to the oldest.

[0087] In one example embodiment, the apparatus further includes an acquisition module and a construction module, wherein: The acquisition module is used to acquire video streams from multiple individual animals; The determining module 12 is further configured to determine the position of each individual animal based on each video frame in the video stream; The determining module 12 is also used to determine, based on the location of each of the animal individuals, whether risky interaction behavior has occurred between any two animal individuals; The determining module 12 is further configured to, when it is determined that there is a risk interaction behavior between two animal individuals, determine the number of interactions, the type of behavior, the start time of the risk interaction behavior, and the duration of the risk interaction behavior. The construction module is used to construct the graph database with each of the animal individuals as nodes, whether risk interaction occurs between any two animal individuals as an edge, and the number of interactions, behavior type, start time of the risk interaction, and duration of the risk interaction as edge attributes.

[0088] In one example embodiment, the determining module 12 is specifically used for: Based on the location of each of the animal individuals, determine the distance between any two animal individuals; Two animal individuals whose distance is less than a preset distance threshold are identified as candidate animal pairs; Based on the key point recognition network, the mouth key points and buttock key points of each animal in the candidate animal pair are determined; A region of interest (ROI) image is determined from the video frame, the ROI image containing the mouth key points and buttock key points of each animal individual in the candidate animal pair; Based on the ROI images of the candidate animal pairs in each of the video frames, it is determined whether risky interaction behavior occurs between the candidate animal pairs.

[0089] In one example embodiment, the determining module 12 is specifically used for: The ROI images corresponding to each of the multiple video frames are input into the temporal action recognition model to obtain the behavior recognition result output by the temporal action recognition model. The behavior recognition result is used to characterize whether risky interaction behavior occurs between the candidate animal individuals. The temporal action recognition model is trained based on sample videos containing two sample animal individuals, with whether the two sample animal individuals have risky interaction behavior as the label.

[0090] In one example embodiment, the construction module is specifically used for: For each of the aforementioned individual animals, a sub-image containing that individual animal is extracted from the video frame; The sub-image is input into the individual recognition model to obtain the animal individual's identity ID output by the individual recognition model. The individual recognition model is trained based on sample images of multiple sample animal individuals, with the identity ID of each sample animal individual as a label. The graph database is constructed by using the individual animal IDs as nodes, whether risky interaction occurs between any two individual animals as edges, and the number of interactions, behavior type, start time of the risky interaction, and duration of the risky interaction as edge attributes.

[0091] The apparatus of this embodiment can be used in any embodiment of the method for determining individual animals at risk. Its specific implementation process and technical effects are similar to those in the method for determining individual animals at risk. For details, please refer to the detailed description in the method for determining individual animals at risk, which will not be repeated here.

[0092] Figure 6 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as... Figure 6 As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other through the communications bus 640. The processor 610 can call logical instructions in the memory 630 to execute a method for determining risky animal individuals. This method includes: when a target animal individual is marked as a confirmed or suspected case of disease transmission, performing a multi-hop path query in a graph database, starting with the target animal individual, to obtain at least one candidate risky animal individual that is directly or indirectly associated with the target animal individual within a preset time window. The graph database uses animal individuals as nodes, with the presence or absence of risky interaction behavior between two animal individuals as the edges between the corresponding nodes, and the interaction frequency, behavior type, start time, and duration of the risky interaction behavior between the two animal individuals as the attributes of the edges; for each candidate risky animal individual, determining a risk score based on the interaction frequency, behavior type, start time, and duration; and determining a risky animal individual from at least one candidate risky animal individual based on each risk score.

[0093] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, 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 computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. 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.

[0094] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for determining risky animal individuals provided by the above methods. The method includes: when a target animal individual is marked as a confirmed or suspected case in the spread of an epidemic, using the target animal individual as the query starting point, performing a multi-hop path query in a graph database to obtain at least one candidate risky animal individual that is directly or indirectly associated with the target animal individual within a preset time window. The graph database uses each animal individual as a node, with whether a risky interaction occurs between two animal individuals as the edge between the nodes corresponding to the two animal individuals, and the interaction frequency, behavior type, start time of the risky interaction, and duration of the risky interaction between the two animal individuals as the attributes of the edge; for each candidate risky animal individual, determining a risk score for the candidate risky animal individual based on the interaction frequency, behavior type, start time, and duration of the candidate risky animal individual; and determining a risky animal individual from at least one candidate risky animal individual based on each risk score.

[0095] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for determining risky animal individuals provided by the above methods. This method includes: when a target animal individual is marked as a confirmed or suspected case of disease transmission, performing a multi-hop path query in a graph database, using the target animal individual as the query starting point, to obtain at least one candidate risky animal individual that is directly or indirectly associated with the target animal individual within a preset time window. The graph database uses each animal individual as a node, with the presence or absence of risky interaction behavior between two animal individuals as the edge between the nodes corresponding to the two animal individuals, and the interaction frequency, behavior type, start time of the risky interaction behavior, and duration of the risky interaction behavior between the two animal individuals as attributes of the edge; for each candidate risky animal individual, determining a risk score for the candidate risky animal individual based on the interaction frequency, behavior type, start time, and duration of the candidate risky animal individual; and determining a risky animal individual from at least one of the candidate risky animal individuals based on each risk score.

[0096] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0097] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining at-risk animal individuals, characterized in that, include: When a target animal individual is marked as a confirmed or suspected case of disease transmission, a multi-hop path query is performed in the graph database starting from the target animal individual to obtain at least one candidate risk animal individual that is directly or indirectly associated with the target animal individual within a preset time window. The graph database is defined as follows: each animal individual is a node, and whether a risk interaction occurs between two animal individuals is defined as the edge between the nodes corresponding to the two animal individuals. The attributes of the edge are the number of interactions, the type of behavior, the start time of the risk interaction, and the duration of the risk interaction between the two animal individuals. For each candidate risk animal individual, a risk score is determined based on the number of interactions, behavior type, start time, and duration of the interaction. Based on each of the aforementioned risk scores, risk animal individuals are identified from at least one of the aforementioned candidate risk animal individuals.

2. The method for determining risky animal individuals according to claim 1, characterized in that, The process of determining the risk score of the candidate risk animal individual based on the number of interactions, behavior type, start time, and duration of the interaction includes: From the graph database, query the number of target interactions, target behavior types, target start time, and target duration of direct or indirect risk interaction behaviors between the candidate risk animal individual and the target animal individual; Based on the target behavior type, a behavior type weight is determined, which is used to characterize the degree of danger that the target behavior type poses to the spread of the disease; Based on the target start time and the target duration, a time decay factor is determined. The time decay factor is used to characterize the degree of decay of the impact of the risk interaction behavior that occurs directly or indirectly between the candidate risk animal individual and the target animal individual on the spread of the disease. The risk score of the candidate risk animal individual is determined based on the target interaction count, the behavior type weight, and the time decay factor.

3. The method for determining risky animal individuals according to claim 1, characterized in that, The method further includes: Find at least one target video clip related to the at-risk animal individual from a video library, the video library including multiple video clips, the video clips being videos containing risky interactive behaviors between animal individuals; Output each target video segment in order of the occurrence time of the risky interactive behavior contained therein, from most recent to oldest.

4. The method for determining risky animal individuals according to any one of claims 1-3, characterized in that, The method further includes: Acquire video streams for multiple individual animals; For each video frame in the video stream, the position of each individual animal is determined based on the video frame; Based on the location of each of the animal individuals, determine whether risky interaction behavior occurs between any two animal individuals; If it is determined that there is a risk interaction behavior between two individual animals, determine the number of interactions, the type of behavior, the start time of the risk interaction behavior, and the duration of the risk interaction behavior; The graph database is constructed using each of the animal individuals as nodes, whether risky interaction occurs between any two animal individuals as an edge, and the number of interactions, the type of behavior, the start time of the risky interaction, and the duration of the risky interaction as edge attributes.

5. The method for determining risky animal individuals according to claim 4, characterized in that, The determination of whether risky interaction behavior occurs between any two animal individuals based on their locations includes: Based on the location of each of the animal individuals, determine the distance between any two animal individuals; Two animal individuals whose distance is less than a preset distance threshold are identified as candidate animal pairs; Based on the key point recognition network, the mouth key points and buttock key points of each animal in the candidate animal pair are determined; A region of interest (ROI) image is determined from the video frame, the ROI image containing the mouth key points and buttock key points of each animal individual in the candidate animal pair; Based on the ROI images of the candidate animal pairs in each of the video frames, it is determined whether risky interaction behavior occurs between the candidate animal pairs.

6. The method for determining risky animal individuals according to claim 5, characterized in that, The step of determining whether risky interaction behavior occurs between candidate animal pairs based on the ROI images of the candidate animal individuals in each of the video frames includes: The ROI images corresponding to each of the multiple video frames are input into the temporal action recognition model to obtain the behavior recognition result output by the temporal action recognition model. The behavior recognition result is used to characterize whether risky interaction behavior occurs between the candidate animal individuals. The temporal action recognition model is trained based on sample videos containing two sample animal individuals, with whether the two sample animal individuals have risky interaction behavior as the label.

7. The method for determining risky animal individuals according to claim 4, characterized in that, The graph database is constructed using each of the animal individuals as nodes, with the presence or absence of risky interaction behavior between any two animal individuals as an edge, and the number of interactions, behavior type, start time of the risky interaction behavior, and duration of the risky interaction behavior as edge attributes, including: For each of the aforementioned individual animals, a sub-image containing that individual animal is extracted from the video frame; The sub-image is input into the individual recognition model to obtain the animal individual's identity ID output by the individual recognition model. The individual recognition model is trained based on sample images of multiple sample animal individuals, with the identity ID of each sample animal individual as a label. The graph database is constructed by using the individual animal IDs as nodes, whether risky interaction occurs between any two individual animals as edges, and the number of interactions, behavior type, start time of the risky interaction, and duration of the risky interaction as edge attributes.

8. A device for identifying an individual animal at risk, characterized in that, include: The query module is used to perform multi-hop path queries in a graph database when a target animal individual is marked as a confirmed or suspected case of disease transmission. Starting from the target animal individual, the module obtains at least one candidate risk animal individual that is directly or indirectly associated with the target animal individual within a preset time window. The graph database is defined as follows: each animal individual is a node, the edge between the nodes of the two animal individuals is defined as whether a risk interaction occurs between the two animal individuals, and the attributes of the edge are the number of interactions, the type of behavior, the start time of the risk interaction, and the duration of the risk interaction. The determination module is used to determine the risk score of each candidate risk animal individual based on the number of interactions, behavior type, start time, and duration of the candidate risk animal individual. The determining module is further configured to determine a risk animal individual from at least one of the candidate risk animal individuals based on each of the risk scores.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method for determining risk animal individuals as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for determining risk animal individuals as described in any one of claims 1 to 7.