Method and device for identifying estrus state of livestock, storage medium and electronic equipment
By acquiring real-time data on livestock movement acceleration and body temperature, and using data fusion and classification models to identify estrus status, the problem of labor-intensive and inaccurate manual prediction has been solved. This has enabled efficient and accurate identification of estrus status, improving the efficiency and quality of livestock farming.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ZHONGRONG DIGITAL TECH CO LTD
- Filing Date
- 2023-05-17
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, manually predicting livestock physiological cycles to identify estrus status is labor-intensive and has low accuracy, which affects the effectiveness of mating and reproduction.
By acquiring real-time temporal acceleration and body temperature data of livestock, and using an estrus state recognition model comprised of a data fusion module, a temporal convolution module, and a state classification module, the data is fused, encoded, and classified to identify the estrus state of the livestock.
It improves the accuracy of estrus detection, saves labor costs, and can quickly and accurately identify the estrus status of a large number of livestock, thereby improving the efficiency and quality of livestock farming.
Smart Images

Figure CN116602788B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of animal husbandry technology, specifically to a method, device, storage medium, and electronic equipment for identifying the estrus state of livestock. Background Technology
[0002] In recent years, with the improvement of economic benefits, livestock farming has become an indispensable part of modern agriculture. The key to livestock farming lies in how to accurately grasp the timing of livestock mating and reproduction in order to achieve high yields.
[0003] Generally, farm workers record the physiological data of each animal, such as age, body temperature, and weight, to artificially predict the animal's physiological cycle. Then, based on the physiological cycle, they estimate the likelihood of the animal being in estrus, so that the animal can be bred and reproduced when it is in estrus.
[0004] However, manually predicting menstrual cycles inevitably incurs significant human costs, and the accuracy of estrus status assessment is affected by errors due to subjective human judgment. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and electronic device for identifying the estrus state of livestock, which can improve the accuracy of estrus state identification.
[0006] In a first aspect, embodiments of this application provide a method for identifying the estrus state of livestock, the method comprising:
[0007] Real-time acquisition of the target livestock's temporal motion acceleration and temporal body temperature;
[0008] The temporal motion acceleration and temporal body temperature are input into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module.
[0009] The fused temporal data is input into the temporal convolution module for encoding processing to obtain the encoding result;
[0010] The encoding results are input into the state classification module for classification processing to obtain the state recognition results of the target livestock. The state recognition results indicate whether the target livestock is in estrus or not.
[0011] Secondly, embodiments of this application also provide a livestock estrus state identification device, comprising:
[0012] The data acquisition module is used to acquire the temporal motion acceleration and temporal body temperature of the target livestock in real time.
[0013] The data processing module is used to input the temporal motion acceleration and temporal body temperature into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module.
[0014] The feature encoding module is used to input the fused temporal data into the temporal convolution module for encoding processing to obtain the encoding result;
[0015] The output module is used to input the encoded results into the state classification module for classification processing to obtain the state identification results of the target livestock. The state identification results indicate whether the target livestock is in estrus or not.
[0016] Thirdly, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when run on a computer, causes the computer to execute the livestock estrus state identification method provided in any embodiment of this application.
[0017] Fourthly, embodiments of this application also provide an electronic device, including a processor and a memory, the memory having a computer program, and the processor executing the livestock estrus state identification method as provided in any embodiment of this application by calling the computer program.
[0018] The technical solution provided in this application acquires the temporal acceleration and body temperature of a target animal in real time. The temporal acceleration and body temperature are input into the data fusion module of an estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module. The fused temporal data is input into the temporal convolution module for encoding processing to obtain an encoding result. The encoding result is input into the state classification module for classification processing to obtain a state recognition result for the target animal, indicating whether the target animal is in estrus or not. By processing the temporal acceleration and body temperature of the target animal through the estrus state recognition model, the accuracy of estrus state recognition is improved. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram illustrating an application scenario of the livestock estrus state identification method provided in this application embodiment.
[0021] Figure 2 This is a flowchart illustrating the livestock estrus state identification method provided in an embodiment of this application.
[0022] Figure 3 This is a schematic diagram of the structure of the estrus state recognition model in the method provided in the embodiments of this application.
[0023] Figure 4 for Figure 3 A schematic diagram of the temporal convolution module.
[0024] Figure 5 This is a schematic diagram of the structure of the livestock estrus state recognition device provided in the embodiments of this application.
[0025] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.
[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0028] This application provides a method for identifying the estrus state of livestock. The subject executing this method can be the livestock estrus state identification device provided in this application, or an electronic device integrating the livestock estrus state identification device. The livestock estrus state identification device can be implemented in hardware or software, and the electronic device can be a smartphone, tablet computer, desktop computer, etc.
[0029] The solution provided in this application employs artificial intelligence (AI) technology. AI is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include machine learning (ML) technology.
[0030] The livestock can be cattle, sheep, pigs, rabbits, horses, donkeys, camels, deer, etc. The livestock estrus state identification method provided in this application can be applied to any kind of livestock. In the following embodiments, cattle are used as an example to illustrate the solution of this application.
[0031] First, please refer to Figure 1 , Figure 1 This diagram illustrates an application scenario of the livestock estrus state identification method provided in this application. Multiple cattle are kept in a farm, each equipped with a temperature sensor and an accelerometer. The temperature sensor detects the cattle's body temperature in real time to obtain the time-series body temperature. The accelerometer detects the cattle's motion acceleration in real time to obtain the time-series motion acceleration. This application provides an estrus state identification model. By inputting the time-series motion acceleration and time-series body temperature of one cattle into the estrus state identification model, the model can identify the estrus state of that cattle and output the identification result, indicating whether the cattle are in estrus or not.
[0032] Temperature and acceleration sensors can be installed in the cow's ear tag. After detecting the cow's body temperature and movement acceleration, the real-time body temperature and movement acceleration can be stored in a database so that time-series movement acceleration and time-series body temperature can be retrieved from the database when estrus status identification is required.
[0033] The following embodiments focus on the method for identifying the estrus state of livestock provided in this application.
[0034] Please see Figure 2 , Figure 2 This is a flowchart illustrating the livestock estrus state identification method provided in this application embodiment. The specific flow of the livestock estrus state identification method provided in this application embodiment can be as follows:
[0035] 101. Real-time acquisition of the target livestock's temporal acceleration and temporal body temperature.
[0036] Among them, the target livestock refers to livestock for which estrus status needs to be identified.
[0037] When acquiring the temporal motion acceleration and temporal body temperature of a target animal, one approach is to obtain the temporal motion acceleration in real time from an accelerometer carried by the animal, and the temporal body temperature in real time from a temperature sensor carried by the animal. Alternatively, pre-stored temporal motion acceleration and body temperature data can be retrieved from a database. The specific implementation method can be chosen according to actual needs and is not limited here.
[0038] 102. The temporal motion acceleration and temporal body temperature are input into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module.
[0039] To improve the accuracy of estrus state identification and save labor costs, this application introduces a pre-trained estrus state identification model to identify the estrus state of target livestock. The estrus state identification model is obtained by training a neural network model using sample motion acceleration sequences and sample body temperature sequences.
[0040] Please see Figure 3 , Figure 3 This is a schematic diagram of the estrus state recognition model in the method provided in this application embodiment. The estrus state recognition model includes a data fusion module, a temporal convolution module, and a state classification module connected in sequence. The data fusion module is used to fuse temporal motion acceleration and temporal body temperature data; the temporal convolution module is used to encode the fused temporal data; and the state classification module is used to classify the encoding results.
[0041] Understandably, in addition to acquiring the temporal motion acceleration and temporal body temperature of the target livestock for data fusion processing, analysis can also be performed based on the environmental data of the target livestock. For example, at least one of the temporal ambient temperature, temporal ambient humidity, and temporal ambient light can be acquired and fused with the temporal motion acceleration and temporal body temperature to obtain fused data.
[0042] 103. Input the fused time series data into the temporal convolution module for encoding processing to obtain the encoding result.
[0043] The length of the fused temporal data is the same as the length of the encoding result. By encoding the fused temporal data using a temporal convolution module, both shallow and deep features can be extracted to comprehensively represent the distribution of the fused temporal data in continuous time and space.
[0044] 104. Input the encoding result into the state classification module for classification processing to obtain the state recognition result of the target livestock. The state recognition result indicates whether the target livestock is in estrus or not.
[0045] The state classification module has two categories: estrus state and non-estrus state. By inputting the encoded results into the state classification module for classification, the encoded results can be divided into either estrus state or non-estrus state, thus completing the identification of the estrus state of the target livestock.
[0046] In practice, this application is not limited by the execution order of the described steps. Without causing conflicts, some steps may be performed in other orders or simultaneously.
[0047] The livestock estrus state identification method in this application embodiment can quickly and accurately process the temporal motion acceleration and temporal body temperature of target livestock through an estrus state identification model, thereby outputting the state identification result of the target livestock, whereby the state identification result indicates whether the target livestock is in estrus or not. Compared with the prior art, the solution of this application improves the accuracy of estrus state identification, saves labor costs, and can efficiently complete the identification of the estrus state of a large number of livestock, which is convenient for widespread promotion in the field of animal husbandry.
[0048] In some embodiments, prior to step 102, the method further includes:
[0049] Detect whether there are missing data for time-series motion acceleration and time-series body temperature;
[0050] If so, then fill in the missing data for the time-series motion acceleration and / or time-series body temperature to obtain the filled time-series motion acceleration and / or time-series body temperature;
[0051] Step 102 includes:
[0052] The filled temporal motion acceleration and temporal body temperature are input into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data.
[0053] Data imputation methods include, but are not limited to, linear interpolation and averaging data before and after iteration. For example, when using the average of data before and after iteration, if a one-hour interval is selected as the missing data range, the missing data can be filled using the average of valid data from the preceding and following ten minutes, iterating continuously until the missing interval is completely filled. Specifically, when imputing missing values for time-series motion acceleration and time-series body temperature, different time intervals can be selected for filling the missing data. For instance, for time-series motion acceleration, the average of valid data from a shorter time interval can be used to fill the missing data, while for time-series body temperature, the average of valid data from a longer time interval can be used.
[0054] In this embodiment, by filling in the missing values in the temporal motion acceleration and temporal body temperature, the accuracy of state recognition can be improved when applied to the state recognition of the target livestock.
[0055] In some embodiments, after the time-series motion acceleration and time-series body temperature are input into the data fusion module, the data fusion module performs data fusion processing on the time-series motion acceleration and time-series body temperature in ways including but not limited to: concatenating the vector corresponding to the time-series motion acceleration and the vector corresponding to the time-series body temperature, and representing the fused time-series data with the concatenated vector; or mapping the time-series motion acceleration and time-series body temperature to a one-dimensional space to achieve data fusion processing of the two, thereby obtaining the fused time-series data, etc.
[0056] In some embodiments, the temporal convolution module includes multiple sequentially connected dilated causal convolutional layers; the fused temporal data is input into the temporal convolution module for encoding processing to obtain the encoding result, including:
[0057] The fused temporal data is input into each sequentially connected dilated causal convolutional layer for convolution operations to obtain the encoding result;
[0058] In this process, the output of each dilated causal convolutional layer serves as the input to the next dilated causal convolutional layer, and the scale of the convolution result between the input and output of each dilated causal convolutional layer is the same.
[0059] Please see Figure 4 , Figure 4 for Figure 3 The schematic diagram of the temporal convolution module shows that it includes multiple sequentially connected dilated causal convolutional layers. The fused temporal data is input into the first dilated causal convolutional layer for convolution operation, and the first convolution operation result is output. Then, the first convolution operation result is input into the second dilated causal convolutional layer for convolution operation, and the second convolution operation result is output. This process continues until the last dilated causal convolutional layer outputs the final convolution operation result as the encoding result.
[0060] For the first dilated causal convolutional layer, multiple segments of time-series data are extracted from the fused time-series data through a sliding window. The dilated causal convolutional layer includes multiple dilated causal convolutional units. By inputting the multiple segments of time-series data into the multiple dilated causal convolutional units, each dilated causal convolutional unit performs a convolution operation on its input time-series data and inputs the convolution operation result into the dilated causal convolutional unit corresponding to the next dilated causal convolutional layer.
[0061] Multiple dilated causal convolutional layers are used to extract shallow and deep features from the fused temporal data. Shallow features can represent the correlation between local information that is close in time, while deep features can represent the correlation between local information that is not close in time.
[0062] In this embodiment, the fused time-series data is convolved layer by layer by dilated causal convolutional layers. This strengthens the correlation between local features with large time spans by extracting shallow and deep features of the time-series data, while avoiding excessive parameter increases and ensuring the efficiency of model training.
[0063] In some embodiments, after inputting the encoding result into the state classification module for classification processing to obtain the state recognition result of the target livestock, the method further includes:
[0064] If the state recognition result indicates that the target livestock is in estrus, then the image information of the target livestock is acquired;
[0065] Identify the behavioral characteristics of the target livestock based on image information, and determine whether the behavioral characteristics include the target estrus behavior corresponding to the target livestock;
[0066] If so, then the target animal is confirmed to be in estrus.
[0067] To improve the accuracy of identifying the state of the target livestock, this embodiment further acquires image information of the target livestock when the estrus state recognition model identifies that the target livestock is in estrus. The behavioral characteristics of the target livestock are then identified through the image information. Only when the behavioral characteristics contain the target estrus behavior corresponding to the target livestock is the target livestock finally determined to be in estrus. Otherwise, the state of the target livestock is re-identified or it is determined that the target livestock is in non-estrus state.
[0068] The image information can be collected by cameras installed in the farm. Different livestock exhibit corresponding estrus behaviors; for example, cattle will exhibit mounting behavior when in estrus.
[0069] In this embodiment, by combining model recognition results and image recognition results to comprehensively determine whether the target livestock is in estrus, the accuracy of identifying the state of the target livestock is improved. This helps to promptly remind staff which livestock are in estrus so that they can be bred in a timely manner, thereby increasing the probability of reproduction and improving the quality and yield of livestock farming.
[0070] In some embodiments, the method further includes:
[0071] Obtain the sample animal's motion acceleration sequence and sample body temperature sequence;
[0072] By analyzing the motion acceleration sequences of the samples from different dimensions, the motion characteristics of the livestock in the samples can be determined.
[0073] Based on the temperature change trend indicated by the sample body temperature sequence, determine the body temperature characteristics of the sample livestock;
[0074] Match the target state label with corresponding motion and body temperature features;
[0075] Based on the correspondence between the sample motion acceleration sequence, the sample body temperature sequence, and the target state label, a neural network model is trained until a preset stopping condition is reached, thus obtaining an estrus state recognition model.
[0076] The types of livestock in the sample can be the same or different. For example, the sample livestock can consist entirely of cattle, or the sample livestock can include various types of livestock such as cattle, sheep, and horses. There is no limitation here, and the selection can be based on the actual use case.
[0077] In addition, there are multiple sample animals, and each sample animal corresponds to a set of sample motion acceleration sequences and sample body temperature sequences. The sample motion acceleration sequences and sample body temperature sequences of the sample animals can be obtained by using accelerometers and temperature sensors carried by the sample animals.
[0078] Considering that the movement and body temperature characteristics of livestock change significantly when they are in estrus, this application embodiment obtains the movement characteristics of livestock by analyzing the sample's motion acceleration sequence and the body temperature characteristics by analyzing the sample's body temperature sequence. The movement and body temperature characteristics are then combined to determine the target state label of the livestock. The state label includes an estrus state label and a non-estrus state label.
[0079] For example, livestock in estrus are more active. When determining the movement characteristics of livestock, we can analyze the intensity of the movement, the duration of the intense movement, and the frequency of the movement based on the acceleration sequence of the movement. By combining the analysis results from various dimensions, we can determine the movement characteristics of livestock.
[0080] For example, when livestock are in estrus, their body temperature is higher. When determining the body temperature characteristics of livestock, the body temperature change trend can be analyzed based on the body temperature sequence to describe the body temperature characteristics of livestock.
[0081] As described above, after analyzing the movement and body temperature characteristics of the sample livestock, the two can be combined for analysis. Only when both movement and body temperature characteristics indicate that the sample livestock is in estrus will the estrus status label be determined as the target status label. Otherwise, the non-estrus status label will be determined as the target status label.
[0082] By inputting the sample motion acceleration sequence and sample body temperature sequence of each livestock sample into the neural network model, and using the target state label corresponding to the livestock sample as the training target, the neural network model is trained until the preset stopping condition is met, so as to obtain a trained estrus state recognition model.
[0083] The preset stopping conditions include, but are not limited to: the number of training iterations reaching a preset number, the model being fitted, etc.
[0084] In this embodiment, the motion acceleration sequence and body temperature sequence of the samples are processed to accurately extract the motion features corresponding to the motion acceleration sequence and the body temperature features corresponding to the body temperature sequence. Then, by analyzing the motion and body temperature features, target state labels are added to the sample livestock, and a neural network model is trained based on the sample motion acceleration sequence and body temperature sequence corresponding to the target state labels. This improves the accuracy of model training and ensures the predictive performance of the model.
[0085] In some embodiments, to improve the predictive performance of the model, after matching the target state labels of the corresponding motion features and body temperature features, the sample data can be filtered according to the target state labels of each sample animal.
[0086] For example, a portion of the data can be selected from the sample data labeled with the corresponding estrus state, and another portion can be selected from the sample data labeled with the corresponding non-estrus state, according to a set ratio, to serve as training data. The preset ratio can be 1:1, 1:2, 1:3, etc., and can be selected according to the actual use scenario; there is no limitation here.
[0087] In some embodiments, the motion acceleration sequence of the sample is analyzed in different dimensions to determine the motion characteristics of the sample livestock, including:
[0088] Analyze the absolute acceleration at different times in the sample motion acceleration sequence to obtain the absolute acceleration sequence;
[0089] Determine the absolute acceleration of targets in the absolute acceleration sequence that is greater than a preset acceleration threshold;
[0090] The motion characteristics are determined based on the absolute acceleration sequence and the target's absolute acceleration.
[0091] The motion acceleration of the sample livestock over a continuous time period constitutes the sample motion acceleration sequence. When the accelerometer of the sample livestock is two-axis, three-axis, or multi-axis, the sample motion acceleration sequence can also include motion acceleration in different directions over a continuous time period. By averaging the absolute values of motion acceleration in different directions or summing the squares of motion acceleration in different directions, the absolute motion acceleration at different times can be obtained, and the absolute motion acceleration at different times can be used to construct an absolute acceleration sequence.
[0092] For example, the absolute values of the motion accelerations in different directions at a certain moment can be summed by taking the square root of the sum of squares to obtain the absolute motion acceleration at that moment.
[0093] By selecting target absolute accelerations from the absolute acceleration sequence that are greater than a preset acceleration threshold, and then comparing and analyzing the target absolute accelerations with the absolute acceleration sequence, the movement characteristics of the sample livestock can be determined.
[0094] The preset acceleration threshold indicates the critical acceleration before and after estrus in livestock. When the absolute acceleration is greater than the preset threshold, it indicates that the livestock is approaching estrus; when the absolute acceleration is not greater than the preset threshold, it indicates that the livestock is approaching non-estrus. The preset acceleration threshold can be set by the user or obtained by calculating the average of historical accelerations.
[0095] In this embodiment, by analyzing the motion acceleration of the sample livestock in multiple dimensions, the motion characteristics of the sample livestock can be accurately extracted, thereby enabling accurate classification of the sample livestock.
[0096] In some embodiments, determining motion characteristics based on an absolute acceleration sequence and a target absolute acceleration includes:
[0097] Determine the first ratio of the target's absolute acceleration in the absolute acceleration sequence;
[0098] Calculate the variance of motion acceleration in an absolute acceleration sequence;
[0099] The motion characteristics are determined based on the first ratio and the variance of the motion acceleration.
[0100] This embodiment provides an implementation method for comparing and analyzing absolute acceleration sequences and target absolute motion acceleration to determine the motion characteristics of sample livestock.
[0101] For example, the ratio of the number of target absolute accelerations to the total number of absolute accelerations in the absolute acceleration sequence represents the first ratio of the target absolute acceleration in the absolute acceleration sequence. That is, the first ratio indicates the distribution of target absolute acceleration in the absolute acceleration sequence. When the first ratio is large, the distribution of target absolute acceleration is denser, and the sample livestock move more frequently; when the first ratio is small, the distribution of target absolute acceleration is sparser, and the sample livestock move less.
[0102] For example, the variance of all absolute accelerations in the absolute acceleration sequence can be calculated to obtain the variance of the motion acceleration in the absolute acceleration sequence. The variance of motion acceleration can represent the degree of dispersion between the absolute accelerations in the absolute acceleration sequence. When the dispersion is large, it indicates that the sample livestock have a large range of motion changes and the motion is more intense. When the dispersion is small, it indicates that the sample livestock have a small range of motion changes and the motion is more gentle.
[0103] In determining motion characteristics based on a first ratio and the variance of motion acceleration, the first ratio can be compared with a preset ratio, and the variance of motion acceleration can be compared with a preset variance of acceleration. If both the first ratio and the variance of motion acceleration are greater than the preset ratio, the motion characteristics of the sample livestock are determined to belong to a first motion category, indicating frequent and vigorous movement. If the first ratio is not greater than the preset ratio, but the variance of motion acceleration is greater than the preset variance of acceleration, or if the first ratio is greater than the preset ratio, but the variance of motion acceleration is not greater than the preset variance of acceleration, the motion characteristics of the sample livestock are determined to belong to a second motion category, indicating frequent and gentle movement, or minimal and vigorous movement. If both the first ratio and the variance of motion acceleration are not greater than the preset ratio, the motion characteristics of the sample livestock are determined to belong to a third motion category, indicating gentle and minimal movement.
[0104] This embodiment determines the motion characteristics by comparing and analyzing the first ratio and the variance of motion acceleration. The motion characteristics can accurately describe the intensity and frequency of the sample livestock's movement, which facilitates the analysis of whether the sample livestock are in estrus or the prediction of the time interval of the sample livestock's estrus.
[0105] In some embodiments, determining the body temperature characteristics of livestock samples based on the body temperature change trend indicated by the sample body temperature sequence includes:
[0106] Determine the target body temperature in the sample body temperature sequence that is higher than a preset body temperature threshold;
[0107] Determine the second ratio of the target body temperature in the sample body temperature sequence;
[0108] Based on the temperature differences of the sample body temperature data at different times in the sample body temperature sequence, the trend of body temperature change indicated by the sample body temperature sequence is determined.
[0109] The body temperature characteristics are determined based on the second ratio and the trend of body temperature changes.
[0110] The body temperature of the sample livestock over a continuous period constitutes the sample body temperature sequence. Analysis of this sequence helps determine the body temperature characteristics of the livestock. Generally, livestock have higher body temperatures during estrus. For example, a cow's normal body temperature is 38 to 39 degrees Celsius; when a cow is in estrus, its body temperature can rise by 1 to 2 degrees Celsius.
[0111] For example, a target body temperature higher than a preset threshold can be selected from multiple body temperatures included in the sample body temperature sequence. The preset body temperature threshold indicates the critical body temperature before and after estrus in livestock, with the body temperature being higher during estrus. When the body temperature is higher than the preset body temperature threshold, it indicates that the sample livestock is tending towards estrus; when the body temperature is not higher than the preset body temperature threshold, it indicates that the sample livestock is tending towards non-estrus.
[0112] Then, the second ratio of the target body temperature in the sample body temperature sequence is represented by the ratio of the number of target body temperatures to the number of all body temperatures in the sample body temperature sequence. A larger second ratio indicates that the body temperature of the sample livestock is higher, while a smaller second ratio indicates that the body temperature of the sample livestock is closer to normal.
[0113] For example, by comparing the differences in body temperature at different times within a sample temperature sequence, the trend of body temperature change can be determined by the magnitude of these differences. When body temperature gradually increases and the differences between temperatures are small, the trend indicates a gradual increase in body temperature; when body temperature gradually increases and the differences between temperatures are large, the trend indicates a sharp increase in body temperature; when body temperature gradually decreases and the differences between temperatures are small, the trend indicates a gradual decrease in body temperature; when body temperature gradually decreases and the differences between temperatures are large, the trend indicates a sharp decrease in body temperature; and when the differences between body temperatures are small, the trend indicates a gradual change in body temperature.
[0114] In determining body temperature characteristics based on the second ratio and the trend of body temperature change, the second ratio can be compared with a preset ratio, and the body temperature characteristics can be determined by combining the comparison result with the trend of body temperature change. When the second ratio is greater than the preset ratio and the trend of body temperature change indicates an increase in body temperature, the body temperature characteristics of the sample livestock are determined to belong to the first body temperature category, where the first body temperature category indicates an increase in body temperature. When the second ratio is not greater than the preset ratio and the trend of body temperature change indicates a decrease in body temperature, the body temperature characteristics of the sample livestock are determined to belong to the second body temperature category, where the second body temperature category indicates a decrease in body temperature. When the second ratio is greater than the preset ratio and the trend of body temperature change indicates a decrease in body temperature, or when the second ratio is not greater than the preset ratio and the trend of body temperature change indicates an increase in body temperature, or when the trend of body temperature change indicates a flat change in body temperature, the body temperature characteristics of the sample livestock are determined to belong to the third body temperature category, where the third body temperature category indicates a normal body temperature.
[0115] This embodiment determines the body temperature characteristics by comparing and analyzing the second ratio and the trend of body temperature changes. The body temperature characteristics are used to accurately describe the body temperature changes of the sample livestock, thereby accurately analyzing whether the sample livestock are in estrus or predicting the time range of estrus in the sample livestock.
[0116] In some embodiments, matching target state labels corresponding to motion features and body temperature features includes:
[0117] Based on the preset correspondence between status labels and motion features and body temperature features, target status labels corresponding to motion features and body temperature features are matched, where status labels include estrus status labels and non-estrus status labels.
[0118] The preset correspondence is as follows: when the movement feature belongs to the first movement category and the body temperature feature belongs to the first body temperature category, the corresponding status label is the estrus status label; when the movement feature belongs to the second or third movement category and the body temperature feature belongs to the second or third body temperature category, the corresponding status label is the non-estrus status label.
[0119] This embodiment collects real sample motion acceleration sequences and sample body temperature sequences of livestock, and analyzes these sequences to determine the movement and body temperature characteristics of the livestock. This allows for the addition of state labels to the livestock, thus creating training pairs of sample acceleration sequences, sample body temperature sequences, and target state labels. These pairs are then used to train a neural network model, enabling the model to learn the correspondence between the sample acceleration sequences, sample body temperature sequences, and target state labels, thereby obtaining an estrus state recognition model.
[0120] In some embodiments, before analyzing the sample motion acceleration sequence in different dimensions to determine the motion characteristics of the sample livestock, the method further includes:
[0121] Detect whether there are missing data in the sample motion acceleration sequence and sample body temperature sequence;
[0122] If so, then fill in the missing data for the motion acceleration sequence and / or body temperature sequence of the sample.
[0123] The method for filling data into the sample motion acceleration sequence and / or sample body temperature sequence can be referred to the above-mentioned content, and will not be repeated here.
[0124] As described above, the livestock estrus state identification method proposed in this embodiment of the invention collects sample animal motion acceleration sequences and sample body temperature sequences. These sequences are then analyzed from multiple dimensions to determine the animal's motion and body temperature characteristics, thereby matching corresponding target state labels. The sample motion acceleration sequences and body temperature sequences are then used as input to a neural network model, with the target state labels serving as the output. This neural network model is trained to obtain an estrus state identification model. Finally, the estrus state identification model is applied to identify the state of target livestock to obtain identification results. These results are then combined with the target livestock's image information to comprehensively determine whether the livestock is in estrus. This improves the accuracy of target livestock state identification, facilitates timely detection of estrus, and enables timely mating and reproduction, thereby improving breeding efficiency and quality and promoting the development of animal husbandry.
[0125] One embodiment also provides a device for identifying the estrus state of livestock. Please refer to [link / reference needed]. Figure 5 , Figure 5 This is a schematic diagram of the structure of the livestock estrus state identification device 200 provided in an embodiment of this application. The livestock estrus state identification device 200 is applied to an electronic device and includes a data acquisition module 201, a data processing module 202, a feature encoding module 203, and a result output module 204, as follows:
[0126] The data acquisition module 201 is used to acquire the temporal motion acceleration and temporal body temperature of the target livestock in real time.
[0127] The data processing module 202 is used to input the temporal motion acceleration and temporal body temperature into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module.
[0128] Feature encoding module 203 is used to input the fused temporal data into the temporal convolution module for encoding processing to obtain the encoding result;
[0129] The result output module 204 is used to input the encoding result into the state classification module for classification processing to obtain the state identification result of the target livestock. The state identification result indicates whether the target livestock is in estrus or not.
[0130] In some embodiments, the temporal convolution module includes a plurality of sequentially connected dilated causal convolutional layers; the feature encoding module 203 is further configured to:
[0131] The fused temporal data is input into each sequentially connected dilated causal convolutional layer for convolution operations to obtain the encoding result;
[0132] In this process, the output of each dilated causal convolutional layer serves as the input to the next dilated causal convolutional layer, and the scale of the convolution result between the input and output of each dilated causal convolutional layer is the same.
[0133] In some embodiments, the estrus state recognition device 200 further includes a sample processing module for:
[0134] Obtain the sample animal's motion acceleration sequence and sample body temperature sequence;
[0135] By analyzing the motion acceleration sequences of the samples from different dimensions, the motion characteristics of the livestock in the samples can be determined.
[0136] Based on the temperature change trend indicated by the sample body temperature sequence, determine the body temperature characteristics of the sample livestock;
[0137] Match the target state label with corresponding motion and body temperature features;
[0138] Based on the correspondence between the sample motion acceleration sequence, the sample body temperature sequence, and the target state label, a neural network model is trained until a preset stopping condition is reached, thus obtaining an estrus state recognition model.
[0139] In some embodiments, the sample processing module is further configured to:
[0140] Analyze the absolute acceleration at different times in the sample motion acceleration sequence to obtain the absolute acceleration sequence;
[0141] Determine the absolute acceleration of targets in the absolute acceleration sequence that is greater than a preset acceleration threshold;
[0142] The motion characteristics are determined based on the absolute acceleration sequence and the target's absolute acceleration.
[0143] In some embodiments, the sample processing module is further configured to:
[0144] Determine the first ratio of the target's absolute acceleration in the absolute acceleration sequence;
[0145] Calculate the variance of motion acceleration in an absolute acceleration sequence;
[0146] The motion characteristics are determined based on the first ratio and the variance of the motion acceleration.
[0147] In some embodiments, the sample processing module is further configured to:
[0148] Determine the target body temperature in the sample body temperature sequence that is higher than a preset body temperature threshold;
[0149] Determine the second ratio of the target body temperature in the sample body temperature sequence;
[0150] Based on the temperature differences of the sample body temperature data at different times in the sample body temperature sequence, the trend of body temperature change indicated by the sample body temperature sequence is determined.
[0151] The body temperature characteristics are determined based on the second ratio and the trend of body temperature changes.
[0152] In some embodiments, after inputting the encoding result into the state classification module for classification processing to obtain the state recognition result of the target livestock, the result output module 204 is further configured to:
[0153] If the state recognition result indicates that the target livestock is in estrus, then the image information of the target livestock is acquired;
[0154] Identify the behavioral characteristics of the target livestock based on image information, and determine whether the behavioral characteristics include the target estrus behavior corresponding to the target livestock;
[0155] If so, then the target animal is confirmed to be in estrus.
[0156] It should be noted that the livestock estrus state identification device 200 provided in this application embodiment belongs to the same concept as the livestock estrus state identification method in the above embodiment. The livestock estrus state identification device 200 can realize any of the methods provided in the livestock estrus state identification method embodiment. For details of its implementation process, please refer to the livestock estrus state identification method embodiment, which will not be repeated here.
[0157] As described above, the livestock estrus state recognition device proposed in this application collects sample animal motion acceleration sequences and body temperature sequences. By analyzing these sequences from multiple dimensions, the device determines the animal's motion and body temperature characteristics, thereby matching corresponding target state labels. Then, using the sample motion acceleration and body temperature sequences as input to a neural network model and the target state labels as output, the model is trained to obtain an estrus state recognition model. Finally, the estrus state recognition model is applied to identify the state of target livestock to obtain the recognition result. This result is then combined with the target livestock's image information to comprehensively determine whether the livestock is in estrus, thus improving the accuracy of target livestock state recognition. This facilitates timely detection of estrus, enabling timely mating and reproduction, improving breeding efficiency and quality, and promoting the development of animal husbandry.
[0158] This application also provides an electronic device, which may be a smartphone, tablet computer, desktop computer, etc. Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0159] The processor 301 is the control center of the electronic device 300. It connects various parts of the electronic device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the electronic device 300 and processes data, thereby monitoring the electronic device 300 as a whole.
[0160] In this embodiment, the processor 301 in the electronic device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to realize various functions:
[0161] Real-time acquisition of temporal motion acceleration and temporal body temperature of target livestock;
[0162] The temporal motion acceleration and temporal body temperature are input into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module.
[0163] The fused temporal data is input into the temporal convolution module for encoding processing to obtain the encoding result;
[0164] The encoding results are input into the state classification module for classification processing to obtain the state recognition results of the target livestock. The state recognition results indicate whether the target livestock is in estrus or not.
[0165] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0166] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0167] As described above, the electronic device provided in this embodiment collects sample motion acceleration sequences and sample body temperature sequences of livestock. By analyzing these sequences from multiple dimensions, it determines the livestock's motion and body temperature characteristics, thereby matching corresponding target state labels. Then, using the sample motion acceleration sequences and body temperature sequences as input to a neural network model and the target state labels as output, the neural network model is trained to obtain an estrus state recognition model. Finally, the estrus state recognition model is applied to identify the state of target livestock to obtain the state recognition result. This result is then combined with the target livestock's image information to comprehensively determine whether the target livestock is in estrus, thus improving the accuracy of target livestock state recognition. This facilitates timely detection of target livestock in estrus, enabling timely mating and reproduction, improving breeding efficiency and quality, and promoting the development of animal husbandry.
[0168] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0169] Therefore, this application provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes the following steps:
[0170] Real-time acquisition of temporal motion acceleration and temporal body temperature of target livestock;
[0171] The temporal motion acceleration and temporal body temperature are input into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module.
[0172] The fused temporal data is input into the temporal convolution module for encoding processing to obtain the encoding result;
[0173] The encoding results are input into the state classification module for classification processing to obtain the state recognition results of the target livestock. The state recognition results indicate whether the target livestock is in estrus or not.
[0174] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0175] The aforementioned storage medium can be ROM / RAM, magnetic disk, optical disk, etc. Since the computer program stored in the storage medium can execute the steps in any of the livestock estrus state identification methods provided in the embodiments of this application, it can achieve the beneficial effects that any of the livestock estrus state identification methods provided in the embodiments of this application can achieve, as detailed in the preceding embodiments, and will not be repeated here.
[0176] The foregoing has provided a detailed description of a method, apparatus, storage medium, and electronic device for identifying the estrus state of livestock, as provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for identifying the estrus state of livestock, characterized in that, The method includes: Real-time acquisition of temporal motion acceleration and temporal body temperature of target livestock; The temporal motion acceleration and the temporal body temperature are input into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module. The fused temporal data is input into the temporal convolution module for encoding processing to obtain the encoding result. The temporal convolution module includes multiple sequentially connected dilated causal convolutional layers. The fused temporal data is input into each sequentially connected dilated causal convolutional layer for convolution operation to obtain the encoding result. The output of each dilated causal convolutional layer is used as the input of the next dilated causal convolutional layer, and the scale of the convolution operation result of the input and output of each dilated causal convolutional layer is the same. The encoding result is input into the state classification module for classification processing to obtain the state identification result of the target livestock, which indicates whether the target livestock is in estrus or not.
2. The method according to claim 1, characterized in that, Before the data fusion module inputs the time-series motion acceleration and the time-series body temperature into the estrus state recognition model for data fusion processing to obtain the fused time-series data, the method further includes: Obtain the sample animal's motion acceleration sequence and sample body temperature sequence; The motion acceleration sequence of the sample is analyzed in different dimensions to determine the motion characteristics of the livestock in the sample. The body temperature characteristics of the livestock in the sample are determined based on the body temperature change trend indicated by the sample body temperature sequence. Match the target state label corresponding to the motion feature and the body temperature feature; Based on the correspondence between the sample motion acceleration sequence, the sample body temperature sequence, and the target state label, a neural network model is trained until a preset stopping condition is reached, thus obtaining the estrus state recognition model.
3. The method according to claim 2, characterized in that, The analysis of the sample motion acceleration sequence in different dimensions to determine the motion characteristics of the sample livestock includes: Analyze the absolute acceleration at different times in the sample motion acceleration sequence to obtain the absolute acceleration sequence; Determine the target absolute acceleration in the absolute acceleration sequence that is greater than a preset acceleration threshold; The motion characteristics are determined based on the absolute acceleration sequence and the target absolute motion acceleration.
4. The method according to claim 3, characterized in that, Determining the motion characteristics based on the absolute acceleration sequence and the target absolute acceleration includes: Determine the first ratio of the target's absolute acceleration in the absolute acceleration sequence; Calculate the variance of motion acceleration in the absolute acceleration sequence; The motion characteristics are determined based on the first ratio and the variance of the motion acceleration.
5. The method according to claim 2, characterized in that, Determining the body temperature characteristics of the livestock sample based on the body temperature change trend indicated by the sample body temperature sequence includes: Determine the target body temperature in the sample body temperature sequence that is higher than a preset body temperature threshold; Determine the second ratio of the target body temperature in the sample body temperature sequence; Based on the temperature differences of the sample body temperature data at different times in the sample body temperature sequence, the trend of body temperature change indicated by the sample body temperature sequence is determined. The body temperature characteristics are determined based on the second ratio and the trend of body temperature change.
6. The method according to any one of claims 1 to 5, characterized in that, After inputting the encoding result into the state classification module for classification processing to obtain the state recognition result of the target livestock, the process further includes: If the state recognition result indicates that the target livestock is in estrus, then the image information of the target livestock is acquired; Identify the behavioral characteristics of the target livestock based on the image information, and determine whether the behavioral characteristics include the target estrus behavior corresponding to the target livestock; If so, then the target livestock is determined to be in the estrus state.
7. A device for identifying the estrus state of livestock, characterized in that, include: The data acquisition module is used to acquire the temporal motion acceleration and temporal body temperature of the target livestock in real time. The data processing module is used to input the temporal motion acceleration and the temporal body temperature into the data fusion module of the estrus state recognition model for data fusion processing to obtain fused temporal data. The estrus state recognition model also includes a temporal convolution module and a state classification module. The feature encoding module is used to input the fused temporal data into the temporal convolution module for encoding processing to obtain the encoding result. The temporal convolution module includes multiple sequentially connected dilated causal convolutional layers. The fused temporal data is input into each sequentially connected dilated causal convolutional layer for convolution operation to obtain the encoding result. The output of each dilated causal convolutional layer serves as the input to the next dilated causal convolutional layer, and the scale of the convolution operation result between the input and output of each dilated causal convolutional layer is the same. The result output module is used to input the encoding result into the state classification module for classification processing to obtain the state identification result of the target livestock, and the state identification result indicates whether the target livestock is in estrus or not.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run on a computer, the computer performs the livestock estrus state identification method as described in any one of claims 1 to 6.
9. An electronic device comprising a processor and a memory, the memory storing a computer program, characterized in that, The processor invokes the computer program to execute the livestock estrus state identification method as described in any one of claims 1 to 6.