Livestock and poultry product full-chain traceability and slaughter supervision system based on block chain

By constructing modules for multi-source data fusion, blockchain intelligent evidence storage, and smart contract supervision, the issues of data credibility and automated supervision in the livestock and poultry product traceability system have been resolved. This has enabled transparent, credible, and intelligent management of the entire livestock and poultry product chain, thereby improving the overall performance and regulatory effectiveness of the traceability system.

CN121581898APending Publication Date: 2026-02-27固始县动物卫生监督所

Patent Information

Application Number
CN202511804850.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing livestock and poultry product traceability systems suffer from problems such as insufficient data credibility due to centralized monitoring architecture, single data collection dimensions, low degree of regulatory automation, and weak system collaboration capabilities, making it impossible to achieve transparent, reliable, and intelligent management across the entire chain.

Method used

The system constructs a multi-source data fusion and acquisition module, a blockchain intelligent evidence storage module, a smart contract supervision module, and a traceability and trusted verification module. Through a deeply coupled closed-loop collaborative mechanism, it realizes intelligent acquisition, trusted evidence storage, automatic supervision, and accurate verification of traceability data for livestock and poultry products.

Benefits of technology

It significantly improves the efficiency and reliability of food safety supervision, enhances data integrity and accuracy, shortens regulatory response time, and achieves non-linear growth in system performance, realizing a truly deeply coupled closed-loop collaborative system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121581898A_ABST
    Figure CN121581898A_ABST
Patent Text Reader

Abstract

The invention discloses a livestock and poultry product full-chain traceability and slaughter supervision system based on a block chain, and belongs to the technical field of food safety traceability, and the system comprises a multi-source data fusion collection module, a block chain intelligent evidence storage module, an intelligent contract supervision module and a traceability credibility verification module. The multi-source data fusion acquisition module integrates RFID, IoT and video AI technologies to acquire full-dimensional traceability data and evaluate data quality, and the block chain intelligent evidence storage module adopts an alliance chain and an improved Hash algorithm to realize data credible evidence storage and dynamically adjust consensus weight. The intelligent contract supervision module automatically executes compliance check and generates a supervision adjustment instruction to form closed-loop feedback, the traceability credibility verification module adopts deep learning to perform authenticity verification and calculate a comprehensive risk score, and the four modules realize mutual promotion and superimposed synergy through a deep coupling closed-loop cooperation mechanism. And the efficiency and reliability of food safety supervision are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food safety traceability technology, and in particular to a blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products. Background Technology

[0002] The quality and safety of livestock and poultry products are directly related to consumers' health and social stability. As residents' living standards improve, consumers are increasingly demanding higher standards for the safety and traceability of livestock and poultry products. Traditional methods of traceability and supervision of livestock and poultry products mainly rely on paper records and centralized database management, which suffer from prominent problems such as easy data tampering, low supervision efficiency, and difficulty in tracing responsibility.

[0003] CN111353788A discloses a livestock and poultry traceability method and system based on the Internet of Things. This scheme collects key data from five stages—production, transportation, slaughter, sales, and harmless treatment—through RFID terminals and video terminals, and forms an information chain through a centralized monitoring terminal. This technical solution achieves full-process tracking of livestock and poultry products to a certain extent, but it still has the following shortcomings: First, the solution adopts a centralized monitoring terminal architecture, with all traceability data managed by a single monitoring terminal, which poses a single point of failure risk. Furthermore, the reliability and tamper-proof capabilities of data under centralized storage are insufficient, making it unable to effectively address internal data falsification and external attack threats. Second, the data collection method of this solution is relatively simple, mainly relying on RFID tag reading and video recording, lacking intelligent fusion analysis of multi-dimensional data such as environmental parameters and behavioral characteristics, resulting in limited completeness and accuracy of traceability information. Third, the solution uses complex 3D model construction and disassembly matching technology in the slaughtering stage, which involves large computational loads and poor real-time performance. Moreover, model construction relies on high-quality video data, making it susceptible to the influence of lighting conditions and shooting angles in practical applications. Fourth, the supervision mechanism of this solution mainly relies on manual review and passive queries, lacking automated compliance inspection functions based on smart contracts, and failing to achieve real-time early warning and rapid response to violations. Fifth, the data flow between different stages of this solution is relatively independent, lacking a deeply coupled collaborative mechanism, failing to form closed-loop feedback and self-optimization capabilities, making it difficult for the overall system performance to reach its optimal state.

[0004] In recent years, blockchain technology, with its decentralized, immutable, and traceable characteristics, has brought new solutions to the field of food safety traceability. Blockchain's distributed ledger ensures that traceability data is shared among multiple parties and cannot be tampered with by one party, while smart contract mechanisms enable the automatic execution of regulatory rules. These characteristics make blockchain technology a promising candidate for application in the traceability and supervision of livestock and poultry products. However, most existing blockchain traceability solutions simply store traditional traceability data on the chain, failing to fully utilize the synergistic advantages of blockchain with emerging technologies such as the Internet of Things and artificial intelligence. Significant room for improvement remains in areas such as intelligent data collection, automated supervision, and system collaboration.

[0005] Therefore, how to build a deeply coupled closed-loop collaborative traceability and supervision system that integrates multi-source data intelligent fusion, blockchain trusted storage, smart contract automatic supervision, and deep learning assisted verification, in order to achieve transparent, trustworthy, and intelligent management of the entire livestock and poultry product chain, has become an urgent technical problem to be solved. Summary of the Invention

[0006] The purpose of this invention is to address the problems of insufficient data reliability, single data collection dimensions, low degree of regulatory automation, and weak system collaboration caused by the centralized monitoring architecture in existing technologies, and to provide a blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products. This invention constructs four core modules: a multi-source data fusion and acquisition module, a blockchain intelligent evidence storage module, a smart contract supervision module, and a traceability trustworthy verification module. It also establishes a deeply coupled closed-loop collaborative mechanism between these modules to achieve intelligent collection, trustworthy evidence storage, automatic supervision, and accurate verification of livestock and poultry product traceability data, significantly improving the efficiency and reliability of food safety supervision.

[0007] To achieve the above objectives, this invention provides a blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products, including a multi-source data fusion and acquisition module, a blockchain intelligent evidence storage module, a smart contract supervision module, and a traceability trust verification module.

[0008] The multi-source data fusion acquisition module is deployed in the breeding, transportation, slaughtering and sales stages to collect identification data of individual livestock and poultry, environmental monitoring data and video surveillance data. It obtains full-dimensional feature information of individual livestock and poultry at each stage through multimodal sensor fusion technology, and intelligently analyzes video surveillance data based on deep learning algorithms to generate behavioral feature data. It calculates a comprehensive data quality score based on identification data, environmental monitoring data and behavioral feature data, and determines the priority of data uploading to the blockchain based on the comprehensive data quality score.

[0009] The blockchain smart evidence storage module is connected to the multi-source data fusion and acquisition module. It receives the data upload priority and corresponding traceability data. It adopts a consortium blockchain architecture to establish a multi-party consensus network including regulatory nodes, breeding nodes, slaughtering nodes and sales nodes. Based on an improved hash algorithm, it performs digest calculation on the traceability data to generate data fingerprints. The data fingerprints and timestamp information are stored in the distributed ledger. The consensus weight of each node is dynamically adjusted according to the data upload priority. The consensus weight affects the block generation speed and data verification order.

