Cattle breeding data transmission method and system based on cloud platform
Through the analysis of thermal infrared video and ambient temperature data, the degree of abnormality in cattle is calculated and the data transmission priority is determined, which solves the problem of insufficient response to early detection of diseases and emergency response in the prior art, and realizes the timely identification and treatment of high-risk diseases such as infectious pleuropneumonia.
Patent Information
- Application Number
- CN202510047447.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The existing technology cannot effectively distinguish and optimize the priority of cattle breeding data transmission, resulting in insufficient response to early detection of diseases and emergency response, especially in dealing with high-risk diseases such as infectious pleuropneumonia.
By collecting and analyzing thermal infrared video and ambient temperature data, distinguishing the exhaled gas area from the cattle body area, obtaining parameters such as body temperature, breathing frequency, exhaled gas temperature and exhaled gas area of each cow, combining the ambient temperature and activity volume, calculate the abnormality degree of each cow, and correct the abnormality degree through group correlation to finally determine the data transmission priority.
It realizes early identification of abnormal cattle and real-time upload of key data, improves the timeliness of detection and treatment of high-risk diseases such as infectious pleuropneumonia, and ensures the safety and efficiency of the breeding farm.
Smart Images

Figure CN119479017B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of breeding data transmission, and in particular to a cattle breeding data transmission method and system based on a cloud platform. Background Art
[0002] With the expansion of modern cattle farming, the demand for data-based and intelligent farming management is becoming more and more urgent. A large amount of data is generated in the farm every day, including individual physiological parameters of cattle, environmental monitoring data and behavioral characteristics records. These data are of great significance for early warning of diseases, feeding optimization and improvement of farming efficiency. However, most of these data are non-critical data (repetitive data, non-rigid data). If all of them are uploaded, a large amount of non-critical data will occupy a large amount of bandwidth, resulting in some critical data cannot be transmitted in time, which ultimately affects the timeliness of data analysis. At present, the priority of data transmission is generally set, that is, critical data is transmitted first and completely; non-critical data can be compressed and transmitted when the bandwidth is idle; in addition, when an emergency occurs, high-priority data can occupy the bandwidth of low-priority data.
[0003] Contagious pleuropneumonia caused by Mycoplasma bovis is highly contagious and has a high mortality rate, but its symptoms are not obvious in the early stages of the disease, which leads to large losses due to untimely prevention. Existing technologies cannot effectively distinguish and optimize the priority of data transmission, and are insufficient in early detection of diseases and emergency response, especially when dealing with high-risk diseases such as contagious pleuropneumonia, which can easily lead to detection delays.
[0004] Therefore, there is an urgent need for a method to achieve early abnormal identification of specific diseases (such as contagious pleuropneumonia) and real-time uploading of key data. Summary of the invention
[0005] In order to solve the above technical problems, the object of the present invention is to provide a cattle breeding data transmission method and system based on a cloud platform.
[0006] According to a first aspect of an embodiment of the present invention, a method for transmitting cattle breeding data based on a cloud platform is provided, and the technical solution adopted is as follows:
[0007] Collect thermal infrared video and ambient temperature within the cattle pen at the current moment;
[0008] Analyze the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video, distinguish the exhaled gas area from the cow body area, and obtain the cow position point in each frame image as well as the body temperature, respiratory frequency, exhaled gas temperature and exhaled gas area of each cow;
[0009] Analyze the change of the position point of each cow in the continuous frame images of the thermal infrared video to obtain the activity amount of each cow;
[0010] According to the exhaled gas area, the respiratory frequency and the activity level, combined with the ambient temperature, the degree of respiratory abnormality of each cow is obtained;
[0011] According to the abnormal breathing degree, combined with the body temperature and the exhaled gas temperature, the abnormality degree of each cow is obtained;
[0012] Analyzing the group correlation between the abnormality levels of all cows within the cowshed, correcting the abnormality levels, and obtaining a corrected abnormality level for each cow;
[0013] The data transmission priority at the current moment is determined according to the corrected abnormality degree.
[0014] In some embodiments of the present invention, analyzing the optical flow vector and the temperature change degree of each region in the continuous frame images of the thermal infrared video also includes:
[0015] Set the temperature threshold range;
[0016] The area within the temperature threshold range in each frame of the thermal infrared video is retained to obtain a suspected hot spot area.
[0017] In some embodiments of the present invention, the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video are analyzed to distinguish the exhaled gas area from the cow body area, and the cow position point in each frame image and the body temperature, respiratory rate, exhaled gas temperature and exhaled gas area of each cow are obtained, including:
[0018] Analyze the optical flow vector and temperature change degree of each suspected hot spot area in the continuous frame images of the thermal infrared video to obtain the possibility that each suspected hot spot area belongs to the exhaled gas area;
[0019] According to the possibility, combined with the optical flow vector, the exhaled gas area and the cow body area are distinguished to obtain the cow position point in each frame image;
[0020] Analyzing the maximum temperature of the cattle body area to obtain the body temperature of each cattle;
[0021] The temperature variation curve of the exhaled gas area in the continuous frame images is analyzed to obtain the respiratory frequency, exhaled gas temperature and exhaled gas area of each cow.
[0022] In some embodiments of the present invention, analyzing the optical flow vector and temperature variation degree of each suspected hot spot area in the continuous frame images of the thermal infrared video to obtain the possibility that each suspected hot spot area belongs to the exhaled gas area includes:
[0023] Obtaining an optical flow vector of each suspected hot spot region in each frame of the image by an optical flow method, and using the direction of the optical flow vector as the moving direction of the suspected hot spot region;
[0024] Based on the moving direction, setting a reference frame before the current frame;
[0025] Analyzing the moving distance of the suspected hot spot area between the reference frame and the previous frame according to the size of the optical flow vector, and obtaining the moving distance parameter of the suspected hot spot area;
[0026] Analyze the temperature change of the suspected hot spot area between a reference frame and a previous frame according to the temperature value of the suspected hot spot area to obtain a temperature change parameter of the suspected hot spot area;
[0027] Analyze the existence of the suspected hot spot area in the reference frame to obtain the stability of the suspected hot spot area;
[0028] According to the moving distance parameter and the temperature change parameter, combined with the stability, all reference frames are traversed to obtain the possibility that each of the suspected hot spot areas belongs to the exhaled gas area.
[0029] In some embodiments of the present invention, the temperature change curve of the exhaled gas area in the continuous frame images is analyzed to obtain the respiratory frequency, exhaled gas temperature and exhaled gas area of each cow, including:
[0030] Constructing a line graph of the temperature of the exhaled gas area of each cow in the continuous frames of the thermal infrared video in a time sequence to obtain a temperature change curve;
[0031] Each time period between the peak points in the temperature change curve is recorded as a breathing cycle of the cow, and the breathing frequency of each cow in each breathing cycle is obtained;
[0032] The maximum temperature value in each respiratory cycle is recorded as the exhaled gas temperature, and the exhaled gas temperature of each cow in each respiratory cycle is obtained;
[0033] The maximum area of the exhaled gas region in all frames in each respiratory cycle is recorded as the exhaled gas area, and the exhaled gas area of each cow in each respiratory cycle is obtained.
[0034] In some embodiments of the present invention, analyzing the change amount of the cow position point of each cow in the continuous frame images of the thermal infrared video to obtain the activity amount of each cow includes:
[0035] Set the reference time period before the current moment;
[0036] For each cow, the distance and time difference between the cow position point and the next cow position point within the reference time period are analyzed, all the cow position points within the reference time period are traversed, and the activity amount of each cow is obtained in combination with the length of the reference time period.
[0037] In some embodiments of the present invention, the degree of respiratory abnormality of each cow is obtained according to the exhaled gas area, the respiratory frequency and the activity level in combination with the ambient temperature, including:
[0038] Based on the historical data of cattle breeding, obtain the reference standard values of respiratory rate, exhaled gas temperature, body temperature, and exhaled gas area of healthy cattle;
[0039] Analyze the differences between the exhaled gas area and the respiratory frequency and their reference standard values, respectively, and combine the activity level and the ambient temperature to obtain the degree of respiratory abnormality of each cow;
[0040] The differences between the body temperature and the exhaled gas temperature and their reference standard values are analyzed, and combined with the degree of respiratory abnormality, the degree of abnormality of each cow is obtained.
[0041] In some embodiments of the present invention, the group correlation between the abnormality levels of all cows in the cowshed is analyzed, including: calculating the average value of the abnormality levels of all cows in the cowshed to obtain the group correlation between the abnormality levels of all cows in the cowshed.
[0042] According to a second aspect of an embodiment of the present invention, a cattle breeding data transmission system based on a cloud platform is provided, comprising: a memory and a processor, wherein:
[0043] The memory is used to store program code;
[0044] The processor is used to read the program code stored in the memory and execute the method described in the first aspect of the embodiment of the present invention.
[0045] In some embodiments of the present invention, the processor comprises:
[0046] The data acquisition module is used to collect thermal infrared video and ambient temperature within the cattle pen at the current moment;
[0047] A basic data analysis module, used to analyze the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video, distinguish the exhaled gas area from the cow body area, obtain the cow position points in each frame image and the body temperature, respiratory rate and exhaled gas temperature of each cow; and used to analyze the change amount of the cow position points in the continuous frame images of the thermal infrared video to obtain the activity amount of each cow;
[0048] The abnormality degree analysis module is used to obtain the abnormality degree of breathing of each cow according to the exhaled gas area, the respiratory frequency and the activity amount in combination with the ambient temperature; and to obtain the abnormality degree of each cow according to the abnormality degree of breathing in combination with the body temperature and the exhaled gas temperature; and to analyze the group correlation between the abnormality degrees of all cows within the cowshed, correct the abnormality degree, and obtain the corrected abnormality degree of each cow;
[0049] The data transmission priority determination module is used to determine the data transmission priority at the current moment according to the correction abnormality degree.
[0050] Compared with the prior art, the cattle breeding data transmission method and system based on the cloud platform provided by the present invention have the following technical effects:
[0051] 1. Based on the thermal infrared video data, according to the characteristics of each cow's body in the infrared image and the difference in the characteristics of the exhaled gas in the infrared image, the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video are analyzed, the exhaled gas area and the cow body area are distinguished, and the physiological parameters (body temperature, respiratory rate, exhaled gas temperature and exhaled gas area of each cow) and activity parameters (activity of each cow) of each individual cow are obtained, which provides basic data for the subsequent abnormality analysis of the cows, and the data acquisition method is simple and reliable.
[0052] 2. According to the historical reference data of cattle, the early stage of infectious pleuropneumonia will cause the cattle's respiratory rate to accelerate and the body temperature to rise, but these similar changes will also occur due to the increase in ambient temperature and the cattle's activities. Therefore, the abnormality of the cattle is quantified by the differences in parameters such as respiratory rate, body temperature, exhaled gas temperature and exhaled gas area, and adjusted in combination with the ambient temperature and activity level; the abnormality of the cattle obtained by the method and system of the present invention comprehensively considers the respiratory characteristics and body temperature characteristics of the cattle in the early stage of infectious pleuropneumonia, and combines the effects of ambient temperature and activity level on respiration and body temperature. The abnormality of the cattle in the early stage of infectious pleuropneumonia can be detected in a timely and accurate manner, effectively solving the problem of untimely prevention due to the unclear symptoms in the early stage of infectious pleuropneumonia, and realizing the early abnormal identification of infectious pleuropneumonia.
[0053] 3. Since contagious pleuropneumonia is contagious, the abnormality of the cow will become greater when other individuals infected with contagious pleuropneumonia appear. Therefore, by analyzing the abnormality of other cows in the group, the abnormality of individual cows can be further corrected, highlighting the priority of monitoring and treatment of potentially infected cows.
[0054] 4. The method of the present invention can timely and accurately identify abnormal individuals with contagious pleuropneumonia in the farm, and set their priority to the highest level for transmission during data transmission, which can ensure timely treatment of early contagious pleuropneumonia. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A basic flow chart of a cattle breeding data transmission method based on a cloud platform provided by an embodiment of the present invention;
[0057] Figure 2 A basic flow chart of a method for distinguishing an exhaled gas area from a cow body area provided by one embodiment of the present invention;
[0058] Figure 3 A schematic diagram of the basic composition of a cloud platform-based cattle breeding data transmission system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the cattle breeding data transmission method and system based on the cloud platform proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. Terms such as "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such article or device. In the absence of further restrictions, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the article or device including the element.
[0061] The specific scheme of the cattle breeding data transmission method based on cloud platform provided by the present invention is described in detail below with reference to the accompanying drawings.
[0062] See also Figure 1 , which shows the basic process of a cattle breeding data transmission method based on a cloud platform provided by an embodiment of the present invention.
[0063] like Figure 1 As shown, a cattle breeding data transmission method based on a cloud platform provided by an embodiment of the present invention specifically includes:
[0064] S100: Collect thermal infrared video and ambient temperature within the cattle pen at the current moment.
[0065] The infrared thermal imaging sensor collects the thermal infrared video within the current cattle pen range, and the video collection frequency is 30fps (30 frames per second). Multiple temperature sensors are set within the cattle pen range, and the ambient temperature within the cattle pen range at the current moment is collected through the temperature sensors.
[0066] S200: Analyze the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video, distinguish the exhaled gas area from the cow body area, and obtain the cow position point in each frame image as well as the body temperature, respiratory frequency and exhaled gas temperature of each cow.
[0067] In the early stages of contagious pleuropneumonia, it is necessary to monitor and evaluate abnormal conditions in cattle by analyzing thermal infrared videos and environmental factors. Because the disease can cause cattle to breathe rapidly, have a fever, and have a disordered breathing rhythm, a comprehensive assessment of multiple factors is required.
[0068] When testing the early data of contagious pleuropneumonia, since contagious pleuropneumonia will cause the cow's breathing to become rapid and the body temperature to rise in the early stage, but these will be affected by the individual activity of the cow and the ambient temperature, so it is necessary to determine the activity data of each cow. Through thermal infrared video, only the temperature of the exhaled gas of each cow can be obtained, which cannot be directly used as the activity data of each cow. Therefore, it is necessary to analyze the continuous frame images of the thermal infrared video, and distinguish the exhaled gas area from the cow body area according to the difference in the characteristics of each cow's body in the infrared image and the characteristics of the exhaled gas in the infrared image, and obtain the cow position point in each frame image and the body temperature, respiratory frequency and exhaled gas temperature of each cow. Then, by analyzing the change in the cow position point in multiple frames of images, the activity of each cow can be obtained.
[0069] Based on the above analysis, in this embodiment, the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video are first analyzed to distinguish the exhaled gas area from the cow body area, and the cow position point in each frame image as well as the body temperature, respiratory rate and exhaled gas temperature of each cow are obtained.
[0070] In some embodiments of the present invention, the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video are analyzed, and the following steps are also included: setting a temperature threshold range; retaining the area within the temperature threshold range in each frame image of the thermal infrared video to obtain the suspected hot spot area. The specific implementation method is: Since the body temperature of cattle is usually between arrive The temperature of the exhaled gas will not exceed the body temperature by much, and will continue to decrease after exhalation; therefore, the preset The temperature threshold range is set, and the area within the temperature threshold range in each frame of the thermal infrared video is retained and recorded as a suspected hot spot area.
[0071] See also Figure 2 , which shows the basic process of a method for distinguishing the exhaled gas area and the cow body area provided by an embodiment of the present invention.
[0072] like Figure 2 As shown, the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video are analyzed to distinguish the exhaled gas area from the cow body area, and the cow position point in each frame image as well as the body temperature, respiratory rate and exhaled gas temperature of each cow are obtained, including:
[0073] S201: Analyze the optical flow vector and temperature change degree of each suspected hot spot area in the continuous frame images of the thermal infrared video to obtain the possibility that each suspected hot spot area belongs to the exhaled gas area.
[0074] Since the suspected hot spot areas include the cow body area, the exhaled gas area and equipment in the cowshed that are within the temperature threshold range, and except for the exhaled gas area, the other areas of these suspected hot spot areas have high stability, and only the exhaled gas area will move and the temperature will change with the frame number, the moving direction and distance of each suspected hot spot area in multiple frames of continuous images can be analyzed.
[0075] Since the body temperature of the cow is relatively constant compared to the exhaled gas, and the movement of the cow's body is relatively smaller than the movement of the exhaled gas within a relatively small time threshold (short time), the exhaled gas area will continuously move in adjacent frames of the thermal infrared video due to the movement of the gas and the dissipation of temperature, and the temperature will also continuously change.
[0076] Therefore, in some embodiments of the present invention, by analyzing the optical flow vector and temperature change degree of each suspected hot spot area in the continuous frame images of the thermal infrared video, the possibility of each suspected hot spot area belonging to the exhaled gas area is obtained. The specific implementation method is: the optical flow vector of each suspected hot spot area in each frame image is obtained by the optical flow method, and the direction of the optical flow vector is used as the moving direction of the suspected hot spot area; based on the moving direction, the reference frame before the current frame is set, and the reference frame can be set to 30 frames before the current frame; according to the size of the optical flow vector, the moving distance of the suspected hot spot area between the reference frame and its previous frame is analyzed to obtain the moving distance parameter of the suspected hot spot area; according to the temperature value of the suspected hot spot area, the temperature change of the suspected hot spot area between the reference frame and its previous frame is analyzed to obtain the temperature change parameter of the suspected hot spot area; the existence of the suspected hot spot area in the reference frame is analyzed to obtain the stability of the suspected hot spot area; according to the moving distance parameter and the temperature change parameter, combined with the stability, all reference frames are traversed to obtain the possibility that each suspected hot spot area belongs to the exhaled gas area.
[0077] The calculation formula for constructing the possibility that the suspected hot spot area belongs to the exhaled gas area is:
[0078]
[0079] In the formula, Indicates Frame The possibility that the suspected hot spot area belongs to the exhaled gas area; Indicates The number of reference frames before the frame (i.e. 30 frames before the current frame); Indicates Frame No. The suspected hot spot area is Frame reference frame and The modulus of the optical flow vector of the frame reference frame (the average value of the optical flow vectors of all pixels in the region); Indicates Frame No. The suspected hot spot area is The frame reference frame and the The difference in average temperature from frame to frame; Indicates the persistence score of the suspected hot spot area, that is, the Frame No. The suspected hot spot area is Whether the current suspected hot spot area exists in the frame reference frame, if yes, it is 1, if not, it is 0; represents the linear normalization function.
[0080] Represents the moving distance parameter of the suspected hot spot area between the reference frame and its previous frame, The larger the value, the higher the suspected hot spot area in the current frame. Frame reference frame and The larger the moving distance between frame reference frames, the greater the possibility that the current suspected hot spot area belongs to the exhaled gas area; Represents the temperature change parameter of the suspected hot spot area between the reference frame and its previous frame, The larger the value, the higher the current suspected hot spot area in the current frame. The frame reference frame and the The larger the difference between the average temperature of the frame reference frame, the greater the temperature change of the current suspected hot spot area, indicating that the current suspected hot spot area is more likely to belong to the exhaled gas area; Indicates the persistence score of the suspected hot spot area, indicating the stability of the suspected hot spot area. The persistence of the exhaled gas area is low, while the persistence of the cow body area is high. Therefore, this is used to Make adjustments.
[0081] Similarly, the possibility that each suspected hot spot area in all frame images of the thermal infrared video belongs to the exhaled gas area is obtained.
[0082] S202: Based on the possibility and in combination with the optical flow vector, the exhaled gas area and the cow body area are distinguished to obtain the cow position point in each frame image.
[0083] After obtaining the possibility that each suspected hot spot area in all frames belongs to the exhaled gas area, the exhaled gas area and the cow body area are distinguished according to the possibility and combined with the optical flow vector, and the cow position point in each frame image is obtained. The specific implementation method is: presetting the possibility threshold that the suspected hot spot area belongs to the exhaled gas area, the value of the possibility threshold can be 0.8; setting the possibility that each suspected hot spot area in the current frame belongs to the exhaled gas area greater than the possibility threshold ( ) is recorded as the exhaled gas area, and then the exhaled gas area in each frame image is obtained; the possibility that each suspected hot spot area in the current frame belongs to the exhaled gas area is less than or equal to the possibility threshold ( ) is recorded as the non-exhaled gas area.
[0084] The probability that each suspected hot spot area in the current frame belongs to the exhaled gas area is less than or equal to the probability threshold ( ) cannot be directly determined as the cow body area, because it may also be a device in the temperature threshold range in the cowshed, and it needs to be reversed according to the exhaled gas area. The gas in the exhaled gas area generally diffuses from the nostril position. Since cows have two nostrils and the two nostrils are in different directions, there is generally another adjacent exhaled gas area for the exhaled gas area, and there is a certain angle between the moving directions of the two adjacent exhaled gas areas. Determine the center point of the two adjacent exhaled gas areas, and extend them continuously in the opposite direction of the optical flow direction from the center point of the exhaled gas area. The intersection of the two extension lines is used as the cow position point. The non-exhaled gas area closest to the cow's nose is recorded as the cow body area. Then the cow body area and cow position point in each frame image are obtained.
[0085] S203: Analyze the maximum temperature of the cow body area to obtain the body temperature of each cow.
[0086] After obtaining the cow body region in each frame of image, the highest temperature of the cow body region is used as the body temperature of the corresponding cow, thereby obtaining the body temperature of each cow in each frame of image.
[0087] S204: Analyze the temperature change curve of the exhaled gas area in the continuous frame images to obtain the respiratory frequency, exhaled gas temperature and exhaled gas area of each cow.
[0088] The breathing cycle includes the stages of exhalation and inhalation. During the exhalation stage, the temperature of the exhaled gas will continue to decrease. Therefore, for the accuracy of subsequent calculations, the highest temperature in the exhaled gas area is used as the exhaled gas temperature corresponding to the exhaled gas area in subsequent calculations, and this can be used as a feature for the frequency calculation of the cow's breathing. As the exhaled gas diffuses and cools down, it will not be detected when it is below the detection threshold. At this time, the area is the largest, and the exhaled gas area can be obtained.
[0089] Therefore, by analyzing the temperature change curve of the exhaled gas area in the continuous frame image, the respiratory frequency, exhaled gas temperature and exhaled gas area of each cow are obtained. The specific implementation method is: the temperature of the exhaled gas area of each cow in the continuous frames in the thermal infrared video is constructed into a line graph in a time sequence to obtain a temperature change curve; each time period between the peak points in the temperature change curve is recorded as a breathing cycle of the cow, and the inverse of the breathing cycle is calculated to obtain the respiratory frequency of each cow in each breathing cycle; the maximum temperature value in each breathing cycle is recorded as the exhaled gas temperature to obtain the exhaled gas temperature of each cow in each breathing cycle; the maximum area of the exhaled gas area in all frames in each breathing cycle is recorded as the exhaled gas area area. Since the two noses of the cow produce two adjacent exhaled gas areas, the areas corresponding to the two adjacent exhaled gas areas in each breathing cycle are added together to obtain the exhaled gas area of each cow in each breathing cycle.
[0090] S300: Analyze the change in the position points of the cows in the continuous frame images of the thermal infrared video to obtain the activity amount of each cow.
[0091] Through step S200, the cow position point of each cow in each frame image is obtained, therefore, the change amount of the cow position point of each cow in the continuous frame image of the thermal infrared video is analyzed to obtain the activity amount of each cow. It should be noted that due to the continuity of the cow's body activity, the cow body area of a cow in the continuous frames is continuous and uninterrupted, therefore the continuous and uninterrupted cow body area is regarded as the cow body area of the same cow, that is, the change amount of multiple cow position points of each cow in the continuous frame image of the thermal infrared video within the corresponding cow body area is analyzed to obtain the activity amount of each cow.
[0092] The specific implementation method is: set a reference time period before the current moment, the length of the reference time period can be set to 2 minutes; for each cow, analyze the distance and time difference between the cow position point and the next cow position point within the reference time period (within 2 minutes before the current moment), traverse all cow position points within the reference time period, and combine the length of the reference time period to obtain the activity amount of each cow at the current moment. The calculation formula for the activity amount of each cow at the current moment is constructed as follows:
[0093]
[0094] In the formula, Indicates the current moment Activity level of cattle; Indicates the number of The number of cattle location points per cattle; Indicates The first cow The distance between the position of a cow and the position of the next cow; Indicates The first cow The time difference between the location of one cow and the location of the next cow; Indicates the length of the reference time period (2 minutes).
[0095] The distance between the cow position point and the next cow position point The larger the value, the greater the distance the cattle has moved, which means the cattle are more active at the current moment. The cumulative value of displacement is used to represent the activity amount, but considering that the time interval is large, when the displacement is the same distance, the cattle may have wandered for a distance in the middle moment, so the cumulative value of displacement is used to represent the activity amount. right Weighted, the greater the time interval between the two cows' location points, the greater the impact of the distance between the two cows' location points on the cows' activity level.
[0096] It should be noted that the amount of activity in the period before the current moment has a direct impact on the current respiration and body temperature. The amount of activity at the current moment expressed by the amount of activity in a very short period of time has a certain deviation. Therefore, the activity at the current moment is quantified here by the amount of activity within 2 minutes before the current moment.
[0097] In order to facilitate the subsequent calculation, the activity of each cow in each respiratory cycle is further calculated. The first cow Taking the activity during a breathing cycle as an example, we can first calculate The first cow The calculation method of the activity amount corresponding to the end of each breathing cycle is the same as that of the above The calculation method of the activity of the first cow in the 2 minutes before the current moment is to calculate the activity of the first The first cow The activity volume in the 2 minutes before the end of the first breathing cycle is divided by the number of breathing cycles in the previous 2 minutes to get the The first cow The amount of activity during a breathing cycle.
[0098] S400: Based on the exhaled gas area, respiratory rate and activity level, combined with the ambient temperature, the degree of respiratory abnormality of each cow is obtained.
[0099] In the early stages of contagious pleuropneumonia, the cattle's respiratory rate will increase, the amount of exhaled gas will decrease, and the breathing rhythm will be disordered; and due to inflammation in the cattle's body, the metabolism in the cattle's body increases, which in turn causes the body temperature to rise, and the body temperature changes show a certain degree of fluctuation.
[0100] Therefore, the degree of respiratory abnormality of each cow is obtained according to the exhaled gas area, respiratory rate and activity level, combined with the ambient temperature. Further, according to the historical data of cattle breeding, the reference standard values of respiratory rate and exhaled gas area of healthy cows are obtained; the difference between the exhaled gas area and respiratory rate and their reference standard values is analyzed, and the degree of respiratory abnormality of each cow is obtained in combination with the activity level and ambient temperature.
[0101] The specific implementation method is as follows: According to the historical data information obtained in the cattle farm, the standard value of the static data of the cattle when they are not sick can be obtained under normal circumstances, that is, the reference standard value of the respiratory frequency and the exhaled gas area. The average value of each data dimension in the cattle farm is calculated and used as the reference standard value of each dimension. According to various data of each cow 2 hours before the current moment, including respiratory frequency, exhaled gas volume (exhaled gas area), body temperature, exhaled gas temperature, activity level and ambient temperature and other data. Since it is difficult for cattle to breathe in the early stage of infectious pleuropneumonia, their breathing will be relatively rapid, and the amount of exhaled gas will be relatively reduced. However, under normal circumstances, the respiratory frequency of cattle increases due to high temperature or cattle activity. The purpose is to dissipate heat through respiratory metabolism and increase oxygen intake, so the amount of exhaled gas will not decrease. Therefore, the degree of respiratory abnormality of each cow can be obtained by analyzing the changes in the respiratory frequency and exhaled gas area of cattle.
[0102] The calculation formula for the degree of respiratory abnormality of each cow is constructed as follows:
[0103]
[0104] In the formula, Indicates the current moment The degree of abnormal breathing of the cow; Indicates The number of respirations (number of breathing cycles) of the cow in the 2 hours before the current moment; Indicates The first cow The absolute value of the difference between the respiratory rate during a respiratory cycle and the reference standard value; Indicates The first cow The absolute value of the difference between the exhaled gas area during a respiratory cycle and the reference standard value; Indicates The first cow The ambient temperature at the time of the first breathing cycle. It should be noted that since the temperature sensors are distributed in multiple locations in the cowshed, the ambient temperature at this time is the distance from the first breathing cycle. The first cow The position of the respiratory cycle is closest (according to The first cow The ambient temperature detected by the temperature sensor of the cow body area during each breathing cycle, and the average value of the detected temperatures is calculated when multiple temperature sensors are at a similar distance; Indicates The first cow The absolute value of the difference between the ambient temperature during a respiratory cycle and the suitable temperature range for cattle. The suitable temperature range for cattle is ; Indicates The first cow The amount of activity during a respiratory cycle; represents the linear normalization function.
[0105] and The larger the The first cow The greater the difference between the respiratory rate and the exhaled gas area (expired gas volume) in the first respiratory cycle and the standard normal value, the The greater the degree of abnormal breathing of the first cow; The larger the value, the greater the difference between the current ambient temperature and the suitable temperature range of the cow. When the current ambient temperature is greater than the maximum value of the suitable temperature range of the cow, the cow will normally breathe faster to dissipate heat and ensure the normal temperature of the body. When the current ambient temperature is less than the minimum value of the suitable temperature range of the cow, the cow will reduce the breathing frequency to reduce the loss of heat. At the same time, due to the amount of activity of the cow, The larger the value, the higher the respiratory rate, which is normal. Therefore, at this time, the absolute value of the difference between the ambient temperature and the suitable temperature range of the cow is and the amount of activity of the cattle at this time To adjust for the degree of respiratory abnormality in each cow due to abnormalities in respiratory rate and expired air area.
[0106] Similarly, the degree of respiratory abnormality of each cow is obtained.
[0107] S500: According to the degree of abnormal breathing, combined with the body temperature and the exhaled gas temperature, the degree of abnormality of each cow is obtained.
[0108] Since cattle have inflammation in the early stages of contagious pleuropneumonia, their body temperature will rise and fluctuate slightly. Therefore, the degree of abnormality of each cow can be obtained based on the difference between the body temperature and the temperature of the exhaled gas of each cow and the normal range in the same time window, combined with the degree of abnormal breathing of the cow.
[0109] Therefore, according to the degree of abnormal breathing, combined with body temperature and exhaled gas temperature, the degree of abnormality of each cow is obtained. Further including: obtaining reference standard values of exhaled gas temperature and body temperature of healthy cows according to historical data of cattle breeding; analyzing the difference between body temperature and exhaled gas temperature and their reference standard values, and combining the degree of abnormal breathing to obtain the degree of abnormality of each cow.
[0110] The specific implementation method is as follows: Based on the historical data information obtained from the cattle farm, the standard value of the static data of the cattle when they are not sick under normal circumstances can be obtained, that is, the reference standard value of the body temperature and the exhaled gas temperature. The average value of each data dimension in the cattle farm is calculated and used as the reference standard value of each dimension. Based on various data of each cow 2 hours before the current moment, including respiratory rate, exhaled gas volume (exhaled gas area), body temperature, exhaled gas temperature, activity level, and ambient temperature.
[0111] The calculation formula for the abnormality degree of each cow at the current moment is constructed as follows:
[0112]
[0113] in, Indicates the current moment The degree of abnormality of the cow; Indicates the current moment The degree of abnormal breathing of the cow; Indicates The duration (in seconds) of the temperature detection of the cow 2 hours before the current moment; Indicates The first cow The absolute value of the difference between the body temperature at 1 second and the reference standard value; Indicates The first cow The absolute value of the difference between the exhaled gas temperature at 1 second and the reference standard value; Indicates the reference standard value of body temperature; Indicates the reference standard value of exhaled gas temperature; represents the linear normalization function.
[0114] pass The difference between body temperature and exhaled gas temperature is combined and normalized to quantify the effect of temperature on the detection of abnormality in cattle. The larger the value, the more severe the inflammation in the cattle and the higher the abnormality.
[0115] Similarly, the degree of abnormality of each cow is obtained.
[0116] S600: Analyze the group correlation between the abnormality levels of all cows in the cowshed, correct the abnormality levels, and obtain the corrected abnormality level of each cow.
[0117] After obtaining the abnormality level of each cow at the current moment, since contagious pleuropneumonia is contagious, there may not be only one cow infected with contagious pleuropneumonia in the farm. Therefore, it is necessary to further determine the severity of the abnormality by comparing the abnormality level of the current cow with the abnormality data of other cows in the cowshed. If the abnormality level of other cows around a cow is higher and the number of abnormal cows is larger, it means that the infection situation in the farm is more serious at this time, and the abnormality level of each cow needs to be further corrected according to the abnormality level of all cows in the cowshed where each cow is located.
[0118] Therefore, by analyzing the group correlation between the abnormality levels of all cows in the cowshed, the abnormality level is corrected to obtain the corrected abnormality level of each cow. Further, analyzing the group correlation between the abnormality levels of all cows in the cowshed includes: calculating the average value of the abnormality levels of all cows in the cowshed to obtain the group correlation between the abnormality levels of all cows in the cowshed.
[0119] The calculation formula for the corrected abnormality level of each cow is constructed as follows:
[0120]
[0121] In the formula, Indicates the current moment Corrected abnormality level of the cow; Indicates the current moment The degree of abnormality of the cow; Indicates The number of cattle in the same pen; Indicates The first cow in the same pen The degree of abnormality of the cow; represents the linear normalization function.
[0122] By calculating the average value of the abnormality levels of all the cows in the cowshed, the abnormality levels of all the cows in the cowshed are corrected to obtain the corrected abnormality level of each cow.
[0123] S700: Determine the data transmission priority at the current moment according to the degree of correction of the abnormality.
[0124] The data transmission priority at the current moment is determined according to the corrected abnormality level. The specific implementation method is: the abnormality level threshold is preset to 0.7. When the corrected abnormality level of each cow in the breeding farm is greater than the abnormality level threshold, it is marked as an abnormal individual. When data is transmitted, the individual data priority is higher than other data.
[0125] In a farm, the data of each dimension under normal circumstances can be directly determined by the threshold to identify the abnormality in its dimension, so that the abnormal data can be transmitted first during data transmission. However, since the fluctuation of bovine contagious pleuropneumonia in the farm is not obvious during the early data detection, and the difficulty of treatment will increase in the later stage, it is necessary to identify the disease signal as early as possible. Therefore, according to the above method, the abnormal individuals of contagious pleuropneumonia in the farm can be identified in time and accurately, and their priority can be set to the highest level for transmission during transmission to ensure that the early contagious pleuropneumonia can be treated in time.
[0126] In summary, the present invention uses the optical flow vector and temperature change degree of each area in the continuous frame image of the thermal infrared video to distinguish the exhaled gas area from the cattle body area, and determines the cattle position point and the body temperature of the cattle in each frame image, and combines the temperature and area changes of the exhaled gas area to obtain the respiratory frequency, exhaled gas temperature and exhaled gas area of each cattle. Secondly, according to the historical reference data of cattle, the respiratory frequency of cattle will be accelerated and the body temperature will also increase in the early stage of illness, but these similar changes will also occur due to the increase in ambient temperature and the cattle's activities. Therefore, the abnormal degree of cattle is quantified by the difference in parameters such as respiratory frequency, body temperature, exhaled gas temperature and exhaled gas area, and adjusted in combination with ambient temperature and activity. Finally, since contagious pleuropneumonia is contagious, the abnormal degree of the cattle will also become greater when other individuals infected with contagious pleuropneumonia appear. Therefore, by analyzing the abnormal degree of other cattle in the group, the abnormal degree of individual cattle is further corrected, highlighting the priority of monitoring and treatment of potentially infected cattle.
[0127] Based on the same inventive concept as the above method, this embodiment also provides a cattle breeding data transmission system based on a cloud platform.
[0128] See also Figure 3 , which shows the basic composition of a cattle breeding data transmission system based on a cloud platform provided by an embodiment of the present invention.
[0129] like Figure 3 As shown, a cattle breeding data transmission system based on a cloud platform includes: a memory 10 and a processor 20, wherein:
[0130] A memory 10, used for storing program codes;
[0131] The processor 20 is used to read the program code stored in the memory 10, and execute the acquisition of the thermal infrared video and the ambient temperature within the cowshed at the current moment; analyze the optical flow vector and the temperature change degree of each area in the continuous frame images of the thermal infrared video, distinguish the exhaled gas area from the cow body area, and obtain the cow position point in each frame image and the body temperature, breathing frequency, exhaled gas temperature and exhaled gas area of each cow; analyze the change amount of the cow position point of each cow in the continuous frame images of the thermal infrared video to obtain the activity of each cow; obtain the degree of abnormal breathing of each cow based on the exhaled gas area, breathing frequency and activity, combined with the ambient temperature; obtain the degree of abnormal breathing of each cow based on the body temperature and the exhaled gas temperature; analyze the group correlation between the abnormal degrees of all cows in the cowshed, correct the abnormal degree, and obtain the corrected abnormal degree of each cow; determine the data transmission priority at the current moment based on the corrected abnormal degree.
[0132] Furthermore, the processor 20 includes a data acquisition module 21, a basic data analysis module 22, an abnormality degree analysis module 23 and a data transmission priority determination module 24. Among them:
[0133] The data acquisition module 21 is used to collect thermal infrared video and ambient temperature within the cattle pen at the current moment;
[0134] The basic data analysis module 22 is used to analyze the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video, distinguish the exhaled gas area from the cow body area, obtain the cow position point in each frame image and the body temperature, respiratory rate and exhaled gas temperature of each cow; and to analyze the change amount of the cow position point in the continuous frame images of the thermal infrared video to obtain the activity amount of each cow;
[0135] The abnormality degree analysis module 23 is used to obtain the abnormality degree of breathing of each cow according to the exhaled gas area, respiratory frequency and activity, combined with the ambient temperature; and to obtain the abnormality degree of each cow according to the abnormality degree of breathing, combined with the body temperature and the exhaled gas temperature; and to analyze the group correlation between the abnormality degrees of all cows in the cowshed, correct the abnormality degree, and obtain the corrected abnormality degree of each cow;
[0136] The data transmission priority determination module 24 is used to determine the data transmission priority at the current moment according to the degree of correction of the abnormality.
[0137] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0138] Various embodiments in this specification are described in a progressive manner, and the same or similar parts between various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A cattle breeding data transmission method based on a cloud platform, characterized in that: The method comprises: Collect thermal infrared video and ambient temperature within the cattle pen at the current moment; Analyze the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video, distinguish the exhaled gas area from the cow body area, and obtain the cow position point in each frame image as well as the body temperature, respiratory frequency, exhaled gas temperature and exhaled gas area of each cow; Analyze the change of the position point of each cow in the continuous frame images of the thermal infrared video to obtain the activity amount of each cow; According to the exhaled gas area, the respiratory frequency and the activity level, combined with the ambient temperature, the degree of respiratory abnormality of each cow is obtained; According to the abnormal breathing degree, combined with the body temperature and the exhaled gas temperature, the abnormality degree of each cow is obtained; The abnormal breathing degree of each cow and the method for obtaining the abnormal degree are as follows: according to the historical data of cattle breeding, the reference standard values of the respiratory frequency, the exhaled gas temperature, the body temperature, and the exhaled gas area of healthy cows are obtained; the difference between the exhaled gas area and the respiratory frequency and their reference standard values is analyzed, and the abnormal breathing degree of each cow is obtained by combining the activity amount and the ambient temperature; the difference between the body temperature and the exhaled gas temperature and their reference standard values is analyzed, and the abnormal breathing degree of each cow is obtained by combining the abnormal breathing degree; Analyzing the group correlation between the abnormality levels of all the cows in the cowshed, correcting the abnormality level, and obtaining the corrected abnormality level of each cow; wherein the average value of the abnormality levels of all the cows in the cowshed is calculated to obtain the group correlation between the abnormality levels of all the cows in the cowshed; When the corrected abnormality level is greater than the abnormality level threshold, the corresponding cattle are marked as abnormal individuals, and the priority of the abnormal individuals is set to the highest level for transmission.
2. The cattle breeding data transmission method based on cloud platform according to claim 1 is characterized in that: Analyze the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video, which also includes: Set the temperature threshold range; The area within the temperature threshold range in each frame of the thermal infrared video is retained to obtain a suspected hot spot area.
3. The cattle breeding data transmission method based on cloud platform according to claim 2 is characterized in that: Analyze the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video, distinguish the exhaled gas area from the cow body area, and obtain the cow position point in each frame image and the body temperature, respiratory rate, exhaled gas temperature and exhaled gas area of each cow, including: Analyze the optical flow vector and temperature change degree of each suspected hot spot area in the continuous frame images of the thermal infrared video to obtain the possibility that each suspected hot spot area belongs to the exhaled gas area; According to the possibility, combined with the optical flow vector, the exhaled gas area and the cow body area are distinguished to obtain the cow position point in each frame image; Analyzing the maximum temperature of the cattle body area to obtain the body temperature of each cattle; The temperature variation curve of the exhaled gas area in the continuous frame images is analyzed to obtain the respiratory frequency, exhaled gas temperature and exhaled gas area of each cow.
4. The cattle breeding data transmission method based on cloud platform according to claim 3 is characterized in that: Analyzing the optical flow vector and temperature variation degree of each suspected hot spot area in the continuous frame images of the thermal infrared video to obtain the possibility that each suspected hot spot area belongs to the exhaled gas area includes: Obtaining an optical flow vector of each suspected hot spot region in each frame of the image by an optical flow method, and using the direction of the optical flow vector as the moving direction of the suspected hot spot region; Based on the moving direction, setting a reference frame before the current frame; Analyzing the moving distance of the suspected hot spot area between the reference frame and the previous frame according to the size of the optical flow vector, and obtaining the moving distance parameter of the suspected hot spot area; Analyze the temperature change of the suspected hot spot area between a reference frame and a previous frame according to the temperature value of the suspected hot spot area to obtain a temperature change parameter of the suspected hot spot area; Analyze the existence of the suspected hot spot area in the reference frame to obtain the stability of the suspected hot spot area; According to the moving distance parameter and the temperature change parameter, combined with the stability, all reference frames are traversed to obtain the possibility that each of the suspected hot spot areas belongs to the exhaled gas area.
5. The cattle breeding data transmission method based on cloud platform according to claim 3 is characterized in that: Analyze the temperature change curve of the exhaled gas area in the continuous frame images to obtain the respiratory frequency, exhaled gas temperature and exhaled gas area of each cow, including: Constructing a line graph of the temperature of the exhaled gas area of each cow in the continuous frames of the thermal infrared video in a time sequence to obtain a temperature change curve; Each time period between the peak points in the temperature change curve is recorded as a breathing cycle of the cow, and the breathing frequency of each cow in each breathing cycle is obtained; The maximum temperature value in each respiratory cycle is recorded as the exhaled gas temperature, and the exhaled gas temperature of each cow in each respiratory cycle is obtained; The maximum area of the exhaled gas region in all frames in each respiratory cycle is recorded as the exhaled gas area, and the exhaled gas area of each cow in each respiratory cycle is obtained.
6. The method for transmitting cattle breeding data based on a cloud platform according to claim 5, characterized in that: Analyze the change amount of the cow position point of each cow in the continuous frame images of the thermal infrared video to obtain the activity amount of each cow, including: Set the reference time period before the current time; For each cow, the distance and time difference between the cow position point and the next cow position point within the reference time period are analyzed, all the cow position points within the reference time period are traversed, and the activity amount of each cow is obtained in combination with the length of the reference time period.
7. A cattle breeding data transmission system based on a cloud platform, characterized in that: The system comprises: a memory and a processor, wherein: The memory is used to store program codes; The processor is configured to read the program code stored in the memory and execute the method according to any one of claims 1 to 6.
8. The cloud platform-based cattle breeding data transmission system according to claim 7 is characterized in that: The processor comprises: The data acquisition module is used to collect thermal infrared video and ambient temperature within the cattle pen at the current moment; A basic data analysis module, used to analyze the optical flow vector and temperature change degree of each area in the continuous frame images of the thermal infrared video, distinguish the exhaled gas area from the cow body area, obtain the cow position points in each frame image and the body temperature, respiratory rate and exhaled gas temperature of each cow; and used to analyze the change amount of the cow position points in the continuous frame images of the thermal infrared video to obtain the activity amount of each cow; The abnormality degree analysis module is used to obtain the abnormality degree of breathing of each cow according to the exhaled gas area, the respiratory frequency and the activity amount in combination with the ambient temperature; and to obtain the abnormality degree of each cow according to the abnormality degree of breathing in combination with the body temperature and the exhaled gas temperature; and to analyze the group correlation between the abnormality degrees of all cows within the cowshed, correct the abnormality degree, and obtain the corrected abnormality degree of each cow; The data transmission priority determination module is used to determine the data transmission priority at the current moment according to the correction abnormality degree.
Citation Information
Patent Citations
AI-based live pig abnormal behavior monitoring and early warning method and system
CN118658209A
Experimental animal behavioral research methods and apparatuses
US10959398B1