Donkey automatic grouping and holding method and system

By fusing multi-sensor data through video surveillance and edge computing technologies, precise grouping and low-stress restraint in donkey farming have been achieved, solving the problems of high missed detection rate and frequent stress reactions in existing technologies, and improving the reliability and efficiency of the system.

CN121713872APending Publication Date: 2026-03-24SHAN DONG DONG E E JIAO
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies are insufficient for achieving precise grouping and low-stress restraint in large-scale donkey farming, especially for efficient handling of various abnormal conditions such as disease and injury. Furthermore, existing devices rely on manual judgment and have a fragile network environment, resulting in high false negative rates, frequent stress reactions, and high personnel safety risks.

Method used

By introducing video surveillance, donkey monitoring collars, and edge computing technology, a multi-sensor data fusion and local decision-making mechanism is constructed to collect donkey identity, physiological, and image data in real time, use neural network models for anomaly identification, and independently execute group control when the network is interrupted.

Benefits of technology

It significantly improves the anomaly detection rate and system response speed, reduces the risk of missed detections and misjudgments, has the ability to operate continuously in weak network/no network conditions, and improves the reliability and clustering accuracy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121713872A_ABST
    Figure CN121713872A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic donkey grouping and restraint method and system, and the method and system effectively improve the anomaly detection rate and the system response speed through the multi-sensing information fusion and edge side real-time calculation, reduce the missed detection and misjudgment risks, achieve the low-stress restraint, and improve the reliability of the system. And meanwhile, the weak network / network-free sustainable operation capability is realized, and the grouping efficiency and the system reliability are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of automated livestock breeding equipment, and in particular relates to a method and system for automatic grouping and restraining of donkeys that integrates the Internet of Things, edge computing and multi-sensor data fusion. Background Technology

[0002] In large-scale donkey farming, precise grouping based on health status and low-stress restraint are core elements for achieving refined management and ensuring farming efficiency. As the scale of farming expands, traditional manual methods and existing technologies are no longer sufficient to meet the needs of efficient handling of diverse abnormal conditions such as disease, injury, and lameness, highlighting increasingly prominent technological bottlenecks.

[0003] Traditional management methods rely on manual inspections to assess the health of donkeys. This not only consumes a significant amount of manpower but is also limited by differences in staff experience and workload, resulting in a missed inspection rate of around 30%. This makes it difficult to detect and intervene in abnormal conditions in a timely manner. After grouping, simply restraining the donkeys by manually driving them is highly likely to trigger stress reactions, leading to resistance and a high risk of kicking injuries to operators. According to actual farming data, the rate of donkey stress-induced kicking injuries has reached 12.7%, seriously threatening the personal safety of farmers.

[0004] To improve this situation, some automated livestock grouping and restraint devices have emerged in the industry. For example, the rapid livestock grouping device disclosed in patent CN208095592U achieves grouping through a central guiding mechanism and multiple sets of guiding gates, and is equipped with mazes and restraint devices to reduce stress responses. However, this device is not equipped with a health status recognition module, and can only achieve general grouping. It cannot accurately triage livestock based on specific health abnormalities such as diseases or injuries, and the grouping decision relies entirely on manual judgment, which still suffers from low efficiency and high subjectivity.

[0005] For donkey farming, patent CN205284520U proposes a comprehensive donkey shed for easy grouping. It uses RFID cards to identify donkeys and a central control computer to control the opening and closing of grouping doors, guiding donkeys to different functional areas such as breeding rooms and treatment / immunization rooms. While this device automates identification and targeted grouping, its status judgment relies on static information in a preset database, lacking dynamic perception of the donkeys' real-time status. It cannot identify abnormal situations not recorded in the system, such as sudden illness or temporary lameness, resulting in insufficient targeting and timeliness of grouping. Furthermore, its control system does not consider fluctuations in the farm's network environment; a network outage will directly halt the grouping operation.

[0006] Patent CN222583288U discloses a donkey body measurement cage and penning system that automates the body measurement process by acquiring donkey body shape parameters through a weight sensor and image acquisition unit. However, this system only focuses on body shape data acquisition and does not integrate key health indicators such as body temperature and behavioral characteristics, making it unable to form a comprehensive health status assessment result and difficult to support accurate grouping decisions based on multiple abnormal states. In addition, the device does not have a dedicated restraint mechanism, and donkeys still need to be transferred to other equipment for further processing after grouping, increasing operational complexity and the risk of stress to the donkeys.

[0007] Other related technologies, such as the free-range livestock herd tracking and positioning device proposed in patent CN117233695A, can achieve real-time tracking of donkey locations, but are limited to positioning functions and lack the ability to group and restrain animals, thus failing to form a complete "identification-grouping-restraint" processing chain. While machine vision-based health recognition algorithms and intelligent grouping equipment already used in pig farming demonstrate excellent performance in health monitoring accuracy and automation, they cannot be directly applied to donkey farming scenarios due to significant differences in physiological characteristics and behavioral patterns between donkeys and pigs.