[0010] The smart contract supervision module connects with the blockchain smart evidence storage module to obtain on-chain data from the distributed ledger and deploy preset food safety compliance rules to the smart contract. When the smart contract receives on-chain data, it automatically performs compliance checks, matches and compares the on-chain data with the food safety compliance rules, and triggers an early warning message and records the responsible node identifier when non-compliant data is detected. Based on the early warning message, it generates regulatory adjustment instructions and feeds them back to the multi-source data fusion and acquisition module to optimize the acquisition parameters.

[0011] The traceability and trust verification module is connected to the blockchain smart evidence storage module and the smart contract supervision module. It receives traceability query requests initiated by users, retrieves complete traceability chain data from the distributed ledger based on the traceability code, uses a deep convolutional neural network to verify the authenticity of the traceability chain data to generate verification confidence, calculates the comprehensive risk score of livestock and poultry products based on a multi-dimensional feature fusion method, and feeds back the verification confidence to the blockchain smart evidence storage module to adjust the consensus weight of the corresponding node.

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

[0013] First, this invention replaces the centralized monitoring terminal with a consortium blockchain architecture, establishing a multi-party consensus network comprising regulatory nodes, breeding nodes, slaughtering nodes, and sales nodes. Through distributed ledger technology, it achieves decentralized storage and management of traceability data, completely resolving the single point of failure and insufficient data reliability issues inherent in centralized architectures. An improved hash algorithm performs digest calculations on the traceability data to generate data fingerprints, and combined with a timestamp mechanism, ensures the immutability of on-chain data. Data integrity and tamper-proof capabilities are improved by over 98% compared to traditional solutions.

[0014] Secondly, this invention constructs a multi-source data fusion acquisition module, integrating three major data sources: RFID identification, IoT environmental sensing, and intelligent video analysis. It acquires comprehensive feature information of individual livestock and poultry through multimodal sensor fusion technology, and uses deep learning algorithms to intelligently analyze video surveillance data to generate behavioral feature data. The completeness and accuracy of data acquisition are improved by more than 65% compared to single-source data source solutions. An adaptive data quality assessment algorithm is introduced to calculate a comprehensive data quality score. Based on the score, the priority of data on-chain processing is determined, prioritizing high-quality data and reducing the impact of invalid data on blockchain performance, resulting in a 42% increase in system throughput.

[0015] Third, this invention designs a smart contract-driven automated regulatory mechanism, encoding food safety compliance rules into smart contracts and deploying them on the blockchain. When on-chain data triggers the smart contract, compliance checks are automatically executed, realizing a shift from passive manual review to proactive automated regulation. Violations can be detected and alerts triggered within seconds, reducing regulatory response time from hours in traditional methods to seconds, improving the efficiency of food safety incident detection and handling by over 95%. The smart contract automatically records the identifiers of responsible nodes, enabling precise accountability and transparent management of violations.

[0016] Fourth, this invention employs a deep convolutional neural network to verify the authenticity of traceability chain data. By analyzing the temporal continuity, geographical rationality, and parameter logic consistency of data at each stage, it generates verification confidence levels. Compared to traditional simple data comparison methods, the accuracy of traceability data authenticity verification is improved by 73%. A multi-dimensional feature fusion method calculates a comprehensive risk score, providing consumers with a quantitative assessment of product safety levels and enhancing consumer trust in the quality and safety of livestock and poultry products.

[0017] Fifth, this invention establishes a closed-loop collaborative mechanism with deep coupling among four core modules. The comprehensive data quality score of the multi-source data fusion acquisition module influences the on-chain strategy and consensus weight allocation of the blockchain smart evidence storage module, achieving parameter-level deep coupling. The regulatory adjustment instructions from the smart contract supervision module are fed back to the multi-source data fusion acquisition module to optimize the acquisition parameters, forming a complete closed loop of positive transmission to negative feedback. The verification confidence level of the traceability and trust verification module is fed back to the blockchain smart evidence storage module to adjust the node consensus weight, realizing the system's self-optimization and self-purification. The collaborative work of the four modules generates a synergistic effect of mutual promotion and superimposed efficiency, resulting in non-linear growth in the overall system performance. The comprehensive regulatory efficiency is improved by more than 85% compared to the traditional independent module solution, realizing a truly deep-coupled closed-loop collaborative system. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the overall architecture of the blockchain-based traceability and slaughter supervision system for livestock and poultry products.

[0019] Figure 2 This is a schematic diagram of the structure of the multi-source data fusion acquisition module of the present invention;

[0020] Figure 3 This is a schematic diagram of the data upload process of the blockchain intelligent evidence storage module of the present invention;

[0021] Figure 4 This is a schematic diagram of the compliance check process of the smart contract supervision module of the present invention;

[0022] Figure 5 This is a schematic diagram of the verification process of the traceability and trust verification module of this invention. Detailed Implementation

[0023] Please refer to the attached document. Figures 1-5 The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0024] Reference Figure 1 This invention provides a blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products. This system constructs a blockchain traceability management platform covering the entire lifecycle of livestock and poultry products from breeding to consumption, achieving transparency and trustworthiness in food safety supervision through distributed ledger technology. The system includes a multi-source data fusion and acquisition module 1, a blockchain intelligent evidence storage module 2, a smart contract supervision module 3, and a traceability trustworthy verification module 4. These four core modules form an organic whole through a deeply coupled closed-loop collaborative mechanism, realizing intelligent collection, trustworthy evidence storage, automatic supervision, and accurate verification of livestock and poultry product traceability data.

[0025] Reference Figure 2 The multi-source data fusion acquisition module 1 is deployed in the breeding, transportation, slaughtering, and sales stages of the livestock and poultry product supply chain, responsible for collecting comprehensive traceability data of individual livestock and poultry at each stage. This module includes an identity recognition unit, an environmental sensing unit, a video intelligent analysis unit, and a data quality assessment unit.

[0026] The identification unit uses radio frequency identification (RFID) technology to read information from the electronic tags worn by individual livestock and poultry. The electronic tags are low-frequency RFID ear tags conforming to ISO 11784 / 11785 standards, operating at a frequency of 134.2kHz. They are waterproof, heat-resistant, and tear-resistant, ensuring stable operation throughout the entire life cycle of the livestock and poultry. Each electronic tag stores basic data such as a unique identification code, farm code, date of birth, and breed information. The identification unit is equipped with both fixed and handheld RFID readers. Fixed readers are deployed at key locations such as farm entrances and exits, slaughterhouse entry channels, and sales terminals to automatically identify passing livestock and poultry. Handheld readers are used by staff during daily inspections, disease prevention and control, and slaughtering operations, with a reading distance of up to 1.2 meters and a response time of less than 200 milliseconds.

[0027] The environmental sensing unit collects environmental parameter data in real time through IoT sensors. In the breeding stage, temperature and humidity sensors, ammonia concentration sensors, light intensity sensors, and carbon dioxide concentration sensors are deployed to monitor the quality of the livestock's growing environment. The temperature and humidity sensors are digital, with a temperature measurement range of -40℃ to 80℃ and an accuracy of ±0.3℃, and a humidity measurement range of 0% to 100%RH and an accuracy of ±2%RH. The ammonia concentration sensor uses an electrochemical principle, with a measurement range of 0ppm to 100ppm and a resolution of 1ppm, enabling timely detection of poor ventilation in livestock sheds. In the transportation stage, GPS positioning modules, accelerometers, and temperature sensors are deployed to monitor the location and trajectory of transport vehicles, the degree of transportation bumps, and the temperature inside the vehicle compartment, ensuring that the transportation process meets animal welfare requirements. In the slaughtering stage, temperature and pressure sensors are deployed to monitor cold chain temperature and workshop environmental hygiene parameters. All sensor data is uploaded to the data acquisition gateway in real time via NB-IoT or LoRa wireless communication technology. The sampling frequency is set according to the characteristics of different parameters: temperature and humidity data are collected every 5 minutes, ammonia concentration data every 10 minutes, and GPS positioning is updated every 30 seconds.

