Cow calving behavior prediction method and device, equipment and storage medium

By installing a terminal device with a gyroscope sensor on the cow's tail, the motion information is obtained in real time and the tail lifting posture is predicted, the heavy burden and misjudgment problems caused by manual observation in the prior art are solved, and efficient and accurate prediction of cow calving is achieved.

CN119744782APending Publication Date: 2025-04-04SHANGHAI SHANNUO INFORMATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411572110.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing dairy farm uses manual observation methods to confirm the status of the cows and determine whether they are about to calve, resulting in heavy manpower burden and misjudgment, and the prediction efficiency and accuracy are low.

Method used

By installing a terminal device containing a gyroscope sensor on the cow's tail, the movement information of the cow's tail, including acceleration value and angular velocity value, determine the tail lifting posture information, and predict whether there is calving behavior based on the tail lifting posture information within the preset time interval.

Benefits of technology

It realizes automatic prediction of calving behavior of dairy cows, saves manpower and time, improves prediction efficiency and accuracy, and helps dairy farm staff prepare for calving in advance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119744782A_ABST
    Figure CN119744782A_ABST
Patent Text Reader

Abstract

The invention provides a dairy cow calving behavior prediction method and device, equipment and a storage medium. The method is applied to terminal equipment, the terminal equipment is fixed on the tail of a dairy cow, a gyroscope sensor is configured in the terminal equipment, and the method comprises the following steps: acquiring motion information of the tail of the dairy cow through the gyroscope sensor; coordinate axes of the gyroscope sensor comprise an X axis, a Y axis and a Z axis, and the motion information comprises respective acceleration values on the three coordinate axes and angular velocity values on the Z axis; according to the motion information, tail lifting posture information of the dairy cow is determined; the tail lifting attitude information represents the relationship between the acceleration value of the tail on the Y axis and the time point of collecting the acceleration value, and the relationship between the acceleration value on the Z axis and the time point of collecting the acceleration value; and according to the tail lifting posture information in the preset time interval, predicting whether the dairy cow has a calving behavior or not. According to the method, the cow tails are monitored, so that the prediction precision of cow calving is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology, and in particular to a method, device, equipment and storage medium for predicting calving behavior of dairy cows. Background Art

[0002] Calving of dairy cows is a very important task in dairy farms. Currently, most dairy farms use manual observation methods to confirm the status of dairy cows and determine whether the cows are about to calve.

[0003] This method not only brings a heavy labor burden, but also is prone to misjudgment. Therefore, it is necessary to study an automatic prediction method for calving behavior, detect cow behavior in a timely and accurate manner, and help dairy farm staff make various preparations for cow calving in advance. Summary of the invention

[0004] The present application provides a method, device, equipment and storage medium for predicting calving behavior of dairy cows, so as to improve the prediction accuracy and efficiency of calving of dairy cows.

[0005] In a first aspect, the present application provides a method for predicting calving behavior of a dairy cow, the method being applied to a terminal device, the terminal device being fixed on the tail of the dairy cow, and the terminal device being equipped with a gyroscope sensor; the method comprising:

[0006] The motion information of the cow's tail is obtained by using the gyro sensor; wherein the coordinate axes of the gyro sensor include an X-axis, a Y-axis, and a Z-axis, and the motion information includes acceleration values ​​on the three coordinate axes and an angular velocity value on the Z-axis;

[0007] Determine the tail-lifting posture information of the cow according to the motion information; wherein the tail-lifting posture information represents the relationship between the acceleration value of the tail on the Y-axis and the time point of collecting the acceleration value, and the relationship between the acceleration value on the Z-axis and the time point of collecting the acceleration value;

[0008] Based on the tail-lifting posture information within a preset time interval, it is predicted whether the cow has calving behavior.

[0009] In a second aspect, the present application provides a device for predicting calving behavior of a dairy cow, the device being applied to a terminal device, the terminal device being fixed on the tail of the dairy cow, and the terminal device being equipped with a gyroscope sensor; the device comprising:

[0010] An information acquisition unit, used to acquire movement information of the cow's tail through the gyro sensor; wherein the coordinate axes of the gyro sensor include an X-axis, a Y-axis, and a Z-axis, and the movement information includes acceleration values ​​on the three coordinate axes and an angular velocity value on the Z-axis;

[0011] A posture determination unit, used to determine the tail-lifting posture information of the cow according to the motion information; wherein the tail-lifting posture information represents the relationship between the acceleration value of the tail on the Y axis and the time point, and the relationship between the acceleration value on the Z axis and the time point;

[0012] The behavior prediction unit is used to predict whether the cow has calving behavior based on the tail-lifting posture information within a preset time interval.

[0013] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0014] The memory stores computer-executable instructions;

[0015] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0017] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.

[0018] The present application provides a method, device, equipment and storage medium for predicting the calving behavior of a dairy cow. By installing a terminal device containing a gyroscope sensor on the tail of a dairy cow, motion information such as the acceleration value and angular velocity value of the dairy cow's tail during movement can be obtained in real time. According to the motion information, the tail-lifting posture information of the dairy cow's tail on the Y-axis and Z-axis can be obtained, that is, the acceleration values ​​of the Y-axis and Z-axis at each time point can be obtained. According to the tail-lifting posture information within a preset time interval, it is predicted whether the dairy cow will calve, so as to give an early warning to the staff. The automatic prediction of calving behavior is realized, which saves manpower and time, improves the prediction efficiency and accuracy of calving behavior, and helps the staff of the dairy farm to make various preparations for the calving of dairy cows in advance. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] Figure 1 A schematic diagram of a flow chart of a method for predicting calving behavior of dairy cows provided in an embodiment of the present application;

[0021] Figure 2A schematic diagram of a coordinate system of a gyroscope sensor provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of a waveform diagram of a change in acceleration value provided in an embodiment of the present application;

[0023] Figure 4 A schematic diagram of a flow chart of a method for predicting calving behavior of dairy cows provided in an embodiment of the present application;

[0024] Figure 5 A schematic diagram of a flow chart of a method for predicting calving behavior of dairy cows provided in an embodiment of the present application;

[0025] Figure 6 A structural block diagram of a device for predicting calving behavior of dairy cows provided in an embodiment of the present application;

[0026] Figure 7 A structural block diagram of a device for predicting calving behavior of dairy cows provided in an embodiment of the present application;

[0027] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application;

[0028] Fig. 9 A structural block diagram of an electronic device provided in an embodiment of the present application.

[0029] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0031] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0032] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0033] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0034] It should be noted that due to space limitations, this application specification does not list all optional implementation methods. After reading this application specification, those skilled in the art should be able to think that as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method. Each embodiment is described in detail below.

[0035] Cow calving is a very important task in dairy farms. By predicting the calving behavior of dairy cows, it can help dairy farm staff make various preparations for calving in advance, thereby improving the efficiency of calving. The state of dairy cows before calving is different from their usual state. Through field observations in dairy farms, it is found that dairy cows will frequently lift their tails before calving, and the tail lifting posture of dairy cows before calving is significantly different from the usual tail lifting posture. Therefore, detecting the tail lifting of dairy cows is an important way to provide early warning for dairy cow production.

[0036] At present, most dairy farms still use manual observation methods, which not only brings a heavy manpower burden, but also is prone to misjudgment. The prediction efficiency and accuracy of calving behavior are low, affecting the success rate of calving.

[0037] The present application provides a method, device, equipment and storage medium for predicting calving behavior of dairy cows, aiming to solve the above technical problems in the prior art.

[0038] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0039] Figure 1The present invention provides a flowchart of a method for predicting the calving behavior of a dairy cow, which can be performed by a device for predicting the calving behavior of a dairy cow. The method is applied to a terminal device, which is fixed on the tail of the dairy cow and is equipped with a gyroscope sensor. Figure 1 As shown, the method comprises the following steps:

