Intelligent weighing and feeding integrated control method and system based on livestock identity recognition

By using multi-dimensional discrimination of RFID data streams and dynamic weight threshold setting, combined with time synchronization and local buffer mechanisms, the problems of poor individual adaptability and high data mismatch rate in existing technologies have been solved, realizing intelligent precision feeding and integrated cloud management control.

CN122004148APending Publication Date: 2026-05-12INNER MONGOLIA WISDOM XINGMU IOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INNER MONGOLIA WISDOM XINGMU IOT TECH CO LTD
Filing Date
2026-01-28
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies lack effective time-series constraint mechanisms in dynamic weighing scenarios, making them unable to adapt to the individualized fluctuations of livestock of different breeds, sizes, or behavioral characteristics. The RFID reading process is susceptible to multi-tag collisions, metal environment reflections, and electromagnetic interference. It lacks a positive verification mechanism for legitimate ear tag encoding formats, has insufficient anti-interference capabilities, fails to deeply couple weighing results with feeding strategies, health assessments, and cloud management, lacks dynamic feeding decision models and data upload mechanisms for network outage fault tolerance, and has poor process closure.

Method used

By performing structural analysis on the data stream output by the RFID module, determining the validity of data packets by combining the legal range of standard ear tag ID length and frame tail format, dynamically setting the weight change threshold, introducing time synchronization window constraints between the identification time and the weight stabilization time, constructing a feeding priority scoring model, and equipping it with a local circular buffer and automatic retransmission mechanism, highly reliable data identification, adaptive weighing, and cloud closed-loop management are achieved.

Benefits of technology

It effectively suppresses multi-tag collisions and environmental interference, enhances the weighing adaptability of livestock with different breeds, body sizes and behavioral characteristics, eliminates cross-individual mismatch of identity and weight data, realizes accurate feeding decisions and reliable data upload, and ensures stable operation of the system under communication abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122004148A_ABST
    Figure CN122004148A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent weighing and feeding integrated control method and system based on livestock identity recognition, and relates to the technical field of Internet of Things and intelligent animal husbandry, and the method comprises the steps: carrying out the structural analysis of an original data flow outputted by an RFID module, and combining a preset standard ear tag ID length legal range, the validity of the data packet is judged according to the sum verification result and the frame tail format, when the data packet is valid, the ear tag ID is extracted, an RFID valid state flag is set, and the recognition moment is recorded; querying a locally stored historical stable weight value according to the ear tag ID and setting a weight change threshold value, reading a current weight value output by the weighing sensor at a fixed period, comparing the current weight value with the last stable weight value, and when the difference values continuously reaching preset times are all smaller than the weight change threshold value, judging that the weight is in a stable state, recording the current weight as a final weight value; when the RFID effective state mark and the weight stable state mark are true at the same time, and the corresponding ear tag ID is not processed on the same day, the ear tag is identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of Internet of Things and intelligent animal husbandry technology, and in particular to an integrated intelligent weighing and feeding control method and system based on livestock identification. Background Technology

[0002] In modern intensive livestock farming systems, individualized and precise management has become a core technological approach to improve production efficiency, optimize feed conversion rates, and ensure animal welfare. In recent years, with the maturity of radio frequency identification (RFID) technology, high-precision weighing sensing technology, and embedded control systems, the industry has gradually explored automated solutions that integrate automatic livestock identification with dynamic weight monitoring. Such systems typically deploy RFID readers and electronic scales in channels or weighing stations to attempt to achieve "one file per animal" data collection. Some studies further attempt to introduce simple threshold judgments to filter out weighing fluctuations and trigger basic feeding actions based on the identification results.

