Livestock and poultry product safety tracing system

By establishing a full-chain quality evaluation system and a two-layer coding verification mechanism, the problems of unscientific quality evaluation, simple coding design, and weak anti-counterfeiting verification in existing livestock and poultry product traceability technologies have been solved, realizing a scientific and reliable traceability system and improving information integrity and security.

CN121860653APending Publication Date: 2026-04-14XINJIANG AGRI UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing traceability technologies for livestock and poultry products lack scientific quality evaluation methods, have simple coding designs with limited information value, weak anti-counterfeiting verification mechanisms, and are difficult to guarantee information consistency and security.

Method used

A full-chain quality evaluation system is established through information processing, calculation, quality classification, and coding modules. A two-layer code is generated for verification, including information collection, standardization processing, impact factor calculation, quality level classification, and code generation. Encryption and verification mechanisms are used to ensure the security and consistency of the code.

Benefits of technology

It effectively carries quality grade information, improves the information integrity, scientific nature of evaluation, and security and reliability of the traceability system, and significantly enhances the anti-counterfeiting protection function and the practicality of coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860653A_ABST
    Figure CN121860653A_ABST
Patent Text Reader

Abstract

The invention provides a livestock and poultry product safety traceability system, which belongs to the field of food safety, and comprises an information processing module used for collecting raw material source information, production line information and product specification information of livestock and poultry products and carrying out standardization processing to obtain standardized grade information; the calculation module is used for calculating influence factors of the livestock and poultry products; the quality division module is used for calculating a comprehensive quality index and performing quality grade division on the livestock and poultry products according to the comprehensive quality index; the coding module is used for generating a tracing code containing quality grade information based on the product quality grade and the influence factor; and the code verification module is used for generating a first-layer code and a second-layer code according to the tracing code, and carrying out association consistency verification to obtain a code verification result. According to the invention, effective bearing of quality grade information is realized, and information integrity, evaluation scientificity, safety and reliability of a tracing system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food safety technology, and in particular to a traceability system for livestock and poultry products. Background Technology

[0002] With increasingly stringent food safety regulations and growing consumer concern about the quality of livestock and poultry products, establishing a comprehensive traceability system for these products has become a crucial means of ensuring food safety. Currently, livestock and poultry product traceability technologies are primarily based on carriers such as RFID electronic tags, QR codes, and barcodes. By attaching traceability labels to product packaging, information about the product's production and distribution processes can be recorded and queried, achieving the management goal of traceable product origin and verifiable destination.

[0003] Existing traceability technologies suffer from the following technical shortcomings in practical applications: First, traceability information primarily relies on basic data records, lacking scientific evaluation and intuitive expression of product quality levels, making it difficult for consumers to directly understand product quality through traceability codes. Second, coding designs often employ simple segmented identification methods, limiting the information value they carry and failing to fully utilize the coding space to convey useful information. Third, anti-counterfeiting verification mechanisms are relatively weak, relying mainly on single code verification, making them susceptible to copying and forgery, and lacking multi-layered security protection mechanisms. These technical limitations affect the practical value and anti-counterfeiting effectiveness of traceability systems, hindering the further development of livestock and poultry product traceability technology.

[0004] Chinese invention patent CN112819116A discloses a livestock and poultry product safety traceability and quarantine system and production conveyor line. This technical solution establishes a traceability system covering the entire livestock and poultry product process by setting up RFID electronic tags (1, 2, and 3) at different stages of livestock and poultry breeding, transportation, and slaughtering to record farm information, transportation information, and slaughter quarantine information, respectively. The system uses RFID readers and QR code printers to write traceability information into the electronic tags and generate QR codes on the product packaging, achieving digital recording and query functions for traceability information. However, the traceability information lacks objective quality evaluation methods, and the traceability codes lack effective anti-counterfeiting verification means, failing to guarantee information consistency. Summary of the Invention

[0005] The technical solution of the present invention is implemented as follows: The present invention provides an information processing module for collecting raw material source information, production line information and product specification information of livestock and poultry products, and performing standardization processing on the raw material source information, production line information and product specification information to obtain standardized grade information, wherein the standardized grade information includes raw material source grade, production line grade, product specification grade and packaging grade.

[0006] The calculation module is used to calculate the impact factors of livestock and poultry products based on the standardized grade information. The impact factors of livestock and poultry products include the impact factors of raw material source, production line and product specifications.

[0007] The quality classification module is used to calculate a comprehensive quality index based on the raw material source influencing factors, production line influencing factors, and product specification influencing factors, and to classify the quality grades of livestock and poultry products according to the comprehensive quality index to obtain the product quality grades.

[0008] The coding module is used to generate traceability codes containing quality grade information based on product quality grade and impact factor;

[0009] The encoding verification module is used to generate a first-level code and a second-level code based on the traceability code, and to perform association consistency verification on the first-level code and the second-level code to obtain the encoding verification result.

[0010] Based on the above technical solutions, preferably, the specific steps of the calculation module are as follows:

[0011] The raw material source grade and the slaughterhouse certification grade are weighted and calculated to obtain the raw material source influence factor;

[0012] The production line level is numerically mapped according to a preset mapping rule to obtain the production line influencing factor.