[0008] In summary, existing patented technologies either lack the ability to dynamically identify health status, can only handle single types of anomalies, or rely on a stable network environment and have not formed a complete processing flow. All of these are insufficient to meet the integrated needs of grouping and low-stress restraint in large-scale donkey farming. Therefore, developing a grouping and restraint technology for large-scale donkey farming has become a critical issue that the industry urgently needs to address. Summary of the Invention

[0009] To address the aforementioned issues, this invention provides an automatic grouping and restraint method and system for donkeys. By introducing video surveillance, donkey monitoring collars, and edge computing technology, a multi-sensor data fusion and local decision-making mechanism is constructed, significantly improving the accuracy of grouping and the reliability of the system.

[0010] To achieve the above objectives, the present invention provides a method for automatic grouping and restraining of donkeys, comprising the following steps: S100, the donkey breeding area is preset as a waiting area, a first area and a second area, with the second area including the Baoding area; S200: Real-time acquisition of donkey identification, physiological data and image data in the waiting area to obtain multimodal data of the donkeys with the identification; S300, using a preset donkey grouping model to perform fusion calculations on the multimodal data of the donkeys, determine and identify the state of the donkeys and output the grouping category, which includes normal and abnormal. S400: When the grouping category is normal, open the channel between the waiting area and the first area, and close the channel between the waiting area and the second area, guiding the donkeys with the identified identity from the waiting area to the first area; when the grouping category is abnormal, open the channel between the waiting area and the second area, and close the channel between the waiting area and the first area, guiding the donkeys with the corresponding identified identity from the waiting area to the second area. S500, guide the donkeys from the second area to Baoding area for processing.

[0011] In some of these implementations, the physiological data includes heart rate, body temperature, activity level, and / or weight, and the image data is video and / or images.

[0012] Preferably, in some embodiments, before step S300, the method further includes: Acquire donkey physiological history data and donkey image history data, label the donkey physiological history data and donkey image history data to obtain a training dataset, and use the training dataset to train the initial model to obtain the preset donkey grouping model.

[0013] In some implementations, labeling donkey image history data includes labeling behaviors such as lying down to rest, standing to rest, walking, running, lameness, scratching, eating, drinking, refusing to eat, interacting, attacking, remaining still, circling repeatedly, falling down, and being in heat. Labeling donkey physiological history data includes associating donkey physiological history data with behaviors in donkey image history data through donkey identification, and aligning the labeled physiological data with the behavior labels in the image history data.

[0014] For example, In some of these implementations, the pre-defined donkey grouping model is a neural network model, preferably a YOLOv model or a MobileNet model.

[0015] Another aspect of the present invention provides an automatic grouping and restraint system for donkeys, including a waiting area channel (1), a normal donkey feeding area, an abnormal donkey feeding area, an identification device, an image acquisition device, a donkey physiological data monitoring device, and an edge computing box; The feeding area for donkeys with abnormal feeding habits includes a separate restraint pen; The normal donkey feeding area and the abnormal donkey feeding area are isolated from each other, and the waiting area passage can be selectively connected to the normal donkey feeding area or the abnormal donkey feeding area through a switching device. The identification device includes an RFID reader / writer installed in the waiting area passage and an RFID tag installed on the donkey's body to identify the donkey's identity. The image acquisition device is set in the normal donkey feeding area and the abnormal donkey feeding area to collect image data of donkey behavior in real time. The donkey physiological data monitoring device is worn on the donkey, and the physiological data includes heart rate, body temperature, and activity level. The edge computing box is communicatively connected to the recognition device, the image acquisition device, the donkey physiological data monitoring device, and the switching device.

[0016] The edge computing box has a built-in preset donkey grouping model, which includes an abnormal behavior recognition model and a multi-data fusion decision module. It can independently perform donkey grouping control when the network is interrupted, and control the switching device to act according to the grouping result. When the donkey grouping is normal, the switching device connects the normal donkey feeding area and the waiting area channel; or, when the donkey grouping is abnormal, the switching device connects the abnormal donkey feeding area and the waiting area channel. The abnormal behavior recognition model is built on an improved Yolov5s network architecture and incorporates prior knowledge of donkey behavior. The abnormal behavior recognition model is configured to extract features from donkey video data acquired by the image acquisition device using a convolutional neural network (CNN) and output a 128-dimensional donkey video feature vector. The multi-data fusion decision module receives the donkey video feature vector output by the abnormal behavior recognition model. First, it uses an attention mechanism to calculate the correlation weight between the donkey video features and the physiological data features. Then, it concatenates the weighted video features and the physiological data features to obtain a fused feature vector. It uses Bayes' theorem to fuse the state probability of the fused features with the abnormal probability of the image data and outputs the final posterior probability of the state. By comparing it with a preset threshold, it outputs whether the donkey group is normal or abnormal.