[0003] Existing technical solutions suffer from several key defects that severely limit their practical application effectiveness. In dynamic weighing scenarios, RFID identification events and stable weight states are often asynchronous in time. However, existing systems generally lack effective time-series constraint mechanisms, making them unable to adapt to the individual fluctuations of livestock of different breeds, sizes, or behavioral characteristics. The RFID reading process is susceptible to multi-tag collisions, metallic environmental reflections, and electromagnetic interference. There is a lack of a positive verification mechanism for legitimate ear tag encoding formats, resulting in insufficient anti-interference capabilities. The weighing results are not deeply coupled with feeding strategies, health assessments, and cloud management. Furthermore, there is a lack of dynamic feeding decision-making models based on individual growth states and data upload mechanisms that are fault-tolerant during network outages. The process has poor closed-loop performance, making it difficult to support truly intelligent and precise farming. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an integrated intelligent weighing and feeding control method based on livestock identification to address the problem of lacking an effective time-series constraint mechanism, failing to adapt to the individualized fluctuation characteristics of livestock of different breeds, body sizes, or behavioral characteristics, being susceptible to multi-tag collisions, metal environment reflections, and electromagnetic interference during RFID reading, lacking a positive verification mechanism for legitimate ear tag encoding formats, having insufficient anti-interference capabilities, failing to deeply couple weighing results with feeding strategies, health assessments, and cloud management, lacking a dynamic feeding decision model based on individual growth status and a data upload mechanism for network outage fault tolerance, and having poor process closure.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides an integrated intelligent weighing and feeding control method based on livestock identification, comprising: The raw data stream output by the RFID module is structurally parsed. The validity of the data packet is determined by combining the preset standard ear tag ID length legal range, the cumulative verification result and the frame tail format. When the data packet is valid, the ear tag ID is extracted, the RFID valid status flag is set, and the identification time is recorded. Based on the ear tag ID, the system queries the locally stored historical stable weight value and sets a weight change threshold. The system reads the current weight value output by the weighing sensor at fixed intervals and compares it with the previous stable weight value. When the difference is less than the weight change threshold for a preset number of consecutive times, the weight is determined to be in a stable state, and the current weight is recorded as the final weight value. When the RFID valid status flag and the weight stable status flag are both true, and the corresponding ear tag ID has not been processed on the same day, the time difference between the identification time and the stable time is calculated. When the time difference does not exceed the preset synchronization window threshold, the ear tag ID is bound to the final weight value to form a paired data record. Based on the paired data record, the feeding strategy corresponding to the ear tag ID is retrieved, and the feeding decision is executed in combination with the final weight value to generate a feeding instruction; The feeding actuator is driven to complete the feeding operation according to the feeding instructions, and the feeding execution results are associated with the paired data record. The ear tag ID, final weight value, feeding execution result, and processing time are encapsulated into a structured data packet and uploaded to a remote cloud platform via a wireless communication module. After the upload is completed, the RFID valid status flag, weight stable status flag, and daily processing mark are cleared.

[0007] As a preferred embodiment of the intelligent weighing and feeding integrated control method based on livestock identification described in this invention, the specific steps for performing structural parsing on the raw data stream output by the RFID module are as follows: The system continuously receives the byte stream output by the RFID reader through the serial communication interface and temporarily stores the received data in a circular receive buffer; The receiver buffer is scanned byte by byte to find the preset frame header identifier. Once the frame header is detected, the data length field immediately following the frame header identifier is read. The data length field indicates the number of valid data bytes from the start of the type field to the end of the data field; according to The value is used to calculate the theoretical end position of the data content area, and to verify whether the byte after the theoretical end position is equal to the preset frame end identifier. If the frame end matches, all bytes from the type field to the data field are summed to obtain the verification result. ; Will With the checksum byte carried in the data packet Compare and judge at the same time. Does it belong to the preset set of valid standard ear tag ID lengths? Only if the frame tail is correct, ,and When the current data packet is determined to be valid identification data; Extract the complete ear tag ID from the data content area, set the RFID valid status flag, and record the timestamp of the identification event as the identification time. .

[0008] As a preferred embodiment of the intelligent weighing and feeding integrated control method based on livestock identification described in this invention, the specific steps of querying locally stored historical stable weight values ​​based on ear tag IDs and setting weight change thresholds are as follows: After the RFID valid status flag is set, the historical stable weight value associated with the extracted ear tag ID is retrieved from the non-volatile memory. If the ear tag ID is being identified for the first time and there is no corresponding record in the memory, then the default initial weight value corresponding to the livestock breed will be used as the initial weight value. ; The system is based on Dynamically calculate the weight change threshold used in this weighing process. Its formula is: ; in, The minimum weight change threshold preset for the system is used to ensure the weighing sensitivity of small animals. This is the proportionality coefficient.

[0009] As a preferred embodiment of the intelligent weighing and feeding integrated control method based on livestock identification described in this invention, the specific steps of reading the current weight value output by the weighing sensor at fixed intervals and comparing it with the previous stable weight value are as follows: The system sends a reading command to the weighing sensor at a fixed sampling period to obtain the current weight value. ; Initialize the last stable weight value For the first read ; In each acquisition Then, calculate its relationship with absolute difference ; like Then the internal stable counter will be... Add 1, otherwise, Clear to zero, and Update to the current ; when The cumulative number of stable counts has reached the preset threshold. At this point, the system determines that the current weight has reached a stable state and records the current weight. The final weight value of this measurement Set the weight stability flag and record the timestamp of the stability event as the stability moment. .

