Tracing method for livestock in pasture

By using blockchain technology and sensor data collection to generate traceability codes, the problems of incomplete information recording and insufficient data security in livestock traceability methods have been solved. This enables detailed tracking and efficient management of the livestock growth process, and improves data security and query efficiency.

CN120975799APending Publication Date: 2025-11-18SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511085320.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing livestock traceability methods suffer from problems such as incomplete information recording, insufficient data security and reliability, inability to achieve dynamic tracking, and low efficiency in data management and querying.

Method used

By using blockchain technology in conjunction with motion and environmental sensors to collect data, a traceability code is generated and uploaded to the blockchain. A hash function is used to ensure the uniqueness and security of the traceability code. Growth information is periodically bound to the code and submitted to the blockchain network to achieve data immutability and reliable transmission.

Benefits of technology

It improves the security and reliability of data, enables detailed tracking and dynamic monitoring of livestock growth processes, enhances data management and query efficiency, and provides comprehensive and accurate traceability information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120975799A_ABST
    Figure CN120975799A_ABST
Patent Text Reader

Abstract

The invention provides a pasture livestock traceability method, and relates to the technical field of livestock traceability, and the method comprises the steps: obtaining pre-stored basic parameters and pre-stored block parameters of pasture livestock; generating a plurality of traceability codes according to one basic parameter and the plurality of block parameters, and constructing a traceability code table; wherein each traceability code table comprises the livestock attribute of one traceability livestock and the corresponding number information; obtaining growth information of the traceable livestock in a preset period, and binding the growth information with one corresponding traceability code in the traceability code table; creating a binding record data structure, adding the growth information into a record corresponding to the traceability code as a newly added field to form extended traceability data, submitting the traceability data to a block chain network, and initiating a chaining request; detailed tracking of the livestock in different growth stages can be realized, and powerful support is provided for more comprehensive understanding of the growth condition of the livestock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of livestock traceability technology, and in particular to a method for tracing livestock in ranches. Background Technology

[0002] In the traditional field of livestock management and traceability, existing methods and technologies have many shortcomings. First, the records of livestock traceability information are often incomplete, providing only very limited basic information such as breed and date of birth, and failing to comprehensively cover key growth data during the livestock's growth process, such as daily exercise and pasture environmental conditions. This one-sidedness in information recording makes it difficult for farmers, regulatory authorities, and consumers to fully understand the true growth status of livestock.

[0003] Meanwhile, traditional traceability methods have significant vulnerabilities in terms of data security and reliability. Livestock-related records are usually stored in paper documents or simple spreadsheets, which are easily tampered with or lost due to improper storage. Furthermore, due to the lack of effective technical means to ensure the authenticity and immutability of data, the reliability of traceability information for livestock products in the market is questionable, and consumers lack confidence in the quality assurance of livestock products.

[0004] Moreover, most current traceability systems can only provide static information on livestock, making it difficult to dynamically track the growth process of livestock. Farmers cannot use existing systems to monitor the growth changes of their livestock in real time, and regulatory authorities also find it difficult to effectively supervise the entire life cycle of livestock. This significantly limits the efficiency of quality assessment and problem tracing of livestock products.

[0005] Furthermore, with the continuous expansion of livestock farming, the limitations of existing traceability methods in terms of data management and query efficiency are becoming increasingly apparent. Faced with massive amounts of livestock data, traditional traceability systems struggle to achieve efficient management and rapid querying, thus failing to meet the growing market and regulatory demands. Summary of the Invention

[0006] To address one of the aforementioned technical problems, this invention provides a method for tracing livestock in a ranch, which enables detailed tracking of livestock at different growth stages, providing strong support for a more comprehensive understanding of livestock growth.

[0007] This invention provides a method for tracing the origin of livestock on a ranch, comprising:

[0008] Obtain the pre-stored basic parameters and pre-stored block parameters of the pasture livestock; wherein, the basic parameters represent the livestock attributes of the traceable livestock, and the block parameters are the parameters of the blocks existing in the blockchain network;

[0009] Based on a basic parameter and multiple block parameters, multiple traceability codes are generated to construct a traceability code table; wherein, each of the traceability code tables includes the livestock attribute of the traceable livestock and the corresponding number information;

[0010] The growth information of traceable livestock is obtained at a preset period, and the growth information is bound to a corresponding traceability code in the traceability code table;

