Livestock product epidemic and traceability information quality tracing system based on artificial intelligence
By using AI-based systems for real-time monitoring and multimodal information fusion, the problem of insufficient disease risk perception in existing technologies has been solved, enabling early prediction and accurate traceability of livestock and poultry product diseases, and improving the efficiency and accuracy of disease risk management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YANGO UNIV
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-17
AI Technical Summary
Existing livestock and poultry product quality traceability technologies lack the ability to proactively perceive and warn of disease risks, and cannot identify potential health abnormalities in the early stages of production. Furthermore, the heterogeneous traceability information has not been deeply integrated, making it difficult to quickly and accurately locate the root cause and delineate the boundaries of impact in traceability analysis.
An artificial intelligence-based system is adopted, including a raw material file construction module, an anomaly proactive prediction module, a multimodal information fusion module, a traceability knowledge graph construction module, and an intelligent traceability decision-making module. By combining real-time monitoring data streams, time series analysis, and external knowledge bases, the system can predict and trace potential disease anomalies.
It enables early prediction and marking of potential disease nodes, generates a panoramic view of abnormal events, dynamically constructs a traceability knowledge graph, optimizes traceability paths, improves the accuracy of automatic inference and traceability of disease transmission paths, and reduces the risk of disease spread.
Smart Images