[0013] The product specification influence factor is obtained by weighting the product specification level and packaging grade.

[0014] Based on the above technical solutions, preferably, the product quality grades include Grade 1 livestock and poultry products, Grade 2 livestock and poultry products, and Grade 3 livestock and poultry products.

[0015] Based on the above technical solutions, preferably, the steps of the quality division module are as follows:

[0016] The basic quality evaluation value is obtained by weighted averaging the factors affecting raw material sources, production lines, and product specifications.

[0017] The short-board correction coefficient is calculated based on the raw material source influence factor, production line influence factor, and product specification influence factor; whereby the short-board correction coefficient is the ratio of the minimum value to the average value among the raw material source influence factor, production line influence factor, and product specification influence factor.

[0018] The comprehensive quality index is obtained by performing a nonlinear combination calculation of the basic quality evaluation value and the short board correction coefficient.

[0019] Based on the preset threshold range of the comprehensive quality index, livestock and poultry products are classified into first-level, second-level, or third-level livestock and poultry products.

[0020] Based on the above technical solutions, the preferred logic for nonlinear combination operations is as follows:

[0021] ;

[0022] ;

[0023] in, Indicates the overall quality index. This represents the entropy weight of the i-th influencing factor. The index represents the influencing factor, where i=1 indicates the raw material source influencing factor, i=2 indicates the production line influencing factor, and i=3 indicates the product specification influencing factor. Indicates the standardized impact factor. This represents the intensity coefficient of the short-board effect. This represents the short-board correction factor. This indicates the influencing factor of raw material source. Indicates the influencing factors of the production line. Indicates the product specification influencing factor. Let j represent the j-th standardized impact factor. Indicates the summation index.

[0024] Based on the above technical solutions, preferably, the steps of the encoding module are as follows:

[0025] A three-digit enterprise identification segment is generated based on the enterprise identification code in the enterprise registration information; the enterprise identification segment uniquely identifies the livestock and poultry product production enterprise.

[0026] A four-dimensional product attribute segment is generated based on the breed type and processing method of livestock and poultry products; the product attribute segment includes livestock and poultry breed identifier and processing technology identifier.

[0027] A three-dimensional quality grade segment is generated based on product quality grade, raw material source influencing factor, and production line influencing factor. The first digit of the quality grade segment reflects the overall quality grade, the second digit reflects the raw material source grade, and the third digit reflects the production line grade.

[0028] A six-digit batch identifier segment is generated based on production batch and production time information. The batch identifier segment includes a production date code and a batch sequence number code.

[0029] The enterprise identification segment, product attribute segment, quality grade segment, and batch identification segment are structurally connected according to predefined coding rules to obtain a sixteen-digit traceability code.

[0030] Based on the above technical solutions, preferably, the step of generating the first-level code based on the traceability code specifically includes:

[0031] Extract all 3-digit enterprise identification information from the enterprise identification segment;

[0032] Selectively extract the first two core product identifiers from the product attribute section;

[0033] Extract the first comprehensive quality grade identifier from the quality grade range;

[0034] Extract all 6-digit batch information from the batch identifier segment;

[0035] Based on the Unix timestamp information generated at the time of encoding, a 4-bit time compression segment is generated using Base36 encoding. The extracted enterprise identification information, core product identification information, comprehensive quality level identification information, batch information and time compression segment are recombined, and a 2-bit check code is generated through a verification algorithm to form an 18-bit first-layer code.

[0036] Based on the above technical solutions, preferably, the step of generating the second-layer code based on the traceability code specifically includes:

[0037] Use the complete 16-digit traceability code as the basic information carrier;

[0038] Based on the high-precision numerical representation of the raw material source impact factor, production line impact factor, and product specification impact factor, an 8-bit detailed scoring segment is generated.

[0039] Based on the Unix timestamp information of the encoding generation time, an 8-bit time identifier segment is generated using hexadecimal encoding.

[0040] The SHA-256 cryptographic hash algorithm is used to perform digest operations on the basic information carrier, detailed scoring segment and time stamp segment, and the first 8 bits of the digest result are used as the anti-counterfeiting verification segment.

[0041] The basic information carrier, detailed scoring segment, time stamp segment, and anti-counterfeiting verification segment are connected to form a 40-bit second-layer code.

[0042] Based on the above technical solutions, preferably, the step of verifying the consistency of the first layer encoding and the second layer encoding specifically includes:

[0043] The first-level and second-level codes are parsed for structured information to extract enterprise identification information, quality level information, batch information and time information, and construct corresponding multi-dimensional information vectors.

[0044] For each information dimension, the corresponding information items in the first-level encoding and the second-level encoding are converted into a character set form, and the number of overlapping elements and the total number of elements for each information item are calculated.

[0045] Based on the ratio of the number of overlapping elements to the total number of elements, the similarity component value of each information item is calculated;

[0046] The similarity component values ​​of each information item are weighted and averaged according to a preset weight allocation to obtain the comprehensive similarity coefficient.

[0047] Based on the time identification information of the first-layer and second-layer coding, the time difference is converted into a time consistency coefficient through an exponential decay function;

[0048] The correlation consistency verification coefficient is obtained by multiplying the comprehensive similarity coefficient and the time consistency coefficient.