[0010] As a preferred embodiment of the intelligent weighing and feeding integrated control method based on livestock identification described in this invention, the specific steps for calculating the time difference between the identification time and the stable time and determining whether the animals are bound together are as follows: Provided that both the RFID valid status flag and the weight stability status flag are true, check whether the ear tag ID has been processed on that day. If it has not been processed, read the identification time. With steady moments ; The formula for calculating the time difference between the two is: ; Will With preset synchronization window threshold Compare; When satisfied If it is determined that the RFID identification event and the weight stabilization event belong to the same individual livestock, then it is permissible to associate the ear tag ID with the final weight value. Binding is performed to form a pairing data record; otherwise, it is judged as a cross-individual interference event, the current pairing attempt is discarded, and the relevant status flags are reset.

[0011] As a preferred embodiment of the intelligent weighing and feeding integrated control method based on livestock identification described in this invention, the specific steps of making feeding decisions based on the final weight value are as follows: The system retrieves the feeding strategy corresponding to the ear tag ID from the local non-volatile memory based on the ear tag ID in the pairing data record; The feeding strategy includes a target lower weight limit. Upper limit of target weight Maximum number of feedings per day And feed type parameters; The system queries the number of feedings performed on the day for each ear tag ID. If the final weight value Below ,and Then, the feeding priority assessment stage begins; Among them, priority scoring Calculate using the following formula: ; in, and For the preset weighting coefficients, satisfy This is used to adjust the degree to which weight deviation and feeding frequency affect decision-making; The lower limit of the target weight; The upper limit of the target weight; This is the maximum number of feedings per day; This is the final weight value; This refers to the number of feedings performed that day. when Greater than the system's preset decision threshold At that time, a feeding instruction is generated, which then drives the feeding actuator to release a fixed amount of feed and associates the feeding execution result with the paired data record; If the wireless communication module returns a failure status when uploading structured data packets, the structured data packets are written to the circular buffer in the non-volatile memory and marked as to be retransmitted. During idle periods, the main controller periodically scans the circular buffer and re-uploads all items to be retransmitted in sequence. After a successful upload, the retransmission mark is cleared. When the buffer is full, the earliest written data to be retransmitted is overwritten according to the first-in-first-out principle.

[0012] As a preferred embodiment of the intelligent weighing and feeding integrated control method based on livestock identification described in this invention, the steps of encapsulating the ear tag ID, final weight value, feeding execution result, and processing time into a structured data packet and uploading it are as follows: Ear tag ID, final weight value The feeding execution results and processing time are constructed into a standardized data structure, which is then serialized into a JSON format string to form a structured data packet. This structured data packet is then sent to a remote cloud platform via a wireless communication module. After the transmission is completed, wait for the communication module to return the transmission status. If the status is successful, execute the status reset process. If the status is failed, trigger the local buffer and retransmission mechanism. During the status reset process, the system clears the RFID valid status flag and the weight stable status flag, and marks the ear tag ID as processed on the same day. Clear the RFID receiving buffer and the temporary weighing variable to restore the system to its initial state of being ready to be identified, and prepare to respond to the next individual animal being weighed.

[0013] Secondly, the present invention provides an intelligent weighing and feeding integrated control system based on livestock identification, including an RFID reading and writing module, a weighing platform, a main controller, a feeding actuator, a wireless communication module and a power management unit. The RFID reader / writer module is installed at the entrance of the weighing platform and is used to read the electronic ear tags worn by livestock in a non-contact manner, and output a raw serial data stream containing a frame header, length field, data content, check byte and frame tail. The weighing platform consists of a high-rigidity metal frame and four high-precision weighing sensors, used to support livestock and output electrical signals proportional to their weight in real time. The main controller adopts an embedded microcontroller unit, which is connected to the RFID read / write module through a UART interface and to the weighing platform through an ADC or digital interface. It is used for the system control method, which specifically includes: RFID data packet parsing, dynamic threshold calculation, weight stability judgment, time synchronization verification, feeding decision generation, data encapsulation and uploading, and status reset. The feeding actuator is located on the outlet side of the weighing platform and includes a feed storage bin, a screw feeder driven by a stepper motor, and an electromagnetic control valve. It is controlled by the feeding command of the main controller and is used to release precisely measured feed as needed. The wireless communication module is integrated inside or external to the main controller and supports 4G, Wi-Fi or LoRa wireless communication protocols. It is used to upload structured data packets to the remote livestock management cloud platform in real time to realize centralized data storage and analysis. The power management unit is connected to the mains power or solar power system. After AC-DC conversion and voltage regulation, it provides a stable DC power supply to the RFID reading and writing module, weighing platform, main controller, feeding actuator and wireless communication module.