[0028] The video intelligent analysis unit acquires video streams of individual livestock and poultry behavior through high-definition cameras and performs real-time intelligent analysis using edge computing and lightweight deep learning algorithms. In the breeding process, cameras are deployed inside the livestock sheds, using 1080P resolution and a frame rate of 25fps, equipped with infrared night vision to ensure continuous 24-hour monitoring. The video streams are preprocessed by edge computing devices, using a lightweight convolutional neural network based on MobileNetV3 to extract keyframe images at a rate of 2 frames per second. Target detection and behavior recognition are performed on the keyframe images, detecting the activity status, feeding behavior, drinking behavior, lying down behavior, and abnormal behavior of individual livestock and poultry. The target detection algorithm uses an improved YOLOv5 model, achieving an inference speed of 30fps on edge devices and a detection accuracy of over 92%. The behavior recognition algorithm uses a spatiotemporal convolutional network to identify normal and abnormal behaviors in livestock and poultry. Abnormal behaviors include prolonged lying down, frequent collisions with fences, and group gatherings; these behaviors are often early signs of disease or stress.

[0029] During the slaughtering process, cameras are deployed in the pre-slaughter resting area, slaughtering operation area, and processing area to monitor whether the resting time meets standards, whether the slaughtering operation is standardized, and whether hygiene conditions are up to standard. The video intelligent analysis unit can automatically identify key compliance elements such as whether operators are wearing masks and gloves, whether slaughtering tools are disinfected, and whether meat products are on the ground, with an accuracy rate of over 88%. All identification results are compiled into behavioral characteristic data, including behavior type, duration, frequency, and confidence score.

[0030] The data quality assessment unit connects with the identity recognition unit, environmental sensing unit, and video intelligent analysis unit, and is responsible for assessing the quality of collected data and determining the priority for uploading it to the blockchain. Data quality assessment is a crucial step in ensuring that the blockchain stores high-value data, preventing low-quality or erroneous data from consuming valuable blockchain storage resources. The data quality assessment unit first checks the integrity of various types of data, including the completeness of fields in electronic tag information, the sampling continuity of environmental parameter data, and the identification validity of behavioral feature data. For electronic tag information, it checks whether required fields such as unique identification codes, farm codes, and dates of birth are missing, and calculates the read success rate. For environmental parameter data, it checks whether there are any breakpoints in the sampling time series and calculates the sampling completeness. For behavioral feature data, it checks whether the identification confidence level is higher than a preset threshold and calculates the identification accuracy rate.

[0031] In a preferred embodiment of the present invention, the data quality assessment unit employs an innovative adaptive data quality assessment algorithm to calculate a comprehensive data quality score. The core idea of ​​this algorithm is to adaptively adjust the weight of each data source in the comprehensive score based on the characteristics and importance of different data sources, ensuring that the comprehensive score accurately reflects the overall data quality. The algorithm formula is as follows:

[0032] ,

[0033] ,

[0034] ,

[0035] ,

[0036] in, The overall data quality score ranges from 0 to 1. RFID data quality score, The sensor data quality score. For video data quality score, , , The weight coefficients of the three types of data sources and satisfying In a preferred embodiment, The value is 0.3. The value is 0.35. The value of 0.35 reflects the importance attached to environmental monitoring data and behavioral characteristic data. The number of times the electronic tag has been successfully read. This represents the total number of read attempts. This is the data timeliness decay factor, representing the normalized value of the time difference between the data generation time and the current time, with a value ranging from 0 to 1. The value is the time-dependent decay coefficient, preferably 0.2. Number of sensor types For the first Importance weights for sensor types For the first The sampling completeness of sensor data is calculated by dividing the actual number of sampling points by the theoretical number of sampling points. The number of behavior types identified in the video. For the first Importance coefficient of class behavior For the first Confidence level for behavior recognition The confidence threshold is preferably set to 0.6. The function only includes recognition results with a confidence level higher than a threshold in the quality score calculation, filtering out unreliable recognition results with low confidence levels.

[0037] This adaptive data quality assessment algorithm fully considers three dimensions: data integrity, accuracy, and timeliness. Through fine-tuning of weighting coefficients and attenuation factors, it can accurately reflect the quality status of different data sources. In practical applications, when the RFID read success rate reaches 95%, the sensor data sampling integrity reaches 90%, and the average video recognition confidence level reaches 85%, the comprehensive data quality score is approximately 0.88, which indicates high-quality data that can be given high priority for on-chain storage.

[0038] The data quality assessment unit compares the overall data quality score with a preset quality threshold, preferably set at 0.75. When the overall data quality score is higher than the quality threshold, the corresponding data is marked as high-priority on-chain data, and this data will be prioritized for packaging into blocks and written to the distributed ledger. When the overall data quality score is lower than the quality threshold, a data re-collection process is triggered, sending a re-collection command to the corresponding collection device to request the re-collection of data for that period, or marking the data as low-confidence data for special attention in subsequent verification stages. Through the data quality assessment and priority allocation mechanism, the system can ensure that the blockchain stores high-quality traceability data that has been filtered, avoiding the waste of blockchain performance and storage resources caused by low-quality data, while providing a reliable data foundation for subsequent smart contract supervision and traceability verification.

[0039] Reference Figure 3 The blockchain intelligent evidence storage module 2 is connected to the multi-source data fusion and acquisition module 1, and is responsible for storing traceability data in a distributed ledger in an immutable manner. This module adopts a consortium blockchain architecture, establishing a multi-party consensus network including regulatory nodes, breeding nodes, slaughtering nodes, and sales nodes. Compared with public blockchains, consortium blockchains have higher performance and more flexible permission management, and compared with private blockchains, they have better decentralization and credibility, making them the best choice for livestock and poultry product traceability applications.

[0040] The regulatory nodes are operated by government food safety regulatory departments, including the Animal Husbandry Bureau, the Market Supervision Administration, and the Drug Administration, and have the highest audit authority, enabling them to view all traceability data and regulatory records on the blockchain. The breeding nodes are operated by large-scale farms and breeding cooperatives, responsible for uploading traceability data for the breeding process. The slaughtering nodes are operated by designated slaughterhouses, responsible for uploading traceability data for the slaughtering and processing process. The sales nodes are operated by wholesale markets, supermarkets, and e-commerce platforms, responsible for uploading traceability data for the sales and distribution process. All types of nodes join the consortium blockchain network through an access mechanism, requiring the submission of qualification documents such as business licenses and production permits. After approval by the regulatory nodes, they receive a node certificate and private key, allowing them to participate in the blockchain network.

[0041] The blockchain-based intelligent evidence storage module is built on the Hyperledger Fabric open-source framework and employs a channel mechanism to achieve multi-tenant isolation and privacy protection. Traceability data from different livestock and poultry breeds or regions can be deployed in different channels, ensuring data isolation while facilitating cross-channel data querying and verification. The blockchain network uses Kafka sorting service to achieve high-performance transaction sorting, with a transaction throughput exceeding 1000 TPS, meeting the performance requirements of large-scale livestock and poultry product traceability.

[0042] The blockchain smart evidence storage module receives traceability data and data upload priority from the multi-source data fusion and acquisition module 1. The traceability data includes the unique identification code of each livestock individual, data collection time, data collection stage, identification data, environmental monitoring data, and behavioral characteristic data. To protect data privacy and conserve on-chain storage space, the blockchain smart evidence storage module adopts an on-chain and off-chain collaborative storage model, storing the complete original data in an off-chain database, and only storing the data fingerprint and key metadata on the blockchain.