[0017] The specific configuration of the multiple data fusion decision module is as follows: The attention mechanism adopts the CBAM attention mechanism to calculate the correlation weights between video features and physiological features, as shown in the following formula: Where V represents video features and P represents physiological features. , The weight matrix is ​​a learnable matrix. , Here, σ is the bias term, sigmoid activation function, CNN(V) uses a convolutional neural network to extract features from the input V, LSTM(P) uses a long short-term memory network to extract temporal features from the input sequence P, and GAP is a global average pooling layer. The donkey video feature map CNN(V) extracted by CNN is input into the global average pooling layer, and after calculating the global mean in the channel dimension, a low-dimensional global feature vector of the video is output. The weights representing video features. The weights represent the physiological features, and their sum is 1; Feature concatenation: The weighted video features are concatenated with the physiological features to obtain a fused feature vector: Ffusion = Concat( ⋅V, ⋅P) Where Concat is the concatenation operation, and Ffusion is the fused feature vector with a dimension of 256; Decision-level fusion utilizes Bayes' theorem to fuse the state probability of the fused features with the anomaly probability of the image data, and uses the image data to correct and enhance the fuzzy inference results of the fused features, as shown in the following formula: Where S represents the donkey's state, A represents the fusion feature (Ffusion), and I represents the image data. P(S|A) is the posterior probability of the fusion feature, P(I|S,A) is the likelihood probability of the image data under state S and fusion feature A, P(I|A) is the normalization constant, and P(S|A,I) is the final posterior probability of the state. An anomaly threshold is set; if P(S=anomaly|A,I) ≥ the threshold, the donkey's state is determined to be abnormal; otherwise, it is determined to be normal.

[0018] It also includes using an online learning mechanism to dynamically adjust the weights of video features and physiological features: in, Let be the attention weights of the video features during the t-th training iteration. The attention weights are the attention weights of the video features updated in the (t+1)th iteration; η is the learning rate. This is a true label for the donkey's condition. The donkey state predicted by the model (i.e., P(S|A,I)); Attention weights for video features in the predicted values The partial derivatives, The updated physiological characteristic weights.

[0019] If the prediction accuracy of one feature is higher than that of another feature, the weight of that feature is increased; if the prediction accuracy of one feature decreases, the weight of that feature is decreased.

[0020] In some embodiments, the normal donkey feeding area and the abnormal donkey feeding area are separated from each other by an isolation fence. An entrance to the normal donkey feeding area is set at the end of the isolation fence near the side of the normal donkey feeding area, and an entrance to the abnormal donkey feeding area is set at the end of the isolation fence near the side of the abnormal donkey feeding area. The entrances to the normal donkey feeding area and the abnormal donkey feeding area are connected to the waiting area passage through a switching device.

[0021] In some embodiments, the switching device is a revolving door, which can selectively connect the entrance to the normal donkey feeding area or the entrance to the abnormal donkey feeding area with the waiting area passage by rotating the revolving door. Alternatively, the switching device can be a dual-channel gate, which selectively connects the entrance to the normal donkey feeding area or the entrance to the abnormal donkey feeding area with the waiting area channel by switching the dual-channel gate.

[0022] In some embodiments, the image acquisition device is a video monitoring device, and / or the donkey physiological data monitoring device is a donkey monitoring collar. As a preferred embodiment, the donkey monitoring collar incorporates an accelerometer, a heart rate sensor, and a temperature sensor, and the collar data is transmitted wirelessly to an edge computing box.

[0023] In some implementations, a weight sensor is also provided on the waiting area path, and the weight sensor is communicatively connected to the edge computing box.

[0024] In some implementations, the edge computing box has a built-in preset donkey grouping model, which includes an abnormal behavior recognition model and a multi-data fusion decision module, enabling it to independently perform donkey status judgment and grouping control when the network is interrupted.

[0025] In some implementations, the abnormal behavior recognition model includes embedding prior knowledge of donkey behavior. This prior knowledge includes labeling historical donkey image data. The labeling of historical donkey image data includes labeling behaviors such as lying down to rest, standing to rest, walking, running, lameness, scratching, eating, drinking, refusing to eat, interacting, attacking, remaining still, repeatedly circling, falling down, and being in heat. A training dataset is obtained by associating the behaviors in the historical donkey image data with the donkey's identity identifier, and the model is trained using the training dataset to obtain the abnormal behavior recognition model.

[0026] In some implementations, the edge computing box is connected to a cloud server to upload local data and judgment results to the cloud server for model optimization and data backup.

[0027] Furthermore, the video monitoring device includes multiple high-definition cameras and an infrared supplementary lighting module to achieve 24-hour uninterrupted monitoring, covering key areas of donkey activity (such as the normal donkey feeding area, the abnormal donkey feeding area, and the area next to the feed trough).

[0028] In some embodiments, a feed trough is provided behind the feeding area of ​​the abnormal donkey, the outlet of the independent restraint pen is connected to the feed trough, the entrance of the independent restraint pen is provided with an electric lifting door, and a first infrared sensor is provided above the feed trough to detect the presence of donkeys.