[0040] S101. Obtain movement information of the cow's tail through a gyro sensor; wherein the coordinate axes of the gyro sensor include an X-axis, a Y-axis, and a Z-axis, and the movement information includes respective acceleration values ​​on the three coordinate axes and an angular velocity value on the Z-axis.

[0041] Exemplarily, the terminal device may include a gyroscope sensor and a module chip, and the gyroscope sensor may be used to obtain the acceleration value and angular velocity value of the cow's tail during movement. The module chip integrates a network communication function, can be connected and communicated with the gyroscope sensor, and can process the acceleration value and angular velocity value obtained by the gyroscope sensor to predict whether the cow is about to calve. When it is determined that calving behavior is to be performed, an early warning can be sent to the back-end server through the network to remind the staff to prepare for calving. The terminal device can be fixed on the cow's tail, for example, it can be tied to the base of the cow's tail.

[0042] The data collected by the gyroscope sensor is data of a three-axis coordinate system, that is, the coordinate axes of the gyroscope sensor may include an X-axis, a Y-axis, and a Z-axis. Through the gyroscope sensor, the motion information of the cow's tail can be obtained in real time or periodically, and the motion information may include acceleration values ​​and angular velocity values, that is, the acceleration values ​​on the X-axis, Y-axis, and Z-axis can be obtained, and the angular velocity values ​​on the X-axis, Y-axis, and Z-axis can also be obtained. In this embodiment, the motion information may include acceleration values ​​on the X-axis, Y-axis, and Z-axis, and an angular velocity value on the Z-axis.

[0043] In this embodiment, the three coordinate axes of the gyro sensor satisfy the right-hand rule, the Y axis is along the tail direction, and the Z axis is perpendicular to the tail direction.

[0044] Specifically, the coordinate system of the gyroscope sensor is a three-axis coordinate system, and the three coordinate axes are respectively an X-axis, a Y-axis, and a Z-axis. Among them, the direction of the Y-axis can be along the direction of the tail, for example, it can be upward along the direction of the tail; the direction of the Z-axis can be perpendicular to the direction of the tail, for example, it can be perpendicular to the direction of the tail outward; the direction of the X-axis satisfies the right-hand rule, that is, according to the right-hand rule and the already determined directions of the Y-axis and the Z-axis, the direction of the X-axis can be obtained.

[0045] Figure 2 Schematic diagram of the coordinate system of the gyroscope sensor. Figure 2 This is a picture of a cow's back. Figure 2In the figure, if the tail hangs down naturally, the Y-axis direction can be upward, the Z-axis direction can be toward the back of the cow, and the X-axis direction can be toward the right. When the cow's tail is raised, the Y-axis direction gradually moves toward the front of the cow, the Z-axis direction gradually moves toward the sky, and the X-axis direction does not change.

[0046] The beneficial effect of such a setting is that, by setting the direction of the coordinate axis, it helps to calculate the acceleration and angular velocity, improves the standardization of the calculation, and thus improves the efficiency and accuracy of calving prediction.

[0047] S102. Determine the tail-lifting posture information of the cow based on the motion information; wherein the tail-lifting posture information represents the relationship between the acceleration value of the tail on the Y-axis and the time point of collecting the acceleration value, and the relationship between the acceleration value on the Z-axis and the time point of collecting the acceleration value.

[0048] For example, at any moment, the tail-lifting posture information at that moment can be determined based on motion information such as the acceleration value on the X-axis, the acceleration value on the Y-axis, the acceleration value on the Z-axis, and the angular velocity value on the Z-axis. The tail-lifting posture information can characterize the posture of the cow's tail being lifted, and the tail-lifting posture information can include the relationship between the acceleration value of the tail on the Y-axis and the time point at which the acceleration value is collected, and the relationship between the acceleration value of the tail on the Z-axis and the time point at which the acceleration value is collected. That is, the acceleration value on the Y-axis and the acceleration value on the Z-axis at each moment can be obtained.

[0049] The acceleration values ​​on the Y axis and the acceleration values ​​on the Z axis corresponding to each time point can be found from the motion information as the tail-lifting posture information. The time points can also be screened according to the acceleration values ​​on the X axis, the acceleration values ​​on the Y axis, the acceleration values ​​on the Z axis, and the angular velocity values ​​on the Z axis at each time point, and then the acceleration values ​​on the Y axis and the acceleration values ​​on the Z axis corresponding to the time points retained after the screening are found as the tail-lifting posture information. For example, the angular velocity value of the Z axis can be screened, and the time points whose angular velocity values ​​are less than the preset angular velocity can be screened out to obtain the retained time points.

[0050] The acceleration change waveform of the Y axis can be obtained according to the relationship between the acceleration value on the Y axis and the time point, and the acceleration change waveform of the Z axis can also be obtained according to the relationship between the acceleration value on the Z axis and the time point. Figure 3 It is a schematic diagram of the acceleration value change waveform. Figure 3 In FIG. 1 , the solid line waveform may be the acceleration change waveform of the Z axis, and the dotted line waveform may be the acceleration change waveform of the Y axis. The horizontal axis represents the time point, and the vertical axis represents the acceleration value.

[0051] S103: predicting whether the cow has calving behavior based on the tail-lifting posture information within a preset time interval.

[0052] Exemplarily, the preset time interval may include multiple time points, and the tail-lifting posture information at each time point is determined to obtain the tail-lifting posture information of the preset time interval. According to the tail-lifting posture information within the preset time interval, it can be determined whether the cow has frequently lifted its tail. For example, if the waveform graph fluctuates more, it is considered that the cow has frequently lifted its tail. Cows usually have frequent tail-lifting behaviors before giving birth. Therefore, it can be determined whether the cow is about to calve by determining whether the cow has frequently lifted its tail. Relevant information about the tail-lifting situation, such as the time and posture information of the tail-lifting behavior, can be sent to the staff in real time or at a fixed time. If the cow lifts its tail frequently within the preset time interval, it is considered that the cow is about to calve; if the cow does not lift its tail frequently within the preset time interval, it is considered that the cow is not about to calve.

[0053] The prediction result of whether to perform calving behavior can be sent to the staff, for example, an alarm message can be issued through the terminal device, or the terminal device can send the prediction result to the back-end server. After the staff obtains the prediction result, they can prepare for calving in time.

[0054] In the embodiment of the present application, by installing a terminal device containing a gyroscope sensor on the tail of a cow, the motion information such as the acceleration value and angular velocity value of the cow's tail during the movement can be obtained in real time. According to the motion information, the tail-lifting posture information of the cow's tail on the Y-axis and Z-axis can be obtained, that is, the acceleration values ​​of the Y-axis and Z-axis at each time point can be obtained. According to the tail-lifting posture information within a preset time interval, it is predicted whether the cow will calve, so as to give an early warning to the staff. The automatic prediction of calving behavior is realized, which saves manpower and time, improves the prediction efficiency and accuracy of calving behavior, and helps the staff of the dairy farm to make various preparations for the calving of the cow in advance.

[0055] Figure 4 A flowchart of a method for predicting calving behavior of dairy cows provided in an embodiment of the present application is an optional embodiment based on the above embodiment.

[0056] In this embodiment, the tail lifting posture information of the cow is determined according to the motion information, including: determining the tail state according to the acceleration value of the cow's tail on the X-axis, the acceleration value on the Y-axis, and the acceleration value on the Z-axis; wherein the tail state includes a static state and a moving state; if it is determined that there is no tail-swinging behavior according to the angular velocity value of the cow's tail on the Z-axis, and it is determined that the tail state is a moving state, then the tail lifting posture information of the cow is determined according to the acceleration value of the cow's tail on the Y-axis and the acceleration value on the Z-axis.