[0049] More preferably, the formula for calculating the correlation consistency verification coefficient is:

[0050] ;

[0051] ;

[0052] in, Represents the correlation consistency verification coefficient. This represents the information item index, where k=1 represents enterprise identification information, k=2 represents product attribute information, k=3 represents quality grade information, and k=4 represents batch identification information. This represents the weight of the k-th type of information. Represents the standardized distance of the k-th class of information. Represents the time consistency coefficient. This represents the timestamp value corresponding to the first layer of encoding. This represents the timestamp value corresponding to the second layer of encoding. For the allowable reference time difference, This represents the time tolerance parameter.

[0053] The livestock and poultry product safety traceability system of the present invention has the following advantages over the prior art:

[0054] (1) Through information processing module, calculation module, quality classification module, coding module and coding verification module, a full-chain quality evaluation system from raw material source to final product was established, realizing the effective carrying of quality grade information. Through double-layer coding verification, a reliable anti-counterfeiting protection function was provided, thus constructing a scientific and complete livestock and poultry product traceability technology system and improving the information integrity, evaluation scientificity and safety reliability of the traceability system;

[0055] (2) By using the hierarchical organization of enterprise identification segment, product attribute segment, quality grade segment and batch identification segment, the integrity of information and the rationality of structure of traceability coding are achieved. This ensures that the coding length is appropriate for practical application and that the information is complete enough to meet traceability requirements. At the same time, the hierarchical organization of the coding structure facilitates information extraction and parsing, and improves the practicality and operability of the traceability system.

[0056] (3) The first layer of coding generates a 14-bit simplified code through information extraction and simplification strategies, and the second layer of coding generates a 40-bit extended code through information expansion and encryption strategies. The association consistency verification mechanism combines information similarity calculation with time consistency analysis, which can effectively identify coding forgery and tampering behavior, and significantly improve the security protection level of the traceability system. Attached Figure Description

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

[0058] Figure 1 This is a block diagram of a livestock and poultry product safety traceability system according to the present invention. Detailed Implementation

[0059] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0060] like Figure 1 As shown, the present invention provides a livestock and poultry product safety traceability system, comprising:

[0061] The information processing module is used to collect information on the source of raw materials, production line, and product specifications of livestock and poultry products, and to standardize the information on the source of raw materials, production line, and product specifications to obtain standardized grade information, which includes the grade of raw material source, grade of production line, grade of product specifications, and grade of packaging.

[0062] The calculation module is used to calculate the impact factors of livestock and poultry products based on the standardized grade information. The impact factors of livestock and poultry products include the impact factors of raw material source, production line and product specifications.

[0063] The quality classification module is used to calculate a comprehensive quality index based on the raw material source influencing factor, production line influencing factor, and product specification influencing factor, and to classify livestock and poultry products into quality grades based on the comprehensive quality index to obtain product quality grades; product quality grades include Grade 1 livestock and poultry products, Grade 2 livestock and poultry products, and Grade 3 livestock and poultry products;

[0064] The coding module is used to generate traceability codes containing quality grade information based on product quality grade and impact factor;

[0065] The encoding verification module is used to generate a first-level code and a second-level code based on the traceability code, and to perform association consistency verification on the first-level code and the second-level code to obtain the encoding verification result.

[0066] Understandably, raw material source information is collected through the slaughterhouse management system interface, obtaining slaughterhouse certification level data and raw material grading results. Slaughterhouse certification levels are categorized into three levels based on management hierarchy: national, provincial, and municipal, corresponding to Level 3, Level 2, and Level 1, respectively. Raw material grading is categorized into three grades based on quality level: superior, standard, and ordinary, also corresponding to Level 3, Level 2, and Level 1. Production line information is collected through the production execution system, obtaining the specific production line number used for the product and the technical level assessment results. The production line technical level comprehensively considers multiple factors such as equipment advancement, automation level, and process control precision, and is divided into three levels: advanced, intermediate, and basic, corresponding to Level 3, Level 2, and Level 1. Product specification information is collected through the packaging production line's automatic identification system, obtaining product specification classification and packaging grade information. Product specifications are categorized into three types: premium, standard, and general; packaging grades are categorized into three grades: high-end, mid-range, and economy, all using Level 3, Level 2, and Level 1 numerical identifiers.

[0067] This invention establishes a full-chain quality evaluation system from raw material source to final product through information processing module, calculation module, quality classification module, coding module and coding verification module. It realizes the effective carrying of quality grade information and provides reliable anti-counterfeiting protection function through dual-layer coding verification. Thus, it constructs a scientific and complete traceability technology system for livestock and poultry products and improves the information integrity, evaluation scientificity and safety reliability of the traceability system.

[0068] In one embodiment of the present invention, the specific steps of the calculation module are as follows:

[0069] The raw material source grade and the slaughterhouse certification grade are weighted and calculated to obtain the raw material source influence factor;

[0070] The production line level is numerically mapped according to a preset mapping rule to obtain the production line influencing factor.

[0071] The product specification influence factor is obtained by weighting the product specification level and packaging grade.

[0072] In one embodiment of the present invention, the steps of the quality division module are as follows:

[0073] The basic quality evaluation value is obtained by weighted averaging the factors affecting raw material sources, production lines, and product specifications.

[0074] The short-board correction coefficient is calculated based on the raw material source influence factor, production line influence factor, and product specification influence factor; whereby the short-board correction coefficient is the ratio of the minimum value to the average value among the raw material source influence factor, production line influence factor, and product specification influence factor.

[0075] The comprehensive quality index is obtained by performing a nonlinear combination operation on the basic quality evaluation value and the shortcoming correction coefficient; the logic of the nonlinear combination operation is as follows:

[0076]

[0077] in, Indicates the overall quality index. This represents the entropy weight of the i-th influencing factor. The index represents the influencing factor, where i=1 indicates the raw material source influencing factor, i=2 indicates the production line influencing factor, and i=3 indicates the product specification influencing factor. Indicates the standardized impact factor. This represents the intensity coefficient of the short-board effect. This represents the short-board correction factor. This indicates the influencing factor of raw material source. Indicates the influencing factors of the production line. Indicates the product specification influencing factor. Let j represent the j-th standardized impact factor. Indicates the summation index. The standardized information entropy of the i-th influencing factor is represented. Let the standardized information entropy of the j-th influence factor be denoted as . This indicates the number of historical data points used to calculate the entropy weight. This represents the probabilistic value of the k-th sample of the i-th influencing factor, where the probability represents the relative proportion of the k-th sample among all historical samples of the i-th indicator. This represents the k-th historical sample value of the i-th influence factor; This represents the sum of all n historical sample values ​​for the i-th influence factor; Indicates the sample index. The sample index variable is used for summation, and its value ranges from 1 to n. It is a smoothing factor;

[0078] Based on the preset threshold range of the comprehensive quality index, livestock and poultry products are classified into first-level, second-level, or third-level livestock and poultry products.

[0079] Understandably, when using the entropy weighting method for objective weighting, the lower the information entropy of an indicator, the greater its information content, and therefore the greater its weight in the comprehensive evaluation. Using a pre-defined mapping rule for numerical mapping essentially means directly using standardized production line level values ​​as production line influencing factors. That is, the calculation of production line influencing factors employs a level mapping method, mapping values ​​according to the technical level of the production line. ,in, This represents the mapped values: 1 for advanced production lines, 0.6 for intermediate production lines, and 0.3 for basic production lines. This mapping rule ensures a positive correlation between production line technology level and quality evaluation. (Comprehensive Quality Index) A higher value indicates a higher overall quality level of livestock and poultry products. For the i-th influencing factor, n sample data points from historical production batches are collected. Each sample value is divided by the sum of all sample values ​​for that indicator to obtain the relative proportion of that sample under that indicator. This relative proportion is the probabilistic value. ,satisfy The information entropy of this indicator can be measured by calculating the probability distribution of all samples. If the sample values ​​of an indicator are evenly distributed, the entropy value is large, indicating that the indicator has low discrimination and should have a small weight; conversely, if the sample values ​​of an indicator are concentrated (high dispersion), the entropy value is small, indicating that the indicator has high discrimination and should have a large weight. This objective weighting method based on information entropy avoids the interference of subjective factors and ensures the scientific and objective nature of quality evaluation.