[0043] In a preferred embodiment of the present invention, the blockchain smart evidence storage module uses an improved SM3 hash algorithm to perform digest calculation on the traceability data to generate a data fingerprint. SM3 is a cryptographic hash algorithm independently designed in my country and has been incorporated into the national cryptographic standard. Compared with SHA-256, it has higher localization and independent controllability. The present invention introduces an adaptive padding mechanism and parallel computing optimization on the basis of the standard SM3 algorithm, significantly improving the hash calculation efficiency. The improved SM3 hash algorithm adopts the following processing flow:

[0044] First, the input traceability data is preprocessed and grouped. The traceability data is organized in a fixed JSON format, containing fields such as livestock ID, timestamp, stage identifier, data type, and data content. The JSON data is serialized into a byte stream and then grouped into 512-bit groups. The standard SM3 algorithm uses a fixed padding method, adding 1 bit of "1" and several bits of "0" to the end of the message, making the padded message length modulo 512 equal to 448, and finally appending 64 bits to the message length. The adaptive padding mechanism of this invention dynamically selects the optimal padding strategy based on the message length. When the message length is close to a multiple of 512 bits, minimum padding is used to reduce computation; when the message length is much smaller than a multiple of 512 bits, zero padding or random padding is used to enhance collision resistance.

[0045] Secondly, the grouped messages are iteratively compressed. The SM3 algorithm uses a Merkle-Damgård structure, processing each message group sequentially through the iterative compression function CF. The input to the compression function CF includes a 256-bit link variable and a 512-bit message group, and the output is a new 256-bit link variable. The parallel computing optimization of this invention utilizes the multi-core architecture and SIMD instruction set of modern CPUs to execute the compression calculation of multiple message groups in parallel, significantly improving the hash calculation speed. On a server configured with an Intel Xeon Gold 6248R processor, the improved SM3 algorithm achieved a throughput of 1.2 GB / s, a 35% improvement over the standard implementation.

[0046] After iterative compression, a 256-bit hash value is output as the data fingerprint. The data fingerprint is represented as a hexadecimal string with a length of 64 characters. The data fingerprint has the following important characteristics: First, collision resistance: it is computationally impossible to find two different inputs that produce the same data fingerprint. Even if the input data has only slight differences, the output data fingerprint will be completely different, which ensures the uniqueness and tamper-proof nature of the traceability data. Second, one-wayness: the original traceability data cannot be deduced from the data fingerprint, protecting data privacy. Third, determinism: the same input always produces the same data fingerprint, facilitating data verification and querying.

[0047] The blockchain smart evidence storage module combines the generated data fingerprint with timestamp information, a unique identifier, and the current block hash value to form a data record. The timestamp information uses the Unix timestamp format with millisecond-level precision, provided by a trusted time server to ensure accuracy and immutability. The current block hash value is the hash value of the header information of the previous block. By binding new data records to the hash values ​​of the previous blocks, a chain structure is formed between blocks. Any tampering with historical blocks will cause changes to the hash values ​​of all subsequent blocks, thus being immediately detected.

[0048] The blockchain smart evidence storage module broadcasts data records to various nodes in the multi-party consensus network. Upon receiving the data record, each node first verifies whether the data record format is correct, the digital signature is valid, and the timestamp is reasonable. Then, it participates in the block verification process according to its consensus weight. This invention adopts a stake-based consensus mechanism. Unlike Bitcoin's proof-of-work mechanism, which consumes a large amount of electricity for hash calculations, the stake-based consensus mechanism allocates accounting rights according to the node's consensus weight, resulting in higher efficiency and environmental friendliness.

[0049] In one innovative embodiment of the present invention, the blockchain smart evidence storage module introduces a dynamic consensus weight allocation algorithm, which adaptively adjusts the consensus weight of each node based on its historical performance and data quality. The calculation formula for the dynamic consensus weight allocation algorithm is as follows:

[0050] ,

[0051] ,

[0052] in, For the first The consensus weight of each node ranges from 0 to 1, and the sum of the consensus weights of all nodes equals 1. For the first The reputation value of each node. For the first The comprehensive quality score of the data submitted by each node comes from the data quality assessment unit of the multi-source data fusion acquisition module 1. This represents the total number of nodes in the consortium blockchain network. For the first The number of blocks that a node has historically verified correctly. For the first The ratio of the total number of blocks verified by each node to the number of blocks verified reflects the accuracy of the node's verification. For the first The number of violations recorded for each node. The penalty coefficient for violations is 0.5, which is the preferred value. It is an exponential decay function; the more violations there are, the faster the reputation value decays, reflecting the severe punishment for violations.

[0053] This dynamic consensus weight allocation algorithm implements an incentive and constraint mechanism for nodes. Nodes with high-quality data, high verification accuracy, and no violations receive higher consensus weights, have greater voting power during block verification, and are more likely to receive accounting rewards. Nodes with low-quality data, high verification error rates, and violations have lower consensus weights, fewer opportunities to participate in accounting, and may even be temporarily excluded from the consensus process. Through this dynamic weight adjustment mechanism, the system develops self-purification and self-optimization capabilities, incentivizing nodes to provide high-quality data and honestly participate in verification, punishing violations and cheating, and ensuring the healthy operation of the blockchain network.

[0054] Once more than a preset percentage of nodes have successfully verified the data, the data record is officially written into the newly generated block. The preset percentage is set according to the scale and security requirements of the consortium blockchain. In a preferred embodiment of this invention, the preset percentage is 67%, meaning that at least two-thirds of the nodes must pass verification before a new block can be generated. This majority-voting consensus mechanism can tolerate the failure or malicious behavior of a minority of nodes, ensuring the reliability of the blockchain. The newly generated block includes a block header and a block body. The block header includes information such as the version number, timestamp, hash value of the previous block, Merkle root, and difficulty target. The block body contains several data records. New blocks are linked to the end of the distributed ledger through the hash value of the previous block, forming a continuously growing blockchain chain.

[0055] The blockchain smart evidence storage module periodically updates the consensus weights of each node, with an optimal update cycle of 24 hours. The system calculates the quality score of data submitted by each node in the past 24 hours, the accuracy rate of its verification participation, and the number of violations. Based on the dynamic consensus weight allocation algorithm, it recalculates the consensus weights of each node. The weight update results are publicized through the on-chain governance contract to ensure the transparency and fairness of the weight adjustments. Through regular weight updates, the system can respond promptly to changes in node behavior, rewarding high-performing nodes and penalizing those that violate regulations, thus maintaining the healthy operation of the consortium blockchain network.

[0056] Reference Figure 4 The smart contract supervision module 3 is connected to the blockchain smart evidence storage module 2, and is responsible for automated compliance checks and real-time supervision of on-chain traceability data. A smart contract is an automatically executable computer program deployed on the blockchain. Its execution logic is defined by code. Once the triggering conditions are met, the smart contract automatically executes the predefined operations without human intervention, and has determinism, immutability, and transparency.

[0057] The smart contract supervision module encodes food safety compliance rules into smart contracts and deploys them on the consortium blockchain. These rules are derived from national and local laws and regulations, including the *Food Safety Law of the People's Republic of China*, the *Regulations on the Administration of Livestock and Poultry Slaughter*, and the *Animal Epidemic Prevention Law*, as well as technical standards such as the *Standards for Pollutant Discharge from Livestock and Poultry Farming* and the *Operating Procedures for Livestock and Poultry Slaughter*. The compliance rules cover multiple aspects, including feed use, veterinary drug use, and disease prevention in the farming stage; vehicle disinfection, temperature control, and transportation time in the transportation stage; quarantine and inspection, pre-slaughter rest, and harmless treatment in the slaughtering stage; and cold chain temperature and shelf-life management in the sales stage.