[0057] like Figure 4 As shown, the method comprises the following steps:

[0058] S401. Obtain movement information of the cow's tail through a gyro sensor; wherein the coordinate axes of the gyro sensor include an X-axis, a Y-axis, and a Z-axis, and the movement information includes respective acceleration values ​​on the three coordinate axes and an angular velocity value on the Z-axis.

[0059] Exemplarily, this step may refer to the above-mentioned step S101 and will not be described in detail.

[0060] S402: Determine the tail state according to the acceleration value of the cow's tail on the X-axis, the acceleration value on the Y-axis, and the acceleration value on the Z-axis; wherein the tail state includes a static state and a moving state.

[0061] For example, the tail of a cow can be in different states, and the tail state can be divided into a static state and a moving state. For example, when the tail is swishing or lifting, it is in a moving state. By obtaining the three-axis value of acceleration, it can be determined whether the cow's tail is in a static state or a moving state. That is, the tail state can be determined based on the acceleration value of the cow's tail on the X-axis, the acceleration value on the Y-axis, and the acceleration value on the Z-axis.

[0062] The judgment condition of the tail state can be preset. For example, the judgment condition can be that the acceleration value on the X-axis, the acceleration value on the Y-axis, and the acceleration value on the Z-axis exceed the preset threshold range respectively, and the tail state is considered to be in motion; or, the judgment condition can be that for each coordinate axis, the change value of the acceleration value at adjacent moments is determined. If the change value is greater than or equal to the preset change threshold, the tail state is considered to be in motion; or, the average value of the acceleration values ​​of the three coordinate axes at the same time is calculated. If the average value is greater than a preset value, the tail state is considered to be in motion, otherwise it is in a stationary state. In this embodiment, the judgment condition of the tail state is not specifically limited.

[0063] S403: If it is determined that there is no tail-swinging behavior according to the angular velocity value of the cow's tail on the Z axis, and the tail state is determined to be in a moving state, the cow's tail-lifting posture information is determined according to the acceleration value of the cow's tail on the Y axis and the acceleration value of the cow's tail on the Z axis.

[0064] Exemplarily, if it is determined that the cow's tail is in a stationary state, the subsequent monitoring of the tail-lifting behavior and calving behavior will not be performed, that is, steps S403 and S404 will not be executed. If it is determined that the cow's tail is in motion, it can be determined whether the cow's tail has a tail-swinging behavior based on the angular velocity value of the cow's tail on the Z axis. The tail-swinging behavior refers to swinging the tail left and right. The judgment conditions for the tail-swinging behavior can be preset. For example, if the angular velocity of the Z axis exceeds the preset angular velocity, it is considered that the tail-swinging behavior exists; or, if the angular velocity change at adjacent moments exceeds the preset change, it is considered that the tail-swinging behavior exists. In this embodiment, the judgment conditions for the tail-swinging behavior are not specifically limited.

[0065] If it is determined that the cow's tail is swishing, there is no need to perform tail lifting detection, that is, there is no need to determine the tail lifting posture information, nor is there a need to predict whether calving behavior will occur. If it is determined that there is no tail swishing behavior and the tail state is in motion, the cow's tail lifting posture information can be determined based on the acceleration value of the cow's tail on the Y axis and the acceleration value on the Z axis. For example, the Y axis acceleration and the Z axis acceleration at different times can be determined as the tail lifting posture information.

[0066] In this embodiment, tail lifting monitoring is performed only when the cow's tail moves and there is no tail flicking, so as to avoid misdetecting the tail flicking behavior as tail lifting behavior, reduce the subsequent calculation amount, improve the detection accuracy and efficiency of tail lifting behavior, and thus improve the prediction accuracy and efficiency of calving behavior.

[0067] In this embodiment, determining whether there is tail-flicking behavior based on the angular velocity value of the cow's tail on the Z axis includes: determining an angular velocity increment value of the Z axis based on the angular velocity value of the cow's tail on the Z axis within a preset time period; wherein the angular velocity increment value represents the swinging amplitude of the tail; if the angular velocity increment value is within a preset increment threshold, determining that there is no tail-flicking behavior.

[0068] Specifically, a time period is pre-set, and the time length of the preset time period can be less than or equal to the time length of the preset time interval. The angular velocity values ​​on the Z axis corresponding to each time point within the preset time period are obtained. According to the angular velocity values ​​on the Z axis at each time point within the preset time period, the angular velocity increment value of the Z axis is determined. The angular velocity increment value can characterize the amplitude of the tail swinging left and right. A calculation formula for the angular velocity increment value is pre-set, and the angular velocity value is substituted into the formula to calculate the angular velocity increment value. In this embodiment, the calculation formula for the angular velocity increment value is not specifically limited.

[0069] An increment threshold is set in advance, and the angular velocity increment value is compared with the increment threshold. If the angular velocity increment value is within the preset increment threshold, it is determined that there is no tail-swinging behavior; if the angular velocity increment value is greater than the preset increment threshold, it is determined that there is a tail-swinging behavior.

[0070] The beneficial effect of this setting is that the angular velocity increment value of the gyroscope Z axis can be used to determine whether the cow has a tail-flicking action, thereby avoiding errors in monitoring the tail-lifting behavior and improving the prediction accuracy of calving behavior.

[0071] S404: predict whether the cow has calving behavior based on the tail-lifting posture information within a preset time interval.

[0072] Exemplarily, this step may refer to the above-mentioned step S103 and will not be described in detail.

[0073] In the embodiment of the present application, by installing a terminal device containing a gyroscope sensor on the tail of a cow, the motion information such as the acceleration value and angular velocity value of the cow's tail during the movement can be obtained in real time. According to the motion information, the tail-lifting posture information of the cow's tail on the Y-axis and Z-axis can be obtained, that is, the acceleration values ​​of the Y-axis and Z-axis at each time point can be obtained. According to the tail-lifting posture information within a preset time interval, it is predicted whether the cow will calve, so as to give an early warning to the staff. The automatic prediction of calving behavior is realized, which saves manpower and time, improves the prediction efficiency and accuracy of calving behavior, and helps the staff of the dairy farm to make various preparations for the calving of the cow in advance.

[0074] Figure 5 A flowchart of a method for predicting calving behavior of dairy cows provided in an embodiment of the present application is an optional embodiment based on the above embodiment.

[0075] In this embodiment, based on the tail lifting posture information within a preset time interval, predicting whether the cow has calving behavior includes: determining the energy value on the Y-axis corresponding to each time point according to the acceleration value on the Y-axis corresponding to each time point in the tail lifting posture information, and determining the energy value on the Z-axis corresponding to each time point according to the acceleration value on the Z-axis corresponding to each time point in the tail lifting posture information; wherein the energy value represents the energy consumed by the movement of the tail; if it is determined that there is tail lifting behavior within the preset time interval based on the energy values ​​on the Y-axis and the energy values ​​on the Z-axis corresponding to each time point within the preset time interval, then the number of tail lifting behaviors within the preset time interval, the duration of the tail lifting behaviors, and the tail lifting posture information of the tail lifting behaviors are recorded; based on the number of tail lifting behaviors within the preset time interval, the duration of the tail lifting behaviors, and the tail lifting posture information of the tail lifting behaviors, predicting whether the cow has calving behavior.

[0076] like Figure 5 As shown, the method comprises the following steps:

[0077] S501. Obtain movement information of the cow's tail through a gyro sensor; wherein the coordinate axes of the gyro sensor include an X-axis, a Y-axis, and a Z-axis, and the movement information includes respective acceleration values ​​on the three coordinate axes and an angular velocity value on the Z-axis.

