A method and system for managing farm animal growth data
By collecting, sorting, and removing extreme readings in an automated weighing system at a sheep farm, the problem of weight data deviation caused by sheep's herding behavior was solved, ensuring the accuracy and reliability of weighing data and providing a solid data foundation for the refined management of the farm.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ZHONGHENG GUOKE INFORMATION TECH CO LTD
- Filing Date
- 2025-09-08
- Publication Date
- 2026-06-09
Smart Images

Figure CN120763487B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of animal husbandry data management technology, and more specifically, to a method and system for managing animal growth data in a farm. Background Technology
[0002] In modern livestock farms, continuous tracking and data management of each animal's growth status is a fundamental and core task for achieving refined management and improving breeding efficiency. Typically, farms attach an electronic ear tag containing unique identification information to each animal and implement an automated weighing system. This system is usually installed in the animal pens' passageways or along the main paths to drinking and feeding areas, with weighing platforms and electronic ear tag readers embedded within the passageways. As an animal walks freely through the passageway, the weighing platform beneath its feet instantly senses and measures its weight, while the adjacent reading device scans the animal's electronic ear tag to obtain its identification information. The system automatically associates the weight data with the corresponding animal identification information and records it in the backend management database. This method greatly improves the efficiency and frequency of data collection, reduces human intervention, and minimizes animal stress. To overcome the instantaneous reading fluctuations caused by animals' unstable standing behavior on the weighing platform (such as brief pauses, swaying back and forth, and lifting one leg), existing technical solutions are typically improved: instead of collecting a single instantaneous reading, the system performs multiple rapid weighings within a short time window (e.g., 2 to 3 seconds) after detecting that the animal has fully settled on the weighing platform. The resulting weights are then arithmetically averaged, and this average is used as the final weighing result. Theoretically, this method can effectively filter out measurement errors caused by the animal's slight, irregular swaying, thus obtaining a more stable and accurate weight data.
[0003] However, in actual operation, especially in large sheep farms, this scheme based on averaging multiple measurements generally works well, significantly improving the reliability of growth data. But as the system ran for a long time, technicians discovered an inexplicable phenomenon when conducting in-depth analysis of individual sheep growth data: the weight gain curves of some sheep showed an unnatural, persistently high trend, especially in certain flocks or channels, where this trend was more pronounced. On-site observation of these sheep revealed that their body size and actual growth did not completely match the "abnormal" growth reported in the data reports; some sheep were even significantly below the levels shown in the data. After repeatedly investigating system hardware, software, and environmental factors, the problem was ultimately pinpointed to a subtle interaction between the sheep's social behavior and the design of the weighing channels.
[0004] As social animals, sheep are naturally inclined to act collectively, or at least closely follow their companions, during their daily activities, especially when heading to watering or grazing areas. To improve weighing efficiency and reduce stress on sheep, weighing tunnels designed for farms are typically sized to guide sheep individually, but their width and length are usually determined by the sheep's size and to avoid panic or congestion caused by excessively narrow passageways. This design ensures smooth passage while also allowing space for close contact between sheep.
[0005] It is within this channel environment that a previously under-considered behavioral pattern begins to impact data accuracy. When a sheep (referred to as the "primary sheep") enters the weighing platform for measurement, brief and slight physical contact may occur due to the proximity of another sheep (referred to as the "accompanying sheep") following closely behind or to the side. This contact does not involve the accompanying sheep stepping entirely onto the weighing platform; rather, it may manifest as the accompanying sheep's head or body slightly leaning against the primary sheep's back or side, or its front hooves briefly resting on the edge of the weighing platform, or even simply transferring some of its own weight indirectly to the platform by pressing against the primary sheep. These behaviors often occur instantaneously, lasting only a fraction of a second to a second, and lack any obvious regularity, making them difficult to detect directly with the naked eye.
[0006] The core improvement of existing weighing systems lies in performing multiple rapid weighings within a short time window of 2 to 3 seconds and calculating the average. This design aims to eliminate random measurement fluctuations caused by the primary sheep's internal physiological activities such as breathing, heartbeat, or slight adjustments in its center of gravity. However, when this brief physical contact with the accompanying sheep occurs, the weighing sensor momentarily detects an additional weight increment not generated by the primary sheep itself. Because this increment is brief and irregular, the system mistakenly interprets it as one of the readings generated by the primary sheep's normal movement within the measurement window and includes it in the average calculation. The system lacks an effective mechanism to distinguish between this additional load caused by the brief contact with the external sheep and the fluctuations in the primary sheep's own weight.
[0007] The introduction of this external load, even if the increment is small each time, causes the calculated average weight value to be systematically pulled upwards due to its high frequency and the fact that it always occurs within the weighing window. For example, if brief contact with the sheep causes the weighing reading to increase by several kilograms at a certain moment, even if this high value only occurs once or twice, it will still produce a significant upward bias in the final result over a 2 to 3 second averaging calculation. This bias is not random but directional, always tending to make the measurement result higher than the sheep's true weight.
[0008] Over time, this persistent upward bias accumulates in the growth data of individual sheep, causing their weight gain curves to appear falsely "healthy" or even "abnormal." When reviewing data reports, managers may mistakenly believe these sheep are growing well, or even exceeding expectations, potentially delaying the identification and intervention of sheep that are actually growing slowly or have potential health problems. For example, a sheep with slow actual weight gain may appear to be growing normally or even faster due to frequent "extra weighings" by other sheep, preventing it from receiving timely nutritional supplements or medical examinations. This data distortion not only affects the precise management of individual sheep but may also lead to unreasonable allocation of feed resources and even influence final sales decisions, negatively impacting the overall profitability of the farm. This systemic data bias, caused by sheep social behavior, pathway design, and limitations of existing weighing algorithms, is a challenge that urgently needs to be addressed in current refined livestock management. Summary of the Invention
[0009] The purpose of this invention is to provide a method and system for managing animal growth data in livestock farms. It aims to solve the problem that in sheep farms, automatic weighing systems are subject to the characteristics of sheep living in groups and the design of weighing channels. This results in the introduction of external loads by the brief and irregular physical contact between the accompanying sheep and the main sheep being measured, which causes the existing average value calculation method to fail and thus distorts the growth data. This invention ensures the authenticity and reliability of the weighing data.
[0010] In a first aspect, the present invention provides a method for managing animal growth data in a farm, comprising the following steps:
[0011] S1. Within a preset time window, collect multiple weight readings of the main sheep at a preset frequency and form an original weight reading sequence;
[0012] S2. Sort the original weight reading sequence numerically to obtain the sorted weight reading sequence;
[0013] S3. Obtain the core reading sequence by removing extreme readings from the sorted weight reading sequence;
[0014] S4. Calculate the arithmetic mean of the core reading sequence to obtain the final weight value.
[0015] The method for managing animal growth data in livestock farms provided by this invention identifies and specifically addresses the "upward bias" error caused by accompanying sheep, as well as the "legitimization" paradox this interference creates for existing averaging algorithms. This ensures the authenticity and reliability of weighing data in group animal farming scenarios. This invention goes beyond simply "averaging"; it strategically "removes false data and retains true data," unlike existing general solutions that only handle random errors.
[0016] Secondly, the present invention provides a farm animal growth data management system, comprising:
[0017] The data acquisition module is used to acquire multiple weight readings of the main test sheep at a preset frequency within a preset time window and form a raw weight reading sequence.
[0018] The data sorting module is used to numerically sort the original weight reading sequence to obtain a sorted weight reading sequence.
[0019] The data cleaning module is used to obtain the core reading sequence by removing extreme readings from the sorted weight reading sequence;
[0020] The calculation module is used to perform an arithmetic mean on the core reading sequence to obtain the final weight value.
[0021] As can be seen from the above, the method for managing animal growth data in farms provided by the present invention can effectively identify and remove external load information that is mixed into the original weight reading sequence due to brief physical contact with sheep within the weighing time window and has instantaneous and upward deviation characteristics. This ensures that the final calculated weight value can truly reflect the resting weight of the sheep being measured and avoids systematic overestimation and distortion of individual growth curves.
[0022] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description
[0023] Figure 1 This is a flowchart of a method for managing animal growth data in a farm, provided in an embodiment of the present invention.
[0024] Figure 2 This is a schematic diagram of a farm animal growth data management system provided in an embodiment of the present invention.
[0025] Label Explanation:
[0026] 100. Data acquisition module; 200. Data sorting module; 300. Data cleaning module; 400. Calculation module. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0028] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0029] Reference Appendix Figure 1 This invention provides a method for managing animal growth data in a farm, comprising the following steps:
[0030] S1. Within a preset time window, collect multiple weight readings of the main sheep at a preset frequency and form an original weight reading sequence;
[0031] S2. Sort the original weight reading sequence numerically to obtain the sorted weight reading sequence;
[0032] S3. Obtain the core reading sequence by removing extreme readings from the sorted weight reading sequence;
[0033] S4. Calculate the arithmetic mean of the core reading sequence to obtain the final weight value.
[0034] This invention effectively filters out abnormally high or low values caused by external interference (such as brief contact with sheep) by sorting the original weight reading sequence and removing extreme readings. This ensures the purity of the core reading sequence used to calculate the final weight, significantly improving the accuracy and reliability of weight data and providing a solid data foundation for the refined management of farms.
[0035] The animal growth data management method described in this invention is typically applied to modern livestock farms equipped with automated weighing systems. This system generally includes a weighing platform, weight sensors, a data acquisition unit, and a data processing unit. When the sheep being monitored enters the weighing platform, the weight sensors continuously sense its weight and convert analog signals into digital signals, which are then collected by the data acquisition unit at a preset frequency. Subsequently, these digitized weight readings are transmitted to the data processing unit, which performs subsequent operations such as sorting, removing extreme readings, and arithmetic averaging to ultimately obtain and store the sheep's final weight value. The entire process aims to achieve accurate monitoring of animal weight to support refined management and decision-making in livestock farms.
[0036] In this invention, "subject sheep" refers to the primary animal individual undergoing weight measurement; "preset time window" refers to a pre-defined time period for collecting weight readings, such as 5 seconds, 10 seconds, or 15 seconds; "preset frequency" refers to the rate at which weight readings are collected within this time window, such as 100 or 200 times per second; "weight reading" refers to the instantaneous weight measurement value obtained by the weighing sensor; "original weight reading sequence" refers to the set of all weight readings collected in chronological order within the preset time window; "sorted weight reading sequence" refers to the result of arranging the original weight reading sequence by numerical value (e.g., ascending or descending); "extreme readings" refer to abnormal readings in the sorted sequence that significantly deviate from the main data distribution, usually located at the two ends of the sequence; "core reading sequence" refers to the set of readings considered more representative of the true weight of the subject sheep after removing extreme readings; "arithmetic mean" refers to the calculation method of summing all readings in the core reading sequence and dividing by the number of readings; and "final weight value" refers to the final result obtained after the above processing, used to represent the weight of the subject sheep.
[0037] Specifically, in step S1, multiple weight readings of the primary sheep are collected at a preset frequency within a preset time window, forming a raw weight reading sequence. As one implementation, a fixed time interval and fixed frequency can be used for data collection. For example, the system is configured to immediately initiate a preset time window lasting 5 seconds after the primary sheep enters the weighing platform, and continuously collect weight readings at a preset frequency of 100 times per second. All collected instantaneous weight readings are directly aggregated to form the raw weight reading sequence. As another implementation, a trigger-based start and fixed-frequency collection can be used. For example, when the weight sensor on the weighing platform detects that the weight exceeds a certain preset threshold (indicating that an animal has entered), the system immediately initiates a preset time window (e.g., 8 seconds) and collects weight readings at a preset frequency of 200 times per second. After the preset time window ends, all collected readings are compiled into a raw weight reading sequence.
[0038] In step S2, the original weight reading sequence is numerically sorted to obtain a sorted weight reading sequence. As one implementation, ascending order can be used. For example, the original weight reading sequence is [120.5, 121.0, 119.8, 120.2, 125.0, 118.0, 120.1, 120.3, 120.0, 120.4]. After sorting it in ascending order, the sorted weight reading sequence is [118.0, 119.8, 120.0, 120.1, 120.2, 120.3, 120.4, 120.5, 121.0, 125.0]. As another implementation, descending order can be used. Regardless of whether ascending or descending order is used, the purpose is to facilitate subsequent identification and removal of extreme readings.
[0039] In step S3, the core reading sequence is obtained by removing extreme readings from the sorted weight reading sequence. One implementation method is a fixed-ratio removal method. For example, in the sorted weight reading sequence, the highest 5% and the lowest 5% of readings are directly removed. If the sequence has 100 readings, the highest 5 and lowest 5 readings are removed, and the remaining 90 readings constitute the core reading sequence. Another implementation method is a fixed-quantity removal method. For example, regardless of the total number of readings in the sequence, the highest N readings and the lowest M readings (N and M can be preset fixed integers, such as N=3, M=3) are directly removed from the sorted weight reading sequence.
[0040] In step S4, the arithmetic mean of the core reading sequence is calculated to obtain the final weight value. As one implementation, all readings in the core reading sequence are summed directly and then divided by the total number of readings in the core reading sequence. For example, if the core reading sequence is [120.0, 120.1, 120.2, 120.3, 120.4], the final weight value is calculated as (120.0 + 120.1 + 120.2 + 120.3 + 120.4) / 5 = 120.2. The final weight value is considered the most accurate representation of the sheep's weight within the current weighing cycle.
[0041] This invention proposes a method for managing animal growth data in livestock farms, aiming to solve the problem that existing automated weighing systems cannot accurately obtain the weight of the sheep being measured when faced with external interference (such as brief contact with the sheep). Its overall working principle is as follows:
[0042] First, in step S1, when the sheep being tested enters the weighing platform, the system continuously collects multiple weight readings of the sheep at a preset frequency within a preset time window, forming an original weight reading sequence. This step ensures that enough instantaneous weight data is acquired within a sufficient time period to capture the sheep's true weight information on the weighing platform, while also potentially including abnormal readings caused by external interference.
[0043] Secondly, in step S2, to facilitate the identification and handling of these potentially abnormal readings, the original weight reading sequence is numerically sorted to obtain a sorted weight reading sequence. By sorting, all readings are arranged in numerical order, ensuring that extreme high and low values are located at opposite ends of the sequence, thus facilitating subsequent extreme reading removal operations.
[0044] Next, in step S3, the core reading sequence is obtained by removing extreme readings from the sorted weight reading sequence. This is the key to solving the problem of the prior art. Traditional arithmetic averaging methods include all readings in the calculation, causing abnormally high values caused by external interference such as brief contact with accompanying sheep to directly inflate the final average weight. By removing these extreme readings at both ends of the sequence, the present invention can effectively filter out the interference of these non-subject sheep's own weight, making the remaining core reading sequence more accurately reflect the actual weight of the subject sheep. For example, if a brief contact with an accompanying sheep causes an abnormally high reading at a certain moment, this reading will be at the high end after sorting and will be identified as an extreme reading and removed.
[0045] Finally, in step S4, the arithmetic mean of the cleaned core reading sequence is calculated to obtain the final weight value. Since the core reading sequence has eliminated extreme readings caused by external interference, its arithmetic mean yields a more accurate and reliable final weight value. Therefore, this invention effectively avoids the problem of inflated weight data caused by external interference, providing reliable data support for precise feeding, health monitoring, and growth assessment in livestock farms. The entire process, through the coordinated action of data collection, sorting, cleaning, and averaging calculations, ensures the accuracy of weight data and the effectiveness of management decisions.
[0046] The core innovation of the animal growth data management method proposed in this invention lies in the introduction of a step to sort the original weight reading sequence and remove extreme readings, so as to effectively address the problem of inaccurate weight data caused by external interference in the prior art.
[0047] Compared to existing methods that simply average all collected weight readings, this invention represents a significant improvement. While existing methods can eliminate some random errors caused by the slight movement of the primary sheep, external interference, such as brief physical contact with accompanying sheep, can lead to additional weight readings being incorrectly included in the averaging calculation, resulting in a systematic upward shift in the final weight value. For example, if an accompanying sheep briefly leans against the edge of the weighing platform, even for a moment, some of its weight will be captured by the sensor and averaged as valid readings by existing methods, causing the final result to deviate from the true weight of the primary sheep.
[0048] This invention effectively identifies and eliminates abnormally high or low values caused by external interference by numerically sorting the original weight reading sequence in step S2 and removing extreme readings from the sorted sequence in step S3. For example, when brief contact with a companion sheep causes one or a few readings to be abnormally high, these readings will be at the highest end of the sorted sequence and will be accurately identified as extreme readings and removed. Thus, the core reading sequence used for the final arithmetic mean is purified, containing only a valid reflection of the weight of the primary sheep being measured, thereby ensuring that the final weight value calculated in step S4 is more accurate and reliable. This data cleaning mechanism is not available in existing technologies; it fundamentally solves the problem of weight data distortion caused by external factors other than the primary sheep being measured, providing a more solid and reliable data foundation for the refined management of farms and avoiding misjudgments and resource waste caused by false weight data.
[0049] In some embodiments, the specific steps in step S1 include:
[0050] S11. Within a preset time window, continuously collect the instantaneous weight reading of the main test sheep at a preset frequency;
[0051] S12. Based on the variation range between continuous instantaneous weight readings, perform a real-time stability assessment of the instantaneous weight readings to obtain the stability assessment results;
[0052] S13. Based on the stability assessment results, select the instantaneous weight readings that meet the preset stability conditions and form the original weight reading sequence.
[0053] Step S11 aims to acquire continuous, high-frequency instantaneous weight readings to provide basic data for subsequent stability assessment. The preset time window can be set according to the actual application scenario and the physiological characteristics of the primary sheep, for example, it could be 5 seconds, 10 seconds, or longer. The preset frequency determines the density of data collection; for example, it can be set to collect data 10 times or more per second to capture subtle movements of the primary sheep. Further, step S12 is the core of this invention, its purpose being to identify unstable data in the instantaneous weight reading sequence. Specifically, real-time stability assessment can be achieved by calculating the difference or rate of change between consecutive instantaneous weight readings. For example, the absolute difference between two adjacent instantaneous weight readings can be calculated; if this difference exceeds a certain preset threshold, the current reading is considered unstable. Alternatively, the standard deviation or variance of the readings over a period of time can be calculated to assess its degree of fluctuation. The stability assessment result can be a Boolean value (stable / unstable) or a quantified stability index. Therefore, step S13 filters the instantaneous weight readings based on the assessment results of S12. Instantaneous weight readings that meet the preset stability conditions refer to those readings that are assessed as stable or whose stability index reaches a preset threshold. This screening mechanism effectively eliminates abnormal readings caused by factors such as sheep swaying, external interference, or momentary sensor malfunctions, thereby ensuring that the final raw weight reading sequence has high reliability and accuracy.
[0054] The present invention effectively solves the problem of data instability caused by animal movement or external interference in traditional methods by introducing real-time stability assessment (S12) and screening based on the assessment results (S13) after collecting instantaneous weight readings (S11). Specifically, when the sheep being tested moves on the weighing platform, its instantaneous weight reading will show obvious fluctuations. By continuously monitoring the amplitude of changes between consecutive readings, these fluctuations can be identified in a timely manner. Once the fluctuation amplitude exceeds the preset stability condition, the corresponding instantaneous weight reading is judged as unstable data and discarded. This mechanism ensures that only instantaneous weight readings when the sheep being tested is relatively still or the reading fluctuation is within an acceptable range are included in the original weight reading sequence, thereby providing high-quality input data for subsequent weight calculation.
[0055] Through the above technical solution, this invention can significantly improve the quality and accuracy of the original weight reading sequence. Compared with directly collecting all readings, the introduction of a real-time stability assessment and screening mechanism can effectively avoid measurement errors caused by physiological shaking of the sheep being measured or external environmental interference, thereby ensuring that subsequent weight calculation results are more accurate and reliable. This is of great significance for the refined management of farms and the accurate assessment of animal growth status, and helps to improve breeding efficiency and economic benefits.
[0056] In some preferred embodiments, a specific example is given below. Assume that when weighing a primary sheep, the preset time window is set to 10 seconds, and the preset frequency is 20 instantaneous weight readings per second. In step S11, the data acquisition module continuously collects these 200 instantaneous weight readings. In step S12, the system calculates the absolute difference between every two adjacent instantaneous weight readings in real time. For example, if the current reading is 50.1 kg and the previous reading was 50.0 kg, the difference is 0.1 kg. If the preset stability threshold is 0.05 kg, then this reading is considered stable. If the next reading suddenly jumps to 50.5 kg, the difference is 0.4 kg, exceeding the 0.05 kg threshold, then this reading is marked as unstable. In step S13, the data cleaning module, based on these stability assessment results, only includes those instantaneous weight readings marked as stable into the original weight reading sequence. For example, out of 200 readings collected within 10 seconds, only 180 readings may meet the stability criteria. These 180 readings will constitute the final raw weight reading sequence for subsequent weight calculation. In this way, even if the sheep being weighed experiences slight movement during the weighing process, the system can intelligently filter out the stable data that best represents its true weight, thereby improving the accuracy of weight measurement.
[0057] In some embodiments, the specific steps in step S12 include:
[0058] S121. In the initial stage of the preset time window, identify a reading sequence that reflects the physiological shaking characteristics of the main sheep;
[0059] S122. Determine the stability threshold suitable for the main test sheep based on the fluctuation range of the reading sequence;
[0060] S123. During the remaining phase of the preset time window, based on the variation amplitude between consecutive instantaneous weight readings, the subsequently collected instantaneous weight readings are compared with the stability threshold to obtain the stability evaluation result.
[0061] Specifically, in step S121, the "initial stage of the preset time window" can be understood as a short period of time before the formal weight measurement, such as the few seconds after the sheep enters the weighing area and begins to stand stably. During this stage, the system does not immediately filter data but continuously collects instantaneous weight readings to capture weight fluctuations caused by the sheep's slight swaying or posture adjustments in its natural state. This "reading sequence reflecting the physiological swaying characteristics of the sheep" aims to obtain the inherent fluctuation pattern of the individual in a relatively stable but not completely still state.
[0062] In step S122, "determining a stability threshold suitable for the primary sheep based on the fluctuation range of the reading sequence" means that after identifying the reading sequence reflecting the physiological swaying characteristics of the primary sheep, statistical analysis can be performed on the sequence, such as calculating its standard deviation, mean absolute deviation, or the difference between the maximum and minimum values (i.e., the range). Based on these statistics, a dynamic stability threshold adapted to the current physiological state of the primary sheep can be set. For example, the range of the sequence can be multiplied by a preset coefficient, or a multiple of its standard deviation can be used as the stability threshold. This threshold can more accurately reflect the weight fluctuation range of the primary sheep under normal physiological activity.
[0063] In practical applications, step S123, "During the remaining phase of the preset time window, based on the variation amplitude between consecutive instantaneous weight readings, the subsequently collected instantaneous weight readings are compared with the stability threshold to obtain the stability evaluation result," means that after determining the stability threshold suitable for the primary sheep, the system will continue to collect instantaneous weight readings. For each subsequently collected instantaneous weight reading, the variation amplitude between it and the previous one or several instantaneous weight readings will be calculated. If the variation amplitude exceeds the previously determined adaptive stability threshold, the instantaneous weight reading is considered unstable and does not meet the preset stability condition; conversely, if the variation amplitude is within the threshold, the reading is considered stable and can be included in the original weight reading sequence.
[0064] The present invention actively identifies and learns the physiological swaying characteristics of the test sheep during the initial stage of a preset time window, thereby dynamically determining a personalized stability threshold for each test sheep. Because this threshold is adaptively determined based on the actual physiological fluctuations of a specific test sheep, subsequent stability assessments during the remaining stages of the preset time window can more accurately determine whether instantaneous weight readings are stable. This effectively avoids misjudgments caused by fixed thresholds, ensuring that only truly stable readings reflecting the actual weight of the test sheep are included in the original weight reading sequence, thus improving the accuracy and reliability of data collection.
[0065] Through the above technical solution, this invention overcomes the limitations of traditional fixed-threshold stability assessment and achieves adaptive stability assessment during the data collection process of the main sheep's weight. This method dynamically adjusts the stability judgment criteria based on the individual physiological characteristics of each sheep, effectively filtering out normal fluctuations caused by physiological shaking, while accurately identifying and eliminating abnormal readings caused by external interference or unstable standing. As a result, the obtained raw weight reading sequence has higher accuracy and reliability, providing high-quality basic data for subsequent weight value calculations and significantly improving the precision of animal growth data management in farms.
[0066] In some preferred embodiments, a specific example is given below. Assume that when measuring the weight of a primary sheep, the preset time window is 10 seconds. During the initial 2 seconds (the initial phase of the preset time window), the system continuously collects instantaneous weight readings at a frequency of 100Hz, obtaining 200 readings. These readings may fluctuate within a certain range, for example, between 50.0 kg and 50.2 kg. The system analyzes the fluctuation range of these 200 readings, for example, calculating its range as 0.2 kg. Based on this, a stability threshold suitable for the primary sheep can be set, for example, using 50% of the range as the threshold, i.e., 0.1 kg. During the next 8 seconds (the remaining phase of the preset time window), the system continues to collect instantaneous weight readings. For each newly collected reading, it is compared with the previous reading. If the difference between the two exceeds 0.1 kg, the reading is considered unstable and not adopted; if the difference is within 0.1 kg, the reading is considered stable and included in the original weight reading sequence. In this way, it can be ensured that the final raw weight reading sequence is high-quality data after personalized, adaptive stability assessment.
[0067] In some embodiments, the specific steps in step S3 include:
[0068] A1. According to the preset ratio, remove the highest and lowest readings from the sorted weight reading sequence to obtain the core reading sequence.
[0069] The preset ratio can be flexibly set according to the actual application scenario and data characteristics. For example, it can be set to remove the highest and lowest 5% of readings, or dynamically adjusted according to the data distribution. The highest-end reading refers to the part of the weight reading sequence with the largest value, and the lowest-end reading refers to the part of the weight reading sequence with the smallest value. By removing these extreme readings, the interference of outliers on the final weight value calculation can be effectively reduced.
[0070] The present invention removes the highest and lowest readings from the sorted weight reading sequence by setting a preset ratio, aiming to eliminate random errors or abnormal fluctuations that may occur during data acquisition. For example, during animal weighing, factors such as the animal's momentary shaking, sensor drift, or external interference may cause extreme values in the collected weight readings, either too high or too low. If these extreme values are not effectively processed, they will seriously affect the accuracy of the final weight value. By setting a preset ratio, the system can systematically remove these outliers that significantly deviate from the main data distribution, thereby making the remaining core reading sequence more representative and more accurately reflecting the actual weight of the sheep being measured.
[0071] The above technical solution enables a simple, efficient, and controllable method for cleaning raw weight reading sequences. This removal method, based on a preset ratio, avoids the computational overhead of complex statistical analysis while ensuring effective suppression of outliers, thereby improving the accuracy and reliability of the final weight values. Furthermore, by removing the highest and lowest readings, measurement errors caused by instantaneous animal behavior (such as jumping, head raising or lowering) or environmental factors (such as wind or vibration) can be effectively reduced, resulting in more stable and representative weight data and providing a more solid data foundation for livestock management decisions.
[0072] In some embodiments, the specific steps in step S3 include:
[0073] B1. Based on the sorted sequence of weight readings, calculate the difference between each pair of adjacent readings to obtain a difference sequence;
[0074] B2. Slide a window across the difference sequence and calculate the sum of the differences within each window;
[0075] B3. Identify the window with the smallest sum of differences, and determine the readings in the sorted weight reading sequence corresponding to that window as the core reading sequence.
[0076] Specifically, in step B1, calculating the difference between each pair of adjacent readings based on the sorted weight reading sequence refers to performing a difference operation on continuous data points in the sorted weight reading sequence. For example, the absolute value of subtracting the previous reading from the subsequent reading can be calculated to quantify the magnitude of numerical variation between adjacent readings. The purpose is to transform the volatility of the original weight reading sequence into an analyzable difference sequence, enabling the subsequent identification of more stable regions in the dataset. In step B2, sliding a window across the difference sequence and calculating the sum of differences within each window can be understood as defining a fixed-size window, moving it sequentially across the difference sequence, and calculating the cumulative value of all differences within each position. The purpose is to assess the overall volatility of local regions in the difference sequence; the smaller the total difference, the more stable the original reading sequence segment corresponding to that window. In practical applications, step B3 specifically identifies the window with the smallest total difference among all windows and determines the readings in the original sorted weight reading sequence associated with the difference sequence segment corresponding to this smallest total difference as the core reading sequence. For example, if the sum of the differences in a window is the smallest, then the differences covered by that window correspond to a continuous subset of the original sorted sequence, and this subset is considered the most stable core reading sequence. The aim is to accurately extract the stable data segment that best represents the animal's true weight from the entire reading sequence, which may contain noise or outliers.
[0077] This invention effectively addresses the limitations of traditional methods in identifying and removing extreme readings by introducing adjacent difference analysis and a sliding window technique on the sorted weight reading sequence. Specifically, by calculating the differences between adjacent readings, the local fluctuations of the original data can be made explicit. Subsequently, a sliding window is applied to the difference sequence, and the sum of the differences within the window is calculated, allowing the system to quantify the internal consistency of different data segments. When the window with the smallest sum of differences is identified, it means that the original weight reading sequence segment corresponding to that window has the smallest internal fluctuation, and is therefore determined to be the most stable core reading sequence that best reflects the true weight of the sheep being measured. This method avoids the problem of losing effective data or failing to effectively handle scattered outliers that may result from simply removing the highest or lowest readings, ensuring the high reliability of the selected core reading sequence.
[0078] Through the above technical solution, this invention can extract representative core reading sequences from collected weight readings more accurately and robustly. Compared to simply removing a fixed proportion of extreme readings, this method can dynamically identify the most stable continuous segments in the dataset, thus effectively addressing atypical extreme values caused by factors such as animal physiological shaking and transient sensor interference. Therefore, the obtained final weight values have higher accuracy and reliability, providing a more solid data foundation for farm management decisions and significantly improving the level of precision in growth data management.
[0079] The following is a specific example to illustrate this. Suppose that within a preset time window, after processing steps S1 and S2, the sorted weight reading sequence is obtained as: [49.8, 50.0, 50.1, 50.2, 50.3, 50.4, 50.5, 51.5, 53.0].
[0080] First, according to step B1, calculate the difference between every two adjacent readings to obtain a difference sequence (taking the absolute value):
[0081] |50.0-49.8|=0.2;
[0082] |50.1-50.0|=0.1;
[0083] |50.2-50.1|=0.1;
[0084] |50.3-50.2|=0.1;
[0085] |50.4-50.3|=0.1;
[0086] |50.5-50.4|=0.1;
[0087] |51.5-50.5|=1.0;
[0088] |53.0-51.5|=1.5;
[0089] Therefore, the difference sequence is: [0.2,0.1,0.1,0.1,0.1,0.1,0.1,1.0,1.5].
[0090] Next, according to step B2, a sliding window is made over the difference sequence and the sum of the differences within each window is calculated. Assume the length of the sliding window is set to 3 (i.e., each window contains 3 differences).
[0091] Window 1 (containing the first to third elements of the difference sequence): [0.2, 0.1, 0.1], sum = 0.4. The original sorted weight reading sequence corresponding to this window is [49.8, 50.0, 50.1, 50.2].
[0092] Window 2 (containing the 2nd to 4th elements of the difference sequence): [0.1, 0.1, 0.1], sum = 0.3. The original sorted weight reading sequence corresponding to this window is [50.0, 50.1, 50.2, 50.3].
[0093] Window 3 (containing the 3rd to 5th elements of the difference sequence): [0.1, 0.1, 0.1], sum = 0.3. The original sorted weight reading sequence corresponding to this window is [50.1, 50.2, 50.3, 50.4].
[0094] Window 4 (containing the 4th to 6th elements of the difference sequence): [0.1, 0.1, 0.1], sum = 0.3. The original sorted weight reading sequence corresponding to this window is [50.2, 50.3, 50.4, 50.5].
[0095] Window 5 (containing the 5th to 7th elements of the difference sequence): [0.1, 0.1, 1.0], sum = 1.2. The original sorted weight reading sequence corresponding to this window is [50.3, 50.4, 50.5, 51.5].
[0096] Window 6 (containing the 6th to 8th elements of the difference sequence): [0.1, 1.0, 1.5], sum = 2.6. The original sorted weight reading sequence corresponding to this window is [50.4, 50.5, 51.5, 53.0].
[0097] Finally, according to step B3, the window with the smallest sum of differences is identified. In this example, the smallest sum of differences is 0.3, corresponding to windows 2, 3, and 4. To obtain the longest stable core sequence, the original reading sequences corresponding to all consecutive windows with the smallest sum of differences can be merged. The original reading sequence jointly covered by windows 2, 3, and 4 is [50.0, 50.1, 50.2, 50.3, 50.4, 50.5]. Therefore, the core reading sequence is determined to be [50.0, 50.1, 50.2, 50.3, 50.4, 50.5].
[0098] In some embodiments, the specific steps in step B2 include:
[0099] B21. Initialize a window and calculate the sum of the differences within that window to obtain the initial window sum of differences;
[0100] B22. Slide the window to the next position on the difference sequence;
[0101] B23. Subtract the difference of leaving the window from the initial sum of window differences, and add the difference of newly entering the window to the initial sum of window differences to obtain the updated sum of window differences;
[0102] B24. Repeat steps B22 and B23 until the window has traversed the difference sequence and the sum of the differences in each window is obtained.
[0103] Step B21 aims to lay the foundation for subsequent window sliding calculations. Specifically, on the difference sequence, a window of a preset size is first determined, and the sum of all differences within this window is calculated. This sum is recorded as the initial window difference sum. This initial window difference sum will serve as the starting point for subsequent iterative calculations.
[0104] Further, step B22 describes how the window moves across the difference sequence. Specifically, after the initial window calculation is completed, the window is slid to the next position, typically meaning the window's starting position is moved one unit to the right, thus covering a new set of data in the difference sequence.
[0105] Therefore, step B23 details the update mechanism for the sum of differences during window sliding. When the window slides from one position to the next, the leftmost difference in the original window will leave the current window's range, while the rightmost difference in the difference sequence will newly enter the current window's range. To efficiently calculate the sum of differences in the new window, this invention employs an incremental update method: subtracting the differences leaving the window from the sum of differences in the previous window, and adding the newly entering differences, thus obtaining the updated sum of differences in the window. This method avoids recalculating the sum of all differences within the entire window with each slide, significantly improving computational efficiency.
[0106] Finally, step B24 ensures a comprehensive analysis of the difference sequence. By repeating steps B22 and B23, the window continues to slide across the difference sequence until the entire sequence has been traversed. During this process, the sum of differences within each possible window is calculated and recorded so that the window with the smallest sum of differences can be identified later.
[0107] The present invention optimizes the process of calculating the sum of differences within each window on a difference sequence by employing an incremental calculation method using a sliding window. Traditional methods may require recalculating the sum for each new window, which leads to a large amount of repetitive calculation when processing long difference sequences, thus reducing data processing efficiency. The present invention updates the sum by adding or subtracting only the differences leaving and entering the window as the window slides, avoiding repeated traversal and summation of all elements within the window, thereby significantly reducing the computational load. This mechanism enables the system to process large amounts of weight reading data more quickly, especially in aquaculture scenarios requiring real-time or near-real-time data cleaning and weight calculation, where its advantages are even more pronounced.
[0108] The above technical solution enables the identification of core reading sequences with higher computational efficiency during data cleaning of sorted weight reading sequences. Specifically, by employing an incremental sliding window calculation method, the repeated calculation of the sum of differences within each window is avoided, thereby significantly reducing the computational complexity of the algorithm and improving the speed of data processing and the responsiveness of the system. For data management in large-scale farms, this can effectively improve the throughput of data processing, ensure the timely acquisition and analysis of weight data, and provide more efficient support for farm management decisions.
[0109] In some embodiments, the specific steps in step S3 include:
[0110] C1. For the sorted sequence of weight readings, calculate the difference between each pair of adjacent readings to obtain the difference sequence;
[0111] C2. Based on the difference sequence, identify target points whose differences are greater than a preset interval threshold;
[0112] C3. Based on the target point, divide the sorted weight reading sequence into multiple numerical clusters;
[0113] C4. Select the numerical cluster with the most readings among multiple numerical clusters and determine it as the core reading sequence.
[0114] Specifically, in step C1, the obtained sorted weight reading sequence is processed. By calculating the difference between every two adjacent readings in the sequence, a difference sequence reflecting the size of the interval between data points can be obtained. This difference sequence can reveal the continuity or abrupt changes in the data distribution. The sorted weight reading sequence refers to the sequence obtained after numerically sorting the original weight reading sequence in step S2.
[0115] In step C2, based on the aforementioned difference sequence, points whose differences exceed a preset interval threshold are identified; these points are designated as target points. The preset interval threshold can be set according to the actual application scenario and data characteristics, with the aim of distinguishing between normal fluctuations and significant numerical jumps in the data. These target points typically indicate the boundaries between different numerical clusters in the data.
[0116] In step C3, using the target points identified in step C2, the sorted weight reading sequence is divided into multiple numerical clusters. Each numerical cluster represents a group of weight readings that are relatively close in value.
[0117] In step C4, from the multiple numerical clusters identified above, the cluster containing the largest number of readings is selected and determined as the core reading sequence. This is based on the assumption that the animal's true weight readings during the measurement period should occupy the largest concentrated area in the data, i.e., form the largest numerical cluster.
[0118] The present invention analyzes the internal structure of the sorted weight reading sequence, particularly by identifying significant jumps between data points, to objectively divide the data into different numerical clusters. This method avoids the limitations that may arise from simply removing a predetermined proportion of extreme readings, such as when the data distribution is not strictly symmetrical or when multiple local peaks exist. By selecting the numerical cluster containing the largest number of readings as the core reading sequence, it ensures that the selected set of readings best represents the stable weight state of the sheep during the measurement period, thereby effectively eliminating abnormal readings caused by factors such as animal movement, measurement errors, or environmental interference.
[0119] The above-described technical solution enables a more accurate and robust extraction of the core reading sequence representing the animal's true weight from the original weight reading sequence. Compared to traditional methods that simply remove extreme readings, this invention better adapts to complex data distributions and effectively addresses various interferences that may occur during the measurement process, thereby significantly improving the accuracy and reliability of the final weight value and providing more reliable data support for livestock management decisions.
[0120] In some preferred embodiments, a specific example is given below. Suppose that within a preset time window, the sequence of weight readings collected and sorted is: [50.1, 50.2, 50.3, 50.4, 50.5, 51.0, 51.1, 51.2, 51.3, 55.0, 55.1, 55.2].
[0121] First, in step C1, the difference between each pair of adjacent readings is calculated to obtain the difference sequence: [0.1, 0.1, 0.1, 0.1, 0.5, 0.1, 0.1, 0.1, 3.7, 0.1, 0.1].
[0122] Secondly, in step C2, a preset interval threshold is set to 0.2. Based on the difference sequence, target points with a difference greater than 0.2 are identified. In this example, the differences 0.5 and 3.7 are both greater than 0.2, therefore the corresponding locations are identified as target points.
[0123] Next, in step C3, the sorted weight reading sequence is divided into multiple numerical clusters based on these target points. For example, it can be divided into: cluster 1 [50.1, 50.2, 50.3, 50.4, 50.5]; cluster 2 [51.0, 51.1, 51.2, 51.3]; cluster 3 [55.0, 55.1, 55.2].
[0124] Finally, in step C4, the cluster containing the most readings is selected as the core reading sequence. In this example, cluster 1 contains 5 readings, cluster 2 contains 4 readings, and cluster 3 contains 3 readings. Therefore, cluster 1 [50.1, 50.2, 50.3, 50.4, 50.5] is determined as the core reading sequence. In this way, even if there are multiple numerical ranges in the data, the core data that best represents the true body weight can be accurately identified.
[0125] In some embodiments, the specific steps in step C2 include:
[0126] C21. Traverse the difference sequence and identify all candidate transition points whose differences are greater than the preset interval threshold;
[0127] C22. For each candidate transition point, determine whether the candidate transition point is a local peak point. If it is, proceed to step C23; otherwise, do not use it as the target point.
[0128] C23. For each local peak point, determine whether the difference between the preset number before and after the local peak point is less than the preset fluctuation threshold. If so, it is taken as the target point; otherwise, it is not taken as the target point.
[0129] Specifically, first, the difference sequence is traversed to identify all candidate jump points whose differences are greater than a preset interval threshold. This preset interval threshold can be determined based on historical data analysis, expert experience, or statistical methods, aiming to initially screen for significant difference points that may represent the boundaries of the data cluster. Second, for each identified candidate jump point, it is determined whether it is a local peak. A local peak is defined as a difference point whose value is greater than that of its adjacent difference points. This helps ensure that the identified jump point is a relatively high point in the difference sequence, rather than simply a point within a fluctuation trend. If a candidate jump point does not meet the criteria for a local peak, it is not considered a target point. Finally, for each candidate jump point confirmed as a local peak, it is further determined whether the differences of preset quantities before and after the local peak are all less than a preset fluctuation threshold. The preset quantities define the scope of observation around the local peak, while the preset fluctuation threshold measures the degree of fluctuation in the difference within that scope. The purpose of this step is to verify whether the local peak point represents a clear and stable data cluster boundary, that is, within a certain range before and after the transition point, the data changes relatively smoothly, thereby eliminating false transition points caused by instantaneous noise or outliers. If this condition is met, the local peak point is finally determined as the target point; otherwise, it is not used as the target point.
[0130] The present invention employs multiple verification methods for initially identified candidate transition points by introducing local peak point judgment and fluctuation judgment of the difference before and after the peak point. Specifically, potential transition points are first screened out using a preset interval threshold. Then, by determining whether the selected point is a local peak point, it is ensured that the selected point is a relatively high point in the difference sequence, avoiding misjudging non-critical fluctuations as boundaries. Furthermore, by checking whether the difference of a preset number of values before and after the local peak point is less than a preset fluctuation threshold, it is ensured that the data on both sides of the transition point remain relatively stable within a certain range, thereby confirming that the transition point truly represents a clear separation between data clusters, rather than being caused by random noise or transient anomalies. Thus, the present invention can more accurately and robustly identify the true numerical cluster boundaries in the sorted weight reading sequence.
[0131] Through the above technical solution, this invention effectively avoids misjudgments caused by data noise or local fluctuations, significantly improving the accuracy and reliability of identifying numerical cluster boundaries in the core reading sequence. This makes the final weight calculation more precise, providing farms with more reliable animal growth data, thereby supporting more scientific and effective management decisions. Compared to methods relying solely on a single threshold, this invention enhances resistance to anomalous data through multi-dimensional verification, improving the robustness of the entire data management method.
[0132] In some preferred embodiments, a specific example is given below. Suppose that the difference sequence obtained after the sorted weight reading sequence is calculated is: [0.05, 0.03, 0.1, 0.08, 5.2, 0.07, 0.04, 0.06, 0.09, 0.02].
[0133] First, in step C21 above, a preset interval threshold is set to 1.0. The difference sequence is traversed, and the difference 5.2 is identified as greater than the preset interval threshold of 1.0. Therefore, 5.2 is identified as a candidate transition point.
[0134] Secondly, in step C22 above, for the candidate transition point 5.2, it is determined whether it is a local peak point. Since 5.2 is greater than its previous difference of 0.08 and its next difference of 0.07, 5.2 is confirmed as a local peak point.
[0135] Finally, in step C23 above, for the local peak point 5.2, a preset quantity of 2 and a preset fluctuation threshold of 0.1 are set. The differences before and after 5.2 are checked: [0.08, 0.1] and [0.07, 0.04]. Since these differences (0.08, 0.1, 0.07, 0.04) are all less than the preset fluctuation threshold of 0.1, this indicates that the data fluctuations before and after point 5.2 are small, confirming that 5.2 is a stable transition point. Therefore, 5.2 is ultimately determined as the target point.
[0136] In this way, even in data with slight fluctuations, the present invention can accurately identify the true boundaries of numerical clusters, thereby ensuring the accuracy of the core reading sequence.
[0137] In some embodiments, it also includes:
[0138] S5. Calculate the data dispersion based on the original weight reading sequence, and store the data dispersion as a reliability indicator along with the final weight value in the database. Visualize the final weight value using the reliability indicator for management decision-making.
[0139] Specifically, in step S5, the data dispersion is calculated based on the original weight reading sequence. Data dispersion can be understood as measuring the degree to which each reading in the original weight reading sequence deviates from its mean, reflecting the volatility or dispersion of the data set. In practical applications, data dispersion can be calculated using various statistical methods, such as calculating the standard deviation, variance, range (the difference between the maximum and minimum values), or interquartile range of the original weight reading sequence. The choice of dispersion index can be adjusted according to actual needs and data characteristics, with the aim of quantifying the stability or volatility of the original data within a preset time window.
[0140] Furthermore, the calculated data dispersion is stored in the database along with the final weight value as a reliability metric. The reliability metric characterizes the data quality of the final weight value; a larger dispersion generally indicates greater fluctuation in the original data, potentially lowering the reliability of the final weight value; conversely, a smaller dispersion indicates higher reliability. Storing this reliability metric in association with the final weight value ensures that each weight data point includes its quality assessment information, facilitating subsequent querying and utilization.
[0141] Furthermore, the final weight values are visualized using reliability indicators for management decision-making. The visualization methods can vary; for example, the final weight values can be marked with different colors based on the numerical range of the reliability indicator (e.g., green for high reliability, yellow for medium reliability, and red for low reliability), or displayed using icons, star ratings, confidence intervals, etc. The purpose is to intuitively present the reliability level of the final weight values to managers, enabling them to quickly identify which data are highly reliable and which may have significant uncertainty when reviewing weight data. This allows for more prudent and evidence-based decisions in areas such as feeding management, disease diagnosis, and slaughter planning.
[0142] This invention effectively addresses the problem of providing only the final weight value without sufficient background information on its reliability by introducing data dispersion as a reliability indicator. Specifically, after obtaining the original weight reading sequence, in addition to routine data cleaning and averaging to obtain the final weight value, this invention also calculates the dispersion of the original sequence. This dispersion directly reflects the impact of factors such as the physiological shaking of the sheep, the stability of the weighing equipment, or environmental interference on the stability of the readings during the weighing process. A high dispersion in the original reading sequence indicates that the weighing process may have significant fluctuations, and even after cleaning, the final weight value may still have some deviation or uncertainty; conversely, a lower dispersion means that the weighing process is relatively stable, and the final weight value is more reliable. By storing and visually labeling this quantified reliability indicator along with the final weight value, this invention allows managers to not only see the animal's weight value but also simultaneously understand the "quality" or "reliability" of that value when reviewing the weight data. This additional reliability information enables managers to classify and utilize the data, avoiding critical decisions based on low-reliability data, thereby improving the depth and breadth of data utilization.
[0143] Through the above technical solution, this invention significantly improves the precision of animal growth data management and the scientific nature of decision-making in livestock farms. First, by calculating and storing data dispersion as a reliability indicator, a quantitative quality assessment is provided for each final weight value, compensating for the lack of reliable background information in traditional methods. Second, by visually labeling the final weight values, managers can intuitively and quickly identify weight data of different reliability levels, thereby rapidly focusing on high-quality data from massive datasets or reviewing or eliminating low-quality data. This reliability assessment mechanism enables managers to make more targeted and evidence-based decisions when formulating feeding plans, disease prevention, and timing of slaughter, avoiding misjudgments or resource waste caused by using highly uncertain weight data. Finally, the solution of this invention helps to build a more robust and efficient livestock data management system, promoting the intelligent development of the livestock industry.
[0144] Reference Appendix Figure 2 This invention provides a data management system for animal growth in a farm, comprising:
[0145] The data acquisition module 100 is used to acquire multiple weight readings of the main test sheep at a preset frequency within a preset time window and form an original weight reading sequence.
[0146] The data sorting module 200 is used to numerically sort the original weight reading sequence to obtain a sorted weight reading sequence.
[0147] The data cleaning module 300 is used to obtain the core reading sequence by removing extreme readings from the sorted weight reading sequence;
[0148] The calculation module 400 is used to perform an arithmetic mean on the core reading sequence to obtain the final weight value.
[0149] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0150] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for managing animal growth data in a livestock farm, characterized in that, Includes the following steps: S1. Within a preset time window, collect multiple weight readings of the main sheep at a preset frequency and form an original weight reading sequence; S2. Sort the original weight reading sequence numerically to obtain the sorted weight reading sequence; S3. Obtain the core reading sequence by removing extreme readings from the sorted weight reading sequence. Specific steps include: C1. For the sorted sequence of weight readings, calculate the difference between each pair of adjacent readings to obtain the difference sequence; C2. Based on the difference sequence, identify target points whose differences are greater than a preset interval threshold. Specific steps include: C21. Traverse the difference sequence and identify all candidate transition points whose differences are greater than the preset interval threshold; C22. For each candidate transition point, determine whether the candidate transition point is a local peak point. If it is, proceed to step C23; otherwise, do not use it as the target point. C23. For each local peak point, determine whether the difference between the preset number before and after the local peak point is less than the preset fluctuation threshold. If so, it is taken as the target point; otherwise, it is not taken as the target point. C3. Based on the target point, divide the sorted weight reading sequence into multiple numerical clusters; C4. Select the numerical cluster with the most readings among multiple numerical clusters and determine it as the core reading sequence; S4. Calculate the arithmetic mean of the core reading sequence to obtain the final weight value.
2. The method for managing animal growth data in a farm according to claim 1, characterized in that, The specific steps in step S1 include: S11. Within a preset time window, continuously collect the instantaneous weight reading of the main test sheep at a preset frequency; S12. Based on the variation range between continuous instantaneous weight readings, perform a real-time stability assessment of the instantaneous weight readings to obtain the stability assessment results; S13. Based on the stability assessment results, select the instantaneous weight readings that meet the preset stability conditions and form the original weight reading sequence.
3. The method for managing animal growth data in a farm according to claim 2, characterized in that, The specific steps in step S12 include: S121. In the initial stage of the preset time window, identify a reading sequence that reflects the physiological shaking characteristics of the main sheep; S122. Determine the stability threshold suitable for the main test sheep based on the fluctuation range of the reading sequence; S123. During the remaining phase of the preset time window, based on the variation amplitude between consecutive instantaneous weight readings, the subsequently collected instantaneous weight readings are compared with the stability threshold to obtain the stability evaluation result.
4. The method for managing animal growth data in a farm according to claim 1, characterized in that, Also includes: S5. Calculate the data dispersion based on the original weight reading sequence, and store the data dispersion as a reliability indicator along with the final weight value in the database. Visualize the final weight value using the reliability indicator for management decision-making.
5. A farm animal growth data management system employing the farm animal growth data management method as described in any one of claims 1-4, characterized in that, include: The data acquisition module is used to acquire multiple weight readings of the main test sheep at a preset frequency within a preset time window and form a raw weight reading sequence. The data sorting module is used to numerically sort the original weight reading sequence to obtain a sorted weight reading sequence. The data cleaning module is used to obtain the core reading sequence by removing extreme readings from the sorted weight reading sequence; The calculation module is used to perform an arithmetic mean on the core reading sequence to obtain the final weight value.