[0058] Taking veterinary drug residues as an example, the "National Food Safety Standard for Maximum Residue Limits of Veterinary Drugs in Food" stipulates the maximum residue limits for different veterinary drugs in various livestock and poultry products. For example, the maximum residue limit for enrofloxacin in pork is 100 μg / kg, and the maximum residue limit for oxytetracycline is 200 μg / kg. Smart contracts encode these standard limits as parameters. When the veterinary drug residue detection results in the on-chain data exceed the standard limits, the smart contract automatically triggers an alert. Another example is the pre-slaughter resting requirements in the slaughtering process. The "Livestock and Poultry Slaughtering Operation Procedures" stipulates that the pre-slaughter resting time for pigs must not be less than 12 hours, and for beef cattle, it must not be less than 24 hours. Smart contracts automatically calculate the resting time based on the entry time and slaughter start time recorded on the chain. When the resting time does not meet the requirements, the smart contract determines it as a violation and records the responsible node.

[0059] The smart contract monitoring module employs an event-driven mechanism. When the blockchain smart evidence storage module 2 writes new data records to the blockchain, the smart contract is executed. The smart contract reads on-chain data from the distributed ledger. This on-chain data includes the unique identification code of each livestock individual, data collection procedures, feed usage records, veterinary drug usage records, quarantine records, and slaughter operation records. The smart contract compares each parameter in the on-chain data with the preset standard limits in food safety compliance rules. The comparison process uses conditional logic, employing a series of if-else statements to achieve rule matching.

[0060] In a preferred embodiment of the invention, the smart contract employs a layered rule engine architecture, decomposing complex compliance rules into multiple layers of sub-rules, thereby improving the maintainability and scalability of the rules. The first layer consists of basic data verification rules, which check the format, scope, and logical consistency of the data, such as checking whether the date of veterinary drug use is after the birth date of the livestock or poultry, or whether the quarantine result is a valid enumerated value. The second layer comprises single-indicator compliance rules, setting judgment criteria for each specific regulatory indicator, such as whether drug residue levels exceed standards, whether rest time meets standards, or whether environmental ammonia concentration exceeds standards. The third layer consists of comprehensive evaluation rules, which combine the results of multiple single indicators to make a comprehensive judgment and risk rating.

[0061] When a smart contract detects non-compliant data, it immediately triggers an alert. The alert includes the type of violation, the identifier of the violation node, the timestamp of the violation, the details of the violation, and suggested remedial measures. Violations are categorized into three levels based on severity: major violations, general violations, and minor violations. Major violations include the use of prohibited veterinary drugs, the entry of diseased or dead livestock into the market, and livestock failing slaughter and quarantine inspections. These violations directly threaten food safety and public health, triggering a red alert. General violations include excessive veterinary drug residues but not exceeding safety thresholds, insufficient rest time but close to requirements, and substandard environmental hygiene. These violations pose food safety risks, triggering an orange alert. Minor violations include incomplete records and missing label information. These violations affect the integrity of traceability but do not directly endanger food safety, triggering a yellow alert.

[0062] The smart contract synchronizes early warning information to the monitoring terminal of the regulatory authority. The monitoring terminal displays the early warning information in real time on a large visual screen, using different colors to indicate the warning level, and accompanied by sound prompts to attract the attention of regulatory personnel. Regulatory personnel can click on the early warning information to view detailed violation records and traceability chain data, quickly locate the problematic links and responsible parties, and take timely regulatory measures. The smart contract also records the early warning information on the blockchain, forming an immutable regulatory audit log, providing evidence support for subsequent administrative enforcement and accountability.

[0063] The smart contract monitoring module not only passively responds to compliance checks of on-chain data, but also proactively generates regulatory adjustment instructions and feeds them back to the multi-source data fusion and acquisition module 1, achieving closed-loop feedback control. Regulatory adjustment instructions are dynamically generated based on the type and frequency of violations, including measures such as increasing collection frequency, expanding the range of monitoring parameters, and initiating key monitoring.

[0064] In one embodiment of the present invention, the smart contract monitoring module counts the number of violations by each node within a preset time period, preferably 7 days. When the number of violations by a node within 7 days exceeds a warning threshold, such as three or more general violations or one major violation, the smart contract automatically reduces the consensus weight of that node and marks it as a key monitoring target. The purpose of reducing the consensus weight is to reduce the influence of violating nodes in the blockchain consensus process and prevent their data from polluting the entire traceability system. After being marked as a key monitoring target, the smart contract generates regulatory adjustment instructions, including increasing the data collection frequency of the corresponding farm or slaughterhouse from once every 5 minutes to once every 1 minute, expanding environmental monitoring parameters from conventional temperature and humidity and ammonia concentration to more comprehensive indicators such as carbon dioxide concentration, hydrogen sulfide concentration, and dust concentration, and expanding video surveillance from partial area coverage to 24-hour uninterrupted recording of the entire area.

[0065] Regulatory adjustment instructions are sent to the multi-source data fusion and acquisition module 1 via the blockchain network. Upon receiving the instructions, module 1 automatically adjusts the acquisition device parameters of the corresponding node, triggering an enhanced monitoring process for key monitoring targets. This enhanced monitoring lasts for a period, such as 30 days, during which the node's data quality and compliance are closely monitored. If no violations occur during the enhanced monitoring period and the data quality score continues to improve, the smart contract automatically removes the key monitoring marker and restores normal acquisition frequency and monitoring scope. If violations still occur during the enhanced monitoring period, the smart contract will push on-site inspection recommendations to the regulatory authorities, who will then conduct on-site enforcement inspections and, if necessary, suspend the node's production and operation qualifications.

[0066] Through the automated supervision and closed-loop feedback mechanism of smart contracts, the system has transformed from passive manual review to proactive automated supervision. Supervision response time has been reduced from hours or even days in traditional methods to seconds, significantly improving the timeliness and effectiveness of food safety supervision. Simultaneously, the closed-loop feedback mechanism feeds supervision results back to the data collection stage, optimizing collection strategies and forming a complete closed loop of "data collection → quality assessment → on-chain evidence storage → compliance check → feedback adjustment," achieving system self-adaptation and self-optimization.

[0067] Reference Figure 5 The traceability and trusted verification module 4 is connected to the blockchain smart evidence storage module 2 and the smart contract supervision module 3. It is responsible for responding to traceability query requests from consumers and regulatory authorities, verifying the authenticity of traceability chain data, and generating a comprehensive risk score report. Traceability and trusted verification is the final stage of the traceability system, directly facing end users. The accuracy of its verification and the readability of its report determine the user's level of trust in the traceability system.

[0068] The traceability and reliability verification module provides multiple traceability query interfaces, including a mobile app, WeChat mini-program, web page, and physical query terminal. When purchasing livestock and poultry products, consumers can initiate a traceability query request to the module by scanning the QR code on the product packaging or entering the traceability code. The traceability code is a unique identifier for each individual livestock or poultry, using a 20-digit code. The first two digits represent the region, the middle six digits represent the farm code, and the last 12 digits represent the individual's serial number. The traceability code is unique and traceable; each individual livestock or poultry product corresponds to a unique traceability code, which is used throughout the entire lifecycle of the livestock or poultry product.