[0078] Exemplarily, this step may refer to the above-mentioned step S101 and will not be described in detail.

[0079] S502. Determine the tail-lifting posture information of the cow based on the motion information; wherein the tail-lifting posture information represents the relationship between the acceleration value of the tail on the Y-axis and the time point of collecting the acceleration value, and the relationship between the acceleration value on the Z-axis and the time point of collecting the acceleration value.

[0080] Exemplarily, this step may refer to the above-mentioned step S102 and will not be described in detail.

[0081] S503. Determine the energy value on the Y-axis corresponding to each time point according to the acceleration value on the Y-axis corresponding to each time point in the tail-lifting posture information, and determine the energy value on the Z-axis corresponding to each time point according to the acceleration value on the Z-axis corresponding to each time point in the tail-lifting posture information; wherein the energy value represents the energy consumed by the tail movement.

[0082] Exemplarily, the preset time interval includes multiple time points, and for each time point, the tail lift posture information includes the acceleration value on the Y axis and the acceleration value on the Z axis. According to the acceleration value on the Y axis corresponding to each time point, the energy value on the Y axis corresponding to the time point can be determined. According to the acceleration value on the Z axis corresponding to each time point, the energy value on the Z axis corresponding to the time point can be determined. The energy value refers to the energy consumed by the tail movement, for example, it can be the gravitational potential energy generated by gravity.

[0083] The average value of the acceleration values ​​on the Y axis corresponding to multiple time points may also be calculated, and the energy value on the Y axis may be calculated based on the average value corresponding to the Y axis; and the average value of the acceleration values ​​on the Z axis corresponding to multiple time points may be calculated, and the energy value on the Z axis may be calculated based on the average value corresponding to the Z axis. For example, the average value of the acceleration values ​​on the Y axis at all time points within a preset time interval may be calculated, and the average value of the acceleration values ​​on the Z axis at all time points within a preset time interval may be calculated.

[0084] In this embodiment, the energy value is:

[0085] E = ∫x 2 (t)dt;

[0086] Among them, E is the energy value generated by the movement of the cow's tail, and x(t) is the acceleration value of the cow's tail on the Y axis or Z axis.

[0087] Specifically, the cow's tail generates energy when it moves. A calculation formula for the energy value is preset. When calculating the energy value of the Y axis, the acceleration value on the Y axis is determined, and the acceleration value on the Y axis is substituted into the formula. The calculated E is the energy value of the Y axis. When calculating the energy value of the Z axis, the acceleration value on the Z axis is determined, and the acceleration value on the Z axis is substituted into the formula. The calculated E is the energy value of the Z axis. That is, the energy values ​​of the Y axis and the Z axis are calculated using the same formula.

[0088] The beneficial effect of this setting is that the energy values ​​of the Y-axis and Z-axis can be quickly calculated through the preset formula, so as to determine whether there is tail-lifting behavior based on the energy value, realize the prediction of calving of dairy cows, and improve the efficiency and accuracy of the prediction.

[0089] S504. If it is determined that there is a tail-lifting behavior within the preset time interval based on the energy values ​​on the Y-axis and the energy values ​​on the Z-axis corresponding to each time point within the preset time interval, the number of tail-lifting behaviors within the preset time interval, the duration of the tail-lifting behavior, and the tail-lifting posture information of the tail-lifting behavior are recorded.

[0090] Exemplarily, the preset time interval includes multiple time points. For each time point in the preset time interval, the energy value on the Y axis corresponding to each time point is determined, and the energy value on the Z axis corresponding to each time point is determined. According to the energy value on the Y axis and the energy value on the Z axis corresponding to each time point in the preset time interval, it is determined whether the cow has a tail-lifting behavior in the preset time interval. For example, if the change of the energy value on the Y axis and the energy value on the Z axis in the preset time interval meets the preset change condition, it is considered that the cow has a tail-lifting behavior.

[0091] If it is determined that the cow does not lift its tail within the preset time interval, it is considered that the cow will not calve; if it is determined that the cow lifts its tail, the number of tail-lifting behaviors within the preset time interval, the duration of each tail-lifting behavior, and the tail-lifting posture information of the tail-lifting behavior are recorded. For example, if the energy value on the Y axis and the energy value on the Z axis are both within the preset numerical range, it is considered to be a tail-lifting behavior; the maintenance time of the energy value on the Y axis and the energy value on the Z axis within the preset range is the duration of the tail-lifting behavior; the tail-lifting posture information of the tail-lifting behavior is the relationship between the acceleration value on the Y axis and the time point during the tail-lifting behavior, and the relationship between the acceleration value on the Z axis and the time point.

[0092] In this embodiment, the preset time interval includes multiple preset time periods; based on the energy values ​​on the Y-axis and the energy values ​​on the Z-axis corresponding to each time point in the preset time interval, it is determined that there is a tail-lift behavior in the preset time interval, including: determining that the average value of the energy value on the Y-axis corresponding to each time point in the preset time period is the first average value, and determining that the average value of the energy value on the Z-axis corresponding to each time point in the preset time period is the second average value; if the changing trend of the first average value in the preset time interval satisfies the preset first change condition, and the changing trend of the second average value in the preset time interval satisfies the preset second change condition, it is determined that there is a tail-lift behavior in the preset time interval.

[0093] Specifically, the preset time interval may include multiple preset time periods, and the preset time period includes multiple time points. For example, the preset time period is 100ms. For each time point in the preset time period, the acceleration value on the Y axis corresponding to each time point is determined, and the energy value is calculated based on the acceleration value. The average value of the energy value on the Y axis corresponding to each time point is calculated as the first average value. Similarly, for the Z axis, the acceleration value on the Z axis corresponding to each time point in the preset time period is determined, and the energy value is calculated based on the acceleration value. The average value of the energy value on the Z axis corresponding to each time point is calculated as the second average value.

[0094] According to the first average value corresponding to each time period, the change trend of the first average value within the preset time interval is determined. According to the second average value corresponding to each time period, the change trend of the second average value within the preset time interval is determined. A first change condition and a second change condition are preset to judge whether the change trend of the first average value meets the preset first change condition, and whether the change trend of the second average value meets the preset second change condition. If both are satisfied, it is determined that the cow has a tail-lifting behavior within the preset time interval; if the change trend of the first average value does not meet the first change condition or the change trend of the second average value does not meet the second change condition, it is considered that there is no tail-lifting behavior.

[0095] For example, the first change condition includes two stages, namely, the tail lifting start stage and the tail lifting end stage. In the tail lifting start stage, the condition that the energy value of the Y axis needs to meet is that the energy of the Y axis shows a downward trend, and then the energy value of the Y axis is equal to the energy value of the Z axis. When the energy of the Y axis continues to decline to a certain threshold and maintains for a certain time, it is considered that the tail lifting has begun, and the timing of the tail lifting duration can be started. In the tail lifting end stage, the condition that the energy value of the Y axis needs to meet is that the energy value of the Y axis shows an increasing trend, and then the energy value of the Y axis is equal to the energy value of the Z axis. When the energy value of the Y axis continues to increase to a certain threshold and lasts for a certain time, it is considered that the tail lifting has ended, and the timing of the tail lifting duration has also ended. The second change condition can also include two stages, namely, the tail lifting start stage and the tail lifting end stage. In the tail lifting start stage, the condition that the Z axis needs to meet is that the energy value of the Z axis shows an increasing trend, and then the energy value of the Z axis is equal to the energy value of the Y axis. When the energy of the Z axis continues to increase to a certain threshold and lasts for a certain time, it is considered that the tail lifting has begun, and the timing can be started. In the tail lifting end stage, the energy value of the Z axis needs to meet the condition that the energy value of the Z axis shows a downward trend, and then the energy value of the Z axis is equal to the energy value of the Y axis. When the energy value of the Z axis continues to decline and reaches a certain threshold and lasts for a certain time, the tail lifting is considered to be over and the timing can also end. The change trends of the first average value and the second average value need to meet the corresponding change conditions at the same time to be considered as a tail lifting behavior. For example, the energy value of the Z axis increases and the energy value of the Y axis shows a downward trend, and then the energy value of the Z axis is equal to the energy value of the Y axis. When the energy value of the Z axis continues to increase to a certain threshold and lasts for a certain time, it is considered that the tail lifting has begun and the timing is started. If these three stages are not experienced, the tail lifting is not considered to have begun. Continue to monitor the energy value of the Z axis to see a downward trend and the energy value of the Y axis to see an increasing trend, and then the energy value of the Y axis is equal to the energy value of the Z axis. When the energy value of the Y axis continues to increase to a certain threshold and lasts for a certain time, it is considered that the tail lifting is over and the timing is stopped. If these three stages are not experienced, the tail lifting is not considered to have ended.