[0011] Create a binding record data structure, add growth information as a new field to the record corresponding to the traceability code to form extended traceability data, and submit the traceability data to the blockchain network to initiate an on-chain request.

[0012] In some embodiments, the livestock attributes include identity ID, date of birth, and livestock category.

[0013] In some embodiments, the growth information includes livestock movement data and pasture environmental data, wherein the movement data is collected by motion sensors installed on the legs of the livestock and the environmental data is collected by environmental sensors deployed on the pasture.

[0014] In some embodiments, including:

[0015] The comprehensive evaluation score is calculated based on the aforementioned motion data and environmental data.

[0016] The comprehensive evaluation score and growth information are bound to the corresponding traceability code.

[0017] In some embodiments, calculating the comprehensive evaluation score based on the motion data and environmental data includes:

[0018] Acquire the movement data of livestock grazing for tracing, including the number of daily steps, distance traveled, and duration of exercise.

[0019] Obtain environmental data for tracing the source of livestock farming, including the average daily temperature, average humidity, and average air quality index of the pasture.

[0020] A comprehensive evaluation score is calculated using a weighted average of daily steps, distance, duration, average temperature, average humidity, and average air quality index.

[0021] In some embodiments, generating multiple traceability codes based on a basic parameter and multiple block parameters, and constructing a traceability code table, includes:

[0022] For each traceable livestock, the basic parameters are combined with a corresponding block parameter in an orderly manner to form an input data sequence;

[0023] The input data sequence is fed into a hash function to calculate the hash value, which is then used as the source code of the block.

[0024] Repeat the above steps to generate multiple traceability codes and construct a traceability code table.

[0025] In some embodiments, the step of acquiring the growth information of traceable livestock at a preset period and binding the growth information with a corresponding traceability code in the traceability code table includes:

[0026] Obtain growth information sent by the user at preset intervals via API;

[0027] The target traceability code table is determined based on the grazing attributes and number information in the uploaded growth information;

[0028] Search the traceability code table for unused traceability codes, select an unused traceability code, and bind it to the growth information.

[0029] In some embodiments, including:

[0030] The basic information of livestock is classified into sensitive information and general information. The sensitive information is then encrypted using an encryption algorithm to obtain encrypted information.

[0031] The basic parameters are constructed by combining encrypted and general information.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] By introducing block parameters from blockchain technology and leveraging their immutable nature, traceability data is tightly integrated with the blockchain. By submitting data to the blockchain network and initiating an on-chain request, traceability data becomes difficult to tamper with once it is recorded on the blockchain, thereby greatly improving data security and credibility and enhancing consumer trust in livestock products.

[0034] It enables detailed tracking of livestock at different growth stages, providing strong support for a more comprehensive understanding of livestock growth status;

[0035] It facilitates the systematic management and rapid querying of large amounts of traceability data, improves work efficiency, and enables more timely provision of accurate traceability information to regulatory agencies, businesses, and consumers. Attached Figure Description

[0036] The embodiments of the present invention will be further described below with reference to the accompanying drawings:

[0037] Figure 1 A schematic diagram illustrating the implementation process of a method for tracing livestock in a ranch, provided in an embodiment of the present invention;

[0038] Figure 2 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on the present invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0041] If the application documents contain similar descriptions such as "first, second, third", the following explanation shall be added: In the following description, the terms "first, second, third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.

[0043] To address the problems existing in related technologies, this invention provides a method for tracing the origin of livestock in a ranch. The subject of this tracing method can be an electronic device. The electronic device can be various types of terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or it can be implemented as a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0044] In some embodiments, the functions implemented by the tracing method provided in this invention can be achieved by the processor of an electronic device calling program code, wherein the program code can be stored in a computer storage medium.

[0045] This invention provides a method for tracing the origin of livestock on a ranch. Figure 1 This is a schematic diagram illustrating the implementation process of a livestock traceability method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, it includes:

[0046] Step S1: Obtain the pre-stored basic parameters and pre-stored block parameters of the pasture livestock; wherein, the basic parameters represent the livestock attributes of the traceable livestock, and the block parameters are the parameters of the blocks existing in the blockchain network;

[0047] In some embodiments, the livestock attributes include identity ID, date of birth, and livestock category.

[0048] In this embodiment of the invention, the basic parameters and block parameters of the livestock stored in the ranch are first obtained. The basic parameters are used to uniquely identify and describe the key attributes of the traceable livestock, such as identity ID, date of birth, and livestock category; the block parameters come from blocks in the blockchain network and are used to ensure the correlation and security between the traceability code and the blockchain.