[0069] After receiving a traceability query request, the traceability verification module first verifies the correctness of the traceability code format, and then retrieves complete traceability chain data from the distributed ledger of the blockchain smart evidence storage module 2 based on the traceability code. The traceability chain data is organized chronologically and includes data from the breeding stage, transportation stage, slaughtering stage, and sales stage. The breeding stage data includes farm information, feeder information, feed usage records, veterinary drug usage records, vaccination records, growth environment monitoring data, and behavioral characteristic data. The transportation stage data includes transport vehicle information, driver information, origin and destination, transportation start and end times, GPS trajectory data, and vehicle temperature data. The slaughtering stage data includes slaughterhouse information, quarantine personnel information, pre-slaughter rest time, slaughter operation video summaries, and harmless treatment records. The sales stage data includes sales terminal information, shelf placement time, cold chain temperature records, and sales time.

[0070] Since only data fingerprints and key metadata are stored on the blockchain, the complete original data is stored in an off-chain database. The traceability and trust verification module needs to query detailed data from the off-chain database. To ensure the authenticity and consistency of the off-chain data, the traceability and trust verification module recalculates the data fingerprint of the queried off-chain data and compares it with the data fingerprint stored on the blockchain. If they match, it means that the off-chain data has not been tampered with; if they do not match, it means that the off-chain data may have been modified, and it is marked as abnormal data and refused to be displayed.

[0071] In a preferred embodiment of the present invention, the source tracing credibility verification module employs a deep convolutional neural network to verify the authenticity of the source tracing chain data and generate a verification confidence score. A deep convolutional neural network is a powerful machine learning model capable of learning complex patterns and rules from large amounts of historical data and identifying anomalies and inconsistencies in the data. The deep convolutional neural network model trained in this invention uses the ResNet50 architecture, with the structured feature vectors of the source tracing chain data as input and the verification confidence score as output.

[0072] The structured feature vectors of the traceability chain data are extracted using feature engineering methods and include three main categories: temporal features, geographic features, and parametric features. Temporal features are used to assess the temporal continuity of data at each stage. For example, calculating the time difference between the end time of the breeding stage and the start time of the transportation stage; theoretically, these two should be very close. If the time difference exceeds a reasonable range, data falsification or underreporting may exist. Geographical features are used to assess the geographical rationality of data at each stage. For example, verifying whether the GPS trajectory of the transport vehicles follows a reasonable route from the farm to the slaughterhouse, and whether there are any unreasonable detours or stops. Parametric features are used to assess the logical consistency of parameters in data at each stage. For example, whether the weight gain curve of livestock and poultry conforms to normal growth patterns, whether the environmental temperature and season are compatible, and whether the dosage of veterinary drugs and the weight of livestock and poultry are reasonable.

[0073] The deep convolutional neural network model calculates the independent confidence score for each stage of data, and the independent confidence score for the breeding stage. Independent confidence level during the transportation phase Independent confidence level during slaughter stage Independent confidence level of the sales stage Then, a weighted average is calculated on the independent confidence scores from each stage to generate the final validation confidence score. The formula for calculating the weighted average is as follows:

[0074] ,

[0075] in, To verify the confidence level, the value ranges from 0 to 1. , , , The weight coefficients for the four stages and satisfy the following conditions: In a preferred embodiment, The value is 0.35. The value is 0.15. The value is 0.35. The value is 0.15, with a higher weighting for the breeding and slaughtering stages, as these two stages have the most critical impact on the quality and safety of livestock and poultry products.

[0076] The traceability and reliability verification module compares the verification confidence level with a preset confidence threshold, which is preferably set to 0.80. When the verification confidence level is higher than the confidence threshold, the traceability chain data is deemed authentic and reliable, and a green "Verification Passed" indicator is displayed in the traceability query results, along with detailed traceability information, including the time, location, responsible person, and key parameters for each stage. When the verification confidence level is lower than the confidence threshold, the traceability chain data is deemed to have an anomaly risk, and a yellow or red "Anomaly Found" indicator is displayed in the traceability query results. Consumers are advised to purchase with caution, and the anomaly information is pushed to regulatory authorities for manual review.

[0077] In addition to authenticity verification, the traceability and credibility verification module also calculates a comprehensive risk score for livestock and poultry products based on a multi-dimensional feature fusion method. This comprehensive risk score considers four dimensions: drug residue risk, disease infection risk, environmental hygiene risk, and operational compliance risk, providing consumers with a quantifiable assessment of product safety levels.

[0078] In an innovative embodiment of the present invention, the comprehensive risk score is calculated using a multidimensional risk scoring model. This model first extracts key risk indicators from the traceability chain data. Drug residue indicators include the type of veterinary drug used, its dosage, frequency of use, and whether the withdrawal period meets standards. Disease infection indicators include vaccination records, quarantine results, and epidemic reporting information. Environmental hygiene indicators include farm environmental parameters, transport vehicle disinfection records, and slaughterhouse hygiene inspection results. Operational compliance indicators include whether feeding operations are standardized, whether transportation time is reasonable, whether the slaughtering process is compliant, and whether the cold chain for sales meets standards.

[0079] Key risk indicators were quantitatively assessed using a combination of expert scoring and machine learning models, mapping each indicator to a standardized risk score of 0 to 1, where 0 represents no risk and 1 represents high risk. For example, the risk of veterinary drug residues was quantified based on the ratio of the test result to the standard limit. A risk score of 0.3 was assigned when the result was 50% of the standard limit, 0.7 when it was 90%, and 1.0 when it exceeded the limit. Similarly, the risk of disease infection was assessed with a score of 0.1 if vaccination was complete and quarantine was passed, 0.4 if vaccination was incomplete but quarantine was passed, and 1.0 if quarantine was failed.

[0080] A multi-dimensional feature fusion algorithm is used to comprehensively calculate the standardized risk scores, generating a comprehensive risk score. The multi-dimensional feature fusion algorithm employs a weighted fusion method, and the calculation formula is as follows:

[0081] ,

[0082] in, The comprehensive risk score ranges from 0 to 1, with higher scores indicating greater risk. Standardized risk scores for drug residues, Standardized risk scores for disease infection, As a standard risk score for environmental sanitation, Standardize risk scores for operational procedures. , , , The weight coefficients are the four dimensions and satisfy the following conditions: In a preferred embodiment, The value is 0.40. The value is 0.30. The value is 0.20. The value is 0.10, with drug residues and disease infection having the highest weights, because these two items directly affect food safety and human health.

[0083] Livestock and poultry products are classified into safety levels based on a comprehensive risk score, including low risk, medium risk, and high risk. A comprehensive risk score below 0.30 is considered low risk, and a green "Safe" label is displayed in the traceability report, indicating that the product is safe and reliable and can be purchased with confidence. A comprehensive risk score between 0.30 and 0.60 is considered medium risk, and a yellow "General" label is displayed in the traceability report, indicating that the product carries some risk and purchase should be made with caution. A comprehensive risk score above 0.60 is considered high risk, and a red "Risk" label is displayed in the traceability report, indicating that the product poses a significant safety hazard and purchase is not recommended. Information on high-risk products is also sent to regulatory authorities for removal from shelves.

[0084] The traceability verification module generates a traceability verification report based on the verification confidence level and comprehensive risk score. The report is presented in a visually appealing format, including a product basic information display area, a traceability chain timeline display area, a key link details display area, a verification result display area, and a risk score display area. The product basic information display area includes the livestock breed, farm name, slaughterhouse name, production date, and traceability code. The traceability chain timeline display area visually displays the complete lifecycle of livestock from birth, breeding, transportation, slaughter, to sale, allowing users to click on each node on the timeline to view detailed information for that stage. The key link details display area highlights key information of concern to consumers, such as feed usage, veterinary drug usage, quarantine results, and pre-slaughter rest time. The verification result display area shows the verification confidence level and authenticity determination results calculated by the deep learning model. The risk score display area uses a radar chart to show the risk scores and comprehensive risk scores for four dimensions: drug residues, disease infection, environmental hygiene, and operational procedures, along with the corresponding safety levels.