[0080] The logical calculation formula for nonlinear combinatorial operations implements a bottleneck penalty mechanism through an exponential function. When the three influencing factors are balanced, Approaching 1, It is also close to 1, and the overall quality index is mainly determined by the weighted average; when there are obvious shortcomings, Significantly less than 1 (e.g., 0.5), due to If it is a positive number (typical value 0.3~0.8), then Also less than 1 (e.g., when hour, This will significantly lower the overall quality index, thus reflecting the "barrel effect," meaning that the overall quality of a product is constrained by its weakest link. Compared to simple weighted averaging, this non-linear combination method can more accurately reflect the limiting effect of quality weaknesses on the overall product level.

[0081] In one embodiment of the present invention, the quality classification module determines the quality level of a product based on the magnitude of the comprehensive quality index using a threshold classification method. Level 1 livestock and poultry products correspond to products with a high comprehensive quality index, representing high-quality products that excel in all three dimensions: raw material source, production line technology, and product specifications. Level 2 livestock and poultry products correspond to products with a medium comprehensive quality index, representing standard-quality products that perform well in at least two of the three dimensions. Level 3 livestock and poultry products correspond to products with a low comprehensive quality index, representing economical products that have advantages in cost control but a relatively basic quality level.

[0082] The quality division module is illustrated with a specific embodiment:

[0083] When the comprehensive quality index When the concentration is ≥0.8, the product quality grade is determined to be Grade 1 livestock and poultry product. This grade of product has a high overall quality level and is suitable for consumers with high quality requirements; when 0.5 ≤ When the value is less than 0.8, the product quality grade is determined to be Grade II livestock and poultry products. Products of this grade possess a standard overall quality level and are suitable for general consumer demand. When the value is less than 0.5, the product quality grade is determined to be Grade III livestock and poultry products. This grade of product has a basic comprehensive quality level and is suitable for price-sensitive consumer groups.

[0084] Understandably, the threshold is set based on the numerical range of the comprehensive quality index and the actual application requirements.

[0085] In one embodiment of the present invention, the steps of the encoding module are as follows:

[0086] A three-digit enterprise identification segment is generated based on the enterprise identification code in the enterprise registration information; the enterprise identification segment uniquely identifies the livestock and poultry product production enterprise.

[0087] A four-dimensional product attribute segment is generated based on the breed type and processing method of livestock and poultry products; the product attribute segment includes livestock and poultry breed identifier and processing technology identifier.

[0088] A three-dimensional quality grade segment is generated based on product quality grade, raw material source influencing factor, and production line influencing factor. The first digit of the quality grade segment reflects the overall quality grade, the second digit reflects the raw material source grade, and the third digit reflects the production line grade.

[0089] A six-digit batch identifier segment is generated based on production batch and production time information. The batch identifier segment includes a production date code and a batch sequence number code.

[0090] The enterprise identification segment, product attribute segment, quality grade segment, and batch identification segment are structurally connected according to predefined coding rules to obtain a sixteen-digit traceability code.

[0091] Understandably, the generation of the enterprise identification segment is based on the enterprise's unified social credit code registered with the market supervision and management department. The 18-digit unified social credit code is compressed into a 3-character representation using a hash function. When a hash collision occurs, it is distinguished by adding an incrementing sequence number at the end, ensuring that each enterprise has a unique 3-digit identifier.

[0092] The calculation of the enterprise identification segment uses a hash mapping method to convert the numerical characteristics of the unified social credit code into 3 characters.

[0093] Livestock and poultry breed identification is based on the scientific classification system of animal taxonomy, digitally encoding common livestock and poultry breeds according to their biological characteristics, such as pork product code 01, beef product code 02, mutton product code 03, chicken product code 04, etc. Processing technology identification is based on the standard classification of food processing technologies, digitally encoding different processing methods, such as chilled processing code 01, frozen processing code 02, cooked processing code 03, pickled processing code 04, etc. Product attribute segments are generated using a lookup table mapping method, searching for the corresponding numerical code in a predefined coding mapping table based on the actual product type and processing method. The structured representation of the product attribute segment is as follows: ,in This represents a 4-digit product attribute field. This indicates a 2-digit livestock breed identifier, determined based on the product's biological classification. This indicates a 2-digit processing technology identifier, determined based on the product's processing method. This represents the character concatenation operator, which joins two 2-bit codes into a 4-bit product attribute segment.

[0094] This invention achieves a balance between information integrity and structural rationality in traceability coding through a hierarchical organization of enterprise identification segments, product attribute segments, quality grade segments, and batch identification segments. It effectively solves the technical problems of limited information carrying capacity and chaotic coding structure in existing coding technologies. It ensures both the appropriate coding length for practical application and the integrity of information carrying to meet traceability requirements. At the same time, the hierarchical organization of the coding structure facilitates information extraction and parsing, improving the practicality and operability of the traceability system.

[0095] In one embodiment of the present invention, the quality grade segment is a combination of multi-dimensional quality information encoded to allow consumers to directly understand the product's quality level and specific advantages through the encoding. The first character represents the overall quality grade: Grade 1 livestock and poultry products correspond to character A, Grade 2 livestock and poultry products correspond to character B, and Grade 3 livestock and poultry products correspond to character C. The second and third characters use numbers to represent the grade information of the two most important dimensions: raw material source and production line. Through mathematical mapping, the influence factor values ​​in the range of 0 to 1 are converted into grade numbers from 1 to 3.

[0096] The calculation of the raw material source level and production line level figures uses a numerical mapping method, mapping the influencing factor values ​​proportionally to an integer range of 1 to 3. The formula for calculating the raw material source level figure is:

[0097]

[0098] in, The numerical value representing the grade of raw material source is an integer of 1, 2, or 3. This represents the raw material source influencing factor, with values ​​ranging from 0 to 1 (real numbers). This represents the floor function;

[0099] The formula for calculating the production line level number is:

[0100]

[0101] This represents the production line level number, which is an integer of 1, 2, or 3. This represents the production line impact factor, and its value ranges from 0 to 1 as a real number.

[0102] The complete structured representation of the quality grade range is as follows:

[0103]

[0104] Indicates a 3-digit quality level range. The character represents the overall quality level, with values ​​of A, B, or C. Indicates the grade of raw material source. This indicates the production line level number.

[0105] In one embodiment of the present invention, generating a first-layer code based on a traceability code specifically includes:

[0106] Extract all 3-digit enterprise identification information from the enterprise identification segment;

[0107] Selectively extract the first two core product identifiers from the product attribute section;

[0108] Extract the first comprehensive quality grade identifier from the quality grade range;

[0109] Extract all 6-digit batch information from the batch identifier segment;

[0110] Based on the Unix timestamp information generated at the time of encoding, a 4-bit time compression segment is generated using Base36 encoding. The extracted enterprise identification information, core product identification information, comprehensive quality level identification information, batch information and time compression segment are recombined, and a 2-bit check code is generated through a verification algorithm to form an 18-bit first-layer code.

[0111] Understandably, the first-layer coding process includes information segment extraction, core information reorganization, check code calculation, and complete coding. All 3 digits of the enterprise identification information are completely extracted from the 16-digit traceability code's enterprise identification segment to ensure product traceability. The first two digits of core product identification information are selectively extracted from the product attribute segment to retain key product identification features. The first digit of the comprehensive quality level identification information is extracted from the quality level segment to reflect the overall quality level of the product. All 6 digits of batch information are completely extracted from the batch identification segment to ensure the continuity of batch traceability.

[0112] Based on the Unix timestamp information at the time of encoding generation, a 4-bit time compressed segment is generated using Base36 encoding. Specifically, the system obtains the current Unix timestamp (a standard 32-bit unsigned integer representing the number of seconds since January 1, 1970, 00:00:00 UTC), calculates the difference in seconds between this timestamp and a fixed reference time point (Unix timestamp 1577836800, corresponding to January 1, 2020, 00:00:00 UTC), and converts this difference to Base36 (using 36 characters: 0-9 and AZ). Since... The maximum value that 4 Base36 characters can represent corresponds to a time span of approximately 53.7 years, fully meeting the timeliness requirements for traceability of livestock and poultry products from production to production. For example, if the current time is October 1, 2023 (Unix timestamp approximately 1696118400), the difference from the base time is approximately 118281600 seconds, which, after being converted to Base36 encoding, is represented in the form of "1YXXXX" (the specific value depends on the conversion algorithm).

[0113] The extracted 16-bit core information is recombined in the order of "enterprise identifier (3 bits) + product identifier (2 bits) + quality grade (1 bit) + batch information (6 bits) + time compression segment (4 bits)", and a 2-bit check code is generated by the Luhn check algorithm to form an 18-bit first-layer code.

[0114] In one embodiment of the present invention, generating a second-layer code based on a traceability code specifically includes:

[0115] Use the complete 16-digit traceability code as the basic information carrier;

[0116] Based on the high-precision numerical representation of the raw material source impact factor, production line impact factor, and product specification impact factor, an 8-bit detailed scoring segment is generated.

[0117] Based on the Unix timestamp information of the encoding generation time, an 8-bit time identifier segment is generated using hexadecimal encoding.

[0118] The SHA-256 cryptographic hash algorithm is used to perform digest operations on the basic information carrier, detailed scoring segment and time stamp segment, and the first 8 bits of the digest result are used as the anti-counterfeiting verification segment.

[0119] The basic information carrier, detailed scoring segment, time stamp segment, and anti-counterfeiting verification segment are connected to form a 40-bit second-layer code.

[0120] Understandably, the second-layer coding process includes determining the basic information carrier, generating detailed scoring segments, generating time stamp segments, generating security key segments, and assembling complete codes. In the basic information carrier determination stage, the system directly uses the complete 16-bit traceability code as the basic information segment for the second-layer coding, maintaining the integrity and consistency of the original traceability information. In the detailed scoring segment generation stage, the system generates 8-bit detailed scoring segments based on high-precision numerical representations of raw material source influence factors, production line influence factors, and product specification influence factors, using data compression coding technology. The detailed scoring segment generation employs a fixed-point number coding method, converting the decimal values ​​of the three influence factors into integer representations and generating 8 characters using a hexadecimal encoding format.

[0121] Based on the Unix timestamp information generated at the time of encoding, an 8-bit time identifier segment is generated using hexadecimal encoding. Specifically, the system obtains the current Unix timestamp (a standard 32-bit unsigned integer representing the number of seconds since January 1, 1970, 00:00:00 UTC), and directly converts this 32-bit binary integer into a hexadecimal representation. Since each hexadecimal character can represent 4 bits of binary data... Therefore, a 32-bit binary number corresponds exactly to 8 hexadecimal characters. For example, the timestamp 1696828800 (decimal) corresponds to the binary number 01100101001011000011100000000000 in binary, which is 0x652C3800 in hexadecimal, represented as "652C3800" (8 characters). This encoding method achieves lossless storage of time information. The 32-bit unsigned integer can represent a time range from 1970 to February 7, 2106, fully covering practical application needs.

[0122] In one embodiment of the present invention, the association consistency verification of the first layer encoding and the second layer encoding specifically includes:

[0123] The first-level and second-level codes are parsed for structured information to extract enterprise identification information, quality level information, batch information and time information, and construct corresponding multi-dimensional information vectors.

[0124] For each information dimension, the corresponding information items in the first-level encoding and the second-level encoding are converted into a character set form, and the number of overlapping elements and the total number of elements for each information item are calculated.

[0125] Based on the ratio of the number of overlapping elements to the total number of elements, the similarity component value of each information item is calculated;

[0126] The similarity component values ​​of each information item are weighted and averaged according to a preset weight allocation to obtain the comprehensive similarity coefficient.

[0127] Based on the time identification information of the first-layer and second-layer coding, the time difference is converted into a time consistency coefficient through an exponential decay function;

[0128] The correlation consistency verification coefficient is obtained by multiplying the comprehensive similarity coefficient and the time consistency coefficient.

[0129] Furthermore, the formula for calculating the association consistency verification coefficient is as follows:

[0130]

[0131] in, Represents the correlation consistency verification coefficient. This represents the information item index, where k=1 represents enterprise identification information, k=2 represents product attribute information, k=3 represents quality grade information, and k=4 represents batch identification information. This represents the weight of the k-th type of information. Represents the standardized distance of the k-th class of information. Represents the time consistency coefficient. This represents the Euclidean distance between sets. This represents the set of characters representing the k-th type of information in the first layer of encoding. This represents the set of characters representing the k-th type of information in the second layer of encoding. This represents the timestamp value corresponding to the first layer of encoding. The relative seconds offset is obtained by Base36 decoding the 4-bit time compression segment from the first layer of encoding, and then added to the base timestamp 1577836800 to obtain the absolute Unix timestamp. This represents the timestamp value corresponding to the second layer of encoding. It is directly converted into a Unix timestamp by decoding the 8-bit time identifier segment in the second layer of encoding into hexadecimal. For the allowable reference time difference, This represents the time tolerance parameter, which is determined based on the normal generation time interval of the two-layer encoding in the actual production environment, such as a value range of 60~300 seconds.

[0132] Understandably, the association consistency verification process includes structured information parsing, multi-dimensional information vector construction, similarity component calculation, comprehensive similarity calculation, time consistency calculation, and association verification coefficient calculation. The first and second layer codes are respectively subjected to structured parsing, extracting information from four key dimensions: enterprise identification information, quality level information, batch information, and time information. For the first layer code, the enterprise identification information is the first 3 characters, the quality level information is the 6th character, the batch information is the 7th to 12th characters, and the time information is derived from the batch information. For the second layer code, the enterprise identification information is the first 3 characters of the basic information carrier, the quality level information is the 11th character, the batch information is the 12th to 17th characters, and the time information is the 8-character time signature segment. Under normal circumstances, the two layers of codes should be generated sequentially within a short time (seconds to minutes), with a small timestamp difference and a time consistency coefficient close to 1. If the timestamp difference is too large (e.g., exceeding several hours), it indicates that the code may have been illegally copied or forged, and the time consistency coefficient will significantly decrease, triggering a verification failure alarm.

[0133] This invention employs a first-layer encoding method to generate a 14-bit simplified code through information extraction and simplification strategies, and a second-layer encoding method to generate a 40-bit extended code through information expansion and encryption strategies. The associated consistency verification mechanism combines information similarity calculation with time consistency analysis, which can effectively identify code forgery and tampering behavior, and significantly improve the security protection level of the traceability system.

[0134] A specific embodiment will be used to illustrate this:

[0135] The coding verification module determines the final result of coding verification based on the calculated correlation consistency verification coefficient using a threshold-based method. The verification judgment rules are based on the numerical range of the verification coefficient, setting different judgment thresholds to distinguish between three cases: verification passed, secondary verification, and verification failed. A value ≥ 0.95 indicates that the verification is passed, signifying a high degree of consistency between the two coding layers and reliable product traceability information; a value ≤ 0.80 indicates that the verification is successful. A value <0.95 triggers a secondary verification process, indicating a slight difference between the two coding layers, requiring further manual review or technical verification; when If the value is less than 0.80, the verification fails, indicating a significant inconsistency between the two layers of encoding, which may pose a risk of forgery or tampering.

[0136] The above description is only a preferred 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 protection scope of the present invention.

Claims

1. A livestock and poultry product safety traceability system, characterized in that: include: The information processing module is used to collect information on the source of raw materials, production line, and product specifications of livestock and poultry products, and to standardize the information on the source of raw materials, production line, and product specifications to obtain standardized grade information, which includes the grade of raw material source, grade of production line, grade of product specifications, and grade of packaging. The calculation module is used to calculate the impact factors of livestock and poultry products based on the standardized grade information. The impact factors of livestock and poultry products include the impact factors of raw material source, production line and product specifications. The quality classification module is used to calculate a comprehensive quality index based on the raw material source influencing factors, production line influencing factors, and product specification influencing factors, and to classify the quality grades of livestock and poultry products according to the comprehensive quality index to obtain the product quality grades. The coding module is used to generate traceability codes containing quality grade information based on product quality grade and impact factor; The encoding verification module is used to generate a first-level code and a second-level code based on the traceability code, and to perform association consistency verification on the first-level code and the second-level code to obtain the encoding verification result.

2. The livestock and poultry product safety traceability system as described in claim 1, characterized in that: The specific steps of the calculation module are as follows: The raw material source grade and the slaughterhouse certification grade are weighted and calculated to obtain the raw material source influence factor; The production line level is numerically mapped according to a preset mapping rule to obtain the production line influencing factor. The product specification influence factor is obtained by weighting the product specification level and packaging grade.

3. The livestock and poultry product safety traceability system as described in claim 1, characterized in that: The product quality grades include Grade 1 livestock and poultry products, Grade 2 livestock and poultry products, and Grade 3 livestock and poultry products.

4. The livestock and poultry product safety traceability system as described in claim 3, characterized in that: The specific steps of the quality division module are as follows: The basic quality evaluation value is obtained by weighted averaging the factors affecting raw material sources, production lines, and product specifications. The short-board correction coefficient is calculated based on the raw material source influence factor, production line influence factor, and product specification influence factor; whereby the short-board correction coefficient is the ratio of the minimum value to the average value among the raw material source influence factor, production line influence factor, and product specification influence factor. The comprehensive quality index is obtained by performing a nonlinear combination calculation of the basic quality evaluation value and the short board correction coefficient. Based on the preset threshold range of the comprehensive quality index, livestock and poultry products are classified into first-level, second-level, or third-level livestock and poultry products.

5. A livestock and poultry product safety traceability system as described in claim 4, characterized in that: The logic of nonlinear combinatorial operations is as follows: ; ; in, Indicates the overall quality index. This represents the entropy weight of the i-th influencing factor. The index represents the influencing factor, where i=1 indicates the raw material source influencing factor, i=2 indicates the production line influencing factor, and i=3 indicates the product specification influencing factor. Indicates the standardized impact factor. This represents the intensity coefficient of the short-board effect. This represents the short-board correction factor. This indicates the influencing factor of raw material source. Indicates the influencing factors of the production line. Indicates the product specification influencing factor. Let j represent the j-th standardized impact factor. Indicates the summation index.

6. The livestock and poultry product safety traceability system as described in claim 1, characterized in that: The steps of the encoding module are as follows: A three-digit enterprise identification segment is generated based on the enterprise identification code in the enterprise registration information; the enterprise identification segment uniquely identifies the livestock and poultry product production enterprise. A four-dimensional product attribute segment is generated based on the breed type and processing method of livestock and poultry products; the product attribute segment includes livestock and poultry breed identifier and processing technology identifier. A three-dimensional quality grade segment is generated based on product quality grade, raw material source influencing factor, and production line influencing factor. The first digit of the quality grade segment reflects the overall quality grade, the second digit reflects the raw material source grade, and the third digit reflects the production line grade. A six-digit batch identifier segment is generated based on production batch and production time information. The batch identifier segment includes a production date code and a batch sequence number code. The enterprise identification segment, product attribute segment, quality grade segment, and batch identification segment are structurally connected according to predefined coding rules to obtain a sixteen-digit traceability code.

7. A livestock and poultry product safety traceability system as described in claim 6, characterized in that: The process of generating the first-level code based on the traceability code specifically includes: Extract all 3-digit enterprise identification information from the enterprise identification segment; Selectively extract the first two core product identifiers from the product attribute section; Extract the first comprehensive quality grade identifier from the quality grade range; Extract all 6-digit batch information from the batch identifier segment; Based on the Unix timestamp information generated at the time of encoding, a 4-bit time compression segment is generated using Base36 encoding. The extracted enterprise identification information, core product identification information, comprehensive quality level identification information, batch information and time compression segment are recombined, and a 2-bit check code is generated through a verification algorithm to form an 18-bit first-layer code.

8. The livestock and poultry product safety traceability system as described in claim 7, characterized in that: The process of generating a second-layer code based on the traceability code specifically includes: Use the complete 16-digit traceability code as the basic information carrier; Based on the high-precision numerical representation of the raw material source impact factor, production line impact factor, and product specification impact factor, an 8-bit detailed scoring segment is generated. Based on the Unix timestamp information of the encoding generation time, an 8-bit time identifier segment is generated using hexadecimal encoding. The SHA-256 cryptographic hash algorithm is used to perform digest operations on the basic information carrier, detailed scoring segment and time stamp segment, and the first 8 bits of the digest result are used as the anti-counterfeiting verification segment. The basic information carrier, detailed scoring segment, time stamp segment, and anti-counterfeiting verification segment are connected to form a 40-bit second-layer code.

9. A livestock and poultry product safety traceability system as described in claim 8, characterized in that: The process of verifying the consistency between the first-layer encoding and the second-layer encoding specifically includes: The first-level and second-level codes are parsed for structured information to extract enterprise identification information, quality level information, batch information and time information, and construct corresponding multi-dimensional information vectors. For each information dimension, the corresponding information items in the first-level encoding and the second-level encoding are converted into a character set form, and the number of overlapping elements and the total number of elements for each information item are calculated. Based on the ratio of the number of overlapping elements to the total number of elements, the similarity component value of each information item is calculated; The similarity component values ​​of each information item are weighted and averaged according to a preset weight allocation to obtain the comprehensive similarity coefficient. Based on the time identification information of the first-layer and second-layer coding, the time difference is converted into a time consistency coefficient through an exponential decay function; The correlation consistency verification coefficient is obtained by multiplying the comprehensive similarity coefficient and the time consistency coefficient.

10. A livestock and poultry product safety traceability system as described in claim 9, characterized in that: The formula for calculating the correlation consistency verification coefficient is as follows: ; ; in, Represents the correlation consistency verification coefficient. This represents the information item index, where k=1 represents enterprise identification information, k=2 represents product attribute information, k=3 represents quality grade information, and k=4 represents batch identification information. This represents the weight of the k-th type of information. Represents the standardized distance of the k-th class of information. Represents the time consistency coefficient. This represents the timestamp value corresponding to the first layer of encoding. This represents the timestamp value corresponding to the second layer of encoding. For the allowable reference time difference, This represents the time tolerance parameter.

Citation Information

Patent Citations

  • Livestock and poultry product safety tracing and quarantine system and production conveying line

    CN112819116A