[0029] In some of these implementations, the electric lifting door closes automatically based on a signal detected by a first infrared sensor indicating the continued presence of a donkey.

[0030] In some of these implementations, an exit gate and a second infrared sensor are provided in front of the normal donkey feeding area. When the second infrared sensor detects that a donkey is approaching, the exit gate opens automatically.

[0031] The technical solution of the present invention has at least the following beneficial effects: This invention constructs a multi-sensor data fusion and local decision-making mechanism through multi-sensor information fusion and real-time edge computing, which effectively improves the anomaly detection rate and system response speed, reduces the risk of missed detection and misjudgment, and has the ability to operate continuously in weak network / no network conditions, significantly improving system reliability.

[0032] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0033] Figure 1 A general schematic diagram of an automatic donkey grouping and restraint system provided for some exemplary embodiments of this application; Figure 2 A schematic diagram of a video monitoring device for an automatic donkey grouping and restraint system provided as an example of some embodiments of this application; Figure 3 A schematic diagram of a donkey monitoring collar provided for an automatic donkey grouping and restraint system, which is an exemplary embodiment of this application; Figure 4 Schematic diagram of an edge computing box for an automatic donkey grouping and restraint system provided as an example of some embodiments of this application; Figure 5 A flowchart illustrating the steps of an automatic grouping and restraint method for donkeys provided as an exemplary embodiment of this application.

[0034] Figure label: 1-Waiting area passage; 2-Control cabinet; 3-Identification device; 31-RFID reader / writer; 32-RFID tag; 4-Weight sensor; 5-Balancing fence; 6-Electric lifting gate; 7-First infrared sensor; 8-Exit gate; 9-Entrance to normal donkey feeding area; 10-Revolving door; 11-Entrance to abnormal donkey feeding area; 12-Normal donkey feeding area; 13-Abnormal donkey feeding area; 14-Isolation fence; 15-Feed trough; 16-Video monitoring device; 17-Donkey monitoring collar; 18-Edge computing box. Detailed Implementation

[0035] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0036] Unless otherwise specified, the methods used in the embodiments of this invention are conventional methods; the materials, equipment, systems, etc. used are all commercially available unless otherwise specified.

[0037] Those skilled in the art should understand that the following specific embodiments or implementation methods are a series of optimized configurations listed to further explain the specific content of the invention. These configuration methods can be combined or used in conjunction with each other, unless the invention explicitly states that some or a specific embodiment or implementation method cannot be associated with or used in conjunction with other embodiments or implementation methods. Furthermore, the following specific embodiments or implementation methods are only considered as optimized configurations and are not intended to limit the scope of protection of the invention.

[0038] like Figure 1 As shown, some embodiments of this application provide an automatic donkey grouping and restraint system. Includes waiting area passage 1, control cabinet 2, normal donkey feeding area 12, abnormal donkey feeding area 13, identification device 3, video monitoring device 16, donkey monitoring collar 17, and edge computing box 18; The waiting area passage 1 measures 1.6m × 0.7m × 2.1m and uses a metal frame structure. There are no fewer than two donkey standing areas along the length direction. This structure allows donkeys to enter the standing areas one by one, which is convenient for grouping.

[0039] The normal donkey feeding area 12 and the abnormal donkey feeding area 13 are separated from each other by an isolation fence 14. The normal donkey feeding area entrance 9 is set at the end of the isolation fence near the normal donkey feeding area, and the abnormal donkey feeding area entrance 11 is set at the end of the isolation fence near the abnormal donkey feeding area. The normal donkey feeding area entrance 9 and the abnormal donkey feeding area entrance 11 are connected to the waiting area passage 1 through a revolving door 10.

[0040] The identification device 3 includes an RFID reader 31 installed in the waiting area passage 1 and an RFID tag 32 installed on the donkey's body to identify and obtain the donkey's identity ID; A weight sensor 4 is also installed on the waiting area passage 1. The weight sensor is connected to the edge computing box 18 to transmit weight data to the edge computing box 18 for fusion calculation with physiological data and images.

[0041] See Figure 2The video monitoring device 16 is installed in the normal donkey feeding area 12 and the abnormal donkey feeding area 13, and is also installed in the waiting area passage 1 to collect image data of the donkey's behavior and posture in real time. The video monitoring device 16 includes multiple high-definition cameras and infrared fill light modules to achieve 24-hour uninterrupted monitoring and output video and / or images to the edge computing box. like Figure 3 As shown, the donkey monitoring collar 17 is worn on the donkey. For example, it is worn around the neck of the donkey. It can also be other forms of donkey physiological data monitoring devices, set under the donkey's ear, on the back of the donkey, or on the buttocks of the donkey. Of course, it can also be in other positions. The donkey monitoring collar 17 has built-in acceleration sensors, heart rate sensors, and temperature sensors to collect heart rate, body temperature, and exercise data. The collar data is transmitted to the edge computing box 18 through wireless communication methods such as LoRa or ZigBee. Please refer to the schematic diagram of the edge computing box 18. Figure 4 The edge computing box 18 is connected to the identification device 3, the video monitoring device 16, the donkey monitoring collar 17 and the revolving door 10 respectively. It is used to receive and integrate multiple data, judge the health status of the donkeys by local calculation, and control the action of the revolving door 10 according to the judgment result. When the health status of the donkeys is normal, the revolving door 10 is controlled to rotate to connect the normal donkey feeding area (12) and the waiting area channel 1. Or, when the health status of the donkeys is abnormal, the revolving door 10 is controlled to rotate to connect the abnormal donkey feeding area 13 and the waiting area channel 1.