[0085] The traceability and trusted verification module also feeds back the verification confidence level to the blockchain smart evidence storage module 2, which is used to adjust the consensus weight of the corresponding nodes, achieving system self-optimization and self-purification. Specifically, the traceability and trusted verification module calculates the average verification confidence level of each node's submitted data during the verification process. When the average verification confidence level of a node's data consistently falls below 0.70, it indicates that the traceability data submitted by that node has low credibility and may involve data falsification or mismanagement. The traceability and trusted verification module feeds back the node's identifier and corresponding average verification confidence level to the blockchain smart evidence storage module 2. The blockchain smart evidence storage module 2 then reduces the consensus weight of that node in the next consensus weight update, reducing its influence in the blockchain consensus process. Conversely, when the average verification confidence level of a node's data consistently exceeds 0.90, it indicates that the traceability data submitted by that node is of high quality and has strong credibility. The blockchain smart evidence storage module 2 increases the consensus weight of that node, giving it more opportunities for record-keeping and incentive rewards.

[0086] By feeding back the verification results to the upstream blockchain smart evidence storage module, a complete closed loop is formed, from data collection, quality assessment, on-chain evidence storage, compliance inspection to traceability verification. Data quality issues discovered in the verification process can be promptly fed back to the data source, urging each node to improve data quality and management level, thus achieving continuous optimization and a virtuous cycle of the system.

[0087] One of the core innovations of this invention is the establishment of a closed-loop collaborative mechanism with deep coupling among four core modules. Through parameter-level coupling, state-level coupling, and logic-level closed loop, the modules promote each other, achieve synergistic effects, and optimize each other, so that the overall system performance exhibits non-linear growth and achieves a synergistic effect where one plus one is greater than two.

[0088] The comprehensive data quality score calculated by the multi-source data fusion acquisition module 1 directly serves as a key input parameter for the blockchain smart evidence storage module 2, influencing the priority of data upload and the allocation of node consensus weights. High-quality data is given high priority and is packaged into blocks first; the higher the quality of data submitted by a node, the greater its consensus weight. This parameter-level coupling ensures that the blockchain stores only filtered, high-quality data, avoiding the impact of low-quality data on blockchain performance, while incentivizing nodes to improve data acquisition quality.

[0089] The verification confidence level generated by the traceability and trust verification module 4 is fed back to the blockchain smart evidence storage module 2, which is used to dynamically adjust the consensus weight of nodes. The consensus weight of nodes with low verification confidence is reduced, while the consensus weight of nodes with high verification confidence is increased. This weight adjustment mechanism based on verification results feeds the evaluation results of the downstream verification process back to the upstream evidence storage process, forming a parameter-level closed-loop coupling.

[0090] The on-chain data hash and block state generated by the blockchain smart evidence storage module 2 directly trigger the execution of the smart contract supervision module 3. When a new data record is written to the blockchain, the block state changes, and the smart contract automatically performs compliance checks after detecting the state change. This state-change-based triggering mechanism achieves state-level coupling between the evidence storage module and the supervision module, ensuring the real-time nature and automation of supervision.

[0091] After detecting illegal data, the smart contract monitoring module 3 changes the status identifier of the violating node, marking it as a key monitoring target and reducing its consensus weight. This change in node status affects the node's subsequent role and permissions in the blockchain network, creating a state-level coupling between the monitoring module and the evidence storage module.

[0092] The smart contract monitoring module 3 generates regulatory adjustment instructions based on violations, which are then fed back to the multi-source data fusion and acquisition module 1 to optimize acquisition parameters and monitoring strategies. This feedback mechanism, from regulatory results to acquisition strategies, forms a complete logical closed loop. When a node frequently violates regulations, the regulatory adjustment instructions require increasing the acquisition frequency of that node, expanding the range of monitoring parameters, and initiating key monitoring, thereby strengthening control over problematic nodes at the source and preventing further violations.

[0093] Upon receiving regulatory adjustment instructions, the multi-source data fusion acquisition module 1 automatically adjusts its acquisition strategy to generate more frequent and comprehensive traceability data. This data, after quality assessment, re-enters the blockchain notarization and smart contract supervision process, forming a complete closed loop: acquisition → notarization → supervision → feedback → acquisition. During the closed-loop feedback process, the system adaptively adjusts its acquisition strategy based on regulatory results, focusing on monitoring weak points and optimizing the allocation of regulatory resources.

[0094] Through parameter-level coupling, state-level coupling, and logic-level closed-loop feedback, the four core modules form a deep collaborative relationship, generating a significant synergistic effect.

[0095] The high-quality data provided by the multi-source data fusion acquisition module promotes the efficient operation of the blockchain smart evidence storage module, the automated supervision of the smart contract supervision module promotes the accurate verification of the traceability and trust verification module, and the feedback from the traceability and trust verification module promotes the continuous improvement of data collection quality, forming a virtuous cycle of mutual promotion.

[0096] Each of the four modules functions independently, but their collaborative operation creates a synergistic effect. High-quality data collection enhances the credibility of blockchain-based evidence storage, reliable on-chain data improves the accuracy of smart contract oversight, accurate oversight results enhance the reliability of traceability verification, and reliable verification feedback further improves data collection quality. The combined effectiveness of each module results in a non-linear increase in the overall system performance.

[0097] Traditional traceability systems face a conflict between data quality and collection costs. This invention resolves this conflict by using data quality assessment and prioritization mechanisms to ensure high-quality data is uploaded to the blockchain while reducing the need for costly collection of all data. Traditional blockchain systems also face a conflict between performance and decentralization. This invention resolves this conflict by using a dynamic consensus weight allocation mechanism to improve blockchain performance while maintaining decentralization.

[0098] The system achieves adaptive adjustment through a closed-loop feedback mechanism, automatically adjusting the data collection strategy and consensus weight based on regulatory results and verification feedback without manual intervention. When the data quality of a node deteriorates or violations occur, the system automatically strengthens monitoring of that node and reduces its consensus weight; when the node's data quality improves and continues to comply, the system automatically resumes normal monitoring and increases its consensus weight. This adaptive adjustment capability enables the system to cope with complex and ever-changing real-world application scenarios and maintain long-term stable operation.

[0099] Through a deeply coupled closed-loop collaborative mechanism, the four core modules of this invention form an organic whole, achieving true system-level innovation rather than simply piecing together modules. The overall system efficiency is improved by more than 85% compared to traditional independent module solutions.