[0096] The beneficial effect of this setting is that the average energy of the Y-axis and the Z-axis is calculated at regular intervals, and it is determined whether the change in the energy values ​​of the Y-axis and the Z-axis has experienced a preset change stage, thereby achieving accurate monitoring of the tail-lifting behavior and thereby improving the prediction accuracy of the calving behavior.

[0097] In this embodiment, if the changing trend of the first average value in the preset time interval satisfies the preset first change condition, and the changing trend of the second average value in the preset time interval satisfies the preset second change condition, then it is determined that there is a tail-up behavior in the preset time interval, including: if the changing trend of the first average value in the preset time interval satisfies the preset first change condition, and the changing trend of the second average value in the preset time interval satisfies the preset second change condition, then it is determined that there is a behavior to be confirmed in the preset time interval; determine the duration of the behavior to be confirmed, and if the duration of the behavior to be confirmed is equal to or greater than the preset first time threshold, determine the behavior to be confirmed as a tail-up behavior.

[0098] Specifically, if the change trend of the first average value in the preset time interval meets the first change condition, and the change trend of the second average value in the preset time interval meets the second change condition, it is determined that there is a behavior to be confirmed within the preset time interval, and the behavior to be confirmed may be a tail-raising behavior.

[0099] Determine the duration of the behavior to be confirmed, that is, determine the length of time in a preset time interval during which the change trend of the first average value meets the first change condition and the change trend of the second average value meets the second change condition. A first time threshold is preset, and the first time threshold is a preset time length. Compare the duration of the behavior to be confirmed with the first time threshold. If the duration of the behavior to be confirmed is equal to or greater than the preset first time threshold, the behavior to be confirmed is determined to be a tail-raising behavior; if the duration of the behavior to be confirmed is less than the preset first time threshold, it is determined that the behavior to be confirmed is not a tail-raising behavior.

[0100] The beneficial effect of such a setting is that when the duration of the tail lift is lower than a certain threshold, the behavior is not considered to be a tail lift, thus avoiding misidentification of the tail lift behavior and improving the monitoring accuracy of the tail lift behavior.

[0101] In this embodiment, the preset time interval may include multiple time periods, and there may be multiple time points in a time period. For example, a time period is 100 milliseconds, and every 10 milliseconds is a time point. The acceleration value on the Y-axis corresponding to each time point in the preset time period can be determined, and the energy value on the Y-axis corresponding to the preset time period can be determined according to the acceleration value on the Y-axis corresponding to each time point; and the acceleration value on the Z-axis corresponding to each time point in the preset time period can be determined, and the energy value on the Z-axis corresponding to the preset time period can be determined according to the acceleration value on the Z-axis corresponding to each time point. According to the energy value on the Y-axis and the energy value on the Z-axis corresponding to each time period in the preset time interval, it is determined whether there is a tail lift behavior in the preset time interval.

[0102] For example, within a preset time period, every 10 milliseconds is a time point, the acceleration value on the Y-axis corresponding to each time point is determined, and the average value of the acceleration value is calculated as the average acceleration of the Y-axis within the preset time period. The average acceleration of the Y-axis is substituted into the energy value calculation formula to obtain the energy value on the Y-axis corresponding to the preset time period; similarly, the acceleration value on the Z-axis corresponding to each time point is determined, and the average value of the acceleration value is calculated as the average acceleration of the Z-axis within the preset time period. The average acceleration of the Z-axis is substituted into the energy value calculation formula to obtain the energy value of the Z-axis corresponding to the preset time period.

[0103] That is to say, within the preset time interval, a Y-axis energy value can be obtained as the first average value, and a Z-axis energy value can be obtained as the second average value in each time period. That is, a preset time interval can obtain multiple first average values ​​and multiple second average values. The change trend of the first average value and the change trend of the second average value in the preset time interval can be determined. If the change trend of the first average value in the preset time interval meets the preset first change condition, and the change trend of the second average value in the preset time interval meets the preset second change condition, it is determined that there is a tail lift behavior in the preset time interval.

[0104] In this embodiment, after determining that there is a behavior to be confirmed within the preset time interval, it also includes: determining the time interval between two adjacent behaviors to be confirmed; if the time interval is less than the preset interval threshold, the two adjacent behaviors to be confirmed are determined as a tail-lifting behavior, and the sum of the durations of the two adjacent behaviors to be confirmed is determined as the duration of the tail-lifting behavior.

[0105] Specifically, if it is determined that there are multiple behaviors to be confirmed in the preset time interval, the time interval between two adjacent behaviors to be confirmed is determined, that is, it is determined how long it takes for the next behavior to be confirmed to be performed after the previous behavior to be confirmed is performed.

[0106] An interval threshold is set in advance, and the interval threshold is also a preset time length. The time interval between two adjacent behaviors to be confirmed is compared with the preset interval threshold. If the time interval is less than the preset interval threshold, the two adjacent behaviors to be confirmed are determined as a tail-lifting behavior, and the duration of the two adjacent behaviors to be confirmed is added, and the added duration is determined as the duration of the tail-lifting behavior. That is, the two behaviors to be confirmed are combined, and the duration is also combined.

[0107] The beneficial effect of this setting is that when the interval between two tail lifts is lower than a certain threshold, it is considered as one tail lift behavior, and the duration of the tail lift is accumulated, thereby improving the accuracy of tail lift behavior monitoring.

[0108] S505: Predict whether the cow has calving behavior based on the number of tail-lifting behaviors within a preset time interval, the duration of the tail-lifting behaviors, and the tail-lifting posture information of the tail-lifting behaviors.

[0109] Exemplarily, the number of times the tail is lifted within a preset time interval, the duration of each tail lift, and the tail posture information of each tail lift are determined, and based on these three types of data, it is predicted whether the cow has calving behavior. For example, if the number of tail lifts is too many and the duration of each is long, it is considered that the cow will calve. In this embodiment, tail lift detection is performed first, and then calving warning is issued based on the tail lift situation, so as to realize automatic warning of calving behavior, reduce manpower and time, and improve calving efficiency and safety.

[0110] In this embodiment, the tail-lifting behavior can be divided into three types, namely, frequent tail-lifting but short duration, frequent tail-lifting and long duration, and few tail-lifting but long duration. The frequency range of frequent tail-lifting and the frequency range of few tail-lifting can be preset, and the time range of long duration and short duration can also be preset. The prediction rules for calving behavior can be preset. For example, the prediction rule can be that if the tail is lifted frequently and lasts for a long time, it is considered that the cow will have calving behavior. The three types of tail-lifting behavior can also be combined to predict whether calving behavior will occur. For example, within a time interval, the tail is lifted frequently but the duration is short in the first half, and the tail is lifted less but the duration is long in the second half, then it is considered that calving behavior will occur. In this embodiment, the preset prediction rules are not specifically limited.