[0042] In this embodiment, real-time edge computing based on the edge computing box is provided, and the system has the ability to operate continuously in weak network / no network conditions, which significantly improves the accuracy of clustering and the reliability of the system.

[0043] The revolving door 10 can also be replaced by a dual-channel gate, which selectively connects the normal donkey feeding area entrance 9 or the abnormal donkey feeding area entrance 11 with the waiting area channel 1 by switching the opening and closing of the gate arm in the dual-channel gate.

[0044] The edge computing box 18 has a built-in preset donkey identification and grouping model. This model is designed for the unique physiological and behavioral characteristics of donkeys, including a video behavior recognition model and a multi-data fusion decision module. It can independently perform donkey status judgment and grouping control when the network is interrupted.

[0045] In some implementations, the abnormal behavior recognition model includes embedding prior knowledge of donkey behavior. This prior knowledge includes labeling historical donkey image data. The labeling of historical donkey image data includes labeling behaviors such as lying down to rest, standing to rest, walking, running, lameness, scratching, eating, drinking, refusing to eat, interacting, attacking, remaining still, repeatedly circling, falling down, and being in heat. A training dataset is obtained by associating the behaviors in the historical donkey image data with the donkey's identity identifier, and the model is trained using the training dataset to obtain the abnormal behavior recognition model.

[0046] Specifically, the video behavior recognition model is based on an improved Yolov5s architecture, incorporating prior knowledge of donkey behavior. It extracts key behavioral spatial features from donkey videos (such as lying angle, leg flexion during limping, and repeated circling trajectories) using a convolutional neural network (CNN). In the multi-data fusion decision module, an attention mechanism is first used to calculate the correlation weights between video features and physiological features. Then, the weighted video features and physiological features are concatenated to obtain a fused feature vector. Bayes' theorem is used to fuse the state probability of the fused features with the anomaly probability of the image data, outputting the final posterior state probability. By comparing this probability with a preset threshold, the donkey group category is determined.

[0047] Specifically, the video behavior recognition model collects physiological data of donkeys through video surveillance and wearable devices. Then, it performs denoising, frame extraction, and size normalization on the collected videos. For the collected physiological data, it performs missing value imputation, outlier filtering, time series alignment, grayscale conversion, edge detection, and feature point annotation on the collected images. The multi-data fusion decision module adopts a two-level fusion framework of "feature-level fusion + decision-level fusion." First, it calculates the correlation weights between video features and physiological features through an attention mechanism. Then, it concatenates the weighted video features with the physiological features, fusing the features of both video and physiological data. Finally, it uses Bayes' theorem to fuse the decision results of the image data, achieving complementary advantages of multimodal information. The attention mechanism uses the CBAM attention mechanism to calculate the correlation weights between video features and physiological features, as shown in the following formula: Where V represents video features and P represents physiological features. , The weight matrix is ​​a learnable matrix. , Here, σ is the bias term, σ is the sigmoid activation function, CNN(V) uses a convolutional neural network to extract features from the input V, LSTM(P) uses a long short-term memory network to extract temporal features from the input sequence P, and GAP is a global average pooling layer. The visual feature map of the donkey extracted by CNN (CNN(V)) is input into the global average pooling layer, and after calculating the global mean in the channel dimension, a low-dimensional visual global feature vector is output. The weights representing video features. The weights represent the physiological features, and their sum is 1. Feature concatenation: The weighted video features are concatenated with the physiological features to obtain a fused feature vector: Ffusion = Concat( ⋅V, ⋅P) Where Concat is the concatenation operation, and Ffusion is the fused feature vector with a dimension of 256. Decision-level fusion utilizes Bayes' theorem to fuse the state probabilities of the fused features with the anomaly probabilities of the image data, using image data to correct and enhance the fuzzy inference results of the fused features, as shown in the following formula: Where S represents the donkey's state, A represents the fusion feature (Ffusion), and I represents the image data. P(S|A) is the posterior probability of the fusion feature, P(I|S,A) is the likelihood probability of the image data under state S and fusion feature A, P(I|A) is the normalization constant, and P(S|A,I) is the final posterior probability. An anomaly threshold (e.g., 0.85) is set. If P(S=abnormal|A,I)≥0.85, the donkey's state is considered abnormal; otherwise, it is considered normal. To adapt to differences in different scenarios and individuals, an online learning mechanism is used to dynamically adjust the weights of video and physiological features. in, Let t be the attention weight of the visual feature modality (range (0,1)) at the t-th training iteration. η represents the attention weights of the visual feature modality after the (t+1)th iteration update; η is the learning rate (controlling the step size of weight updates, usually taken as 0.001-0.01). The actual label for the donkey's status (e.g., "normal" is 1, "abnormal" is 0). The donkey state predicted by the model (i.e., P(S|A,I)); Attention weights for the predicted values ​​on the visual modality The partial derivatives, This represents the updated physiological modality weights.