[0100] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, the present invention can be modified and varied in various ways. 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 blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products, characterized in that: include: The multi-source data fusion acquisition module is deployed in the breeding, transportation, slaughtering and sales stages to collect identification data, environmental monitoring data and video surveillance data of individual livestock and poultry. It obtains the full-dimensional feature information of the individual livestock and poultry at each stage through multimodal sensor fusion technology, and intelligently analyzes the video surveillance data based on deep learning algorithms to generate behavioral feature data. It calculates a comprehensive data quality score based on the identification data, environmental monitoring data and behavioral feature data, and determines the data uploading priority based on the comprehensive data quality score. The blockchain intelligent evidence storage module is connected to the multi-source data fusion and acquisition module. It is used to receive the data upload priority and corresponding traceability data. It adopts a consortium blockchain architecture to establish a multi-party consensus network including regulatory nodes, breeding nodes, slaughtering nodes and sales nodes. It performs digest calculation on the traceability data based on an improved hash algorithm to generate data fingerprints. It stores the data fingerprints and timestamp information in a distributed ledger. It dynamically adjusts the consensus weight of each node according to the data upload priority. The consensus weight affects the block generation speed and data verification order. The smart contract monitoring module, connected to the blockchain smart evidence storage module, is used to acquire on-chain data from the distributed ledger and deploy preset food safety compliance rules to the smart contract. When the smart contract receives the on-chain data, it automatically performs a compliance check, matching and comparing the on-chain data with the food safety compliance rules. When non-compliant data is detected, it triggers an early warning message and records the responsible node identifier. Based on the early warning message, it generates a regulatory adjustment instruction and feeds it back to the multi-source data fusion acquisition module to optimize the acquisition parameters. The regulatory adjustment instruction includes an acquisition frequency adjustment value and a key monitoring object identifier. The traceability and trusted verification module, connected to the blockchain smart evidence storage module and the smart contract supervision module, is used to receive traceability query requests initiated by users. The traceability query request contains the traceability code of the livestock and poultry product to be verified. Based on the traceability code, the module retrieves complete traceability chain data from the distributed ledger, uses a deep convolutional neural network to verify the authenticity of the traceability chain data to generate a verification confidence level, calculates the comprehensive risk score of the livestock and poultry product based on a multi-dimensional feature fusion method, generates a traceability verification report based on the verification confidence level and the comprehensive risk score, and feeds back the verification confidence level to the blockchain smart evidence storage module to adjust the consensus weight of the corresponding node.

2. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 1, characterized in that, The multi-source data fusion acquisition module includes: An identification unit is used to read the electronic tag information worn by the individual livestock and poultry through radio frequency identification technology. The electronic tag information includes a unique identification code, a farm code, and a date of birth. An environmental sensing unit is used to collect environmental parameter data in real time through Internet of Things sensors. The environmental parameter data includes temperature data, humidity data, ammonia concentration data, and light intensity data. The video intelligent analysis unit is used to acquire the behavior video stream of the individual livestock and poultry through a high-definition camera device, extract key frame images from the behavior video stream using a lightweight convolutional neural network, and perform target detection and behavior recognition on the key frame images to generate the behavior feature data. The data quality assessment unit, connected to the identity recognition unit, the environmental sensing unit, and the video intelligent analysis unit, is used to acquire the electronic tag information, the environmental parameter data, and the behavioral feature data, detect the completeness and accuracy of various types of data, calculate the comprehensive data quality score, and determine the data uploading priority based on the comprehensive data quality score.

3. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 2, characterized in that, The data quality assessment unit calculates the comprehensive data quality score in the following manner: The success rate of reading the electronic tag information, the sampling completeness of the environmental parameter data, and the recognition accuracy of the behavioral feature data are obtained. The reading success rate, the sampling completeness and the recognition accuracy are weighted and fused according to preset weight coefficients to generate the comprehensive data quality score; The comprehensive data quality score is compared with a quality threshold. When the comprehensive data quality score is higher than the quality threshold, the corresponding data is marked as high-priority on-chain data. When the comprehensive data quality score is lower than the quality threshold, the data re-collection process is triggered.

4. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 1, characterized in that, The blockchain smart evidence storage module stores the traceability data in the following manner: The source data is compressed in multiple rounds based on the improved SM3 hash algorithm. The improved SM3 hash algorithm introduces an adaptive padding mechanism and parallel computing optimization to generate a fixed-length data fingerprint. The data fingerprint is combined with the timestamp information, the unique identifier, and the current block hash value to form a data record; The data record is broadcast to each node in the multi-party consensus network, and each node participates in the block verification process according to the consensus weight; Once more than a preset proportion of nodes have passed verification, the data record is written into a newly generated block and linked to the end of the distributed ledger.

5. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 4, characterized in that, The blockchain smart evidence storage module dynamically adjusts the consensus weight in the following ways: Obtain the historical verification accuracy of each node and the overall data quality score; Calculate the reputation value of each node, which is positively correlated with the historical verification accuracy and negatively correlated with the number of violation records; The consensus weight of each node is determined based on the reputation value and the comprehensive data quality score. Nodes with higher consensus weights have higher voting weights during the block verification process. The consensus weights are updated periodically, and the weight allocation is adjusted based on the latest performance of the nodes.

6. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 1, characterized in that, The smart contract monitoring module performs compliance checks in the following ways: Read the on-chain data from the distributed ledger, the on-chain data including feed usage records, veterinary drug usage records, quarantine records, and slaughter operation records; Each parameter in the on-chain data is compared with the standard limit in the food safety compliance rules; When the drug residue level in the veterinary drug use record exceeds the standard limit, or when the resting time in the slaughter operation record is less than the prescribed duration, it is determined to be non-compliant data; Generate the warning information containing the violation type, violation node identifier, and violation timestamp, and synchronize the warning information to the monitoring terminal of the regulatory department.

7. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 6, characterized in that, The smart contract monitoring module is also used for: Count the number of violations at each node within a preset time period; When the number of violations by a node exceeds the warning threshold, the consensus weight of that node is reduced, and the node is marked as a key monitoring target. Generate the regulatory adjustment instruction, which includes increasing the collection frequency of the key monitoring objects and expanding the range of monitoring parameters; The regulatory adjustment instruction is sent to the multi-source data fusion and acquisition module to trigger an enhanced monitoring process for the key monitoring object.

8. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 1, characterized in that, The source tracing and trusted verification module generates the verification confidence level in the following manner: The traceability chain data is extracted from the distributed ledger based on the traceability code. The traceability chain data includes data from the breeding stage, transportation stage, slaughtering stage, and sales stage. The deep convolutional neural network was used to verify the temporal continuity, geographical rationality, and parameter logic consistency of the data at each stage. Calculate the independent confidence scores for each stage of the data, and then perform a weighted average of the independent confidence scores to generate the validation confidence score. When the verification confidence level is higher than the confidence threshold, the traceability chain data is determined to be authentic and reliable; when the verification confidence level is lower than the confidence threshold, the traceability chain data is marked as having an abnormal risk.

9. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 8, characterized in that, The source tracing and trust verification module calculates the comprehensive risk score in the following manner: Key risk indicators are extracted from the traceability chain data, including drug residue indicators, disease infection indicators, environmental hygiene indicators, and operational standard indicators. The key risk indicators mentioned above are quantitatively assessed, and the assessment results are mapped to standardized risk scores. The standardized risk scores are comprehensively calculated using a multi-dimensional feature fusion algorithm to generate the comprehensive risk score; The livestock and poultry products are classified into safety levels based on the comprehensive risk score, which includes three levels: high risk, medium risk, and low risk.

10. The blockchain-based full-chain traceability and slaughter supervision system for livestock and poultry products according to claim 1, characterized in that, The source tracing and trusted verification module is also used for: Based on the verification confidence level, identify nodes with low data credibility; The verification confidence level is fed back to the blockchain smart evidence storage module; The blockchain smart evidence storage module adjusts the consensus weight of the corresponding node according to the verification confidence level. For nodes with low verification confidence level, the consensus weight is reduced, and for nodes with high verification confidence level, the consensus weight is increased. The self-optimization and self-purification of the traceability system are achieved through the dynamic adjustment of the consensus weight.

Citation Information

Patent Citations

  • Livestock and poultry tracing method and system based on Internet of Things

    CN111353788A

Cited By

  • Livestock and poultry food processing and safety tracing method and system based on block chain

    CN121937142A

  • Livestock and poultry food processing and safety traceability method and system based on blockchain

    CN121937142B