[0014] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the integrated intelligent weighing and feeding control method based on livestock identification as described in the first aspect of the present invention.

[0015] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the integrated intelligent weighing and feeding control method based on livestock identification as described in the first aspect of the present invention.

[0016] The beneficial effects of this invention are as follows: By establishing a multi-dimensional RFID data validity discrimination mechanism based on the legal range of standard ear tag ID length, cumulative verification, and frame tail format, it effectively suppresses misidentification caused by multi-tag collisions and environmental interference. It adopts a dynamic setting of weight change threshold based on historical stable weight values ​​and combines a dual stability judgment logic of continuous difference comparison to improve the adaptability to weight fluctuations of livestock with different breeds, body types, and behavioral characteristics. It introduces a time synchronization window constraint between the identification time and the weight stability time to fundamentally eliminate cross-individual mismatch of identity and weight data. It constructs a feeding priority scoring model that integrates target weight deviation and daily feeding frequency to achieve dynamic and accurate feeding decisions based on individual growth status. It is equipped with a local circular buffer and an automatic retransmission mechanism to ensure that key data is not lost and is traceable in the event of communication abnormalities. Thus, it realizes integrated control from high-reliability identification, adaptive weighing, time-series synchronous pairing to intelligent feeding and cloud closed-loop management, overcoming the defects of existing technologies such as weak anti-interference, poor individual adaptability, high data mismatch rate, and non-closed-loop process. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of the intelligent weighing and feeding integrated control method based on livestock identification in Example 1.

[0019] Figure 2 This is a schematic diagram of the intelligent weighing and feeding integrated control system based on livestock identification in Example 1. Detailed Implementation

[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0021] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0022] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0023] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides an integrated intelligent weighing and feeding control method based on livestock identification, comprising the following steps: S1. Perform structural analysis on the raw data stream output by the RFID module, combine the preset standard ear tag ID length legal range, sum the verification results and frame tail format to determine the validity of the data packet. When the data packet is valid, extract the ear tag ID, set the RFID valid status flag, and record the identification time.

[0024] Furthermore, the system continuously receives the byte stream output by the RFID reader through a serial communication interface and temporarily stores the received data in a circular receive buffer. The receiver buffer is scanned byte by byte to find the preset frame header identifier. Once the frame header is detected, the data length field immediately following the frame header identifier is read. The data length field indicates the number of valid data bytes from the start of the type field to the end of the data field; according to The value is used to calculate the theoretical end position of the data content area, and to verify whether the byte after the theoretical end position is equal to the preset frame end identifier. If the frame end matches, all bytes from the type field to the data field are summed to obtain the verification result. ; Will With the checksum byte carried in the data packet Compare and judge at the same time. Does it belong to the preset set of valid standard ear tag ID lengths? Only if the frame tail is correct, ,and When the current data packet is determined to be valid identification data; Extract the complete ear tag ID from the data content area, set the RFID valid status flag, and record the timestamp of the identification event as the identification time. .

[0025] It should be noted that the above-mentioned multi-condition joint verification mechanism effectively filters out invalid or erroneous data caused by environmental interference, concurrent reading of multiple tags, or communication noise through the synergistic effect of frame header positioning, length legality judgment, cumulative verification and frame tail verification, thereby improving the reliability and anti-interference capability of RFID identification and laying a solid identity data foundation for subsequent accurate pairing.

[0026] S2. Query the historical stable weight value stored locally according to the ear tag ID and set the weight change threshold. Read the current weight value output by the weighing sensor at fixed intervals and compare it with the previous stable weight value. When the difference is less than the weight change threshold for a preset number of consecutive times, it is determined that the weight is in a stable state and the current weight is recorded as the final weight value.

[0027] Furthermore, after the RFID valid status flag is set, the historical stable weight value associated with the extracted ear tag ID is retrieved from the non-volatile memory. If the ear tag ID is being identified for the first time and there is no corresponding record in the memory, then the default initial weight value corresponding to the livestock breed will be used as the initial weight value. ; The system is based on Dynamically calculate the weight change threshold used in this weighing process. Its formula is: ; in, The minimum weight change threshold preset for the system is used to ensure the weighing sensitivity of small animals. This is the proportionality coefficient.