[0048] If the prediction accuracy of one mode is higher than that of another mode, the weight of that mode is increased; if the prediction accuracy of one mode decreases, the weight of that mode is decreased.

[0049] Compared to existing technologies, this model is specifically designed for donkey herding management. Through multimodal data fusion, it solves the problem of low detection rates for sudden anomalies (such as lameness or estrus) in donkeys, a problem inherent in traditional methods (such as single image recognition or RFID). In a test involving 500 donkeys, the model achieved an anomaly detection rate of up to 90%. Compared to the average detection rate of approximately 70% for traditional manual herding as reported in the "National Donkey Industry Technology System Survey Report," this solution improves the detection rate by 25 percentage points. Simultaneously, the system significantly reduces the misjudgment rate of herding from 15% in manual mode to 5%. In terms of efficiency, it represents a leap from hours of manual observation and herding to automatic identification and herding within minutes, and can operate 24 / 7, fundamentally improving the precision and intelligence of livestock management.

[0050] The edge computing box 18 is connected to the cloud server to upload local data and judgment results to the cloud server for model optimization and data backup.

[0051] The edge computing box 18 is installed in the control cabinet 2. The control cabinet 2 is also equipped with necessary controllers. The controllers are communicatively connected to the edge computing box 18 and control the rotation of the revolving door 10 or the opening and closing of the gate arm in the gate according to the instructions sent by the edge computing box 18.

[0052] Behind the abnormal donkey feeding area 13 is a feed trough 15. To guide donkeys entering the abnormal donkey feeding area 13 to be restrained and reduce stress, multiple independent restraint stalls 5 are installed at the feed trough 15. The exit end of each independent restraint stall 5 is connected to the feed trough 15, and the entrance of each independent restraint stall 5 is equipped with an electric lifting door 6. A first infrared sensor 7 is installed above the feed trough 15 to detect the presence of donkeys. After an abnormal donkey enters the abnormal feeding area 13 and steps into a restraint stall 5 to eat, if the first infrared sensor 7 detects that the donkey has been blocking the feed for more than 15 seconds, the electric lifting door 6 will automatically close, thus restraining the donkey and simultaneously notifying staff for further action.

[0053] An exit gate (8) and a second infrared sensor are provided in front of the normal donkey feeding area 12. When the second infrared sensor detects that a donkey is approaching, the exit gate (8) will open automatically.