[0049] Step S2: Generate multiple traceability codes based on a basic parameter and multiple block parameters, and construct a traceability code table; wherein, each traceability code table includes the livestock attribute of the traceable livestock and the corresponding number information;

[0050] In some embodiments, step S2 includes:

[0051] Step S21: For each traceable livestock, the basic parameters are combined with a corresponding block parameter in an ordered manner to form an input data sequence;

[0052] Step S22: Input the input data sequence into the hash function to calculate the hash value, and use the hash value as the traceability code of the block;

[0053] Step S23: Repeat steps S21-S22 above to generate multiple traceability codes and construct a traceability code table.

[0054] In this embodiment of the invention, for each traceable livestock, basic parameters are combined with a block parameter to form an input data sequence, which is then input into a hash function to generate a hash value as the traceability code. The above steps are repeated to generate multiple traceability codes and construct a traceability code table. The hash function ensures the uniqueness and security of each traceability code, and repeated operations can generate traceability codes in batches to meet the traceability needs of the same livestock at different times.

[0055] Step S3: Obtain the growth information of traceable livestock at a preset period, and bind the growth information with a corresponding traceability code in the traceability code table;

[0056] In some embodiments, the growth information includes livestock movement data and pasture environmental data, wherein the movement data is collected by motion sensors installed on the legs of the livestock and the environmental data is collected by environmental sensors deployed on the pasture.

[0057] In this embodiment of the invention, by periodically acquiring growth information and binding it to a traceability code, the entire growth process of livestock can be recorded, providing comprehensive traceability information. By using livestock movement data and pasture environmental data to record in detail the livestock's growth environment and movement, a scientific basis is provided for assessing livestock health and product quality.

[0058] In some embodiments, including:

[0059] Step S10: Calculate the comprehensive evaluation score based on the motion data and environmental data;

[0060] Step S20: Bind the comprehensive evaluation score and growth information to the corresponding traceability code.

[0061] In some embodiments, step S10 includes:

[0062] Step S11: Obtain the movement data of the grazing livestock, including the number of steps, distance, and duration of movement per day;

[0063] Step S12: Obtain environmental data for tracing livestock breeding, including the average daily temperature, average humidity, and average air quality index of the pasture.

[0064] Step S13: Calculate the comprehensive evaluation score by weighted averaging the daily number of steps, distance, duration, average temperature, average humidity, and average air quality index.

[0065] In this embodiment of the invention, a comprehensive evaluation score is calculated based on exercise data and environmental data to quantitatively assess the growth status of livestock. The comprehensive evaluation score is then linked to growth information and traceability codes to further enrich the traceability data. The comprehensive evaluation score provides an intuitive quantitative indicator of livestock growth status, facilitating rapid assessment of livestock quality.

[0066] In some embodiments, step S3 includes:

[0067] Step S31: Obtain the growth information sent by the user at a preset period via API;

[0068] Step S32: Determine the target traceability code table based on the livestock attributes and number information in the uploaded growth information;

[0069] Step S33: Search the traceability code table for unused traceability codes, select an unused traceability code and bind it to the growth information.

[0070] In this embodiment of the invention, growth information is automatically acquired through API, and the target traceability code table is automatically determined based on livestock attributes and number information. Unused traceability codes are automatically selected and bound to generated information to improve traceability efficiency and ensure timely information updates.

[0071] Step S4: Create a binding record data structure, add growth information as a new field to the record corresponding to the traceability code to form extended traceability data, and submit the traceability data to the blockchain network to initiate an on-chain request.

[0072] In this embodiment of the invention, growth information is added as a new field to the record corresponding to the traceability code, forming expanded traceability data and enriching the content of the traceability information. The expanded traceability data is submitted to the blockchain network, initiating an on-chain request, and utilizing the distributed ledger technology of the blockchain to ensure the security and immutability of the data.

[0073] In some embodiments, including:

[0074] Step S100: Classify the basic information of livestock to obtain sensitive information and general information, and use an encryption algorithm to encrypt the sensitive information to obtain encrypted information;

[0075] Step S200: Combine the encrypted information and general information to construct basic parameters.

[0076] In this embodiment of the invention, basic livestock information is categorized, and sensitive information is encrypted to protect privacy. The encrypted information is combined with general information to construct basic parameters for subsequent traceability code generation and other operations. Encrypting sensitive information protects the privacy of livestock owners and their livestock, enhancing the security of the traceability system.