[0111] In this embodiment, whether the cow is in calving behavior is predicted based on the number of tail lifting behaviors within a preset time interval, the duration of the tail lifting behavior, and the tail lifting posture information of the tail lifting behavior, including: if the number of tail lifting behaviors within the preset time interval is equal to or greater than a preset first number threshold, and the duration of each tail lifting behavior is equal to or greater than a preset second time threshold, then based on the tail lifting posture information of the tail lifting behavior, it is predicted whether the cow is in calving behavior.

[0112] Specifically, a first number threshold and a second time threshold are pre-set to determine the number of tail-lifting behaviors within a preset time interval and the duration of each tail-lifting behavior. The number of tail-lifting behaviors is compared with the first number threshold, and the duration of each tail-lifting behavior is compared with the second time threshold. If the number of tail-lifting behaviors is equal to or greater than the preset first number threshold, and the duration of each tail-lifting behavior is equal to or greater than the preset second time threshold, then it is possible to predict whether the cow has calving behavior based on the tail-lifting posture information of each tail-lifting behavior; if the number of tail-lifting behaviors is less than the preset first number threshold, or the duration of the tail-lifting behavior is less than the preset second time threshold, it is considered that the cow will not have calving behavior.

[0113] That is to say, a sliding window method can be used to calculate the number of tail lifts and the duration of tail lifts within a specified time. When the number of tail lifts and the duration of tail lifts reach a predetermined threshold, a comparison and precise matching of the tail lift posture information is performed to provide a calving warning. In this embodiment, the first number threshold and the second time threshold can be manually set and sent to the terminal device in the form of a command.

[0114] The beneficial effect of such a setting is that after determining that there are multiple tail-lifting behaviors, the tail-lifting posture information can be further matched to further improve the confirmation accuracy of the tail-lifting behavior, thereby improving the warning accuracy of dairy cow calving.

[0115] In this embodiment, based on the tail lifting posture information of the tail lifting behavior, predicting whether the cow has calving behavior includes: determining the acceleration value of the tail on the target coordinate axis at each time point according to the tail lifting posture information of the tail lifting behavior; wherein the target coordinate axis is the Y axis or the Z axis; if it is determined according to the time sequence that the difference in acceleration values ​​of adjacent moments is less than a preset first acceleration threshold, then the previous moment in the adjacent moments is determined as the starting point; if after the starting point, there is a difference in acceleration values ​​of adjacent moments that is equal to or greater than the preset first acceleration threshold, then the next moment in the adjacent moments is determined as the end point; if it is determined that the difference in acceleration values ​​of the starting point and the end point on the target axis is greater than a preset second acceleration threshold, then the tail lifting behavior is determined to be the target behavior; if it is determined that the number of target behaviors within the preset time interval is greater than the preset second number threshold, then it is predicted that the cow has calving behavior.

[0116] Specifically, one coordinate axis is determined from the three coordinate axes of the gyroscope sensor as the target coordinate axis, and the target coordinate axis can be the Y axis or the Z axis. For each tail lift behavior, the acceleration value corresponding to each time point of the tail on the target coordinate axis is determined according to the tail lift posture information of the tail lift behavior. For example, if the target coordinate axis is the Z axis and the tail lift behavior lasts for two minutes, the acceleration value corresponding to each time point on the Z axis within these two minutes is determined.

[0117] Determine the two adjacent moments within the duration in time sequence, and calculate the difference in acceleration values ​​at adjacent moments. For example, the duration of the tail lift behavior is from 0:00 to 0:02, and the time points in between include 0 milliseconds, 100 milliseconds, 200 milliseconds, 300 milliseconds, 400 milliseconds, etc. Then, according to the time sequence, you can first determine the difference between the acceleration value corresponding to 0 milliseconds and the acceleration value corresponding to 100 milliseconds. Preset a first acceleration threshold, for example, the first acceleration threshold is 100. Compare the difference in acceleration values ​​at adjacent moments with the first acceleration threshold. If the difference in acceleration values ​​at adjacent moments is less than the first acceleration threshold, the previous moment in the adjacent moments is determined as the starting point. For example, if the adjacent moments are 0 milliseconds and 100 milliseconds, the moment of 0 milliseconds can be used as the starting point.

[0118] After determining the starting point, continue to determine the difference in acceleration between subsequent adjacent moments. For example, you can continue to determine the difference in acceleration between 100 milliseconds and 200 milliseconds. Continue to compare the difference in acceleration values ​​between new adjacent moments with the first acceleration threshold. If the difference in acceleration values ​​between new adjacent moments is equal to or greater than the first acceleration threshold, then determine the next moment in the adjacent moments as the end point; if the difference in acceleration values ​​between new adjacent moments is still less than the first acceleration threshold, continue to determine the difference in acceleration values ​​between subsequent adjacent moments until there is a difference in acceleration values ​​between adjacent moments that is equal to or greater than the first acceleration threshold. For example, the difference in acceleration values ​​between 100 milliseconds and 200 milliseconds is less than the first acceleration threshold, continue to determine the difference in acceleration values ​​between 200 milliseconds and 300 milliseconds, the difference in acceleration values ​​between 200 milliseconds and 300 milliseconds is greater than the first acceleration threshold, and determine the time point of 300 milliseconds as the end point.

[0119] If there is no starting point at the time point of the tail lifting behavior, or there is a starting point but no end point, the tail lifting behavior can be screened out. After determining the starting point and end point of the tail lifting behavior, determine the acceleration value of the starting point on the target axis and the acceleration value of the end point on the target axis, and calculate the difference between the two acceleration values. A second acceleration threshold is set in advance, for example, the second acceleration threshold is 700. If the difference is greater than the second acceleration threshold, the tail lifting behavior is determined as the target behavior; if the difference is less than or equal to the second acceleration threshold, the tail lifting behavior is screened out. By determining the target behavior, the tail lifting behavior is further confirmed, thereby improving the monitoring accuracy of the tail lifting behavior.

[0120] The number of target behaviors within a preset time interval is determined, a second number threshold is preset, and the number of target behaviors is compared with the second number threshold. If the number of target behaviors is greater than the preset second number threshold, it is predicted that the cow is about to calve; if the number of target behaviors is less than or equal to the preset second number threshold, it is considered that the cow is not about to calve.

[0121] The beneficial effect of such a setting is that, by further screening the tail-lifting behavior, precise matching of the tail-lifting posture information can be achieved, thereby improving the early warning accuracy of calving behavior.

[0122] In the embodiment of the present application, by installing a terminal device containing a gyroscope sensor on the tail of a cow, the motion information such as the acceleration value and angular velocity value of the cow's tail during the movement can be obtained in real time. According to the motion information, the tail-lifting posture information of the cow's tail on the Y-axis and Z-axis can be obtained, that is, the acceleration values ​​of the Y-axis and Z-axis at each time point can be obtained. According to the tail-lifting posture information within a preset time interval, it is predicted whether the cow will calve, so as to give an early warning to the staff. The automatic prediction of calving behavior is realized, which saves manpower and time, improves the prediction efficiency and accuracy of calving behavior, and helps the staff of the dairy farm to make various preparations for the calving of the cow in advance.

[0123] Figure 6 This is a structural block diagram of a device for predicting calving behavior of a dairy cow provided in an embodiment of the present application. The device is applied to a terminal device, the terminal device is fixed on the tail of the dairy cow, and a gyroscope sensor is configured in the terminal device. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 6 The device includes: an information acquisition unit 601, a posture determination unit 602 and a behavior prediction unit 603.