[0054] As an example, to illustrate the working principle of this system, after a donkey enters the waiting area channel 1, the RFID reader 31 of the identification device 3 reads the RFID tag 32 on the donkey's ear to obtain the donkey's identification ID, such as "donkey-001", and sends it to the edge computing box. The weight sensor 4 measures the weight, such as "360kg", and sends it to the edge computing box to be bound to the donkey's identification information. The video monitoring device 16 captures the donkey's behavior and posture video and sends it to the edge computing box. The abnormal behavior recognition model judges and displays "one leg on the ground for 5 consecutive minutes" ( If a donkey is suspected of lameness, its monitoring collar 17 uploads heart rate, body temperature, and activity level data to the edge computing box. When the physiological characteristics show "body temperature 38.8℃ (normal range), heart rate 75 beats / minute (normal range), and steps 63 / minute (mild lameness)," the edge computing box uses a multi-data fusion algorithm to increase the weight of the "abnormal behavior" dimension to 0.85, ultimately classifying the donkey as "abnormal." The edge computing box then issues a grouping command, controlling the rotating door 10 to connect the abnormal donkey's feeding area 13 with the waiting area passage 1. After the abnormal donkey enters the abnormal feeding area 13, it is guided by the food to a restraint pen 5 to eat. When the first infrared sensor 7 detects that the donkey has been blocking the view for more than 15 seconds, the electric lifting door 6 automatically closes, achieving automatic restraint without manual intervention and reducing stress on the donkey.

[0055] Please see Figure 5 , Figure 5 A flowchart illustrating the steps of an automatic grouping and restraint method for donkeys is shown.

[0056] Embodiments of the present invention provide a method for automatically grouping and restraining donkeys, comprising the following steps: S100, the donkey breeding area is preset as a waiting area, a first area and a second area, with the second area including the Baoding area; S200: Real-time acquisition of donkey identification, physiological data and image data in the waiting area to obtain multimodal data of the donkeys with the identification; S300, using a preset donkey grouping model to perform fusion calculations on the multimodal data of the donkeys, determine and identify the state of the donkeys and output the grouping category, which includes normal and abnormal. S400: When the grouping category is normal, open the channel between the waiting area and the first area, and close the channel between the waiting area and the second area, guiding the donkeys with the identified identity from the waiting area to the first area; when the grouping category is abnormal, open the channel between the waiting area and the second area, and close the channel between the waiting area and the first area, guiding the donkeys with the corresponding identified identity from the waiting area to the second area. S500, guide the donkeys from the second area to Baoding area for processing.

[0057] Physiological data includes heart rate, body temperature, exercise volume and / or weight, while image data includes videos and / or pictures.

[0058] In one example of the present invention, before step S300, the following should also be included: Acquire donkey physiological history data and donkey image history data, annotate the donkey physiological history data and donkey image history data to obtain a training dataset, and use the training dataset to train the initial model to obtain the preset donkey grouping model; The annotation of donkey image history data includes annotating behaviors such as lying down to rest, standing to rest, walking, running, lameness, scratching, eating, drinking, refusing to eat, interacting, attacking, remaining still, circling repeatedly, falling down and not getting up, and estrus. The annotation of donkey physiological history data includes linking donkey physiological history data with behaviors in donkey image history data through donkey identification, and aligning the annotated physiological data with the behavior annotations in image history data.

[0059] Furthermore, the preset donkey grouping model is a neural network model, preferably a YOLOv model or a MobileNet model. As a further preferred implementation, a model combining CNN (Convolutional Neural Network) and LSTM (Long Short-Term Memory Network) can be used.

[0060] It should be noted that the automatic grouping and restraint method for donkeys provided in this embodiment of the invention can be implemented based on the automatic grouping and restraint system for donkeys provided in any of the above embodiments in specific operation, and will not be described in detail in this embodiment.

[0061] The basic principles of the present invention have been described above with reference to specific embodiments. However, it should be noted that the disclosed systems and methods can be implemented in other ways. The advantages, benefits, and effects mentioned in this invention are merely examples and not limitations, and should not be considered as essential features of each embodiment of the present invention. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. The above details do not limit the present invention to the necessity of adopting the above specific details.

[0062] The block diagrams of devices, apparatuses, devices, and systems involved in this invention are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0063] It should also be noted that in the apparatus, device, and method of the present invention, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of the present invention.

Claims

1. An automatic grouping and restraining system for donkeys, characterized in that, It includes a waiting area passage (1), a normal donkey feeding area (12), an abnormal donkey feeding area (13), an identification device (3), an image acquisition device, a donkey physiological data monitoring device, and an edge computing box (18). The abnormal donkey feeding area (13) includes an independent restraint pen (5); The normal donkey feeding area (12) and the abnormal donkey feeding area (13) are isolated from each other. The waiting area passage (1) can be selectively connected to the normal donkey feeding area (12) or the abnormal donkey feeding area (13) through a switching device. The identification device (3) includes an RFID reader (31) installed in the waiting area channel (1) and an RFID tag (32) installed on the donkey's body to identify the donkey's identity. The image acquisition device is set in the normal donkey feeding area (12) and the abnormal donkey feeding area (13) to collect image data of donkey behavior in real time; The donkey physiological data monitoring device is worn on the donkey, and the physiological data includes heart rate, body temperature, and activity level; The edge computing box (18) is communicatively connected to the identification device (3), the image acquisition device and the donkey physiological data monitoring device, respectively; The edge computing box (18) has a preset donkey grouping model built in. The preset donkey grouping model includes an abnormal behavior recognition model and a multi-data fusion judgment module. It can independently perform donkey grouping control when the network is interrupted, and control the switching device action according to the grouping result. When the donkey grouping is normal, the switching device connects the normal donkey feeding area (12) and the waiting area channel (1). Or, when the donkey grouping is abnormal, the switching device connects the abnormal donkey feeding area (13) and the waiting area channel (1). The abnormal behavior recognition model is built on an improved Yolov5s network architecture and incorporates prior knowledge of donkey behavior. The abnormal behavior recognition model is configured to extract features from donkey video data acquired by the image acquisition device using a convolutional neural network (CNN) and output a 128-dimensional donkey video feature vector. The multi-data fusion decision module receives the donkey video feature vector output by the abnormal behavior recognition model. First, it uses an attention mechanism to calculate the correlation weight between the donkey video features and the physiological data features. Then, it concatenates the weighted video features and the physiological data features to obtain a fused feature vector. It uses Bayes' theorem to fuse the state probability of the fused features with the abnormal probability of the image data and outputs the final posterior probability of the state. By comparing it with a preset threshold, it outputs whether the donkey group is normal or abnormal.