[0077] It should be noted that, in the embodiments of the present invention, if the above-described traceability method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of the present invention are not limited to any specific hardware and software combination.

[0078] Accordingly, embodiments of the present invention provide a storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps in the tracing method provided in the above embodiments.

[0079] This invention provides an electronic device; Figure 2 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention, such as... Figure 2 As shown, the electronic device 400 includes: a processor 401, at least one communication bus 402, a user interface 403, at least one external communication interface 404, and a memory 405. The communication bus 402 is configured to enable communication between these components. The user interface 403 may include a display screen, and the external communication interface 404 may include standard wired and wireless interfaces. The processor 401 is configured to execute a program of a tracing method stored in the memory to implement the steps of the tracing method provided in the above embodiment.

[0080] It should be noted that the descriptions of the storage medium and electronic device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of the present invention, please refer to the descriptions of the method embodiments of the present invention for understanding.

[0081] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of the invention, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the invention. The sequence numbers of the above-described embodiments of the invention are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0082] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, object, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, object, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, object, or apparatus that includes that element.

[0083] In the several embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0084] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0085] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0086] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0087] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a controller to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0088] The above description is merely an embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for tracing the origin of livestock on a ranch, characterized in that, include: Obtain the pre-stored basic parameters and pre-stored block parameters of the pasture livestock; wherein, the basic parameters represent the livestock attributes of the traceable livestock, and the block parameters are the parameters of the blocks existing in the blockchain network; Based on a basic parameter and multiple block parameters, multiple traceability codes are generated to construct a traceability code table; wherein, each of the traceability code tables includes the livestock attribute of the traceable livestock and the corresponding number information; The growth information of traceable livestock is obtained at a preset period, and the growth information is bound to a corresponding traceability code in the traceability code table; Create a binding record data structure, add growth information as a new field to the record corresponding to the traceability code to form extended traceability data, and submit the traceability data to the blockchain network to initiate an on-chain request.

2. The method for tracing the origin of livestock in a ranch according to claim 1, characterized in that, The livestock attributes include identity ID, date of birth, and livestock category.

3. The method for tracing the origin of livestock in a ranch according to claim 1, characterized in that, The growth information includes livestock movement data and pasture environmental data. The movement data is collected by motion sensors installed on the legs of the livestock, and the environmental data is collected by environmental sensors deployed on the pasture.

4. The method for tracing the origin of livestock in a ranch according to claim 3, characterized in that, include: The comprehensive evaluation score is calculated based on the aforementioned motion data and environmental data. The comprehensive evaluation score and growth information are bound to the corresponding traceability code.

5. The method for tracing the origin of livestock in a ranch according to claim 4, characterized in that, The calculation of the comprehensive evaluation score based on the motion data and environmental data includes: Acquire the movement data of livestock grazing for tracing, including the number of daily steps, distance traveled, and duration of exercise. Obtain environmental data for tracing the source of livestock farming, including the average daily temperature, average humidity, and average air quality index of the pasture. A comprehensive evaluation score is calculated using a weighted average of daily steps, distance, duration, average temperature, average humidity, and average air quality index.

6. The method for tracing the origin of livestock in a ranch according to claim 1, characterized in that, The process of generating multiple traceability codes based on a basic parameter and multiple block parameters, and constructing a traceability code table, includes: For each traceable livestock, the basic parameters are combined with a corresponding block parameter in an orderly manner to form an input data sequence; The input data sequence is fed into a hash function to calculate the hash value, which is then used as the source code of the block. Repeat the above steps to generate multiple traceability codes and construct a traceability code table.

7. The method for tracing the origin of livestock in a ranch according to claim 1, characterized in that, The step of acquiring the growth information of traceable livestock at a preset period and binding the growth information with a corresponding traceability code in the traceability code table includes: Obtain growth information sent by the user at preset intervals via API; The target traceability code table is determined based on the grazing attributes and number information in the uploaded growth information; Search the traceability code table for unused traceability codes, select an unused traceability code, and bind it to the growth information.

8. The method for tracing the origin of livestock in a ranch according to claim 1, characterized in that, include: The basic information of livestock is classified into sensitive information and general information. The sensitive information is then encrypted using an encryption algorithm to obtain encrypted information. The basic parameters are constructed by combining encrypted and general information.