Figure CN121458330B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent traceability technology for food safety, specifically to a quality traceability system for livestock and poultry product disease and traceability information based on artificial intelligence. Background Technology
[0002] Existing livestock and poultry product quality traceability technologies primarily rely on the post-event collection and identification of information during breeding, transportation, and slaughter. By assigning a unique identifier to each individual or batch and binding the records generated at each stage to this identifier, a data chain arranged chronologically is formed. This achieves the recording and linking of information, providing a data foundation for subsequent recalls of problematic products and the determination of responsibility.
[0003] Current traceability models have shortcomings. The system lacks proactive perception and early warning capabilities for disease risks; its operational logic is reactive querying after a problem occurs, failing to identify and intervene in potential health anomalies during the production process. Furthermore, the data generated at each stage differs in format, dimension, and granularity. This heterogeneous traceability information is often simply listed or matched by keywords during tracing, without effectively uncovering the deep spatiotemporal relationships and causal logic between the data. Traceability analysis heavily relies on the experience of operators, making it difficult to quickly and accurately pinpoint the root cause and delineate the boundaries of impact when faced with complex potential transmission paths.
[0004] There is a need for a technological approach that can proactively predict dynamic risks in the production process, shifting the starting point for traceability from "after the fact" to "during the process" and even "before the fact." Simultaneously, there is a need for a technological means that can deeply integrate and intelligently analyze multi-source heterogeneous information, enabling dispersed data to form a knowledge structure with semantic association and reasoning capabilities to support automated and precise traceability decisions. Summary of the Invention
[0005] The purpose of this invention is to provide an artificial intelligence-based quality traceability system for livestock and poultry product diseases and traceability information, in order to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides an artificial intelligence-based quality traceability system for livestock and poultry product diseases and traceability information, the system comprising:
[0007] The raw material archive construction module is used to collect information on livestock and poultry raw materials before they enter the production process, extract features and standardize the coding of the livestock and poultry raw material information, generate a unique identifier for the raw material, and associate the initial health status and environmental data of the raw material to form a raw material archive.
[0008] The abnormality proactive prediction module is used to access the dynamic monitoring data stream in the production process in real time. Based on the initial health status in the raw material archive, it uses a time series analysis model to analyze the dynamic monitoring data stream, predict and mark potential disease abnormality nodes and associated raw material batches in advance.
[0009] The multimodal information fusion module is used to simultaneously retrieve heterogeneous traceability records of multiple links such as breeding, transportation and slaughter corresponding to the associated raw material batch after identifying the potential disease abnormal node. The module performs spatiotemporal alignment and feature fusion of the dynamic monitoring data stream and the heterogeneous traceability records to generate a fused panoramic view of abnormal events.
[0010] The knowledge graph construction module is used to construct and update a knowledge graph for tracing the spread and impact of a specific batch of disease by using the entities and relationships in the panoramic view of the abnormal event as nodes and edges, combined with an external authoritative disease knowledge base for relationship reasoning and completion.
[0011] The intelligent traceability decision module is used to automatically generate and optimize the quality traceability query path based on the path connection strength and event logic chain of entities in the traceability knowledge graph, thereby driving the accurate traceability process of the livestock and poultry products.
[0012] Preferably, the implementation of the raw material file construction module includes:
[0013] The biological characteristic data and growth environment parameters of individual livestock and poultry are collected by sensing devices deployed at the source of breeding, and the biological characteristic data and growth environment parameters are cleaned and formatted.
[0014] A pre-trained convolutional neural network model is used to extract features from the images and video streams in the biometric data to obtain structured feature vectors;
[0015] The structured feature vector, the growth environment parameters, and the immunization information entered by the farmers are encapsulated into a data packet, and a hash operation is performed on the data packet to generate a unique identifier for the raw material.
[0016] All data packets carrying the unique identifier of the raw material are stored in a distributed database according to time sequence to form the raw material archive.
[0017] Preferably, the implementation of the anomaly proactive prediction module further includes:
[0018] The initial health status data is extracted in batches from the raw material archive and used as a prediction benchmark.
[0019] The dynamic monitoring data stream, including real-time body temperature, activity level, and feeding sound frequency, is continuously read from the sensor network on the production line.
[0020] The dynamic monitoring data stream and the prediction benchmark of the corresponding batch are input into the trained time series analysis model, and the time series analysis model outputs a health status prediction sequence for multiple future time windows.
[0021] The health status prediction sequence is compared with a preset threshold curve. When the health status prediction sequence continuously exceeds the threshold curve, it is determined to be a potential disease abnormal node. This node is then bound to the livestock and poultry raw material batch that generates the dynamic monitoring data stream to generate an abnormal batch marker.
[0022] The method for inputting the dynamic monitoring data stream and the corresponding batch of prediction benchmarks into a trained time series analysis model, and for the time series analysis model to output a health status prediction sequence for multiple future time windows, is as follows:
[0023] Collect historical dynamic monitoring data streams and corresponding health status label data, and preprocess the historical dynamic monitoring data streams, including missing value imputation and normalization;
[0024] A temporal neural network model based on an attention mechanism is constructed, and supervised training is performed using the historical dynamic monitoring data stream and health status label data to optimize the prediction error;
[0025] During the prediction phase, the real-time dynamic monitoring data stream and the prediction benchmark of the corresponding batch are sliced according to the time window and input into the trained time series analysis model.
[0026] The time series analysis model calculates the feature representation of each time step through a multi-layer neural network, and uses attention weights to focus on key time points, outputting a probability sequence of predicted health status for multiple future time windows;
[0027] Based on the predicted health status probability sequence, a predicted health status sequence is generated for comparison with the threshold curve.
[0028] Preferably, the multimodal information fusion module is implemented in the following ways:
[0029] When the abnormal batch marker is received, the raw material archive is retrieved by reverse retrieval based on the batch number in the marker to obtain all historical files of the abnormal batch.
[0030] Simultaneously, data query requests are initiated to the transportation management subsystem and the slaughtering and processing management subsystem to obtain the geographical location trajectory, transportation vehicle environment log, waiting-to-slaughter rest record, and slaughter quarantine results of the abnormal batch during the circulation process. These records constitute the heterogeneous traceability record.
[0031] Establish a unified spatiotemporal coordinate system to align the timestamps of the dynamic monitoring data stream with the time and location information in the heterogeneous tracing records;
[0032] By using an attention mechanism to weightedly fuse data features from different sources, a panoramic view of the abnormal event containing temporal, spatial, and multidimensional feature information is generated.
[0033] Preferably, the implementation of the knowledge graph construction module includes:
[0034] Entity recognition and relationship extraction are performed on the panoramic view of the abnormal events. The identified entities include specific livestock and poultry batches, farm locations, transport vehicles, slaughter lines, and detected pathogen types. The identified relationships include belonging to, source, transportation, processing, and detection.
[0035] Using the initially identified entities and relationships as seeds, we query an authoritative external disease knowledge base to obtain known transmission routes, susceptible species, and incubation period information for the pathogen type.
[0036] By using a graph neural network model to reason about seed entities, relationships, and external knowledge, the missing potential propagation links and influence relationships between entities are filled in, forming a traceability knowledge graph centered on batches and including the disease transmission path and risk spread range.
[0037] Preferably, the implementation of the knowledge graph construction module further includes:
[0038] In the aforementioned knowledge graph, each relational edge between entities is assigned a connection weight based on data confidence and logical causality;
[0039] When there is new data on similar abnormal events or external knowledge updates, the graph neural network model will recalculate the connection weights and paths of the relevant subgraphs to realize the dynamic update of the traceability knowledge graph. Specifically, when the system detects new data on similar abnormal events or updates to the external authoritative disease knowledge base, the update process of the graph neural network model is triggered.
[0040] Extract subgraphs related to the updated data from the traceability knowledge graph, including entity nodes and relation edges;
[0041] Transform new anomalous event data or external knowledge into graph-structured data and fuse it with atomic graphs;
[0042] The graph neural network model is used to learn the representations of nodes and edges in the fused graph, and the connection weights of the relation edges are recalculated based on data confidence, logical causality and time freshness.
[0043] The path connections in the traceability knowledge graph are updated based on the recalculated connection weights to achieve dynamic updates.
[0044] Preferably, the intelligent traceability decision module is implemented in the following ways:
[0045] Receive traceability query requests initiated by users or traceability tasks automatically triggered by the system; map key information in the query request to the corresponding entity nodes in the traceability knowledge graph;
[0046] Starting from the corresponding entity node, perform a multi-hop traversal in the graph to calculate the total weight of the path leading to different upstream and downstream entity nodes. The total weight of the path is obtained by summing the connection weights of each relation edge on the path.
[0047] Potential traceability paths are sorted according to their total weight, and the paths with the highest weights are selected as the key quality traceability query paths.
[0048] The method for calculating the total path weight to different upstream and downstream entity nodes by performing multi-hop traversal in the graph, starting from the corresponding entity node, and the total path weight being obtained by summing the connection weights of each relation edge on the path, is as follows:
[0049] Taking the entity node mapped by the query request as the starting node, the traversal direction is defined in the traceability knowledge graph, with the upstream direction pointing to the source entity and the downstream direction pointing to the subsequent processing entity;
[0050] The breadth-first search algorithm is used to start from the starting node and perform multi-hop traversal along the relation edges until the preset maximum number of hops is reached or all connected nodes have been traversed.
[0051] During the traversal, for each path from the starting node to the target node, the connection weights of all relation edges on the path are accumulated to obtain the total weight of the path.
[0052] Sort all traversed paths from highest to lowest total weight, and select the path with the highest weight as the key tracing path.
[0053] Preferably, the implementation of the intelligent traceability decision module further includes:
[0054] After obtaining the quality traceability query path, the system automatically generates structured data retrieval instructions and extracts detailed evidence chain data from the raw material archive, transportation management subsystem, slaughtering and processing management subsystem and the abnormal event panorama according to the entity sequence on the path.
[0055] These evidence chains are assembled according to chronological logic to generate a visual traceability report.
[0056] Preferably, the system further includes: a traceability quality assessment module, used to evaluate the quality of the data sources used for reasoning in the traceability knowledge graph;
[0057] The implementation method is as follows: after each trace is completed, record the data chains that are actually verified as correct and the data chains that are disproven in the trace results;
[0058] Tracing back the original data sources corresponding to these data chains includes the raw material archive, the dynamic monitoring data stream, and the heterogeneous traceability records;
[0059] Based on the results of the data chain verification, the quality and reputation scores of the corresponding data sources are adjusted, and the quality and reputation scores are fed back to the multimodal information fusion module for feature weighting calculation during subsequent data fusion.
[0060] Preferably, the operation of the system further includes a closed-loop optimization step:
[0061] The quality reputation score output by the traceability quality assessment module is synchronized to the anomaly proactive prediction module;
[0062] When the anomaly proactive prediction module uses the dynamic monitoring data stream for prediction, it performs credibility weighting processing on the input data stream based on the quality and reputation score of the data source, thereby optimizing the prediction input of the time series analysis model and improving the accuracy of marking the potential epidemic anomaly nodes.
[0063] Compared with the prior art, the beneficial effects of the present invention are:
[0064] This solution employs a technical approach that integrates real-time production dynamic monitoring data streams and continuously analyzes the initial health status of raw materials using a time-series analysis model. This approach can capture subtle abnormal fluctuations that deviate from normal production patterns, enabling early prediction and identification of potential disease outbreaks. This changes the traditional passive approach of initiating traceability only after an outbreak, shifting the risk discovery point forward and creating a window of opportunity for early intervention and risk isolation, thus reducing the probability of disease spread and problematic products entering the market.
[0065] After identifying anomalies, heterogeneous tracing records from multiple stages are retrieved simultaneously, and spatiotemporal alignment and feature fusion are performed to generate a panoramic view of the anomaly. Based on this, relational reasoning is performed using an external authoritative knowledge base to dynamically construct a tracing knowledge graph. This solution integrates scattered and fragmented local information into a unified, semantically rich network structure. It can automatically infer the potential transmission paths of the disease between entities and clearly reveal the scope of impact of the anomaly. By optimizing the tracing path based on the entity connection strength and event logic chain in the graph, the tracing process is no longer limited to linear queries but can quickly focus on core risk links, improving the accuracy and efficiency of tracing investigations in complex scenarios. Attached Figure Description
[0066] Figure 1 This is a schematic diagram illustrating the working principle of the artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system described in this invention.
[0067] Figure 2 A flowchart illustrating the implementation method of the raw material archive construction module;
[0068] Figure 3 A flowchart illustrating the implementation of the multimodal information fusion module;
[0069] Figure 4 A heatmap for the data source quality and reputation score of the livestock and poultry traceability system;
[0070] Figure 5 This is a bar chart showing the mass fraction of livestock and poultry raw materials. Detailed Implementation
[0071] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of 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.
[0072] Please see Figure 1This invention provides an artificial intelligence-based quality traceability system for livestock and poultry product diseases and traceability information. The system includes: a raw material archive construction module that collects livestock and poultry raw material information before it enters the production process; a module that extracts features and standardizes coding of this information to generate unique raw material identification identifiers; and a module that associates the initial health status of the raw materials with environmental data to form a structured raw material archive. An anomaly proactive prediction module accesses the dynamic monitoring data stream during the production process in real time. Based on the initial health status recorded in the raw material archive, this module uses a time-series analysis model to analyze the dynamic monitoring data stream. Its core function is to predict and mark potential disease anomaly nodes in advance, and associate these nodes with raw material batches. Once a potential disease anomaly node is identified, a multimodal information fusion module is activated. This module simultaneously retrieves heterogeneous traceability records from multiple stages, such as breeding, transportation, and slaughtering, corresponding to the associated raw material batch. By aligning the dynamic monitoring data stream with these heterogeneous traceability records in time and space and fusing their features, a panoramic view of anomaly events integrating multidimensional information is generated. The traceability knowledge graph construction module uses entities and relationships identified in the anomaly event panorama as basic nodes and edges. It combines this with an external authoritative disease knowledge base for relationship reasoning and completion, dynamically constructing and updating a traceability knowledge graph focused on specific batches and capable of displaying the spread and impact of diseases. The intelligent traceability decision module automatically generates and optimizes quality traceability query paths based on the path connection strength and event logic chains between entities in the traceability knowledge graph, thereby driving the precise traceability process for livestock and poultry products.
[0073] In one embodiment of the present invention, see [reference] Figure 2The raw material archive construction module collects biometric data and growth environment parameters of individual livestock and poultry through sensing devices deployed at the source of livestock farming, and cleans and formats this data. The module uses a pre-trained convolutional neural network model to extract features from the images and video streams in the biometric data, thereby obtaining structured feature vectors. The module encapsulates the structured feature vectors, growth environment parameters, and immunization information entered by farmers into a single data package, and performs a hash operation on this data package to generate a unique identifier for each raw material. The system stores all data packages carrying unique identifiers of raw materials in a distributed database according to time sequence, thus forming a raw material archive. The raw material archive construction module collects biometric data and growth environment parameters of individual livestock and poultry through sensing devices deployed at the source of livestock farming. These sensing devices include high-definition cameras, environmental sensors, and audio collectors. The biometric data covers visual images, behavioral video streams, and vocal audio of livestock and poultry, while the growth environment parameters cover temperature, humidity, light intensity, and air quality index. In practice, biometric data and growth environment parameters are cleaned and formatted. The cleaning process removes outliers caused by equipment malfunctions, and the formatting process converts heterogeneous data into a structured text format with timestamps, such as serializing sensor readings into JSON objects.
[0074] In some embodiments, a pre-trained convolutional neural network (CNN) model is used to extract features from images and video streams in the biometric data. The pre-trained CNN model is based on the VGG16 architecture and fine-tuned on a large-scale animal image dataset. The model receives standardized image frames or video keyframes, extracts spatial features through convolutional layers, compresses them through fully connected layers, and outputs a structured feature vector with a fixed dimension. This structured feature vector encodes the morphological features and movement patterns of livestock and poultry, serving as a unique representation. Optionally, for audio-based biometric data, such as feeding sounds, the data is converted to a spectrogram using the Mel-frequency cepstral coefficient method and then input into the CNN model, similarly generating a supplementary structured feature vector.
[0075] In practice, structured feature vectors, growth environment parameters, and immunization information entered by farmers are encapsulated into a single data package. The immunization information includes vaccine type, vaccination date, and dosage. The data package is organized as a binary large object, containing header metadata and main data fields. A hash operation is performed on the data package to generate a unique identifier for the raw material. The hash operation uses the SHA-256 algorithm to ensure the global uniqueness of the identifier and data integrity. The formula for calculating the unique identifier of the raw material is:
[0076] ;
[0077] in: This indicates the unique identifier of the raw material. This refers to the SHA-256 hash function. This represents the encapsulated data packet. In some embodiments, the data packet is serialized before the hash operation, generating a byte stream as input to the hash function. It can be understood that the unique identifier of the raw material is permanently bound to the data packet as an index key. Optionally, all data packets carrying the unique identifier of the raw material are stored in a distributed database according to their time sequence. HBase is chosen as the distributed database, and the data packets are stored with the unique identifier of the raw material as the primary key and sorted by the collection timestamp, forming a raw material archive. In specific implementations, the raw material archive establishes a secondary index to support fast retrieval by batch or time range, providing a standardized data source for subsequent modules.
[0078] In one embodiment of the present invention, see [reference] Figure 3 The abnormality proactive prediction module extracts initial health status data from the raw material archive by batch and uses it as the prediction benchmark. This module continuously reads dynamic monitoring data streams from the sensor network on the production line, including real-time body temperature, activity level, and feeding sound frequency. The module inputs the dynamic monitoring data streams and the corresponding batch prediction benchmarks into a trained time-series analysis model, which outputs a health status prediction sequence for multiple future time windows. The module compares the health status prediction sequence with a preset threshold curve. When the health status prediction sequence continuously exceeds the threshold curve, it is identified as a potential disease anomaly node, and this node is linked to the livestock raw material batch that generated the dynamic monitoring data stream, generating an abnormal batch marker. The time-series analysis model is implemented by collecting historical dynamic monitoring data streams and corresponding health status label data, and preprocessing the historical dynamic monitoring data streams, including missing value imputation and normalization. The module constructs a time-series neural network model based on an attention mechanism and uses historical dynamic monitoring data streams and health status label data for supervised training to optimize prediction errors. During the prediction phase, real-time dynamic monitoring data streams and corresponding batch prediction benchmarks are sliced into time windows and input into a trained time series analysis model. The time series analysis model calculates the feature representation of each time step through a multi-layer neural network and uses attention weights to focus on key time points, outputting a probability sequence of predicted health status for multiple future time windows. Based on the predicted health status probability sequence, the module generates a predicted health status sequence for comparison with a threshold curve.
[0079] Upon receiving an abnormal batch marker, the multimodal information fusion module uses the batch number in the marker to retrieve the raw material archive database and obtain all historical records of the abnormal batch. Simultaneously, the module initiates data query requests to the transportation management subsystem and the slaughtering and processing management subsystem to obtain the abnormal batch's geographical location trajectory during its circulation process, transportation vehicle environmental logs, pre-slaughter rest records, and slaughter quarantine results. These records constitute a heterogeneous traceability record. The module establishes a unified spatiotemporal coordinate system, aligning the timestamps of the dynamic monitoring data stream with the time and location information in the heterogeneous traceability record. The module utilizes an attention mechanism to weightedly fuse data features from different sources, generating a panoramic view of the abnormal event that includes temporal, spatial, and multidimensional feature information.
[0080] In a specific implementation, the anomaly proactive prediction module extracts initial health status data batch by batch from the raw material archive. This initial health status data originates from the immune information and early biometric assessment results encapsulated in the raw material archive. The module uses this initial health status data as the prediction benchmark for subsequent analysis. In another implementation, the anomaly proactive prediction module continuously reads dynamic monitoring data streams from a sensor network on the production line. This sensor network consists of body temperature sensors worn on individual livestock, motion accelerometers, and microphone arrays deployed near the feed troughs. The dynamic monitoring data streams include a series of time-series signals such as real-time body temperature, activity level, and feeding sound frequency. In some embodiments, the dynamic monitoring data streams, along with the prediction benchmark for the corresponding batch, are input into a trained time-series analysis model. The time-series analysis model outputs a health status prediction sequence for multiple future time windows.
[0081] The training and prediction of the time-series analysis model have clear implementation steps. The module collects historical dynamic monitoring data streams and corresponding health status label data. The health status label data is annotated by post-event veterinary diagnosis results. The historical dynamic monitoring data streams undergo preprocessing, including using linear interpolation to handle missing signal values and using min-max normalization to scale the data to the zero-to-one range. The module constructs a time-series neural network model based on an attention mechanism. The model includes a long short-term memory network layer and an attention layer. Supervised training is performed using historical dynamic monitoring data streams and health status label data, and the prediction error is optimized using a backpropagation algorithm. In the prediction phase, the real-time dynamic monitoring data streams and the corresponding batch prediction benchmarks are sliced into fixed-length time windows and input into the trained time-series analysis model. The time-series analysis model calculates the feature representation of each time step through a multi-layer neural network and uses attention weights to focus on key time points. The formula for calculating the attention weights is:
[0082] ;
[0083] in: Indicates at time step Attention weights This indicates that the Long Short-Term Memory network is in time step The hidden state, and These are the weight matrix and the bias vector. It is the weight vector of the attention mechanism. This is the total step size of the time window. The time series analysis model ultimately outputs a probability sequence of predicted health status for multiple future time windows. Based on the predicted health status probability sequence, the module generates a predicted health status sequence for comparison with the threshold curve. The predicted health status sequence is a classification label sequence obtained by performing an argmax operation on the predicted probability sequence.
[0084] In practice, the module compares the health status prediction sequence with the preset threshold curve. The threshold curve defines the maximum frequency that each health status category is allowed to occur within a continuous time window. When the health status prediction sequence continuously exceeds the threshold curve, it is determined to be a potential disease abnormal node. This node is then bound to the livestock and poultry raw material batch that generates the dynamic monitoring data stream, generating an abnormal batch marker that includes the batch identifier and the abnormal time point.
[0085] In a specific implementation, upon receiving an abnormal batch marker, the multimodal information fusion module reverse-searches the raw material archive based on the batch number in the marker to obtain all historical records of the abnormal batch. These historical records include biological characteristics, environmental parameters, and immunization information recorded from the source of breeding. Simultaneously, the multimodal information fusion module initiates data query requests to the transportation management subsystem and the slaughtering and processing management subsystem. The transportation management subsystem returns the geographical location trajectory of the abnormal batch during its circulation process and the environmental logs of the transportation vehicles. The slaughtering and processing management subsystem returns the pre-slaughter resting records and slaughter quarantine results of the abnormal batch. These records constitute heterogeneous traceability records. In some embodiments, a unified spatiotemporal coordinate system is established to align the timestamps of the dynamic monitoring data stream with the time and location information in the heterogeneous traceability records. The alignment process uses GPS timestamps and GIS coordinates for mapping and interpolation. It can be understood that the module utilizes an attention mechanism to weightedly fuse data features from different sources, generating a panoramic view of the abnormal event containing temporal, spatial, and multidimensional feature information. The panoramic view is stored in a graph-structured data format, where nodes represent entities or events, and edges represent spatiotemporal or logical relationships. Optionally, during the feature weighted fusion process, learnable weight parameters are assigned to data features from different subsystems. These weight parameters are dynamically adjusted based on the contribution of each feature to the historical tracing task. In practice, the fused panoramic view of abnormal events serves as input to the tracing knowledge graph construction module, providing a unified multimodal data foundation for entity and relationship identification.
[0086] In one embodiment of the present invention, the traceability knowledge graph construction module performs entity recognition and relationship extraction on the panoramic view of abnormal events. The identified entities include specific livestock batches, farm locations, transport vehicles, slaughter lines, and detected pathogen types. The identified relationships include belonging to, origin, transportation, processing, and detection. The module uses the initially identified entities and relationships as seeds, queries an authoritative external disease knowledge base to obtain known transmission routes, susceptible species, and incubation periods for pathogen types. The module uses a graph neural network model to reason about the seed entities, relationships, and external knowledge, completing the missing potential transmission links and impact relationships between entities, forming a traceability knowledge graph centered on batches and containing disease transmission paths and risk diffusion ranges.
[0087] In the knowledge graph tracing, the module assigns a connection weight based on data confidence and logical causality to each relational edge between entities. When new data on similar anomalous events or external knowledge updates, the graph neural network model recalculates the connection weights and paths of the relevant subgraphs, achieving dynamic updates to the knowledge graph. Specifically, when the system detects new data on similar anomalous events or updates to an authoritative external disease knowledge base, it triggers the update process of the graph neural network model. Subgraphs related to the updated data, including entity nodes and relational edges, are extracted from the knowledge graph. The new anomalous event data or external knowledge is transformed into graph structure data and fused with the atomic graph. The graph neural network model is used to learn the representations of nodes and edges in the fused graph, recalculating the connection weights of the relational edges based on data confidence, logical causality, and time freshness. Based on the recalculated connection weights, the path connections in the knowledge graph are updated, achieving dynamic updates.
[0088] In a specific implementation, the knowledge graph construction module traces the abnormal event panorama and performs entity recognition and relationship extraction. The entity recognition process scans the text descriptions and structured fields in the panorama based on a predefined named entity recognition model. The identified entities include specific livestock batches, farm locations, transport vehicles, slaughter lines, and detected pathogen types. The relationship extraction process determines relationships based on the spatiotemporal proximity and logical rules between entities, identifying relationships such as belonging, origin, transportation, processing, and detection. In practice, the initially identified entities and relationships are used as seeds to query an external authoritative disease knowledge base. This external authoritative disease knowledge base stores structured pathogen knowledge. The query operation sends pathogen type codes through an application programming interface to obtain the known transmission routes, susceptible species, and incubation period information of the pathogen type.
[0089] In some embodiments, a graph neural network model is used to reason about seed entities, relationships, and external knowledge. This model employs a graph attention network architecture, aggregating neighbor node information through a message passing mechanism to complete missing potential propagation links and influence relationships between entities, forming a traceability knowledge graph centered on batches and encompassing disease transmission paths and risk spread ranges. It can be understood that in this traceability knowledge graph, each relationship edge between entities is assigned a connection weight based on data confidence and logical causality. Data confidence originates from the quality and reputation score of the data source, while logical causality is based on the causal strength defined in an external authoritative disease knowledge base. The formula for calculating the connection weight is:
[0090] ;
[0091] in: Representing entities With entity The connection weights of the edges between the relationships. The data confidence score indicates that supports the relationship. This indicates the strength of logical causality derived from an external knowledge base. and It is an adjustable hyperparameter that balances the two contributions. In practice, when there is new data on similar anomalous events or external knowledge updates, the graph neural network model will recalculate the connection weights and paths of relevant subgraphs to achieve dynamic updates of the knowledge graph.
[0092] In a specific implementation, when the system detects new data on similar abnormal events or updates to an authoritative external disease knowledge base, it triggers the update process of the graph neural network model. A subgraph related to the updated data is extracted from the traceability knowledge graph. The extraction operation is based on entity type and attribute matching, and the subgraph includes related entity nodes and relational edges. The new abnormal event data or external knowledge is transformed into graph structure data. The transformation process involves creating new nodes or edges and fusing them with the atomic graph. The graph neural network model is used to learn the representations of nodes and edges in the fused graph, and the connection weights of relational edges are recalculated. The connection weights are based on data confidence, logical causality, and time freshness. Optionally, the time freshness factor increases the contribution of recent data. It can be understood that, based on the recalculated connection weights, the path connections in the traceability knowledge graph are updated. Path connection updates involve modifying the weight attributes of edges and the relationships between added and deleted edges, achieving dynamic updates.
[0093] See Figure 4This is a heatmap of the data source quality and reputation score for a livestock and poultry traceability system, a professional visualization chart belonging to the "Data Source Quality and Reputation Score Stage." This heatmap is a key reference for multimodal information fusion; data sources with high scores (such as disease knowledge bases) are given higher weight during fusion to ensure the reliability of traceability results. The transportation subsystem has a relatively low score and is a key target for optimization in subsequent data collection and verification; the improving score trend of the dynamic monitoring flow indicates that the adjustments to the real-time monitoring scheme are effective.
[0094] In one embodiment of the present invention, the intelligent traceability decision module receives traceability query requests initiated by users or traceability tasks automatically triggered by the system. The module maps key information in the query request to corresponding entity nodes in the traceability knowledge graph. Starting from the corresponding entity node, the module performs multi-hop traversal in the graph, calculating the total weight of paths leading to different upstream and downstream entity nodes. The total path weight is obtained by accumulating the connection weights of each relation edge on the path. The module sorts potential traceability paths according to the magnitude of the total path weight, and selects several paths with the highest weights as key quality traceability query paths. The specific implementation of path traversal and weight calculation is as follows: taking the entity node mapped by the query request as the starting node, the traversal direction is defined in the traceability knowledge graph, with the upstream direction pointing to the source entity and the downstream direction pointing to the subsequent processing entity. A breadth-first search algorithm is used to perform multi-hop traversal along the relation edges starting from the starting node until the preset maximum number of hops is reached or all connected nodes are traversed. During the traversal process, for each path from the starting node to the target node, the connection weights of all relation edges on the path are accumulated to obtain the total path weight. Sort all traversed paths from highest to lowest total weight, and select the path with the highest weight as the key tracing path.
[0095] After obtaining the quality traceability query path, the system automatically generates structured data retrieval instructions. Based on the entity sequence along the path, it sequentially extracts detailed evidence chain data from the raw material archive, transportation management subsystem, slaughtering and processing management subsystem, and the anomaly event panorama. The system then assembles this evidence chain data according to chronological logic to generate a visualized traceability report.
[0096] In a specific implementation, the intelligent traceability decision module receives traceability query requests initiated by users or traceability tasks automatically triggered by the system. The traceability query request includes key information such as product batch numbers or abnormal event identifiers. The module maps the key information in the query request to corresponding entity nodes in the traceability knowledge graph. The mapping process is completed by comparing string identifiers or scanning entity attributes. In some embodiments, starting from the corresponding entity node, a multi-hop traversal is performed in the traceability knowledge graph to calculate the total weight of paths leading to different upstream and downstream entity nodes. The total path weight is obtained by accumulating the connection weights of each relation edge on the path. The specific implementation of multi-hop traversal and path weight calculation is as follows: taking the entity node mapped by the query request as the starting node, a traversal direction is defined in the traceability knowledge graph. The upstream direction points to the source entity, and the downstream direction points to the subsequent processing entity. A breadth-first search algorithm is used to perform a multi-hop traversal along the relation edges starting from the starting node until the preset maximum number of hops is reached or all connected nodes are traversed. During the traversal, for each path from the starting node to the target node, the connection weights of all relation edges on the path are accumulated to obtain the total path weight. The formula for calculating the total path weight is:
[0097] ;
[0098] in: This represents the total weight of the path from the starting node to the target node. Indicates the first in the path The connection weights of the relation edges, This represents the total number of relational edges contained in the path. Essentially, all traversed paths are sorted from highest to lowest total weight, and the path with the highest weight is selected as the key traceability path. Optionally, the module sorts potential traceability paths based on their total weight, selecting the top few paths as key quality traceability query paths. Refer to Table 1, which shows the sorting results of some paths originating from the target batch node and their total weights after one traversal.
[0099] Table 1: Potential tracing paths originating from the target batch node and their total weights
[0100]
[0101] In practical implementation, after obtaining the quality traceability query path, the system automatically generates structured data retrieval instructions, which are structured query language statements constructed based on the entity sequence along the path. Based on the entity sequence along the path, detailed evidence chain data is extracted sequentially from the raw material archive, transportation management subsystem, slaughtering and processing management subsystem, and the abnormal event panorama. The extraction process is completed through the application programming interfaces provided by each subsystem. In some embodiments, this evidence chain data is assembled according to temporal logic, arranged in the order of event timestamps, to generate a visual traceability report. Optionally, the traceability report is presented in a visual format combining timeline charts and structured tables. It can be understood that the traceability report is ultimately output to the user or passed to other quality management modules, completing a full traceability decision-making process.
[0102] In one embodiment of the present invention, a traceability quality assessment module is used to evaluate the quality of data sources used for reasoning in the traceability knowledge graph. This is implemented by recording, after each traceability step, the data chains that are verified as correct and those that are disproven in the traceability results. The module traces back the original data sources corresponding to these data chains, including raw material archives, dynamic monitoring data streams, and heterogeneous traceability records. Based on the verification results of the data chains, the module adjusts the quality and reputation scores of the corresponding data sources and feeds these scores back to the multimodal information fusion module for feature weighting calculations during subsequent data fusion. The system operation also includes a closed-loop optimization step, where the quality and reputation scores output by the traceability quality assessment module are synchronized to the anomaly proactive prediction module. When using dynamic monitoring data streams for prediction, the anomaly proactive prediction module performs credibility weighting processing on the input data stream based on the quality and reputation scores of the data sources, thereby optimizing the prediction input of the time-series analysis model and improving the accuracy of marking potential epidemic anomaly nodes.
[0103] In a specific implementation, the system includes a traceability quality assessment module, which evaluates the quality of data sources used for reasoning in the traceability knowledge graph. In this implementation, after each traceability step, the traceability quality assessment module records the data chains that are actually verified as correct and those that are disproven. The actual verification of the traceability results is completed through official quarantine reports or feedback information from subsequent batches of products. In some embodiments, the traceability quality assessment module traces back to the original data sources corresponding to these data chains. These original data sources include raw material archives, dynamic monitoring data streams, and heterogeneous traceability records. The tracing operation is located based on the data identifiers referenced in the traceability report. Based on the verification results of the data chains, the traceability quality assessment module adjusts the quality reputation score of the corresponding data source. The quality reputation score is a value between zero and one, with an initial value of a preset neutral value. The traceability quality assessment module feeds back the quality reputation score to the multimodal information fusion module for feature weighting calculation during subsequent data fusion. It can be understood that the update of the quality reputation score follows an incremental learning rule, and its calculation formula is:
[0104] ;
[0105] in: Indicates a specific data source Quality and reputation rating This indicates the result of the verification. The learning rate hyperparameter controls the degree to which new evidence influences historical reputation. In some embodiments, the learning rate... The settings are dynamically adjusted based on the time interval between verification events.
[0106] In a specific implementation, the system operation also includes a closed-loop optimization step, where the quality reputation score output by the source tracing quality assessment module is synchronized to the anomaly proactive prediction module. When making predictions using dynamic monitoring data streams, the anomaly proactive prediction module performs credibility-weighted processing on the input data stream based on the quality reputation score of the data source. In some embodiments, the credibility-weighted processing involves multiplying the original values of the dynamic monitoring data stream by the corresponding data source's quality reputation score, thereby optimizing the prediction input of the time series analysis model. It can be understood that optimizing the prediction input of the time series analysis model means that the input signal received by the model has been modulated according to its historical reliability. Optionally, the attention mechanism layer of the time series analysis model can additionally receive the quality reputation score as an auxiliary input to further adjust the degree of attention paid to features at different time steps. In a specific implementation, the closed-loop optimization step aims to improve the accuracy of marking potential epidemic anomaly nodes by continuously introducing the quality reputation score as a feedback signal.
[0107] See Figure 5This is a bar chart showing the quality score of livestock and poultry raw materials, a professional visualization chart belonging to the "Raw Material Archive Construction Stage" of the livestock and poultry product traceability system. This chart is used to identify weak links in raw material quality (such as vaccines and additives), and is a key basis for risk prevention and control at the source of livestock and poultry farming. Raw materials with lower quality require strengthened procurement inspection or replacement of suppliers. The raw material quality score is one of the core fields in building the raw material archive database. The completeness of information on high-quality raw materials (such as veterinary drugs and feed) can improve the efficiency of "source exclusion" during subsequent disease tracing.
[0108] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, 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 process, method, article, or apparatus.
[0109] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A quality traceability system for livestock and poultry product diseases and traceability information based on artificial intelligence, characterized in that, The system includes: The raw material archive construction module is used to collect information on livestock and poultry raw materials before they enter the production process, extract features and standardize the coding of the livestock and poultry raw material information, generate a unique identifier for the raw material, and associate the initial health status and environmental data of the raw material to form a raw material archive. The abnormality proactive prediction module is used to access the dynamic monitoring data stream in the production process in real time. Based on the initial health status in the raw material archive, it uses a time series analysis model to analyze the dynamic monitoring data stream, predict and mark potential disease abnormality nodes and associated raw material batches in advance. The multimodal information fusion module is used to simultaneously retrieve heterogeneous traceability records of multiple links such as breeding, transportation and slaughter corresponding to the associated raw material batch after identifying the potential disease abnormal node. The module performs spatiotemporal alignment and feature fusion of the dynamic monitoring data stream and the heterogeneous traceability records to generate a fused panoramic view of abnormal events. The knowledge graph construction module is used to construct and update a knowledge graph for tracing the spread and impact of a specific batch of disease by using the entities and relationships in the panoramic view of the abnormal event as nodes and edges, combined with an external authoritative disease knowledge base for relationship reasoning and completion. The intelligent traceability decision module is used to automatically generate and optimize the quality traceability query path based on the path connection strength and event logic chain of entities in the traceability knowledge graph, thereby driving the accurate traceability process of the livestock and poultry products.
2. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 1, characterized in that, The implementation methods of the raw material file construction module include: The biological characteristic data and growth environment parameters of individual livestock and poultry are collected by sensing devices deployed at the source of breeding, and the biological characteristic data and growth environment parameters are cleaned and formatted. A pre-trained convolutional neural network model is used to extract features from the images and video streams in the biometric data to obtain structured feature vectors; The structured feature vector, the growth environment parameters, and the immunization information entered by the farmers are encapsulated into a data packet, and a hash operation is performed on the data packet to generate a unique identifier for the raw material. All data packets carrying the unique identifier of the raw material are stored in a distributed database according to time sequence to form the raw material archive.
3. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 2, characterized in that, The implementation of the anomaly proactive prediction module also includes: The initial health status data is extracted in batches from the raw material archive and used as a prediction benchmark. The dynamic monitoring data stream, including real-time body temperature, activity level, and feeding sound frequency, is continuously read from the sensor network on the production line. The dynamic monitoring data stream and the prediction benchmark of the corresponding batch are input into the trained time series analysis model, and the time series analysis model outputs a health status prediction sequence for multiple future time windows. The health status prediction sequence is compared with a preset threshold curve. When the health status prediction sequence continuously exceeds the threshold curve, it is determined to be a potential disease abnormal node. This node is then bound to the livestock and poultry raw material batch that generates the dynamic monitoring data stream to generate an abnormal batch marker. The method for inputting the dynamic monitoring data stream and the corresponding batch of prediction benchmarks into a trained time series analysis model, and for the time series analysis model to output a health status prediction sequence for multiple future time windows, is as follows: Collect historical dynamic monitoring data streams and corresponding health status label data, and preprocess the historical dynamic monitoring data streams, including missing value imputation and normalization; A temporal neural network model based on an attention mechanism is constructed, and supervised training is performed using the historical dynamic monitoring data stream and health status label data to optimize the prediction error; During the prediction phase, the real-time dynamic monitoring data stream and the prediction benchmark of the corresponding batch are sliced according to the time window and input into the trained time series analysis model. The time series analysis model calculates the feature representation of each time step through a multi-layer neural network, and uses attention weights to focus on key time points, outputting a probability sequence of predicted health status for multiple future time windows; Based on the predicted health status probability sequence, a predicted health status sequence is generated for comparison with the threshold curve.
4. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 3, characterized in that, The implementation methods of the multimodal information fusion module include: When the abnormal batch marker is received, the raw material archive is retrieved by reverse retrieval based on the batch number in the marker to obtain all historical files of the abnormal batch. Simultaneously, data query requests are initiated to the transportation management subsystem and the slaughtering and processing management subsystem to obtain the geographical location trajectory, transportation vehicle environment log, waiting-to-slaughter rest record, and slaughter quarantine results of the abnormal batch during the circulation process. These records constitute the heterogeneous traceability record. Establish a unified spatiotemporal coordinate system to align the timestamps of the dynamic monitoring data stream with the time and location information in the heterogeneous tracing records; By using an attention mechanism to weightedly fuse data features from different sources, a panoramic view of the abnormal event containing temporal, spatial, and multidimensional feature information is generated.
5. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 4, characterized in that, The implementation methods of the knowledge graph construction module include: Entity recognition and relationship extraction are performed on the panoramic view of the abnormal events. The identified entities include specific livestock and poultry batches, farm locations, transport vehicles, slaughter lines, and detected pathogen types. The identified relationships include belonging to, source, transportation, processing, and detection. Using the initially identified entities and relationships as seeds, we query an authoritative external disease knowledge base to obtain known transmission routes, susceptible species, and incubation period information for the pathogen type. By using a graph neural network model to reason about seed entities, relationships, and external knowledge, the missing potential propagation links and influence relationships between entities are filled in, forming a traceability knowledge graph centered on batches and including the disease transmission path and risk spread range.
6. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 5, characterized in that, The implementation of the knowledge graph construction module also includes: In the aforementioned knowledge graph, each relational edge between entities is assigned a connection weight based on data confidence and logical causality; When there is new data on similar abnormal events or external knowledge updates, the graph neural network model will recalculate the connection weights and paths of the relevant subgraphs to realize the dynamic update of the traceability knowledge graph. Specifically, when the system detects new data on similar abnormal events or updates to the external authoritative disease knowledge base, the update process of the graph neural network model is triggered. Extract subgraphs related to the updated data from the traceability knowledge graph, including entity nodes and relation edges; Transform new anomalous event data or external knowledge into graph-structured data and fuse it with atomic graphs; The graph neural network model is used to learn the representations of nodes and edges in the fused graph, and the connection weights of the relation edges are recalculated based on data confidence, logical causality and time freshness. The path connections in the traceability knowledge graph are updated based on the recalculated connection weights to achieve dynamic updates.
7. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 6, characterized in that, The intelligent traceability decision-making module is implemented in the following ways: Receive traceability query requests initiated by users or traceability tasks automatically triggered by the system; map key information in the query request to the corresponding entity nodes in the traceability knowledge graph; Starting from the corresponding entity node, perform a multi-hop traversal in the graph to calculate the total weight of the path leading to different upstream and downstream entity nodes. The total weight of the path is obtained by summing the connection weights of each relation edge on the path. Potential traceability paths are sorted according to their total weight, and the paths with the highest weights are selected as the key quality traceability query paths. The method for calculating the total path weight to different upstream and downstream entity nodes by performing multi-hop traversal in the graph, starting from the corresponding entity node, and the total path weight being obtained by summing the connection weights of each relation edge on the path, is as follows: Taking the entity node mapped by the query request as the starting node, the traversal direction is defined in the traceability knowledge graph, with the upstream direction pointing to the source entity and the downstream direction pointing to the subsequent processing entity; The breadth-first search algorithm is used to start from the starting node and perform multi-hop traversal along the relation edges until the preset maximum number of hops is reached or all connected nodes have been traversed. During the traversal, for each path from the starting node to the target node, the connection weights of all relation edges on the path are accumulated to obtain the total weight of the path. Sort all traversed paths from highest to lowest total weight, and select the path with the highest weight as the key tracing path.
8. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 7, characterized in that, The implementation of the intelligent traceability decision-making module also includes: After obtaining the quality traceability query path, the system automatically generates structured data retrieval instructions and extracts detailed evidence chain data from the raw material archive, transportation management subsystem, slaughtering and processing management subsystem and the abnormal event panorama according to the entity sequence on the path. These evidence chains are assembled according to chronological logic to generate a visual traceability report.
9. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 8, characterized in that, The system also includes: a traceability quality assessment module, used to evaluate the quality of the data sources used for reasoning in the traceability knowledge graph; The implementation method is as follows: after each trace is completed, record the data chains that are actually verified as correct and the data chains that are disproven in the trace results; Tracing back the original data sources corresponding to these data chains includes the raw material archive, the dynamic monitoring data stream, and the heterogeneous traceability records; Based on the results of the data chain verification, the quality and reputation scores of the corresponding data sources are adjusted, and the quality and reputation scores are fed back to the multimodal information fusion module for feature weighting calculation during subsequent data fusion.
10. The artificial intelligence-based livestock and poultry product disease and traceability information quality traceability system according to claim 9, characterized in that, The operation of the system also includes a closed-loop optimization step: The quality reputation score output by the traceability quality assessment module is synchronized to the anomaly proactive prediction module; When the anomaly proactive prediction module uses the dynamic monitoring data stream for prediction, it performs credibility weighting processing on the input data stream based on the quality and reputation score of the data source, thereby optimizing the prediction input of the time series analysis model and improving the accuracy of marking the potential epidemic anomaly nodes.
Citation Information
Patent Citations
Attack tracing method and device, medium and equipment
CN110875928A
Food health code tracing method and system
CN112837077A