[0028] It should be noted that by adopting a strategy of dynamically adjusting the weight change threshold based on historical stable weight values, the system can adapt to the weighing fluctuation characteristics of livestock with different body sizes, breeds and behavioral characteristics, avoiding misjudgments or omissions caused by fixed thresholds in practical applications, thereby improving the accuracy and individual applicability of weight stability judgment.

[0029] S3. When the RFID valid status flag and the weight stable status flag are both true, and the corresponding ear tag ID has not been processed on the same day, calculate the time difference between the identification time and the stable time. When the time difference does not exceed the preset synchronization window threshold, bind the ear tag ID with the final weight value to form a paired data record.

[0030] Furthermore, the system sends reading commands to the weighing sensor at a fixed sampling period to obtain the current weight value. ; Initialize the last stable weight value For the first read ; In each acquisition Then, calculate its relationship with absolute difference ; like Then the internal stable counter will be... Add 1, otherwise, Clear to zero, and Update to the current ; when The cumulative number of stable counts has reached the preset threshold. At this point, the system determines that the current weight has reached a stable state and records the current weight. The final weight value of this measurement Set the weight stability flag and record the timestamp of the stability event as the stability moment. .

[0031] It should be noted that by introducing a continuous difference comparison and stable counting mechanism in the weight determination process, the system can accurately capture the true static weight of livestock even when there is slight movement, effectively suppressing the influence of instantaneous disturbances on the measurement results and ensuring that the final weight value has high reliability and repeatability.

[0032] S4. Based on the paired data record, retrieve the feeding strategy corresponding to the ear tag ID, combine it with the final weight value to execute the feeding decision, and generate a feeding instruction.

[0033] Furthermore, assuming both the RFID valid status flag and the weight stability status flag are true, check whether the ear tag ID has been processed on that day. If not, read the identification time. With steady moments ; The formula for calculating the time difference between the two is: ; Will With preset synchronization window threshold Compare; When satisfied If it is determined that the RFID identification event and the weight stabilization event belong to the same individual livestock, then it is permissible to associate the ear tag ID with the final weight value. Binding is performed to form a pairing data record; otherwise, it is judged as a cross-individual interference event, the current pairing attempt is discarded, and the relevant status flags are reset.

[0034] It should be noted that by introducing a time difference synchronization constraint between the identification moment and the stable moment, and combining it with the daily anti-duplicate processing logic, the consistency of the attribution of identity recognition and weighing events is strictly limited from the temporal dimension. This fundamentally solves the data mismatch problem in the scenario of multiple livestock alternating on the scale, and ensures the authenticity and uniqueness of individual data records.

[0035] S5. Drive the feeding actuator to complete the feeding operation according to the feeding instruction, and associate the feeding execution result with the paired data record.

[0036] Furthermore, the system retrieves the feeding strategy corresponding to the ear tag ID from the local non-volatile memory based on the ear tag ID in the pairing data record; The feeding strategy includes a target lower weight limit. Upper limit of target weight Maximum number of feedings per day And feed type parameters; The system queries the number of feedings performed on the day for each ear tag ID. If the final weight value Below ,and Then, the feeding priority assessment stage begins; Among them, priority scoring Calculate using the following formula: ; in, and For the preset weighting coefficients, satisfy This is used to adjust the degree to which weight deviation and feeding frequency affect decision-making; The lower limit of the target weight; The upper limit of the target weight; This is the maximum number of feedings per day; This is the final weight value; This refers to the number of feedings performed that day. when Greater than the system's preset decision threshold At that time, a feeding instruction is generated, which then drives the feeding actuator to release a fixed amount of feed and associates the feeding execution result with the paired data record; If the wireless communication module returns a failure status when uploading structured data packets, the structured data packets are written to the circular buffer in the non-volatile memory and marked as to be retransmitted. During idle periods, the main controller periodically scans the circular buffer and re-uploads all items to be retransmitted in sequence. After a successful upload, the retransmission mark is cleared. When the buffer is full, the earliest written data to be retransmitted is overwritten according to the first-in-first-out principle.

[0037] It should be noted that the feeding priority decision model based on multi-parameter fusion can dynamically generate differentiated feeding instructions according to the individual's current growth status and feeding history, thereby achieving precise control of nutrient supply. At the same time, the local caching and automatic retransmission mechanism enhances the data reliability of the system in weak network or network outage environments, ensuring that the management loop is not interrupted due to communication abnormalities.

