Weighted adaptive matrix based end-to-end artificial intelligence system for beef traceability
Patent Information
- Application Number
- CN202611135321.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-30
AI Technical Summary
现有商业化牛肉AI溯源系统均采用固定权重矩阵完成多源溯源特征融合映射,系统参数出厂固化,无法根据不同产区、养殖模式、加工工艺进行动态调整
[0018]基于上述思想,进一步实现了技术上的创新发展, 拼接肉利用粘合剂重组碎肉,走私牛肉冒充高端牧区产品,二者在光谱上的微弱偏差属于低概率边缘异常,传统海量正品训练极易将其平滑抹杀。本发明创新执行梯度分层冻结——冻结基础权重矩阵,仅基于低置信度异常样本更新权重自适应矩阵。数次迭代后,拼接肉在近红外特定波段的吸收峰差异、走私肉在微量元素谱上的细微偏移,均被自适应矩阵对应维度急剧放大,系统“越在造假频发地运行,对当地特有造假手法的识别灵敏度越高”。
Smart Images

Figure CN123015042A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of artificial intelligence-based food traceability, smart animal husbandry, and agricultural product quality and safety supervision systems. Specifically, it relates to a full-chain intelligent traceability system for beef that integrates probability theory distribution correction, dual-weight matrix collaborative correction, and online incremental adaptive optimization. It is mainly used to cover the entire process of beef cattle breeding, slaughtering and processing, cold chain logistics, and terminal sales, enabling traceability of beef origin, quality identification, authenticity verification, and safety risk tracking. It is suitable for integrated hardware and software implementation scenarios such as digital management and control of smart ranches, establishment of traceability systems for food enterprises, and intelligent market supervision and sampling. More specifically, this invention relates to a full-chain artificial intelligence system for beef traceability based on a weighted adaptive matrix. Background Technology
[0002] With the continuous advancement of the national food safety traceability system, the beef cattle industry, as a key livestock traceability sector, has fully implemented a full-process traceability supervision mechanism. Consumers and regulatory authorities have increasingly higher demands for the credibility and accuracy of traceability assessments regarding beef origin, breeding environment, quarantine information, and quality grade. Currently, most mainstream beef traceability systems rely on IoT data collection, blockchain evidence storage, and basic AI feature matching modules to build their overall architecture. However, existing traceability systems have significant technical deficiencies in the core computing power module for intelligent traceability. The systems lack intelligence and adaptability, making them unsuitable for the complex and ever-changing scenarios in the beef industry. The specific technical deficiencies are as follows.
[0003] The primary drawback lies in the fixed weight parameters of existing traceability systems, resulting in rigid scenario adaptability. Current commercial beef AI traceability systems all employ fixed weight matrices to fuse and map multi-source traceability features. System parameters are fixed at the factory and cannot be dynamically adjusted based on different production areas, farming methods, and processing techniques. Beef traceability data encompasses multiple dimensions, including farming environment, growth cycle, slaughter physicochemical indicators, cold chain conditions, and meat quality spectra. Data distribution varies greatly across different scenarios, making fixed-parameter systems highly susceptible to traceability mapping biases. This leads to errors in origin traceability and failure to verify authenticity. The overall accuracy of mainstream traceability systems on the market is only around 70%.
[0004] Secondly, the existing system also suffers from severe coupling of multi-source features and a lack of a module for identifying subtle counterfeit features. Traditional traceability systems use uniform mapping weights for features at each stage of breeding, slaughtering, cold chain, and sales, without setting up differentiated correction units. This results in the superposition of noise from multiple sources and the smoothing over of effective features. For covert counterfeiting scenarios such as low-priced beef being passed off as high-end pasture beef, reconstituted meat falsifying traceability records, and ordinary beef cattle being passed off as organic beef cattle, the existing system cannot capture subtle feature differences, revealing significant vulnerabilities in anti-counterfeiting identification and insufficient traceability security.
[0005] Secondly, the existing system's model iteration mechanism is outdated and cannot adapt to dynamic data distribution shifts. The AI model optimization of existing traceability systems relies on retraining the entire dataset in the cloud, requiring the aggregation of massive amounts of samples, consuming significant computing power, and only supporting offline periodic updates. However, the real beef cattle industry is subject to variables such as seasonal environmental fluctuations, changes in cold chain transportation conditions, and the promotion of new breeds, causing continuous probability distribution shifts in traceability sample characteristics. Traditional systems cannot achieve online incremental updates at the edge, resulting in a continuous decline in traceability accuracy and poor system stability over long-term operation.
[0006] Furthermore, the existing system architecture suffers from poor computing power adaptability and insufficient edge deployment capabilities. Existing traceability systems mostly employ cloud-based retraining and complex model inference architectures, which cannot be adapted to low-computing-power embedded hardware such as smart ranch terminals, cold chain vehicle-mounted equipment, and portable terminals for grassroots supervision. Lightweight versions suffer from low accuracy and weak anti-interference capabilities, making it impossible for the system to balance traceability accuracy with practicality for deployment.
[0007] Moreover, existing technical solutions mostly improve the traceability system from the perspectives of upgrading data acquisition hardware, blockchain encryption and storage, and optimizing basic image recognition modules. They have not yet designed an adaptive weight correction system architecture that coordinates software and hardware to address the probability distribution drift characteristics and non-independent and identically distributed data characteristics of beef traceability samples. The core industry pain points of fixed weights, uncorrectable probability shifts, and lagging iterative updates have remained unresolved. Summary of the Invention
[0008] Based on the aforementioned shortcomings of existing technologies, this invention proposes a full-chain artificial intelligence system for beef traceability based on a weighted adaptive matrix, which effectively solves the above-mentioned technical problems.
[0009] Specifically, this invention provides a full-chain artificial intelligence system for beef traceability based on a weighted adaptive matrix, comprising: a multi-source data acquisition hardware layer for acquiring raw data for the entire beef traceability chain; an edge terminal deployment layer for deploying a lightweight AI inference module and a weighted adaptive correction module; a cloud data management layer for storing a standard beef traceability archive, summarizing global sample data, and distributing basic weight matrix parameters and initial decision tree hierarchical structure parameters; a multi-source traceability feature acquisition and encoding module for preprocessing and encoding the raw traceability data to generate raw traceability feature vectors; and a dual-matrix parameter storage and retrieval module with built-in fixed storage. The system comprises a fixed storage unit and a dynamic caching unit. The fixed storage unit stores the basic weight matrix, which is generated by pre-training with standard samples in the cloud. This basic weight matrix is used to fit the global steady-state probability distribution of beef traceability, ensuring the universality and stability of the system's basic traceability logic. The dynamic caching unit stores the adaptive weight matrix, which is initialized to a zero matrix. This adaptive weight matrix is used to capture the probability distribution shift of the current scene samples in real time during edge inference and dynamically compensate for data deviations caused by scene disturbances. The probability adaptive weight fusion correction module is used to fuse the basic weight matrix and the adaptive weight matrix to generate a matrix adapted to the current sample. The system uses a total weight matrix for the probability distribution and performs probability distribution deviation correction on the original traceability feature vector. A decision tree hierarchical discrimination module is used to hierarchically divide all traceability features according to the information gain values of each traceability feature dimension, constructing a progressive discrimination system that includes priority splitting of core features, hierarchical correction of auxiliary features, and dynamic masking of redundant features. Based on this progressive discrimination system, it performs hierarchical reasoning and judgment on the corrected traceability feature vector, outputting the hierarchical discrimination result. An intelligent traceability probability reasoning module is used to match and compare the hierarchical discrimination result and the corrected traceability feature vector with the standard beef traceability archive, outputting the most accurate result. The final source tracing result and confidence probability; the incremental sample adaptive optimization module is used to filter out abnormal samples below a preset confidence threshold, and based on the filtered abnormal samples, freeze the gradient parameters of the basic weight matrix, and only perform online incremental iterative updates on the weight adaptive matrix; furthermore, after the incremental sample adaptive optimization module updates the weight adaptive matrix, the decision tree hierarchical discrimination module synchronously corrects the information gain values of each source tracing feature dimension, the decision tree node splitting threshold, and the hierarchical discrimination priority according to the weight fluctuation amplitude of the updated weight adaptive matrix, so as to realize the dynamic linkage update of the decision tree hierarchical structure and the weight adaptive matrix.
[0010] Preferably, the decision tree hierarchical discrimination module automatically divides all traceability features into three decision levels based on the information gain value: the first level consists of high-gain core features, including meat quality spectral micro-features, slaughter physicochemical quality inspection features, and core growth cycle features, which serve as the primary basis for splitting and discrimination, and are used to prioritize the basic determination of origin and meat authenticity; the second level consists of medium-gain auxiliary correction features, including the average features of the breeding environment and the steady-state features of the cold chain time series, which are used to correct the deviation and confidence of the initial judgment results of the first level; the third level consists of low-gain redundant weak features, including small random disturbances in the environment and noise from equipment acquisition. The decision tree hierarchical discrimination module automatically suppresses the weight contribution of the low-gain redundant weak features by setting a preset information gain threshold, so as to avoid invalid noise interfering with the global decision.
[0011] Preferably, the decision tree hierarchical discrimination module performs hierarchical source tracing judgment according to a four-level progressive discrimination logic of "core feature priority splitting, auxiliary feature hierarchical correction, redundant feature dynamic masking, and abnormal feature key identification". The abnormal feature key identification step is used to trigger a special review and discrimination process for low-probability abnormal samples at the edge when there is a significant deviation between the judgment results of core features and auxiliary features.
[0012] Preferably, the decision tree hierarchical discrimination module uses the correction magnitude of the weights of each dimension in the current iteration of the adaptive weight matrix as the information gain correction coefficient for each traceability feature dimension, dynamically updates the real-time information gain value of each feature dimension, and adjusts the splitting threshold of the decision tree node and the splitting priority of each feature dimension in real time according to the updated information gain value.
[0013] Preferably, the multi-source tracing feature acquisition and encoding module embeds a decision tree information gain pre-screening mechanism in the data preprocessing stage, pre-calculates the information gain value of each initial feature dimension, and shields random disturbance features and acquisition noise features with information gain lower than a preset threshold before encoding and generating the original tracing feature vector.
[0014] Preferably, when screening abnormal samples, the incremental sample adaptive optimization module combines the hierarchical discrimination deviation output by the decision tree hierarchical discrimination module to locate the cause of the abnormality, classifies the abnormal samples into abnormalities caused by core feature shift, abnormalities caused by auxiliary feature perturbation, and abnormalities caused by noise feature interference, and stores them in the incremental sample pool according to the cause of the abnormality. At the same time, it prioritizes high-deviation edge fraud samples based on the information gain deviation magnitude of the decision tree.
[0015] Preferably, while updating the weight adaptive matrix, the incremental sample adaptive optimization module simultaneously fine-tunes the optimal splitting threshold of each node of the decision tree and the discrimination weight of each level based on the change in information gain of each feature dimension in the incremental sample set, and suppresses the overfitting of the decision tree under small sample conditions through a regularization constraint mechanism.
[0016] The weight adaptive mechanism of this invention precisely addresses the complex constraints of the beef cattle industry, such as "wide distribution of production areas, large differences in working conditions, concealed methods of fraud, and limited edge computing power." Its uniqueness, innovation, and superiority are closely linked to the actual situation of the industry.
[0017] China's beef cattle industry operates on a north-south breeding and south-raising model, with beef transported from the west to the east. The spectral characteristics of grass-fed cattle in Inner Mongolia and grain-fed cattle in Shandong naturally differ, and the cold chain conditions on the same pasture fluctuate significantly between winter and summer. Traditional fixed-weight "one-size-fits-all" approaches are destined to fail. In this invention's dual-matrix architecture, the basic weight matrix is pre-trained from raw data samples across the entire chain (e.g., a massive national sample size) to ensure a universal benchmark; the adaptive weight matrix is initially zero and evolves only at the edge for specific pastures and batches. The adaptive matrix for Inner Mongolian pastures automatically increases the weight of grazing time features, while the Shandong fattening farm strengthens the response to intramuscular fat deposition, truly achieving precise adaptation with "one policy per location, one calibration per batch."
[0018] Based on the above ideas, further technological innovations have been achieved. Reconstituted meat uses adhesives to reassemble minced meat, and smuggled beef is passed off as a high-end pastoral product. The slight spectral deviations between the two are low-probability marginal anomalies, easily smoothed out by traditional massive training with genuine products. This invention innovatively performs gradient-layered freezing—freezing the basic weight matrix and updating the adaptive weight matrix only based on low-confidence anomaly samples. After several iterations, the differences in absorption peaks of reconstituted meat in specific near-infrared bands and the subtle shifts in the trace element spectrum of smuggled meat are dramatically amplified by the corresponding dimensions of the adaptive matrix. The system becomes "more sensitive to identifying local counterfeiting methods the more frequently it operates in areas with high counterfeiting rates."
[0019] Therefore, this invention achieves significant performance advantages. Both the cold chain vehicle-mounted terminal and the grassroots monitoring handheld device utilize ARM low-power chips. Traditional cloud-based retraining requires uploading terabytes of data, consuming substantial computing power, and taking weeks. This invention updates only a small weight adaptive matrix by two orders of magnitude in each iteration, allowing iteration to be completed on-site and take effect in real time during cold chain vehicle transport. Simultaneously, the basic weight matrix is physically frozen; even if a batch of sensors experiences occasional malfunctions causing a temporary shift in the weight adaptive matrix, the next batch of normal samples will pull it back, preventing system crashes. This mechanism fundamentally addresses the industry's essential needs for "high precision, low computing power, and long-term stability" at the edge.
[0020] This invention further introduces decision tree hierarchical discrimination and dynamic information gain selection mechanism, realizing global decision logic innovation based on dual matrix probability correction, and specifically solving the deep-seated defects in beef traceability such as "indistinguishable primary and secondary features, coarse decision logic, and dynamic mismatch of scenarios".
[0021] Traditional beef traceability systems use equal weighting to fuse all breeding, slaughtering, cold chain, and spectral features, resulting in high-value core features and low-value noise features participating in the inference process simultaneously, leading to a simplistic and crude decision-making logic. This invention, based on information gain theory, automatically divides features into three levels: the first level consists of high-gain core features such as meat quality spectral micro-features and slaughter physicochemical indicators, serving as the primary basis for splitting; the second level comprises medium-gain auxiliary features such as average breeding environment values and cold chain steady-state data, used for confidence correction; and the third level consists of low-gain redundant features such as random disturbances and equipment noise, automatically masked through thresholding. The system executes the discrimination according to a progressive logic of "prioritizing core feature splitting, hierarchically correcting auxiliary features, and dynamically masking redundant features," completely solving the inherent problems of mixed primary and secondary features and core features being overwhelmed by noise in traditional flat models.
[0022] Moreover, unlike static decision trees, the hierarchical structure of the decision tree in this invention is deeply integrated with the weight adaptive matrix—the fluctuation range of the weight adaptive matrix directly serves as the information gain correction coefficient for each feature dimension, adjusting the splitting threshold and priority ranking in real time. When the low temperatures in winter cause the variance of cold chain features to drift, the system automatically lowers the priority of that dimension and raises the weights of stable features such as meat quality spectra, ensuring that the decision tree always conforms to the real data distribution of the current scenario. This closed-loop linkage mechanism of "dual matrix correction → dynamic information gain update → adaptive adjustment of decision tree hierarchy" is the first of its kind in the field of traceability.
[0023] In practice, the characteristic deviations of counterfeit samples such as spliced meat and smuggled meat only exist in the microscopic dimension of the spectrum, which traditional flat models can easily smooth out. This invention relies on hierarchical discrimination. The first layer of core features can identify anomalies, the second layer of auxiliary features verifies them, and the third layer shields against noise interference. These three progressive layers form a rigorous logical chain of "focus-verification-confirmation," significantly improving the sensitivity of counterfeit identification. Simultaneously, the decision tree-based hierarchical discrimination provides a clear splitting path and judgment basis for each traceability conclusion—"Because the spectral features deviate from the threshold and the cold chain features are normal, it is judged as suspected splicing"—allowing regulatory personnel to understand and trust the system's judgment, greatly enhancing the interpretability and enforcement credibility of the traceability results. Furthermore, low-gain noise features are pre-masked and do not enter matrix operations, effectively reducing inference computing power overhead under the same hardware conditions and improving edge processing efficiency.
[0024] Introducing the concept of decision trees essentially upgrades source reasoning from "fuzzy matching" to "structured logical deduction," forming a complementary closed loop of "numerical correction + logical optimization" with dual-matrix probability correction, achieving dimensional improvements in accuracy, interpretability, and scene adaptability. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be discussed below. Obviously, the technical solutions described in conjunction with the accompanying drawings are only some embodiments of the present invention. For those skilled in the art, other embodiments and their accompanying drawings can be obtained based on the embodiments shown in these drawings without creative effort.
[0026] Figure 1 A general flowchart of the operation of the full-chain artificial intelligence system for beef traceability based on a weighted adaptive matrix according to the present invention is shown. Figure 2 The flowchart illustrates the operation of the decision tree decision-making mechanism in the full-chain artificial intelligence system for beef traceability based on a weighted adaptive matrix according to the present invention. Detailed Implementation
[0027] The technical solutions of various embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments described in 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.
[0028] To address the systemic shortcomings of existing AI-based beef traceability systems, such as fixed weights, poor scenario adaptability, weak ability to identify low-probability anomalies, high model iteration costs, and insufficient edge computing power adaptability, this invention provides an AI-based precise traceability system for the entire beef supply chain based on an adaptive weight matrix. The design aims to achieve the following objectives: First, this invention considers constructing a dual-matrix collaborative intelligent correction architecture. By decoupling an independent adaptive matrix subsystem from the basic weight matrix, it achieves dynamic compensation for the probability distribution shift of multi-source traceability features in beef, adapting to differentiated data distributions across all scenarios. Second, based on probability theory's maximum likelihood estimation and regularization constraint mechanism, it strengthens the system's ability to identify low-probability, concealed counterfeit samples, improving the accuracy of authenticity verification and anti-interference capabilities of the traceability system. Third, it builds an online incremental optimization subsystem at the edge, eliminating the need for full retraining in the cloud and enabling autonomous iterative updates of system parameters, adapting to the long-term dynamic data evolution of the beef industry. Finally, this invention optimizes the system's hardware and software adaptation architecture, balancing traceability inference accuracy with lightweight computing power requirements, adapting to edge terminal deployments across all scenarios including ranches, cold chain logistics, and market supervision.
[0029] In the architecture of the AI-powered beef full-chain traceability system, this invention considers incorporating an independent weight adaptive correction subsystem and introducing probabilistic judgment, demonstrating strong necessity and technical inevitability. Unlike stable identification systems based on industrial standardization and sample features following a fixed Gaussian distribution, beef traceability falls under a typical dynamic, non-standardized, multi-source probability distribution drift application scenario. From a probabilistic perspective, the dynamic disturbances in the beef cattle breeding environment, slaughtering processes, and cold chain conditions cause traceability feature samples from different batches and production areas to exhibit time-varying, non-independent identically distributed (non-IID) probability characteristics. The fixed-weight module of traditional traceability systems can only fit a single static probability distribution and adapt to standard sample mappings, failing to compensate for feature mean drift, variance fluctuations, and probability offsets in real-world scenarios. Furthermore, concealed counterfeit beef samples are marginal low-probability anomalies in the probability space, with weak feature differences and strong noise interference. The averaging mapping mechanism of traditional systems smooths out anomalous probability features, leading to missed or incorrect detections of counterfeiting. Furthermore, traditional global retraining models rely on iterating the probability distribution of the entire sample set, resulting in high computational costs and slow response times, failing to meet the real-time and dynamic operational requirements of traceability systems. Therefore, the present invention proposes to build a dual-matrix collaborative adaptive traceability system, systematically addressing the core contradiction of the mismatch between traditional traceability systems and the distribution of real-world industry data from the perspectives of hardware deployment, module architecture, probability optimization, and online iteration.
[0030] More specifically, this invention is an integrated intelligent traceability system. Its core innovation lies in building a dual-module collaborative architecture consisting of a basic weight fixed mapping subsystem and an adaptive matrix probability correction subsystem, overturning the traditional single-fixed-weight traceability system architecture. This system combines probability distribution correction, maximum likelihood estimation, and probability regularization constraints. The basic weight subsystem fits the global standard probability distribution of beef traceability features and solidifies general traceability rules. The adaptive matrix subsystem captures probability drift, variance fluctuations, and mean deviations of single-scenario, single-batch samples in real time, dynamically compensating for data offsets caused by scenario disturbances. The dual-matrix fusion generates dynamic traceability weights adapted to the current sample probability distribution. Combined with a dedicated probability constraint incremental optimization subsystem, this achieves high-precision, self-iterative, and highly adaptable intelligent judgment for the entire beef traceability chain.
[0031] The following text will first combine Figure 1 The overall architecture of the system of this invention is described in detail. Figure 1 A general flowchart of the operation of a weighted adaptive matrix-based full-chain artificial intelligence system for beef traceability according to the present invention is shown.
[0032] In the overall architecture of the system of this invention, the multi-source data acquisition hardware layer includes environmental sensors, meat quality spectral acquisition equipment, slaughter and quarantine data recorder, and cold chain temperature and humidity acquisition terminal, which are responsible for the acquisition of original data for the entire chain of traceability; the edge terminal deployment layer consists of ARM architecture embedded terminals, portable monitoring equipment, and cold chain vehicle terminals, which deploy the lightweight AI inference and adaptive correction module of this system; the cloud data management layer is used to store the standard beef traceability archive, summarize global sample data, and distribute basic weight matrix parameters.
[0033] The system of this invention also includes five core software sub-modules, which work together to realize a fully automated traceability process of "data acquisition - encoding preprocessing - dual matrix probability correction - intelligent traceability reasoning - online adaptive iteration".
[0034] The multi-source traceability feature acquisition and encoding module is used to collect traceability data from four categories: beef cattle breeding, slaughtering and processing, cold chain logistics, and meat quality. It completes data cleaning, noise reduction, and normalization preprocessing, and encodes and generates original traceability feature vectors of a unified dimension, eliminating initial data noise caused by hardware acquisition errors.
[0035] The dual-matrix parameter storage and retrieval module has a built-in fixed storage unit and a dynamic cache unit. The fixed storage unit is used to pre-store the basic source traceability weight matrix after training and fit the global standard source traceability probability distribution. The dynamic cache unit is used to store and update the weight adaptive matrix in real time and is dedicated to scene probability deviation correction. The dual-matrix parameters are completely decoupled and can be called independently.
[0036] The probabilistic adaptive weight fusion correction module is the core module of this system. It achieves dynamic fusion of the basic weight matrix and the adaptive weight matrix through Hadamard element-wise multiplication, generates a total weight matrix that adapts to the probability distribution of samples in the current scene, completes the dynamic correction of the source features, and compensates for mean drift and variance fluctuation.
[0037] The intelligent traceability probability reasoning module matches and compares the corrected and accurate traceability feature vector with the standard traceability archive in the cloud. Based on the maximum likelihood estimation, it outputs the traceability classification results and corresponding confidence probabilities, realizing origin traceability, quality grading, authenticity identification and risk assessment.
[0038] The incremental sample adaptive optimization module monitors the source inference confidence probability in real time, accumulates low-confidence abnormal edge samples, and only performs online incremental iterative updates on the adaptive matrix while freezing the basic weight matrix parameters. It suppresses parameter overfitting through probability regularization constraints, thereby achieving autonomous, stable, and low-computing-power iterative optimization of the system.
[0039] Next, the core mathematical and probabilistic model of the system of this invention will be introduced.
[0040] The system model first involves defining traceability feature vectors. The system of this invention collects multi-dimensional traceability data across the entire supply chain and encodes it to generate original traceability feature vectors: ,in, To trace the original characteristics, it covers core dimensions such as breeding environment, growth parameters, slaughter physicochemical indicators, cold chain conditions, and meat quality spectral characteristics; The feature fusion output dimension is preset for the system and used for subsequent probabilistic matching inference.
[0041] The next step involves defining the dual-matrix system architecture. Basic source tracing weight matrix. It is generated by pre-training with massive amounts of standard samples in the cloud and stored in the system hardware. It fits the global steady-state probability distribution of beef traceability, ensuring the stability of the system's basic traceability logic. It is fine-tuned at low frequency and does not participate in edge iteration.
[0042] Weight Adaptive Matrix It is a dynamic correction matrix specific to this system, with the same dimension as the basic source tracing weight matrix. It is initialized as a zero matrix, does not participate in pre-training, and is only updated online based on probabilistic abnormal samples during edge inference, specifically to compensate for the shift in scenario-based probability distribution.
[0043] Next, we will introduce the dynamic weight fusion model.
[0044] The system of this invention generates a dynamic total weight matrix by fusing the parameters of two matrices through Hadamard element-wise multiplication, which adapts to the real-time sample probability distribution. .
[0045] in For Hadham's element-wise product, The matrix consists of identity matrices of the same dimension; feature projection correction is performed using dynamic weights. .
[0046] This is the system bias vector, used to compensate for hardware acquisition and system fixed errors.
[0047] Next, we will introduce the system-specific probabilistic adaptive loss function. Combining maximum likelihood estimation and L2 regularization constraints, and considering the characteristics of non-IID data and the large number of marginal low-probability outliers in the beef traceability system, we design a system-specific loss function to maximize the log-likelihood probability of correct traceability classification, while constraining the fluctuation of adaptive matrix parameters to avoid system overfitting and probability distortion. .
[0048] in: For the source tracing probability matching loss, cross-entropy is used to measure the probability deviation between the system's predicted distribution and the actual source tracing label distribution; λ is the Frobenius norm regularization term, which constrains the variance of system parameter updates; λ is the regularization hyperparameter, with the optimal value for the system being 0.01~0.1, suitable for stable iteration of edge computing power.
[0049] Next, we introduce the incremental gradient update mechanism of the system of this invention. Under this mechanism, the system fixes the gradient of the basic weight matrix and only updates the adaptive matrix, ensuring that the basic logic of the system remains unchanged and only optimizing the scene adaptation capability. The update formula is as follows:
[0050] in The optimal value for the system's online incremental learning rate is 1e. -5 ~1e -3 This ensures that the system can be optimized autonomously in a small, stable and sustainable manner.
[0051] The following section will describe in detail the specific process of the system of this invention, combining the core mathematical and probabilistic models and the specific hardware architecture mentioned above.
[0052] The operation flow of the system of this invention is roughly divided into six steps: Step S1: The system hardware layer collects multi-source data on the entire beef traceability chain, and the software module completes preprocessing and encoding to generate the original traceability feature vector; Step S2: The system calls the fixed basic weight matrix and the locally cached adaptive weight matrix; Step S3: The probabilistic adaptive weight fusion module completes the fusion of the two matrices to generate a dynamic total weight matrix and corrects the feature probability distribution deviation; Step S4: The intelligent traceability probability inference module completes feature matching and outputs the traceability result and confidence probability; Step S5: The incremental adaptive optimization module filters out abnormal samples below the preset confidence threshold and accumulates an incremental sample set; Step S6: The system freezes the basic weight parameters, only iteratively updates the adaptive matrix, completes a single autonomous optimization, and the updated parameters are cached and take effect in real time.
[0053] The above steps will be described one by one below.
[0054] In step S1, multi-layer hardware collaborative acquisition and traceability data standardization encoding are performed. The system collects traceability data of the entire beef supply chain from all dimensions through the bottom hardware layer. This data is collected from various sources, including livestock farming environment sensors, meat quality spectral acquisition equipment, slaughter quarantine recorders, and cold chain temperature and humidity terminals. These sources collect multi-source heterogeneous data such as beef cattle farming environment parameters, growth cycle data, slaughter physicochemical indicators, cold chain operating conditions data, and meat quality spectral characteristics, covering all input dimensions of the traceability feature vector. Due to issues such as noise, inconsistent dimensions, and partial missing values in hardware-acquired data, and the fact that real-world scene data follows a non-IID probability distribution and contains random perturbation variance, the system's multi-source tracing feature acquisition and encoding module first performs outlier removal, data completion, and normalization preprocessing to eliminate probability distribution interference caused by hardware acquisition errors and random scene noise. Finally, it encodes and generates original tracing feature vectors with uniform dimensions and regular distribution. This provides standardized input for subsequent probability correction and feature mapping.
[0055] Preferably, in this step, the following can also be done: Figure 2 As shown, the system synchronously embeds a decision tree information gain pre-screening mechanism to achieve initial intelligent noise reduction and hierarchical preprocessing of the original features. Figure 2 This diagram illustrates the operation flowchart of the decision tree addition mechanism in the full-chain artificial intelligence system for beef traceability based on a weighted adaptive matrix according to the present invention. Specifically, for the massive amount of multi-source heterogeneous traceability features collected, the system pre-calculates the information gain values of each initial feature dimension, quantifies the uncertainty elimination ability of different breeding, slaughtering, cold chain, and meat quality characteristics for the traceability classification task, and distinguishes in advance ultra-high gain core features, medium gain auxiliary features, and low gain noise redundant features. During the data preprocessing stage, low-information-gain random perturbation features and collected noise features are shielded, preventing invalid features from entering the subsequent inference chain. This pre-layered screening solves the problems of mindless input of all features, mixed primary and secondary features, and core features being submerged by noise in the traditional process, laying the foundation for feature selection in subsequent hierarchical decision-making and probabilistic adaptive correction.
[0056] This step is the core foundation and prerequisite for the accurate operation of the entire traceability system, playing a crucial technical role: First, it achieves full coverage of traceability information across the entire chain, supplementing the multi-dimensional heterogeneous characteristics of beef farming, slaughtering, cold chain, and meat quality, avoiding traceability bias caused by missing data in a single dimension; Second, it completes the normalization preprocessing of non-independent and identically distributed raw data, effectively suppressing probability variance interference caused by hardware acquisition noise and random scene disturbances, avoiding subsequent double-matrix fusion offset and maximum likelihood inference distortion caused by inferior input; Third, it unifies feature dimensions and data distribution standards, providing high-precision, unambiguous, and comparable standardized feature inputs for subsequent adaptive matrix probability bias correction, dynamic weight fusion, and incremental iterative optimization at the edge, avoiding from the source the systemic defects of traditional traceability systems caused by messy and irregularly distributed raw data, such as poor model adaptability, low accuracy in counterfeit detection, and unstable iterative optimization. It is a prerequisite for ensuring the effective and reliable operation of all backend probability correction and intelligent inference processes.
[0057] In step S2, the cloud and edge devices collaboratively load the dual matrix parameters to complete parameter initialization. The system relies on a layered hardware architecture to achieve layered storage and retrieval of matrix parameters. The cloud data management layer pre-stores massive amounts of standard beef traceability samples, completes global steady-state probability distribution fitting, and trains to generate the basic traceability weight matrix. This matrix is then permanently written into the hardware-based storage unit of the edge terminal. It is a fixed fit to the standard probability distribution for beef traceability, ensuring the universality and stability of the system's basic traceability logic. Simultaneously, the edge terminal's dynamic cache unit initializes a weighted adaptive matrix with completely consistent dimensions. The initial state is a zero matrix, which does not participate in cloud pre-training, does not change the global standard probability distribution, and only reserves the permission for edge scene deviation correction, thus achieving complete decoupling between the basic weights and adaptive correction parameters.
[0058] Preferably, this step can also simultaneously complete the initial configuration of the decision tree hierarchical discrimination architecture, deeply binding it with the dual-matrix architecture: the system generates a global initial decision tree hierarchical discrimination structure based on pre-training of a standard sample set in the cloud, and solidifies the initial feature splitting priority and basic discrimination hierarchy according to the information gain distribution of historical steady-state samples, establishing a basic decision tree topology structure of "core features prioritized for discrimination, and auxiliary features progressively corrected". At the same time, the decision tree hierarchical parameters and dual-matrix parameters are decoupled and stored, and the basic decision tree hierarchical rules are solidified along with the basic weight matrix, ensuring that the discrimination logic of general scenarios remains unchanged; the decision tree dynamic splitting threshold and feature gain weight are reserved as edge-updateable variables, and are updated in conjunction with the weight adaptive matrix, realizing a hierarchical intelligent decision system of "static baseline decision tree + dynamic adaptive gain optimization" from the architectural level, which is completely different from the traditional single fixed weight, hierarchical decision tracing architecture.
[0059] This step is the core architectural support for the system's decoupled operation of static general traceability and dynamic probability correction mechanisms. It undertakes front-end data preprocessing and determines the feasibility of back-end probability correction and iterative optimization, playing an irreplaceable key technical role: First, by relying on cloud-based big data to fit a global steady-state probability distribution, it establishes a unified and universal benchmark traceability mapping rule for the system through a solidified basic weight matrix. This avoids inaccuracies in the system's basic traceability logic caused by single-scenario or local sample biases, ensuring the system's traceability stability and universality in most standard scenarios. Second, by using zero-matrix initialization of the adaptive weight matrix and completely decoupling the pre-training process, it avoids the problem of new correction units interfering with the basic traceability system from an architectural perspective. While retaining the system's native recognition capabilities, it reserves an independent parameter optimization channel for subsequent non-IID sample probability drift compensation and scene variance fluctuation correction. Third, it realizes a layered deployment mode of cloud-based solidification of matrix parameters and dynamic caching at the edge, which is adapted to the low computing power and weak network characteristics of edge terminals. Basic inference can be completed without real-time cloud interaction, while supporting local autonomous iterative updates. This solves the architectural defects of traditional traceability systems with integrated parameters and no partition optimization, laying a solid architectural foundation for subsequent dual-matrix fusion correction, accurate identification of low-probability abnormal samples, and incremental adaptive optimization at the edge.
[0060] In step S3, probabilistic adaptive weight fusion is performed to dynamically correct sample probability distribution drift. To address the mean shift, variance fluctuation, and local probability distribution shift issues present in single-batch, single-scenario source tracing samples, the system's probabilistic adaptive weight fusion correction module initiates a dual-matrix collaborative operation mechanism. First, a same-dimensional identity matrix is constructed. Complete adaptive matrix basis correction Then, by fusing the fundamental matrix and the adaptive correction matrix through Hadamard element-wise multiplication, a dynamic total weight matrix adapted to the current real-time sample probability distribution is generated: .
[0061] The core function of this step is to compensate for the scenario-specific probability bias that the fixed base matrix cannot adapt to by using an adaptive matrix. It dynamically fine-tunes the weights of non-standard samples with high variance and obvious bias, smooths out the difference in probability distribution between real scenarios and standard samples, and solves the defect of traditional fixed-weight models that only adapt to a single static probability distribution.
[0062] More specifically, this step is the core correction hub for the system to adaptively switch from a static standard probability distribution to a dynamic real-time probability distribution. It is the core implementation carrier of the dual-matrix collaborative architecture and probability theory correction principle of this invention, and plays a decisive technical role: First, it breaks through the static mapping bottleneck of the fixed weight matrix in traditional traceability systems. Relying on the fine-grained weight adjustment characteristics of Hadamard's element-wise product, it provides differentiated compensation for mean drift and variance fluctuations of different traceability feature dimensions, accurately adapting to the core probabilistic characteristics of non-IID beef traceability samples, and solving the traceability inaccuracy problem caused by inconsistent sample distributions in multiple scenarios and batches. Second, it adopts a fusion logic of "basic weight fallback + adaptive weight fine-tuning" to fully retain the basic mapping rules of the global standard traceability distribution while correcting scenario probability shifts, avoiding benchmark collapse caused by single dynamic weight optimization, and achieving a two-way balance between universality and scenario adaptability. Third, it provides accurate and real-time-appropriate weight parameters for the subsequent maximum likelihood probability inference of this system, effectively amplifying the subtle differences in probability features between fraudulent and abnormal samples, avoiding the defect of smoothing out edge abnormal features by averaging with fixed weights, and improving the system's sensitivity to identifying covert fraudulent behavior from a mechanism perspective. It is a core and key link connecting data preprocessing with high-precision probability inference and ensuring the system's adaptive optimization capabilities.
[0063] Preferably, this step completes the dynamic linkage update of dual-matrix adaptive correction and decision tree information gain, realizing the scenario-adaptive upgrade of the global decision logic: the system will update the current iteration... The weight fluctuation amplitude serves as a quantitative indicator of scenario probability drift. Using the weight correction amount of each dimension of the matrix as the gain correction coefficient, the system dynamically updates the real-time information gain values of each traceability feature dimension, and corrects the decision tree node splitting threshold and feature priority ranking in real time. To address feature probability distribution shifts caused by seasonal, production area, and working condition changes, the system automatically increases the decision tree splitting priority of currently high-discrimination features and reduces the weights of features that have experienced variance drift and decreased discriminative ability. This ensures that the decision tree hierarchy is no longer a static, fixed model, but rather adapts in real-time to the distribution of non-IID samples based on the results of the dual-matrix correction. This achieves bidirectional linkage and synchronous optimization between probability distribution correction and hierarchical decision selection, solving the shortcomings of traditional static decision trees in adapting to scenario drift and exhibiting poor generalization.
[0064] The next step is S4, which performs feature projection correction and maximum likelihood probability source inference. In this step, the system uses the dynamic total weight matrix to perform linear projection correction on the original source feature vector, combined with the system's fixed bias vector. Compensate for inherent errors in the hardware system and output a corrected, accurate source-tracing feature vector: The corrected feature vectors have eliminated biases caused by scenario probability disturbances and data variance fluctuations, and the feature distribution closely matches the actual patterns of the current traceability scenario. Subsequently, the intelligent traceability probabilistic inference module matches and compares the precise feature vectors with the cloud-based standard beef traceability archive database. Based on the maximum likelihood estimation principle, it calculates the log-likelihood probability of each traceability label corresponding to the current sample, outputs the inference results of origin, quality grade, authenticity status, and the corresponding confidence probability, and completes high-precision probabilistic traceability determination.
[0065] This step is the core execution terminal for the system's probability correction implementation and intelligent traceability output. It inherits the results of the front-end dual-matrix dynamic fusion and is a crucial transformation link that converts "weight adaptive optimization" into "precise traceability results." It possesses irreplaceable core technological roles: First, it completes the final projection correction of scenario probability bias. Relying on the real-time dynamic total weight matrix, it completes feature space mapping, completely smoothing out the mean offset and variance disturbance caused by the non-IID distribution of beef traceability samples. This aligns the feature distribution of the samples to be tested with the real-world traceability patterns, solving the systemic judgment bias caused by distribution mismatch in traditional fixed-weight inference. Second, it introduces a maximum likelihood estimation probability inference mechanism, changing the traditional binary coarse judgment mode. By quantifying the log-likelihood probability of each traceability label, it outputs confidence results, making the traceability results quantifiable, traceable, and evaluable, greatly improving the precision of beef traceability, quality identification, and authenticity verification. Third, it accurately amplifies the subtle feature differences of concealed counterfeit samples. The feature space after dual-matrix adaptive correction can effectively distinguish the distribution boundaries between genuine samples and marginal low-probability abnormal counterfeit samples, avoiding the shortcomings of traditional inference mechanisms that smooth out minor differences and cause missed or false judgments. This significantly improves the sensitivity and reliability of the system's anti-counterfeiting identification from the inference level. Fourth, it provides a reliable probability evaluation basis for the subsequent adaptive iterative optimization of the system. By outputting accurate inference confidence probabilities, it provides quantitative discrimination standards for downstream abnormal sample screening, incremental sample pool construction, and matrix parameter iterative updates. This establishes a closed-loop link of "accurate inference - abnormal identification - autonomous optimization," which is the core hub to ensure the system's continuous adaptive evolution and long-term high-precision stable operation.
[0066] Preferably, this step can also embed a hierarchical progressive reasoning mechanism of decision trees to reconstruct the global intelligent decision-making logic and achieve refined hierarchical traceability judgment: Based on the corrected feature space, the system performs progressive discrimination according to the hierarchical order of decision tree "prioritizing the splitting of high-gain core features, assisting in the correction of medium-gain features, and suppressing low-gain features". It prioritizes the use of high-gain core features such as meat quality spectrum and slaughter physicochemical properties to complete the first-level judgment of the authenticity of the place of origin, then completes the second-level correction of confidence through auxiliary features such as breeding and cold chain, and finally shields the interference of low-gain noise features. At the same time, it combines dynamically updated information gain thresholds to accurately identify low-probability abnormal fraud samples at the edge, solving the problems of confusion in the primary and secondary aspects of traditional flat full-feature fusion reasoning, the smoothing out of minor fraudulent features, and the single and crude decision logic. This makes each traceability reasoning have hierarchical, interpretable, and optimal intelligent decision-making characteristics, significantly improving the rationality and accuracy of traceability judgment in complex scenarios.
[0067] The next step, S5, involves screening for low-probability anomalies and accumulating an incremental sample pool. The system has a built-in configurable source tracing confidence probability threshold, monitoring the output confidence level of each inference in real time. Samples below the preset threshold are identified as marginal anomalies in the probability space. These samples are often non-standard samples caused by misrepresentation of origin, fabrication, or abnormal operating conditions, exhibiting characteristics such as weak feature differences, strong noise interference, and high identification difficulty. The system automatically categorizes and stores these anomalies in the incremental sample pool, continuously accumulating scenario-based probability deviation samples to provide real-world data support for subsequent adaptive matrix iterative optimization. Simultaneously, it distinguishes between standard steady-state samples and drifting anomaly samples, preventing normal samples from interfering with model optimization accuracy.
[0068] This step is the data source for the system to realize scenario probability drift perception and autonomous iterative evolution. It is a key transitional link connecting intelligent reasoning and adaptive optimization, undertaking the core technical functions of "self-monitoring, self-selection, and self-accumulation" of the system. Its important role is as follows: First, it achieves accurate perception of the non-IID probability distribution drift in the beef traceability scenario. Relying on the confidence probability output by maximum likelihood inference, it quantifies the degree of sample anomaly and accurately filters out marginal low-probability fraud samples and environmental disturbance deviation samples that traditional models cannot effectively identify, thus making up for the shortcomings of traditional traceability systems that lack anomaly identification mechanisms and cannot capture dynamic distribution changes. Second, it constructs a structured and scenario-based incremental anomaly sample set, abandoning the extensive mode of traditional models relying on training with all historical samples. It focuses only on key samples that are prone to misjudgment and have high bias in real scenarios, which greatly improves the pertinence and efficiency of subsequent adaptive matrix iterative optimization, ensuring that system optimization always conforms to the evolution law of real industry data. Third, it effectively isolates steady-state standard samples from dynamic abnormal samples, avoiding the dilution of bias characteristics by a large number of high-confidence conventional samples. This prevents parameter passivation and adaptive capability degradation during model iteration, ensuring that each round of parameter updates effectively corrects probability distribution shifts and enhances the ability to identify subtle counterfeit features. Fourth, it provides continuous, high-quality data input for the system's closed-loop adaptive optimization system, enabling the system to have a long-term, dynamic, and autonomous evolutionary foundation. This allows the adaptive matrix to continuously adapt to changes in probability distribution with variations in seasons, production areas, processes, and distribution conditions, ensuring the system's long-term traceability accuracy and anti-counterfeiting stability from the data source.
[0069] Preferably, this step can combine decision tree discriminant bias to complete refined anomaly sample screening and classification: the system not only filters anomaly samples based on inference confidence, but also uses decision tree hierarchical discriminant bias to locate the cause of anomalies, accurately distinguishing between "anomalies caused by core feature shift, anomalies caused by auxiliary feature perturbation, and anomalies caused by noise feature interference," and storing them in the incremental sample pool according to the anomaly cause classification. Simultaneously, based on the magnitude of decision tree information gain bias, the system quantifies the probability drift of samples, prioritizing high-value, high-biased edge fraud samples, providing accurate sample labels for subsequent targeted iterative optimization, and solving the problems of mixed incremental samples, ambiguous optimization direction, and inability to specifically correct decision defects in traditional methods.
[0070] Finally, in step S6, the system performs tiered parameter freezing and performs autonomous iterative optimization at the edge based on probabilistic regularization constraints. When the cumulative number of samples in the incremental sample pool reaches the preset update threshold N (30~100), the system automatically triggers the adaptive optimization process.
[0071] First, freeze the basic source weight matrix throughout the entire process. The gradient parameters are set, preserving the system's general source-tracing probability mapping rules, and only opening the gradient update channel for the weight adaptive matrix. Then, the system-specific probabilistic adaptive loss function is called. Among them, the source-tracing probability matching loss To minimize the probability deviation between the predicted and true label distributions, the variance of the adaptive matrix parameters is updated by relying on the Frobenius norm regularization term to suppress overfitting and probability distortion caused by small batches of outliers. Finally, an incremental stochastic gradient descent algorithm combined with a fixed learning rate is used. Complete the adaptive matrix parameter iterative update: The updated adaptive matrix parameters are overlaid in real time on the dynamic cache of the edge terminal and take effect immediately for the next round of source tracing inference, realizing the system's real-time adaptation to the evolution of scene probability distribution and completing the closed-loop adaptive optimization of the entire process.
[0072] This step is the final closed-loop core of the dual-matrix adaptive architecture and probabilistic optimization system of this invention. It is the key difference between the system and traditional static traceability systems, enabling it to evolve autonomously. Building upon the results of the preceding data collection, correction, inference, and sample selection processes, its important technical functions are: First, through a hierarchical parameter freezing iteration mechanism, it achieves a balance between "baseline stability" and "scenario adaptation," fully preserving the global standard probability distribution mapping rules obtained from cloud pre-training. This prevents the collapse of basic traceability logic and degradation of general recognition capabilities during iterative optimization, optimizing only the scenario probability drift bias. This architecturally solves the defects of traditional models, such as easy distortion during iteration and decay in generalization ability. Second, relying on a dedicated probabilistic regularization constraint loss function to complete iterative optimization, it effectively suppresses the drastic parameter fluctuations and overfitting problems caused by small batches of low-probability abnormal samples and noisy samples from a probabilistic perspective. It precisely constrains the variance of the adaptive matrix parameter update, ensuring that each round of parameter iteration is stable, controllable, and effective, significantly improving the stability and robustness of the system in complex scenarios. Third, it achieves lightweight online incremental iterative optimization at the edge, completely abandoning the high-computing-power, lagging optimization mode of traditional traceability systems that rely on full-sample retraining in the cloud. It requires no massive data aggregation or high-end computing power; it can autonomously update based solely on real-world anomaly samples accumulated locally on the edge terminal. This perfectly adapts to low-computing-power, weak-network deployment scenarios such as ranches, cold chain logistics, and grassroots supervision, greatly reducing system operation and maintenance costs. Fourth, it constructs a permanent closed-loop evolution mechanism. Through continuous iterative updates of the adaptive matrix, the system can dynamically follow seasonal changes in the beef industry, regional differences, technological upgrades, and evolving distribution conditions. It continuously fits and updates the non-IID probability distribution of traceability samples, constantly optimizing the ability to identify subtle counterfeit features and the accuracy of probability matching. This gives the system long-term adaptive, self-optimizing, and self-upgrading intelligent characteristics, fundamentally solving the industry pain points of long-term accuracy decay and model aging in traditional traceability systems.
[0073] Preferably, this step simultaneously completes the adaptive iterative optimization of the decision tree hierarchical discrimination system, achieving the joint evolution of the dual matrix + decision tree: the system updates... Simultaneously, the dynamic parameters of the decision tree are iteratively optimized. Based on the information gain changes of the incremental sample set, the optimal splitting threshold and hierarchical discrimination weights of each feature dimension are fine-tuned, and the hierarchical discrimination system of the decision tree is updated synchronously. This ensures that the hierarchical selection logic of the decision tree is always synchronized with the latest scenario probability distribution and adaptive matrix correction rules. At the same time, the regularization constraint mechanism is used to suppress the overfitting of the decision tree to small samples, ensuring the stability of the hierarchical discrimination structure and the accuracy of gain selection. Finally, a complete closed-loop cross-theoretical intelligent traceability system is formed, consisting of "data preprocessing optimization - dual matrix probability correction - hierarchical decision reasoning - abnormal sample accumulation - joint parameter iteration", which comprehensively enhances the system's global decision rationality, scenario generalization ability and long-term adaptive evolution ability.
[0074] Therefore, in the preferred embodiment of the present invention, the system of the present invention can also construct a hierarchical decoupled and dynamically adaptive source tracing discrimination system based on global intelligent decision innovation of decision tree hierarchical discrimination and dynamic information gain optimization, which greatly improves the system's global source tracing robustness, discrimination logic and generalization accuracy in complex scenarios.
[0075] Unlike traditional beef traceability systems that commonly employ a flat judgment model of single-layer full-feature weighted fusion and single probability matching, this invention breaks through the inherent technical limitations of traditional AI traceability models, which suffer from "undifferentiated feature fusion, no hierarchical decision-making, and no priority distinction." It further innovatively introduces a decision tree hierarchical progressive judgment mechanism and an information gain quantification screening principle. Combined with the invention's unique dual-matrix probability adaptive correction architecture, it reconstructs the beef full-chain traceability judgment mechanism from the perspective of global decision-making logic. This fills the technical gaps in existing traceability technologies in the fields of multi-source heterogeneous feature hierarchical selection, dynamic adaptive decision-making, and global noise reduction judgment, forming a multi-theoretical cross-integration innovation system of "probability theory distribution correction + information theory feature selection + hierarchical intelligent decision-making."
[0076] The specific technical implementation principle, hierarchical discrimination logic, and dynamic linkage mechanism are as follows: Traditional traceability systems employ an equal weight fusion strategy for all dimensions of features, including breeding environment, growth parameters, slaughter physicochemical indicators, cold chain time-series data, and meat quality spectral micro-characteristics. They do not establish hierarchical distinctions based on feature contribution to traceability. All features participate in model inference simultaneously, easily leading to problems such as low signal-to-noise ratio, dilution of redundant noise features with low discriminative value, and submersion of high-value core traceability features. This is especially problematic for concealed fraud scenarios such as origin misrepresentation, counterfeit reconstituted meat, and alteration of traceability records. Minor abnormal features are easily smoothed out by global average weights, ultimately resulting in chaotic system decision-making logic, blurred boundaries between true and false distinctions, severe under-judgment and misjudgment of low-probability abnormal samples, and poor generalization ability in complex scenarios. Therefore, this invention uses decision tree information gain theory to quantify, classify, filter, and prioritize traceability features across the entire chain. By calculating the conditional information gain of each dimension of traceability features relative to the traceability classification label, it accurately quantifies the ability of each feature to eliminate traceability uncertainty, achieving objective, quantifiable, and adaptive feature hierarchy division.
[0077] Its core quantification logic is as follows: the discriminative value of a feature is determined by calculating the reduction in feature entropy. High information gain features have strong class differentiation capabilities, while low information gain features are mostly scene noise and redundant interference features. Based on the magnitude of information gain, this invention automatically divides massive multi-source traceability features into three decision-making levels: The first level consists of ultra-high gain core traceability features, mainly including meat quality spectral micro-features, slaughter physicochemical quality inspection features, and core growth cycle features. These features have the highest information gain, are the most difficult to counterfeit and tamper with, and have the strongest traceability differentiation. They serve as the primary basis for splitting and discrimination in the first level, prioritizing the basic determination of origin and meat authenticity; The second level consists of medium gain auxiliary correction features, including the average features of the breeding environment and the steady-state features of the cold chain time series, used to correct the deviation and confidence of the initial judgment results of the first level, making up for the discrimination limitations of a single core feature; The third level consists of low gain redundant weak features, including low-value features such as small random disturbances in the environment and slight noise from the collection equipment. The system automatically suppresses their weight contribution by determining the information gain threshold, avoiding invalid noise interference with the global decision. Based on this hierarchical feature selection, this invention constructs a four-level progressive global decision tree discrimination system: "core feature priority splitting, auxiliary feature hierarchical correction, redundant feature dynamic masking, and abnormal feature key identification." This completely solves the problems of feature coupling, lack of distinction between primary and secondary features, and severe noise interference in traditional flat models. More importantly, unlike traditional static decision tree models with fixed structures, fixed splitting thresholds, and fixed feature priorities, this invention achieves a deep dynamic linkage innovation between the decision tree mechanism and the adaptive weight matrix, perfectly adapting to the non-IID time-varying probability distribution characteristics of beef traceability samples.
[0078] Because the probability distribution of traceability data continuously drifts across different production areas, seasons, farming techniques, and distribution conditions, the actual discriminative value and information gain of each dimension of features dynamically change with the scenario. Static decision trees cannot adapt to the dynamic shift in gain. This invention relies on adaptive weight moments updated in real time at the edge. This invention captures the mean shift, variance fluctuation, and probability distribution deviation of scene features in real time. It uses the matrix weight fluctuation amplitude as an information gain correction coefficient, dynamically iteratively updating the information gain calculation results for each feature dimension, the decision tree node splitting threshold, and the hierarchical discrimination priority. This allows the decision tree hierarchy, feature selection criteria, and discrimination logic to adapt to the real-world data distribution patterns of the current scene in real time, completely solving the technical shortcomings of traditional static decision trees, such as weak generalization ability, poor scene adaptability, and insufficient probability drift adaptation. In the overall decision-making chain, this invention forms a closed-loop progressive intelligent reasoning logic: first, it completes global feature denoising and core feature purification through dynamic information gain, eliminating low-value redundant interference; then, it completes fine-grained correction of feature space probability distribution deviation through a dual-matrix adaptive fusion mechanism, correcting scene drift errors; finally, it completes hierarchical discrimination based on the hierarchical decision tree, and outputs high-precision, high-reliability source tracing results by combining maximum likelihood estimation. This innovative global decision-making architecture fundamentally breaks down the flat coupling defects of traditional traceability systems, achieving technological breakthroughs such as quantifiable feature value, distinguishable decision-making levels, dynamically adaptive discrimination criteria, and accurate identification of abnormal samples. Without increasing the computing power load of edge terminals or reducing inference speed, it greatly improves the system's sensitivity and discrimination stability for identifying minor forgery features, low-probability abnormal samples at the edge, and cross-scenario variant samples. This makes the system's global traceability decision-making more reasonable, rigorous, hierarchical, and intelligent, significantly different from existing traditional traceability technology solutions that rely on single probability matching and fixed weight fusion. It also greatly enhances the innovation, advancement, and robustness of the overall technical solution of this invention in engineering implementation.
[0079] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, 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 a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0080] The above description is merely an exemplary embodiment of the present invention and is not intended to limit the present invention. 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 full-chain artificial intelligence system for beef traceability based on a weighted adaptive matrix, characterized in that, include: Multi-source data acquisition hardware layer, used to collect raw data for the entire beef traceability chain; At the edge terminal deployment layer, a lightweight AI inference module and a weight adaptive correction module are deployed. The cloud-based data management layer is used to store the standard beef traceability archive, summarize global sample data, and distribute basic weight matrix parameters. The multi-source tracing feature acquisition and encoding module is used to preprocess and encode the original tracing data to generate the original tracing feature vector; The dual-matrix parameter storage and retrieval module has a built-in fixed storage unit and a dynamic cache unit. The fixed storage unit is used to store the basic weight matrix, which is generated by pre-training with standard samples in the cloud and is used to fit the global steady-state probability distribution of beef traceability. The dynamic cache unit is used to store the weight adaptive matrix, which is initialized to a zero matrix. It is used to capture the probability distribution shift of the current scene sample in real time during edge inference and to dynamically compensate for the data deviation caused by scene disturbances. The probability adaptive weight fusion correction module is used to fuse the basic weight matrix with the weight adaptive matrix to generate a total weight matrix that adapts to the probability distribution of the current scene samples, and to correct the probability distribution deviation of the original source feature vector. The intelligent traceability probability inference module is used to match and compare the corrected traceability feature vector with the standard beef traceability archive, and output the traceability result and confidence probability. The incremental sample adaptive optimization module is used to filter out abnormal samples below a preset confidence threshold, and based on the filtered abnormal samples, freeze the gradient parameters of the basic weight matrix, and only perform online incremental iterative updates on the weight adaptive matrix.
2. The system according to claim 1, characterized in that, The probabilistic adaptive weight fusion correction module fuses the basic weight matrix and the adaptive weight matrix through Hadamard element-wise multiplication to generate the total weight matrix, the expression of which is: , Among them, W base The basic weight matrix, W adapt Let I be the weight adaptive matrix, and let I be the identity matrix of the same dimension. This is the element-wise product of Hadama.
3. The system according to claim 1, characterized in that, The probabilistic adaptive weight fusion correction module uses the total weight matrix to perform linear projection correction on the original source tracing feature vector, and combines it with the system bias vector to output the corrected source tracing feature vector z, the expression of which is: Where x is the original source feature vector, W total Let be the total weight matrix, and b be the system bias vector.
4. The system according to claim 1, characterized in that, The incremental sample adaptive optimization module uses a probabilistic adaptive loss function for parameter iterative updates. This loss function combines maximum likelihood estimation with L2 regularization constraints, and its expression is: in, For the source tracing probability matching loss, cross-entropy is used to measure the probability deviation between the system's predicted distribution and the actual source tracing label distribution; λ is the Frobenius norm regularization term, which constrains the variance of system parameter updates; λ is the regularization hyperparameter, which adapts to stable iteration of edge computing power.
5. The system according to claim 4, characterized in that, The incremental sample adaptive optimization module updates the weight adaptive matrix using the incremental stochastic gradient descent algorithm, and the update formula is as follows: Where η is the online incremental learning rate, The gradient of the loss function with respect to the weight adaptation matrix. The weight adaptive matrix before the update. This is the updated adaptive weight matrix.
6. The system according to claim 5, characterized in that, The range of the online incremental learning rate η is 1e -5 ~1e - ³, the value range of the regularization hyperparameter λ is 0.01 to 0.
1.
7. The system according to claim 1, characterized in that, The incremental sample adaptive optimization module triggers iterative updates when the cumulative number of samples in the incremental sample pool reaches a preset update threshold N, where the value of N ranges from 30 to 100.
8. The system according to claim 1, characterized in that, The multi-source tracing feature acquisition and encoding module performs outlier removal, data completion, and normalization preprocessing on the original tracing data to eliminate probability distribution interference caused by hardware acquisition errors and random scene noise, and generate original tracing feature vectors with unified dimensions.