[0124] The information acquisition unit 601 is used to acquire the movement information of the cow's tail through the gyro sensor; wherein the coordinate axes of the gyro sensor include an X-axis, a Y-axis, and a Z-axis, and the movement information includes the acceleration values ​​of the three coordinate axes and the angular velocity value on the Z-axis;

[0125] The posture determination unit 602 is used to determine the tail-lifting posture information of the cow according to the motion information; wherein the tail-lifting posture information represents the relationship between the acceleration value of the tail on the Y axis and the time point of collecting the acceleration value, and the relationship between the acceleration value on the Z axis and the time point of collecting the acceleration value;

[0126] The behavior prediction unit 603 is used to predict whether the cow has calving behavior based on the tail-lifting posture information within a preset time interval.

[0127] Figure 7 A structural block diagram of a device for predicting calving behavior of dairy cows provided in an embodiment of the present application, such as Figure 7 As shown, the device includes an information acquisition unit 701 , a posture determination unit 702 and a behavior prediction unit 703 , wherein the posture determination unit 702 includes a state determination module 7021 and a posture determination module 7022 .

[0128] The state determination module 7021 is used to determine the tail state according to the acceleration value of the cow's tail on the X-axis, the acceleration value on the Y-axis, and the acceleration value on the Z-axis; wherein the tail state includes a static state and a moving state;

[0129] The posture determination module 7022 is used to determine the tail lifting posture information of the cow according to the acceleration value of the cow's tail on the Y axis and the acceleration value of the cow's tail on the Z axis, if it is determined that there is no tail-swinging behavior according to the angular velocity value of the cow's tail on the Z axis, and the tail state is determined to be in a moving state.

[0130] In one example, the posture determination module 7022 is specifically used to:

[0131] Determine the angular velocity increment of the Z axis according to the angular velocity value of the cow's tail on the Z axis within a preset time period; wherein the angular velocity increment represents the swinging amplitude of the tail;

[0132] If the angular velocity increment value is within the preset increment threshold, it is determined that there is no tail-swinging behavior.

[0133] In one example, the behavior prediction unit 703 includes:

[0134] An energy determination module, used to determine the energy value on the Y-axis corresponding to each time point according to the acceleration value on the Y-axis corresponding to each time point in the tail lifting posture information, and to determine the energy value on the Z-axis corresponding to each time point according to the acceleration value on the Z-axis corresponding to each time point in the tail lifting posture information; wherein the energy value represents the energy consumed by the tail movement;

[0135] A tail lift recording module, for recording the number of tail lifts, the duration of the tail lifts, and the tail lift posture information of the tail lifts within the preset time interval if it is determined that there is a tail lift within the preset time interval according to the energy values ​​on the Y axis and the energy values ​​on the Z axis corresponding to each time point within the preset time interval;

[0136] The behavior prediction module is used to predict whether the cow has calving behavior based on the number of tail-lifting behaviors, the duration of the tail-lifting behaviors, and the tail-lifting posture information of the tail-lifting behaviors within the preset time interval.

[0137] In an example, the energy value is:

[0138] E = ∫x 2 (t)dt;

[0139] Among them, E is the energy value generated by the movement of the cow's tail, and x(t) is the acceleration value of the cow's tail on the Y axis or Z axis.

[0140] In one example, the preset time interval includes multiple preset time periods; the tail recording module includes:

[0141] The average value determination submodule is used to determine the average value of the energy values ​​on the Y axis corresponding to each time point in the preset time period as the first average value, and to determine the average value of the energy values ​​on the Z axis corresponding to each time point in the preset time period as the second average value;

[0142] The trend judgment submodule is used to determine that there is a tail-up behavior in the preset time interval if the change trend of the first average value in the preset time interval meets the preset first change condition, and the change trend of the second average value in the preset time interval meets the preset second change condition.

[0143] In one example, the trend judgment submodule is specifically used to:

[0144] If the change trend of the first average value in the preset time interval satisfies a preset first change condition, and the change trend of the second average value in the preset time interval satisfies a preset second change condition, it is determined that there is a behavior to be confirmed in the preset time interval;

[0145] The duration of the behavior to be confirmed is determined. If the duration of the behavior to be confirmed is equal to or greater than a preset first time threshold, the behavior to be confirmed is determined as the tail-lifting behavior.

[0146] In one example, it also includes:

[0147] An interval determination unit, used to determine the time interval between two adjacent behaviors to be confirmed;

[0148] The time merging unit is used to determine the two adjacent behaviors to be confirmed as a tail-lifting behavior if the time interval is less than a preset interval threshold, and determine the sum of the durations of the two adjacent behaviors to be confirmed as the duration of the tail-lifting behavior.

[0149] In one example, the behavior prediction module includes:

[0150] The behavior prediction submodule is used to predict whether the cow has calving behavior based on the tail lifting posture information of the tail lifting behavior if the number of tail lifting behaviors within the preset time interval is equal to or greater than a preset first number threshold, and the duration of each tail lifting behavior is equal to or greater than a preset second time threshold.

[0151] In one example, the behavior prediction submodule is specifically used to:

[0152] Determine, according to the tail lifting posture information of the tail lifting behavior, the acceleration value of the tail on the target coordinate axis at each time point; wherein the target coordinate axis is the Y axis or the Z axis;

[0153] If it is determined according to the time sequence that the difference in acceleration values ​​at adjacent moments is less than a preset first acceleration threshold, the previous moment among the adjacent moments is determined as the starting point;

[0154] If after the starting point, there is a difference in acceleration values ​​between adjacent moments that is equal to or greater than a preset first acceleration threshold, then the next moment in the adjacent moments is determined as the end point;

[0155] If it is determined that the difference between the acceleration values ​​of the starting point and the end point on the target axis is greater than a preset second acceleration threshold, then determining that the tail lifting behavior is a target behavior;

[0156] If it is determined that the number of target behaviors within the preset time interval is greater than a preset second number threshold, it is predicted that the cow has calving behavior.

[0157] In one example, the three coordinate axes of the gyroscope sensor satisfy the right-hand rule, the Y axis is along the tail direction, and the Z axis is perpendicular to the tail direction.

[0158] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application, such as Figure 8 As shown, the electronic device includes: a memory 81 and a processor 82; the memory 81 is a memory for storing instructions executable by the processor 82.

[0159] The processor 82 is configured to execute the method provided in the above embodiment.

[0160] The electronic device further includes a receiver 83 and a transmitter 84. The receiver 83 is used to receive instructions and data sent by other devices, and the transmitter 84 is used to send instructions and data to external devices.

[0161] Fig. 9 It is a block diagram of a terminal device according to an exemplary embodiment. The device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0162] Device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .

[0163] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0164] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0165] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.

[0166] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0167] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.

[0168] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0169] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0170] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0171] In an exemplary embodiment, the apparatus 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above method.

[0172] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the device 900 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0173] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the method for predicting the calving behavior of a dairy cow of the terminal device.

[0174] The present application also discloses a computer program product, including a computer program, which implements the method described in this embodiment when executed by a processor.

[0175] Various embodiments of the systems and techniques described above in the present application can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0176] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or electronic device.