[0038] S6. Encapsulate the ear tag ID, final weight value, feeding execution result and processing time into a structured data packet, upload it to the remote cloud platform through the wireless communication module, and clear the RFID valid status flag, weight stable status flag and daily processing mark after the upload is completed.

[0039] Furthermore, the ear tag ID and final weight value will be used. The feeding execution results and processing time are constructed into a standardized data structure, which is then serialized into a JSON format string to form a structured data packet. This structured data packet is then sent to a remote cloud platform via a wireless communication module. After the transmission is completed, wait for the communication module to return the transmission status. If the status is successful, execute the status reset process. If the status is failed, trigger the local buffer and retransmission mechanism. During the status reset process, the system clears the RFID valid status flag and the weight stable status flag, and marks the ear tag ID as processed on the same day. Clear the RFID receiving buffer and the temporary weighing variable to restore the system to its initial state of being ready to be identified, and prepare to respond to the next individual animal being weighed.

[0040] It should be noted that the structured data encapsulation and state complete reset mechanism not only ensures the standardization and integrity of uploaded data, but also restores the system to a clean initial state after each processing cycle, effectively preventing state residue or buffer overflow, and supporting the long-term stable operation of the equipment under high-frequency continuous operation conditions.

[0041] This embodiment also provides an intelligent weighing and feeding integrated control system based on livestock identification, including: RFID reader / writer module, weighing platform, main controller, feeding actuator, wireless communication module and power management unit; The RFID reader / writer module is installed at the entrance of the weighing platform to read the electronic ear tags worn by livestock in a non-contact manner and output a raw serial data stream containing a frame header, length field, data content, check byte and frame tail. The weighing platform consists of a high-rigidity metal frame and four high-precision weighing sensors, used to support livestock and output electrical signals proportional to their weight in real time. The main controller, using an embedded microcontroller unit, connects to the RFID reader / writer module via a UART interface and to the weighing platform via an ADC or digital interface. It is used for the system's control methods, specifically including: RFID data packet parsing, dynamic threshold calculation, weight stability judgment, time synchronization verification, feeding decision generation, data encapsulation and uploading, and status reset. The feeding actuator, located on the outlet side of the weighing platform, includes a feed storage bin, a stepper motor-driven screw feeder, and an electromagnetic control valve. It is controlled by the feeding command of the main controller and is used to release precisely measured feed as needed. The wireless communication module, integrated inside or external to the main controller, supports 4G, Wi-Fi or LoRa wireless communication protocols and is used to upload structured data packets to the remote livestock management cloud platform in real time to achieve centralized data storage and analysis. The power management unit connects to the mains power or solar power system, and after AC-DC conversion and voltage regulation, provides a stable DC power supply to the RFID reader / writer module, weighing platform, main controller, feeding actuator and wireless communication module.

[0042] This embodiment also provides a computer device applicable to the integrated intelligent weighing and feeding control method based on livestock identification, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the integrated intelligent weighing and feeding control method based on livestock identification proposed in the above embodiment.

[0043] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0044] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the intelligent weighing and feeding integrated control method based on livestock identification proposed in the above embodiment. The storage medium 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 Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0045] In summary, this invention establishes a multi-dimensional RFID data validity judgment mechanism based on the legal range of standard ear tag ID length, cumulative checksum, and frame tail format. This effectively suppresses misidentification caused by multi-tag collisions and environmental interference. It adopts a dynamic weight change threshold based on historical stable weight values ​​and combines a dual stability judgment logic of continuous difference comparison to improve the adaptability to weight fluctuations of livestock with different breeds, body types, and behavioral characteristics. It introduces a time synchronization window constraint between the identification time and the weight stability time to fundamentally eliminate cross-individual mismatch of identity and weight data. It constructs a feeding priority scoring model that integrates target weight deviation and daily feeding frequency to achieve dynamic and accurate feeding decisions based on individual growth status. It is equipped with a local circular buffer and an automatic retransmission mechanism to ensure that key data is not lost and is traceable in the event of communication abnormalities. Thus, it realizes integrated control from highly reliable identification, adaptive weighing, time-series synchronous pairing to intelligent feeding and cloud closed-loop management, overcoming the shortcomings of existing technologies such as weak anti-interference, poor individual adaptability, high data mismatch rate, and non-closed-loop process.