2. The automatic grouping and restraint system for donkeys as described in claim 1, characterized in that, The specific configuration of the multiple data fusion decision module is as follows: The attention mechanism adopts the CBAM attention mechanism to calculate the correlation weights between video features and physiological features, as shown in the following formula: Where V represents video features and P represents physiological features. , The weight matrix is ​​a learnable matrix. , Here, σ is the bias term, sigmoid activation function, CNN(V) uses a convolutional neural network to extract features from the input V, LSTM(P) uses a long short-term memory network to extract temporal features from the input sequence P, and GAP is a global average pooling layer. The donkey video feature map CNN(V) extracted by CNN is input into the global average pooling layer, and after calculating the global mean in the channel dimension, a low-dimensional global feature vector of the video is output. The weights representing video features. The weights represent the physiological features, and their sum is 1; Feature concatenation: The weighted video features are concatenated with the physiological features to obtain a fused feature vector: Ffusion = Concat( ⋅V, ⋅P) Where Concat is the concatenation operation, and Ffusion is the fused feature vector with a dimension of 256; Decision-level fusion utilizes Bayes' theorem to fuse the state probability of the fused features with the anomaly probability of the image data, and uses the image data to correct and enhance the fuzzy inference results of the fused features, as shown in the following formula: Where S represents the donkey's state, A represents the fusion feature (Ffusion), and I represents the image data. P(S|A) is the posterior probability of the fusion feature, P(I|S,A) is the likelihood probability of the image data under state S and fusion feature A, P(I|A) is the normalization constant, and P(S|A,I) is the final posterior probability of the state. An anomaly threshold is set; if P(S=anomaly|A,I) ≥ the threshold, the donkey's state is determined to be abnormal; otherwise, it is determined to be normal.

3. The automatic grouping and restraint system for donkeys as described in claim 2, characterized in that, It also includes using an online learning mechanism to dynamically adjust the weights of video features and physiological features: in, Let be the attention weights of the video features during the t-th training iteration. The attention weights are the attention weights of the video features updated in the (t+1)th iteration; η is the learning rate. This is a true label for the donkey's condition. The donkey state predicted by the model (i.e., P(S|A,I)); Attention weights for video features in the predicted values The partial derivatives, The updated physiological characteristic weights; If the prediction accuracy of one feature is higher than that of another feature, the weight of that feature is increased; if the prediction accuracy of one feature decreases, the weight of that feature is decreased.

4. The automatic grouping and restraint system for donkeys as described in any one of claims 1-3, characterized in that, The normal donkey feeding area (12) and the abnormal donkey feeding area (13) are isolated from each other by an isolation fence (14). The normal donkey feeding area entrance (9) is set at the end of the isolation fence near the normal donkey feeding area, and the abnormal donkey feeding area entrance (11) is set at the end of the isolation fence near the abnormal donkey feeding area. The normal donkey feeding area entrance (9) and the abnormal donkey feeding area entrance (11) are connected to the waiting area channel (1) through a switching device.

5. The automatic grouping and restraint system for donkeys as described in any one of claims 1-3, characterized in that, The switching device is a rotating door (10), which can selectively connect the normal donkey feeding area entrance (9) or the abnormal donkey feeding area entrance (11) with the waiting area passage (1) by rotating the rotating door (10); Alternatively, the switching device is a dual-channel gate, which selectively connects the normal donkey feeding area entrance (9) or the abnormal donkey feeding area entrance (11) with the waiting area channel (1) by switching the dual-channel gate.

6. The automatic grouping and restraint system for donkeys as described in any one of claims 1-3, characterized in that, The image acquisition device is a video monitoring device (16), and / or the donkey physiological data monitoring device is a donkey monitoring collar (17). The video monitoring device (16) includes multiple high-definition cameras and an infrared supplementary light module to achieve 24-hour uninterrupted monitoring. And / or, the donkey monitoring collar (17) has a built-in accelerometer, heart rate sensor and temperature sensor, and the collar data is transmitted to the edge computing box (18) via wireless communication.

7. The automatic grouping and restraint system for donkeys as described in any one of claims 1-3, characterized in that, A weight sensor (4) is also provided on the path of the waiting area channel (1), and the weight sensor is communicatively connected to the edge computing box (18).

8. The automatic grouping and restraint system for donkeys as described in any one of claims 1-3, characterized in that, A feed trough (15) is provided behind the abnormal donkey feeding area (13). The outlet end of the independent restraint pen (5) is connected to the feed trough (15). An electric lifting door (6) is provided at the entrance of the independent restraint pen (5). A first infrared sensor (7) is provided above the feed trough (15) to detect whether a donkey exists.

9. The automatic grouping and restraint system for donkeys as described in claim 8, characterized in that, The electric lifting door (6) automatically closes based on the signal of the donkey's continued presence detected by the first infrared sensor (7). The normal donkey feeding area (12) is equipped with an exit door (8) and a second infrared sensor. When the second infrared sensor detects that the donkey is approaching, the exit door (8) automatically opens.

Citation Information

Patent Citations

  • Synthesize donkey house convenient to hive off

    CN205284520U

  • Swift livestock sorting corral device

    CN208095592U