[0177] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0178] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0179] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0180] The computer system may include a client and an electronic device. The client and the electronic device are generally far away from each other and usually interact through a communication network. The relationship between the client and the electronic device is generated by computer programs running on corresponding computers and having a client-electronic device relationship with each other. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or a cloud host, which is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The electronic device may also be an electronic device of a distributed system, or an electronic device combined with a blockchain. It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0181] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0182] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for predicting calving behavior of dairy cows, characterized in that: The method is applied to a terminal device, the terminal device is fixed on the tail of a cow, and a gyroscope sensor is configured in the terminal device; the method comprises: The motion information of the cow's tail is obtained by using the gyro sensor; wherein the coordinate axes of the gyro sensor include an X-axis, a Y-axis, and a Z-axis, and the motion information includes acceleration values ​​on the three coordinate axes and an angular velocity value on the Z-axis; Determine the tail-lifting posture information of the cow according to the motion information; wherein the tail-lifting posture information represents the relationship between the acceleration value of the tail on the Y-axis and the time point of collecting the acceleration value, and the relationship between the acceleration value on the Z-axis and the time point of collecting the acceleration value; Based on the tail-lifting posture information within a preset time interval, it is predicted whether the cow has calving behavior.

2. The method according to claim 1, characterized in that Determining the cow's tail-lifting posture information according to the movement information includes: Determine the tail state according to the acceleration value of the cow's tail on the X-axis, the acceleration value on the Y-axis, and the acceleration value on the Z-axis; wherein the tail state includes a static state and a moving state; If it is determined that there is no tail-flailing behavior based on the angular velocity value of the cow's tail on the Z axis, and that the tail state is determined to be in a moving state, the cow's tail-lifting posture information is determined based on the acceleration value of the cow's tail on the Y axis and the acceleration value of the cow's tail on the Z axis.

3. The method according to claim 2, characterized in that According to the angular velocity value of the cow's tail on the Z axis, it is determined that there is no tail-flicking behavior, including: Determine the angular velocity increment of the Z axis according to the angular velocity value of the cow's tail on the Z axis within a preset time period; wherein the angular velocity increment represents the swinging amplitude of the tail; If the angular velocity increment value is within the preset increment threshold, it is determined that there is no tail-swinging behavior.

4. The method according to claim 1, characterized in that: Predicting whether the cow has calving behavior based on the tail-lifting posture information within a preset time interval includes: Determine the energy value on the Y-axis corresponding to each time point according to the acceleration value on the Y-axis corresponding to each time point in the tail-lifting posture information, and determine the energy value on the Z-axis corresponding to each time point according to the acceleration value on the Z-axis corresponding to each time point in the tail-lifting posture information; wherein the energy value represents the energy consumed by the tail movement; If it is determined that there is a tail lift behavior within the preset time interval according to the energy values ​​on the Y axis and the energy values ​​on the Z axis corresponding to each time point within the preset time interval, the number of tail lift behaviors within the preset time interval, the duration of the tail lift behaviors, and the tail lift posture information of the tail lift behaviors are recorded; Whether the cow has calving behavior is predicted based on the number of tail-lifting behaviors, the duration of the tail-lifting behaviors, and the tail-lifting posture information of the tail-lifting behaviors within the preset time interval.

5. The method according to claim 4, characterized in that The energy value is: E=∫x 2 (t)dt; Among them, E is the energy value generated by the movement of the cow's tail, and x(t) is the acceleration value of the cow's tail on the Y axis or Z axis.

6. The method according to claim 4, characterized in that The preset time interval includes a plurality of preset time periods; determining that there is a tail lift behavior in the preset time interval according to the energy values ​​on the Y axis and the energy values ​​on the Z axis corresponding to each time point in the preset time interval includes: Determine an average value of energy values ​​on the Y axis corresponding to each time point in a preset time period as a first average value, and determine an average value of energy values ​​on the Z axis corresponding to each time point in the preset time period as a second average value; If the change trend of the first average value in the preset time interval meets the preset first change condition, and the change trend of the second average value in the preset time interval meets the preset second change condition, it is determined that there is a tail-up behavior in the preset time interval.

7. The method according to claim 6, characterized in that If the change trend of the first average value in the preset time interval satisfies a preset first change condition, and the change trend of the second average value in the preset time interval satisfies a preset second change condition, then determining that there is a tail lift behavior in the preset time interval includes: If the change trend of the first average value in the preset time interval satisfies a preset first change condition, and the change trend of the second average value in the preset time interval satisfies a preset second change condition, it is determined that there is a behavior to be confirmed in the preset time interval; The duration of the behavior to be confirmed is determined. If the duration of the behavior to be confirmed is equal to or greater than a preset first time threshold, the behavior to be confirmed is determined as the tail-lifting behavior.

8. The method according to claim 7, characterized in that After determining that there is a behavior to be confirmed within the preset time interval, the method further includes: Determine the time interval between two adjacent behaviors to be confirmed; If the time interval is less than a preset interval threshold, the two adjacent behaviors to be confirmed are determined as one tail-lifting behavior, and the sum of the durations of the two adjacent behaviors to be confirmed is determined as the duration of the tail-lifting behavior.

9. The method according to claim 4, characterized in that Predicting whether the cow has calving behavior according to the number of tail-lifting behaviors, the duration of the tail-lifting behaviors, and the tail-lifting posture information of the tail-lifting behaviors within the preset time interval includes: If the number of tail-lifting behaviors within the preset time interval is equal to or greater than a preset first number threshold, and the duration of each tail-lifting behavior is equal to or greater than a preset second time threshold, then based on the tail-lifting posture information of the tail-lifting behavior, it is predicted whether the cow has calving behavior.

10. The method according to claim 9, characterized in that Based on the tail-lifting posture information of the cow, it is predicted whether the cow has calving behavior, including: Determine, according to the tail lifting posture information of the tail lifting behavior, the acceleration value of the tail on the target coordinate axis at each time point; wherein the target coordinate axis is the Y axis or the Z axis; If it is determined according to the time sequence that the difference in acceleration values ​​at adjacent moments is less than a preset first acceleration threshold, the previous moment among the adjacent moments is determined as the starting point; If after the starting point, there is a difference in acceleration values ​​between adjacent moments that is equal to or greater than a preset first acceleration threshold, then the next moment in the adjacent moments is determined as the end point; If it is determined that the difference between the acceleration values ​​of the starting point and the end point on the target axis is greater than a preset second acceleration threshold, then determining that the tail lifting behavior is a target behavior; If it is determined that the number of target behaviors within the preset time interval is greater than a preset second number threshold, it is predicted that the cow has calving behavior.

11. The method according to any one of claims 1 to 10, characterized in that The three coordinate axes of the gyro sensor satisfy the right-hand rule, the Y axis is along the tail direction, and the Z axis is perpendicular to the tail direction.

12. A device for predicting calving behavior of dairy cows, characterized in that: The device is applied to a terminal device, the terminal device is fixed on the tail of a cow, and a gyroscope sensor is configured in the terminal device; the device comprises: An information acquisition unit, used to acquire movement information of the cow's tail through the gyro sensor; wherein the coordinate axes of the gyro sensor include an X-axis, a Y-axis, and a Z-axis, and the movement information includes acceleration values ​​on the three coordinate axes and an angular velocity value on the Z-axis; A posture determination unit, used to determine the tail-lifting posture information of the cow according to the motion information; wherein the tail-lifting posture information represents the relationship between the acceleration value of the tail on the Y axis and the time point of collecting the acceleration value, and the relationship between the acceleration value on the Z axis and the time point of collecting the acceleration value; The behavior prediction unit is used to predict whether the cow has calving behavior based on the tail-lifting posture information within a preset time interval.

13. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method and system for detecting actions of tail of animal

    CN106165655A

  • Method and system for judging mood of animal

    CN106308822A

  • Positioning method and system, communication terminal and computer readable storage medium

    CN112738887A

  • Unmanned aerial vehicle control method and device, unmanned aerial vehicle and computer storage medium

    CN117991821A

  • Cow tail raising activity monitoring terminal based on motion sensor

    CN217587885U