[0046] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A smart weighing and feeding integrated control method based on livestock identification, characterized in that: include: The raw data stream output by the RFID module is structurally parsed. The validity of the data packet is determined by combining the preset standard ear tag ID length legal range, the cumulative verification result and the frame tail format. When the data packet is valid, the ear tag ID is extracted, the RFID valid status flag is set, and the identification time is recorded. Based on the ear tag ID, the system queries the locally stored historical stable weight value and sets a weight change threshold. The system reads the current weight value output by the weighing sensor at fixed intervals and compares it with the previous stable weight value. When the difference is less than the weight change threshold for a preset number of consecutive times, the weight is determined to be in a stable state, and the current weight is recorded as the final weight value. When the RFID valid status flag and the weight stable status flag are both true, and the corresponding ear tag ID has not been processed on the same day, the time difference between the identification time and the stable time is calculated. When the time difference does not exceed the preset synchronization window threshold, the ear tag ID is bound to the final weight value to form a paired data record. Based on the paired data record, the feeding strategy corresponding to the ear tag ID is retrieved, and the feeding decision is executed in combination with the final weight value to generate a feeding instruction; The feeding actuator is driven to complete the feeding operation according to the feeding instructions, and the feeding execution results are associated with the paired data record. The ear tag ID, final weight value, feeding execution result, and processing time are encapsulated into a structured data packet and uploaded to a remote cloud platform via a wireless communication module. After the upload is completed, the RFID valid status flag, weight stable status flag, and daily processing mark are cleared.

2. The intelligent weighing and feeding integrated control method based on livestock identification as described in claim 1, characterized in that: The specific steps for performing structural parsing on the raw data stream output by the RFID module are as follows: The system continuously receives the byte stream output by the RFID reader through the serial communication interface and temporarily stores the received data in a circular receive buffer; The receiver buffer is scanned byte by byte to find the preset frame header identifier. Once the frame header is detected, the data length field immediately following the frame header identifier is read. The data length field indicates the number of valid data bytes from the start of the type field to the end of the data field; according to The value is used to calculate the theoretical end position of the data content area, and to verify whether the byte after the theoretical end position is equal to the preset frame end identifier. If the frame end matches, all bytes from the type field to the data field are summed to obtain the verification result. ; Will With the checksum byte carried in the data packet Compare and judge at the same time. Does it belong to the preset set of valid standard ear tag ID lengths? Only if the frame tail is correct, ,and When the current data packet is determined to be valid identification data; Extract the complete ear tag ID from the data content area, set the RFID valid status flag, and record the timestamp of the identification event as the identification time. .

3. The intelligent weighing and feeding integrated control method based on livestock identification as described in claim 2, characterized in that: The specific steps for querying locally stored historical stable weight values ​​based on ear tag ID and setting a weight change threshold are as follows: After the RFID valid status flag is set, the historical stable weight value associated with the extracted ear tag ID is retrieved from the non-volatile memory. If the ear tag ID is being identified for the first time and there is no corresponding record in the memory, then the default initial weight value corresponding to the livestock breed will be used as the initial weight value. ; The system is based on Dynamically calculate the weight change threshold used in this weighing process. Its formula is: ; in, The minimum weight change threshold preset for the system is used to ensure the weighing sensitivity of small animals. This is the proportionality coefficient.

4. The intelligent weighing and feeding integrated control method based on livestock identification as described in claim 3, characterized in that: The specific steps for reading the current weight value output by the weighing sensor at fixed intervals and comparing it with the previous stable weight value are as follows: The system sends a reading command to the weighing sensor at a fixed sampling period to obtain the current weight value. ; Initialize the last stable weight value For the first read ; In each acquisition Then, calculate its relationship with absolute difference ; like Then the internal stable counter will be... Add 1, otherwise, Clear to zero, and Update to the current ; when The cumulative number of stable counts has reached the preset threshold. At this point, the system determines that the current weight has reached a stable state and records the current weight. The final weight value of this measurement Set the weight stability flag and record the timestamp of the stability event as the stability moment. .

5. The intelligent weighing and feeding integrated control method based on livestock identification as described in claim 4, characterized in that: The specific steps for calculating the time difference between the identification time and the stable time and determining whether binding has occurred are as follows: Provided that both the RFID valid status flag and the weight stability status flag are true, check whether the ear tag ID has been processed on that day. If it has not been processed, read the identification time. With steady moments ; The formula for calculating the time difference between the two is: ; Will With preset synchronization window threshold Compare; When satisfied If it is determined that the RFID identification event and the weight stabilization event belong to the same individual livestock, then it is permissible to associate the ear tag ID with the final weight value. Binding is performed to form a pairing data record; otherwise, it is judged as a cross-individual interference event, the current pairing attempt is discarded, and the relevant status flags are reset.

6. The intelligent weighing and feeding integrated control method based on livestock identification as described in claim 5, characterized in that: The specific steps for making feeding decisions based on the final weight value are as follows: The system retrieves the feeding strategy corresponding to the ear tag ID from the local non-volatile memory based on the ear tag ID in the pairing data record; The feeding strategy includes a target lower weight limit. Upper limit of target weight Maximum number of feedings per day And feed type parameters; The system queries the number of feedings performed on the day for each ear tag ID. If the final weight value Below ,and Then, the feeding priority assessment stage begins; Among them, priority scoring Calculate using the following formula: ; in, and For the preset weighting coefficients, satisfy This is used to adjust the degree to which weight deviation and feeding frequency affect decision-making; The lower limit of the target weight; The upper limit of the target weight; This is the maximum number of feedings per day; This is the final weight value; This refers to the number of feedings performed that day. when Greater than the system's preset decision threshold At that time, a feeding instruction is generated, which then drives the feeding actuator to release a fixed amount of feed and associates the feeding execution result with the paired data record; If the wireless communication module returns a failure status when uploading structured data packets, the structured data packets are written to the circular buffer in the non-volatile memory and marked as to be retransmitted. During idle periods, the main controller periodically scans the circular buffer and re-uploads all items to be retransmitted in sequence. After a successful upload, the retransmission mark is cleared. When the buffer is full, the earliest written data to be retransmitted is overwritten according to the first-in-first-out principle.

7. The intelligent weighing and feeding integrated control method based on livestock identification as described in claim 6, characterized in that: The specific steps for encapsulating the ear tag ID, final weight value, feeding execution result, and processing time into a structured data packet and uploading it are as follows: Ear tag ID, final weight value The feeding execution results and processing time are constructed into a standardized data structure, which is then serialized into a JSON format string to form a structured data packet. This structured data packet is then sent to a remote cloud platform via a wireless communication module. After the transmission is completed, wait for the communication module to return the transmission status. If the status is successful, execute the status reset process. If the status is failed, trigger the local buffer and retransmission mechanism. During the status reset process, the system clears the RFID valid status flag and the weight stable status flag, and marks the ear tag ID as processed on the same day. Clear the RFID receiving buffer and the temporary weighing variable to restore the system to its initial state of being ready to be identified, and prepare to respond to the next individual animal being weighed.

8. An integrated intelligent weighing and feeding control system based on livestock identification, based on the integrated intelligent weighing and feeding control method based on livestock identification as described in any one of claims 1 to 7, characterized in that: include: RFID reader / writer module, weighing platform, main controller, feeding actuator, wireless communication module and power management unit; The RFID reader / writer module is installed at the entrance of the weighing platform and is used to read the electronic ear tags worn by livestock in a non-contact manner, and output a raw serial data stream containing a frame header, length field, data content, check byte and frame tail. The weighing platform consists of a high-rigidity metal frame and four high-precision weighing sensors, used to support livestock and output electrical signals proportional to their weight in real time. The main controller adopts an embedded microcontroller unit, which is connected to the RFID read / write module through a UART interface and to the weighing platform through an ADC or digital interface. It is used for the system control method, which specifically includes: RFID data packet parsing, dynamic threshold calculation, weight stability judgment, time synchronization verification, feeding decision generation, data encapsulation and uploading, and status reset. The feeding actuator is located on the outlet side of the weighing platform and includes a feed storage bin, a screw feeder driven by a stepper motor, and an electromagnetic control valve. It is controlled by the feeding command of the main controller and is used to release precisely measured feed as needed. The wireless communication module is integrated inside or external to the main controller and supports 4G, Wi-Fi or LoRa wireless communication protocols. It is used to upload structured data packets to the remote livestock management cloud platform in real time to realize centralized data storage and analysis. The power management unit is connected to the mains power or solar power system. After AC-DC conversion and voltage regulation, it provides a stable DC power supply to the RFID reading and writing module, weighing platform, main controller, feeding actuator and wireless communication module.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the intelligent weighing and feeding integrated control method based on livestock identification as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the intelligent weighing and feeding integrated control method and system based on livestock identification as described in any one of claims 1 to 8.