Ecological product traceability certification integrated system based on full life cycle chain coverage

CN122736634APending Publication Date: 2026-09-11YUNNAN ACAD OF ENVIRONMENTAL SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610896604.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-22
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0004]现有技术中,溯源系统大多记录批次之间的逻辑继承关系,较难对物理层面的物料转换规律进行验证,在多批次拼配的场景下,难以准确追溯成品中各源头批次的原料占比,近红外光谱等检测数据大多仅用于质量检测,未与批次溯源相结合,区块链技术仅用于保证数据的不可篡改,较难自动校验上链数据是否符合物料转换的实际规律

Benefits of technology

[0007] The beneficial effects of this invention are as follows: By collecting standardized traceability data at key event nodes and generating original evidence packages, the invention ensures the integrity and authenticity of the original data. By calculating the continuous contribution of dry basis spectrum evidence, it enables automatic verification of the physical continuity of parent and child batches. By recursively propagating the source sequence, it enables accurate calculation of the dry basis contribution share of the finished product packaging source. By executing consistency verification through smart contracts, it ensures the consistency between on-chain records and material conversion rules. By deterministically calculating the authentication status, it enables the objective and verifiable nature of the authentication results. By generating view data of different granularities, it balances information transparency and data privacy. By generating unique and verifiable traceability labels, it improves the anti-counterfeiting capabilities of the labels. This contributes to improving the reliability and automation of traceability authentication for ecosystem products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122736634A_ABST
    Figure CN122736634A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of blockchain traceability, and discloses an ecological product traceability authentication integrated system based on a full life cycle chain cover, comprising: extracting a hash value and a digital signature; calculating a continuous value; generating a source end sequence; extracting an abnormal identifier; generating an authentication result; generating an abstract value; and outputting a tea product traceability label. The present application realizes automatic verification of the physical continuity of parent-child batches by calculating the continuous amount of dry base spectrum contribution, realizes accurate calculation of the contribution share of the source dry base of finished product packaging through recursive propagation of the source end sequence, guarantees the consistency of on-chain records and material conversion rules through intelligent contract execution consistency verification, and generates a unique verifiable traceability label through deterministic authentication state calculation, thereby improving the anti-counterfeiting capability of the label and helping to improve the reliability and automation degree of ecological product traceability authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain traceability technology, and more specifically, to an integrated system for traceability and authentication of ecological products based on full lifecycle chain coverage. Background Technology

[0002] Currently, traceability technology for eco-products has been gradually applied to the agricultural product supply chain. The relevant systems typically record information such as the product's origin environment, harvesting time, processing information, logistics location, and quality inspection reports. Data storage and retrieval are achieved through centralized platforms or blockchain technology, improving the transparency of supply chain information and helping consumers understand the product's origin.

[0003] As a typical ecological product, tea products undergo multiple processing steps, including withering, fixation, rolling, drying, blending, and grading. During processing, moisture migration, material sieving, merging of multiple batches, and splitting of single batches can occur, making the relationships between batches quite complex. The quality of raw materials can also change during the processing.

[0004] In existing technologies, most traceability systems record the logical inheritance relationship between batches, making it difficult to verify the material conversion rules at the physical level. In scenarios involving the blending of multiple batches, it is difficult to accurately trace the proportion of raw materials from each source batch in the finished product. Near-infrared spectroscopy and other detection data are mostly used only for quality inspection and are not combined with batch traceability. Blockchain technology is only used to ensure the immutability of data and it is difficult to automatically verify whether the data uploaded to the chain conforms to the actual rules of material conversion. Summary of the Invention

[0005] This invention provides an integrated system for traceability and authentication of ecological products based on full lifecycle chain coverage, solving the technical problems mentioned in the background.

[0006] This invention provides an integrated system for traceability and authentication of ecological products based on full lifecycle chain coverage, including: The hash value extraction module is used to collect batch net weight, moisture ratio, spectral sequence, loss ratio, distribution ratio and process category of tea products, and merge and extract hash values ​​and digital signatures. The continuous numerical calculation module is used to extract dry weight values ​​based on batch net weight and moisture ratio, calculate the expected dry weight by combining dry weight values, loss ratio and distribution ratio, extract dry weight residual by comparing dry weight values ​​and expected dry weight, extract contribution ratio based on distribution ratio and dry weight values, correct spectral sequence to obtain processing sequence, convert processing sequence to generate expected sequence by combining process type and contribution ratio, extract spectral residual by comparing processing sequence and expected sequence, and calculate continuous numerical values ​​by fusing dry weight residual and spectral residual. The source sequence generation module is used to propagate the contribution ratio along the transformation path and accumulate it to generate the source sequence. The anomaly verification module is used to integrate hash values, digital signatures, dry weight values, processing sequences, continuous values, contribution ratios, and source sequences, and to perform verification to extract anomaly identifiers and transaction numbers. The authentication result generation module is used to calculate the authentication ratio based on the source sequence, extract the minimum value of the continuous values ​​covered by the transformation route as the continuous lower limit, and generate the authentication result by combining the continuous lower limit, the authentication ratio and the anomaly identifier. The summary generation module is used to combine transaction number, authentication result, authentication ratio, continuous lower limit and source sequence to generate summary values; The traceability label output module is used to combine the certification results and summary values ​​to output the traceability label for tea products.

[0007] The beneficial effects of this invention are as follows: By collecting standardized traceability data at key event nodes and generating original evidence packages, the invention ensures the integrity and authenticity of the original data. By calculating the continuous contribution of dry basis spectrum evidence, it enables automatic verification of the physical continuity of parent and child batches. By recursively propagating the source sequence, it enables accurate calculation of the dry basis contribution share of the finished product packaging source. By executing consistency verification through smart contracts, it ensures the consistency between on-chain records and material conversion rules. By deterministically calculating the authentication status, it enables the objective and verifiable nature of the authentication results. By generating view data of different granularities, it balances information transparency and data privacy. By generating unique and verifiable traceability labels, it improves the anti-counterfeiting capabilities of the labels. This contributes to improving the reliability and automation of traceability authentication for ecosystem products. Attached Figure Description

[0008] Figure 1 This is a schematic diagram of the integrated traceability and certification system for ecological products based on full life-cycle chain coverage, according to the present invention. Figure 2 This is a UML flowchart of the integrated ecological product traceability and certification system based on full life cycle chain coverage of the present invention; Figure 3 This is a schematic diagram of the computational scenario of the present invention. Detailed Implementation

[0009] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.

[0010] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" indicate that the element or object preceding the term encompasses the elements or objects listed following the term and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0011] like Figures 1-3 As shown, the integrated traceability and authentication system for ecological products, based on full lifecycle chain coverage, includes: The hash value extraction module is used to collect batch net weight, moisture ratio, spectral sequence, loss ratio, distribution ratio and process category of tea products, and merge and extract hash values ​​and digital signatures. The continuous numerical calculation module is used to extract dry weight values ​​based on batch net weight and moisture ratio, calculate the expected dry weight by combining dry weight values, loss ratio and distribution ratio, extract dry weight residual by comparing dry weight values ​​and expected dry weight, extract contribution ratio based on distribution ratio and dry weight values, correct spectral sequence to obtain processing sequence, convert processing sequence to generate expected sequence by combining process type and contribution ratio, extract spectral residual by comparing processing sequence and expected sequence, and calculate continuous numerical values ​​by fusing dry weight residual and spectral residual. The source sequence generation module is used to propagate the contribution ratio along the transformation path and accumulate it to generate the source sequence. The anomaly verification module is used to integrate hash values, digital signatures, dry weight values, processing sequences, continuous values, contribution ratios, and source sequences, and to perform verification to extract anomaly identifiers and transaction numbers. The authentication result generation module is used to calculate the authentication ratio based on the source sequence, extract the minimum value of the continuous values ​​covered by the transformation route as the continuous lower limit, and generate the authentication result by combining the continuous lower limit, the authentication ratio and the anomaly identifier. The summary generation module is used to combine transaction number, authentication result, authentication ratio, continuous lower limit and source sequence to generate summary values; The traceability label output module is used to combine the certification results and summary values ​​to output the traceability label for tea products.

[0012] In one embodiment of the present invention, the hash value extraction module is configured as follows: Step S101: Configure the picking and storage, receiving at the factory, processing, blending and grading, packaging finished products, warehousing and logistics and sales query as event category sets, and generate batch numbers for tea batches and event numbers for events. Specifically, the event number is generated by hashing the combination of organization code, equipment number, Coordinated Universal Time timestamp and incremental count. Step S102: Obtain batch net weight, moisture ratio, spectral sequence, loss ratio, allocation ratio, and process category. Specifically, the batch net weight is collected by a networked electronic scale with a resolution of not less than 0.01 kg. Tare is performed before weighing. The weighing container number is bound to the batch number. The spectral sequence is collected using a preset first band range or a preset second band range. The preset first band range is specifically 900–1700 nm, and the preset second band range is specifically 400–1650 nm. The difference between the spectral sequence acquisition time and the event time does not exceed a preset acquisition time difference threshold, which is specifically 10 min. The allocation ratio is generated based on the continuous weighing data from the feeding scale, distributing scale, or packaging scale. Step S103: When the difference in moisture content exceeds a preset moisture difference threshold, the sample is re-mixed and collected. If the difference still exceeds the preset moisture difference threshold after re-collection, a candidate anomaly marker is generated. Specifically, the preset moisture difference threshold is 0.03. Step S104: Combine the batch net weight, moisture ratio, spectral sequence, loss ratio, allocation ratio, process category, operator certificate number, equipment calibration number, and location code into an original evidence package; Step S105: Calculate the hash value and digital signature for the original evidence package.

[0013] It should be noted that the event category set represents the key nodes in the entire life cycle of tea products that require traceability data collection, including seven categories: harvesting and warehousing, receiving at the factory, processing, blending and grading, packaging and finishing, warehousing and logistics, and sales inquiry, which represent the key node division of the traceability process.

[0014] The batch number is a unique identifier assigned to each tea batch to distinguish different tea batches.

[0015] The event number is a unique identifier assigned to each data collection event. It is generated by hashing a combination of the organization code, device number, Coordinated Universal Time (UTC) timestamp, and an incrementing counter, representing the unique identity of the data collection event.

[0016] The batch net weight is the net mass of the tea batch, which can be obtained through a networked electronic scale with a resolution of no less than 0.01 kg, representing the actual net mass of the tea batch.

[0017] Moisture ratio is the mass moisture content of a tea batch, which can be obtained by a moisture meter or near-infrared moisture model. The value ranges from 0 to 1 and characterizes the moisture content of the tea batch.

[0018] The spectral sequence is the near-infrared reflectance sequence of the tea batch, which can be obtained by using a near-infrared spectroscopy device, using the 900-1700nm or 400-1650nm band, to characterize the spectral features of the tea batch.

[0019] The loss ratio is the dry basis loss ratio of an event, which characterizes the degree of dry basis loss caused by waste, sampling, and cleaning materials in the event.

[0020] The allocation ratio is the dry basis flow distribution ratio from the parent batch to the child batch. It is calculated based on the continuous weighing data of the feeding scale, distributing scale, or packaging scale, and represents the proportion of material from the parent batch flowing to the child batch.

[0021] The processing category refers to the type of processing technology used in the tea batch in the corresponding event, and is used to distinguish different processing technologies.

[0022] The preset moisture difference threshold is used to determine whether the moisture content of a tea batch is uniform. The preferred value is 0.03, which is the standard for judging the uniformity of moisture content.

[0023] Candidate anomaly markers are generated when the moisture content of a tea batch is uneven and still does not meet the requirements after re-collection, indicating that the batch has potential anomalies.

[0024] The original evidence package is a data packet consisting of batch net weight, moisture ratio, spectral sequence, loss ratio, allocation ratio, process category, operator certificate number, equipment calibration number, and location code, used to store the original data collected for the event.

[0025] The hash value is a numerical value obtained by hashing the original evidence packet. It represents the integrity summary of the original evidence packet and is used to verify the integrity of the original evidence packet.

[0026] A digital signature is the result of signing the hash value of the original evidence package using the device's private key, and is used to verify the origin and integrity of the original evidence package.

[0027] Specifically, before each weighing, the networked electronic scale automatically triggers a tare operation to zero the weight of the current weighing container. After the tare operation, the system automatically reads the unique serial number of the weighing container and binds it to the current batch number. This binding information is simultaneously stored in the local database of the edge gateway and in encrypted object storage, ensuring that the corresponding weighing container can be associated with the batch number at any time, avoiding interference from the container weight in the collection of the batch net weight. For example, when a 5kg plastic turnover box is used as the weighing container, the system first reads the turnover box's unique serial number, then automatically performs the tare operation to zero the weight of the turnover box, and then binds the turnover box's serial number to the current batch number. Subsequent queries for this batch number can be associated with the corresponding weighing container, ensuring the accuracy of the batch net weight collection.

[0028] Specifically, the acquisition of spectral sequences requires sampling once each in the upper, middle, and lower layers of the container. The upper sampling point is located 5 cm below the surface of the material inside the container, the middle sampling point is located at the middle of the material height, and the lower sampling point is located 5 cm above the bottom of the container. After the three samplings are completed, the system will automatically record the sampling time. The time difference between this time and the current event must not exceed 10 minutes. Sampling data exceeding this time range will be marked as invalid and need to be collected again.

[0029] Specifically, the hash operation uses the SHA256 algorithm to hash the binary data of the original evidence packet, obtaining a 256-bit hash value. The digital signature uses the SM2 elliptic curve cryptography algorithm. Each acquisition device is configured with a unique private key, stored in the device's secure chip, making it difficult to extract externally. The device's public key is stored in the consortium blockchain's certificate system. Each time a signature is made, the device uses its own private key to sign the hash value; verification is performed using the corresponding public key. The certificate system adopts a hierarchical certificate system for the consortium blockchain. The root certificate is issued by the consortium management organization, intermediate certificates are issued by individual companies, and device certificates are issued by individual companies, ensuring that the identity of each device can be traced.

[0030] It should be noted that at each key event node in the entire life cycle of tea products, the minimum dataset sufficient to support subsequent continuous dry basis and spectral authentication calculations is collected. The integrity and immutability of the original data are ensured through hashing and digital signatures, avoiding reliance on manual explanations for subsequent authentication. By designing the event number as a hash value containing the organization code, device number, timestamp, and incremental count, the uniqueness and traceability of each event are ensured. By limiting the moisture difference threshold and sampling requirements, the accuracy and representativeness of the collected data are guaranteed.

[0031] The above embodiments simultaneously collect batch material data, equipment signature data, and authentication context data, and generate original evidence packages, their hashes, and signatures, ensuring the integrity, authenticity, and immutability of the original traceability data, and providing a reliable data foundation for subsequent calculation of dry-based spectral contribution continuity and authentication status updates.

[0032] In one embodiment of the present invention, the continuous numerical calculation module is configured as follows: Step S201: Determine the dry weight value using the batch net weight and moisture ratio, and determine the processing sequence using the spectral sequence. Specifically, the formula for calculating the dry weight value is as follows: in, For batch The dry weight value, in kilograms. For batch The batch net weight, in kilograms. For batch The moisture ratio is between 0 and 1. The formula for calculating the processed sequence is as follows: in, For batch The processing sequence, For batch The near-infrared reflectance sequence at the first sampling point, For batch The near-infrared reflectance sequence at the second sampling point, For batch The near-infrared reflectance sequence at the third sampling point, Indicates smoothing processing. Indicates standard normal correction; Step S202: Determine the expected dry weight using the dry weight value, loss ratio, and allocation ratio. Specifically, multiply the allocation ratio of each parent batch by the dry weight value, sum the results, and then multiply the sum by the difference between the constant 1 and the loss ratio to obtain the expected dry weight. The specific formula for calculating the expected dry weight is as follows: in, For the event Neutron batch Expected dry weight, in kilograms. For the event The loss ratio, with a preset loss threshold of 0.08, For the event Neutron batch The parent batch set, For the event Middle father batch Flow to sub-batch The allocation ratio, For the father batch The dry weight value, in kilograms; Step S203: Determine the dry weight residual using the dry weight value and the expected dry weight, and determine the contribution ratio using the allocation ratio and the dry weight value. Specifically, the formula for calculating the dry weight residual is as follows: in, For the event Neutron batch Dry weight residual, For sub-batch The measured dry weight value, in kilograms. For the event Neutron batch Expected dry weight, in kilograms. This is the dry weight stable amount, expressed in kilograms, specifically 0.001 kg; The formula for calculating the contribution ratio is as follows: in, For the event Middle father batch Pair batch The contribution ratio, For the event Middle father batch Flow to sub-batch The allocation ratio, For the father batch The dry weight value, For the event Neutron batch Any parent batch within the set of parent batches, For the event Neutron batch The parent batch set, For the event Middle father batch Flow to sub-batch The allocation ratio, For the father batch The dry weight value, This is the dry weight stability, specifically 0.001 kg; Step S204: Determine the desired sequence according to the process type, contribution ratio, and treatment sequence, and determine the spectral residuals according to the treatment sequence and the desired sequence. Specifically, the formula for calculating the desired sequence is as follows: in, For the event Neutron batch The expected sequence, For the event Middle father batch Pair batch The contribution ratio, For the event Process category The corresponding spectral proof matrix, For the father batch The processing sequence, For the event Neutron batch The parent batch set; The formula for calculating spectral residuals is as follows: in, For the event Neutron batch Spectral residuals For sub-batch The measured processing sequence, For the event Neutron batch The expected sequence, Represents the vector dot product. Represents the L2 norm, This is a spectral stability measure, specifically 1e-6; Step S205: Determine the continuous values ​​based on the dry weight residual and the spectral residual. Specifically, the calculation formula for the continuous values ​​is as follows: in, For the event Neutron batch A continuous value, ranging from 0 to 1. For the event Neutron batch Dry weight residual, This is the dry weight attenuation coefficient, specifically 0.03. For the event Neutron batch spectral residuals; Step S206: When the loss ratio exceeds the preset loss threshold, retain the loss ratio value and generate an anomaly identifier. When the spectral sequence lacks a fixed band, set the continuous values ​​of the corresponding sub-batch to the preset continuous anomaly value and generate an anomaly identifier. Specifically, the preset continuous anomaly value is 0.

[0033] It should be noted that the dry weight value is the dry basis mass of the batch, in kilograms, and is calculated from the batch net weight and moisture ratio, representing the actual material mass of the batch after removing moisture.

[0034] The processed sequence is the preprocessed spectral fingerprint vector of the batch, which is a vector obtained after smoothing and standard normal correction of the original spectral sequence, and is used to characterize the physical fingerprint of the batch.

[0035] The expected dry weight is the theoretical dry basis mass of the sub-batch in the event, in kilograms, and is calculated from the dry weight value of the parent batch and the loss ratio, characterizing the theoretical dry basis mass of the sub-batch.

[0036] The preset loss threshold is used to determine whether the dry basis loss of an event is within a reasonable range. The preferred value is 0.08, which represents the standard for a reasonable range of dry basis loss.

[0037] The dry weight residual is the relative difference between the measured dry weight of a sub-batch and the expected dry weight, which characterizes the degree of conservation of dry basis material.

[0038] The dry weight stability parameter is a parameter used to avoid division by zero in the calculation of dry weight residuals. It is preferably set to 0.001 kg and represents a stable parameter in the calculation process.

[0039] The contribution ratio is the dry basis contribution of the parent batch to the child batch, representing the proportion of the parent batch material in the child batch.

[0040] The spectral evidence matrix is ​​the spectral evidence transition matrix corresponding to the event process category. It is obtained by training qualified historical transformation samples of the same tea type, the same process, and the same equipment family, and is used to correct spectral changes caused by the process.

[0041] The expected sequence is the theoretical preprocessed spectral vector of the sub-batch, which is calculated from the processing sequence and spectral matrix of the parent batch and characterizes the theoretical spectral features of the sub-batch.

[0042] The spectral residual is the angular similarity residual between the measured processed sequence and the expected sequence in the sub-batch, which characterizes the continuity of the spectral fingerprint.

[0043] The spectral stability parameter is a parameter used to avoid division by zero in the calculation of spectral residuals. It is preferably set to 0.000001 and represents the stability parameter in the spectral calculation process.

[0044] The continuous value is the contribution of the tea batch dry base spectrum to the continuity, and the value ranges from 0 to 1. It is used to represent the degree of continuity of the sub-batch with respect to its parent batch set in terms of physical dry base and spectrum fingerprint.

[0045] The dry weight attenuation coefficient is a parameter used to adjust the degree of influence of the dry weight residual on continuous values. The preferred value is 0.03, which characterizes the influence weight of the dry weight residual.

[0046] The preset continuous outlier value is a parameter used to mark abnormal situations when a fixed band is missing in the spectral sequence. The preferred value is 0, which represents the abnormal marking when the spectrum is missing.

[0047] Specifically, the smoothing process employs the Savitzky-Golay smoothing algorithm with a window size of 11 and a polynomial order of 2 to smooth the original spectral sequence and remove high-frequency noise interference. Standard normal correction, on the other hand, first calculates the mean and standard deviation for each spectral point in the smoothed spectral sequence, then subtracts the mean from each point and divides by the standard deviation to eliminate the influence of scattering differences. For example, if the original spectral sequence has 200 band points, after smoothing, random fluctuations caused by equipment noise are removed. Then, standard normal correction adjusts the mean of the spectral sequence to 0 and the standard deviation to 1, ensuring uniform comparability between different batches of spectra and avoiding interference from differences in equipment condition.

[0048] Specifically, the training method for the spectrum verification matrix is ​​as follows: First, qualified historical transformation samples of the same tea type, process, and equipment family are selected. Each sample contains preprocessed spectrum verification vectors for the parent batch and child batches. Then, a linear regression algorithm is used to train and obtain the spectrum transfer matrix. The selection criteria for the training dataset are: the samples must be qualified batches that have been manually verified, without any abnormal records, and the time range of the samples must be within the most recent 12 months to ensure that the samples can reflect the actual status of the current equipment and process. The version locking mechanism is as follows: the trained spectrum verification matrix will be assigned a unique version number, and the system will lock this version. Subsequent events of the same process category can only use this version of the matrix, unless a new version is released after being reviewed by the alliance management agency. After the new version is released, the old version will still be retained for the verification of historical data.

[0049] Specifically, the weighting of each parameter in continuous numerical calculations is based on the fact that the dry weight residual and spectral residual have roughly the same impact on physical continuity. Therefore, a fusion of exponential and linear terms is used to balance their influence. The experimental basis for setting the dry weight attenuation coefficient to 0.03 is that statistical analysis of the dry weight residuals of multiple qualified batches revealed that 99% of qualified batches had dry weight residuals not exceeding 0.03. Therefore, the attenuation coefficient was set to 0.03, so that when the dry weight residual is 0.03, the exponential term has a value of 0.367, which reasonably reflects the impact of the dry weight residual on continuous numerical calculations.

[0050] It should be noted that the actual water loss, blending, and spectral changes that occur during tea processing are converted into intermediate parameters that can be used for supply chain certification. By simultaneously calculating and fusing the dry weight residual and spectral residual to obtain a continuous value, the physical continuity of parent and child batches can be verified. This solves the problem that traditional traceability systems only record logical inheritance relationships and verify the authenticity of physical material conversion. For example, in a blending event, the dry weights of the three parent batches are 100kg, 200kg, and 300kg, respectively, and the dry weight of the child batch is 590kg with a loss of 10kg. The system calculates a dry weight residual of 0.0017, and simultaneously calculates a spectral residual of 0.01 using the spectral verification matrix, ultimately obtaining a continuous value of 0.96, indicating good physical continuity of the batch.

[0051] The above embodiments eliminate the interference of moisture changes in tea processing on batch contribution judgment by dry basis normalization, and realize the identification of the consistency of physical origin of tea batch by process-corrected spectral residuals. By fusing the continuous values ​​obtained by dry weight residuals and spectral residuals, it is possible to simultaneously punish the non-conservation of dry basis materials and the discontinuity of spectral fingerprints, effectively preventing the problem of obtaining complete certification inheritance by simply falsifying weight or simply falsifying spectrum.

[0052] In one embodiment of the present invention, the source sequence generation module is configured as follows: Step S301: Construct the batch conversion route into a directed acyclic graph from parent batch to child batch; Step S302: Assign a constant 1 to the source end sequence of the source harvesting batch in the source harvesting batch position, and assign a constant 0 to the other source harvesting batch positions; Step S303: Determine the source sequence of the child batch according to the contribution ratio and the source sequence of the parent batch. Specifically, the calculation formula for the source sequence is as follows: in, For sub-batch For the source-end sequence of all harvested batches, For the event Neutron batch Any parent batch within the set of parent batches, For the event Neutron batch The parent batch set, For the event Middle father batch Pair batch The contribution ratio, For the father batch For the source-end sequence of all source-harvested batches, the source-harvested batch A vector whose source-harvesting batch bit is set to one and whose other source-harvesting batch bit bit is set to zero; Step S304: The sub-batch source sequence that enters the next event is used as the parent batch source sequence of the next event to participate in the successive propagation. Step S305: Make the packaged finished product inherit the source sequence of the directly upstream sub-batch, and bind the source sequence with the packaging identifier; In step S306, when the batch conversion route is looped, the dry weight inventory of the same parent batch is repeatedly consumed, the time of the child batch is earlier than the time of the parent batch, or the sum of the elements of the source sequence exceeds the preset sequence and threshold range, an abnormal identifier is generated. Specifically, the preset sequence and threshold range is 0.999 to 1.001.

[0053] It should be noted that the batch conversion route is a collection of all parent-child batch conversion relationships that a tea batch undergoes from the source of picking to the finished product packaging, used to record the flow relationship between batches.

[0054] A directed acyclic graph (DAG) is a graphical representation of the batch transformation path from a parent batch to a child batch, used to record the inheritance relationship between batches.

[0055] The source-end sequence is the dry basis parent source contribution vector of the sub-batch to all source-harvested batches. The source-end sequence of the source-harvested batch is a vector in which the bit of the source-harvested batch is 1 and the bit of other source-harvested batches is 0, representing the proportion of the sub-batch material from each source-harvested batch.

[0056] The packaging label is a unique identifier assigned to each finished product package to distinguish different finished product packages.

[0057] The preset sequence and threshold range are used to determine whether the elements of the source sequence are within a reasonable range. The preferred values ​​are 0.999 to 1.001, which represent the reasonable range standard of the source sequence.

[0058] Specifically, the method for constructing the directed acyclic graph (DAG) is as follows: After each event is completed, the system adds nodes and edges to the DAG based on the parent-child batch relationship of that event. Nodes represent batches, and edges represent the transformation relationship from parent batch to child batch. Each edge stores the corresponding contribution ratio. The data storage structure uses an adjacency list. Each node stores its own batch number, source sequence, and a list of edges pointing to its child nodes. For example, picking batches A, B, and C are used as initial nodes. Then, in the matching event, A and B become parent nodes, and child node D is added. Edges are added from A to D and from B to D. Then, D and C become parent nodes, and child node E is added. Edges are added from D to E and from C to E. This constructs the entire batch transformation DAG, recording the flow relationship of all batches.

[0059] Specifically, the recursive propagation algorithm for the source sequence is as follows: Starting from the source batch, each event is processed sequentially according to its chronological order. For each sub-batch within an event, the source sequence of the sub-batch is calculated based on the source sequence of the parent batch and its contribution ratio. In the case of merging multiple parent batches, the source sequence of each parent batch is multiplied by its corresponding contribution ratio, and then summed to obtain the source sequence of the sub-batch. In the case of splitting a single parent batch, the source sequence of the parent batch is multiplied by the contribution ratio of each sub-batch to obtain the source sequence of each sub-batch. For example, in the source sequence of parent batch A, the bit corresponding to A is 1, and the others are 0. In the source sequence of parent batch B, the bit corresponding to B is 1, and the others are 0. The contribution ratios of A and B are 0.7. Then, in the source sequence of sub-batch D, the bit corresponding to A is 0.3, the bit corresponding to B is 0.7, and the others are 0. This completes the recursive propagation for merging multiple parent batches and accurately records the source contribution of each sub-batch.

[0060] Specifically, the implementation of binding the packaging identifier to the source sequence is as follows: after the packaging event is completed, the system binds the packaging identifier to the corresponding source sequence, writes the binding information to the blockchain, and simultaneously writes the hash value of the source sequence to the blockchain. Any subsequent modification to the source sequence will result in a discrepancy between the hash value and the one on the chain, thus being detected. The system also adds restrictions to the smart contract, prohibiting modification of the already bound source sequence. Modification is only allowed when the packaging corresponding to the packaging identifier has not yet been sealed. After sealing, the binding information is locked. For example, the source sequence corresponding to packaging identifier P1, after being bound and written to the blockchain, has a hash value of abc123. If someone subsequently attempts to modify the source sequence, the new hash value will be different from abc123, and the smart contract will reject the modification operation, ensuring that the source sequence cannot be tampered with.

[0061] It's important to note that the contribution of each finished product package to the initial harvested batch is changed from full inheritance to dry basis share inheritance. This is achieved by recursively propagating the source sequence along a directed acyclic graph, enabling traceability of the dry basis contribution share of the finished product package's origin. Essentially, the many-to-many relationship data in material transformation is transformed into an auditable vector, allowing the supply chain system to trace the proportion of the source harvested batch at the finished product level, rather than just tracing the most recent batch. For example, in the source sequence of a blended tea package, the contributions of the three source harvested batches are 0.4, 0.3, and 0.3 respectively. This allows the system to clearly know the proportion of the raw materials for this package originating from these three source batches, rather than just knowing that they come from the previous blending batch.

[0062] The above embodiments solve the problem of a certified parent batch in blended tea and graded tea being incorrectly extended to all finished product packaging through recursive propagation of the source sequence. This enables accurate calculation of the source dry basis contribution share of each finished product packaging, providing an accurate share basis for subsequent certification status updates.

[0063] In one embodiment of the present invention, the anomaly verification module is configured as follows: Step S401: Encapsulate the hash value, digital signature, dry weight value, processed sequence hash value, continuous value, contribution ratio, source sequence, device calibration number, location code and event type of the original evidence package into an on-chain evidence package; Step S402: Store the plaintext of the original evidence packet into the encrypted object storage, and make the on-chain evidence packet save the hash value, parameter value and index value; Step S403: Perform deterministic serialization on the on-chain evidence packet and calculate the hash value of the on-chain evidence packet; Step S404: Perform consistency checks based on the uniqueness of the event number, the dry weight inventory of the parent batch, the event time sequence, the integrity of the formula fields, and the validity of the digital signature. Specifically, check the uniqueness of the event number, the dry weight inventory of the parent batch, the event time sequence, the integrity of the formula fields, and the validity of the digital signature. Step S405: When the consumption of the parent batch exceeds the difference between the available dry weight inventory of the parent batch and the registered loss, an anomaly flag is generated. Specifically, when the sum of the products of the allocation ratio of the same parent batch consumed in all child batches and the dry weight value exceeds the difference between the available dry weight inventory of the parent batch and the registered loss, an anomaly flag is generated. Step S406: When the certificate verification fails, an anomaly identifier is generated, and a transaction number is generated after the verification is completed. Specifically, an anomaly identifier is generated when the device certificate, operator certificate, or enterprise node certificate expires, is revoked, or does not match the site code.

[0064] It should be noted that the on-chain evidence package is a data packet encapsulated from the hash value, digital signature, dry weight value, processed sequence hash value, continuous value, contribution ratio, source sequence, device calibration number, location code, and event type of the original evidence package, and is used to store it on the blockchain.

[0065] Encrypted object storage is an encrypted storage system used to store the plaintext of the original evidence package, ensuring the security and privacy of the original data.

[0066] Deterministic serialization is a serialization operation performed on on-chain evidence packets in ascending order of field names, ensuring that different nodes obtain the same result after serializing the same on-chain evidence packet.

[0067] The transaction number is a unique identifier for each transaction on the blockchain, used to trace on-chain operations.

[0068] The anomaly identifier is a binary identifier used to mark various abnormal situations that occur during system operation. A value of 0 indicates no anomaly, and a value of 1 indicates that an anomaly exists.

[0069] Specifically, the encryption algorithm used for storing encrypted objects is the SM4 symmetric encryption algorithm. The plaintext of the original evidence package is encrypted using a symmetric key, which in turn is encrypted using the recipient's public key. Only the entity possessing the private key can decrypt it. The access control mechanism employs role-based access control. The regulatory end can access the original evidence packages of all enterprises, while enterprises can only access their own original evidence packages. Consumers cannot access their original evidence packages. For example, enterprise A's original evidence package uses SM4 encryption, with the key encrypted using both the regulatory end's and enterprise A's public keys. Both the regulatory end and enterprise A can decrypt it, but other enterprises cannot. Consumers can only see the hash value and not the plaintext, effectively protecting the privacy of the enterprise's process data.

[0070] Specifically, the rules for deterministic serialization are as follows: First, all fields of the on-chain evidence package are sorted in ascending order according to the ASCII codes of the field names. Then, they are serialized in JSON format. During serialization, no extra spaces or line breaks are allowed. Numbers are preserved to six decimal places, and strings are not escaped unless necessary. For example, if the fields of the on-chain evidence package are b, a, and c, after sorting, they become a, b, c. Then, the serialization yields {"a":1,"b":2,"c":3}. Different nodes will obtain the same serialization result for the same evidence package, and will not get different hash values ​​due to different field orders, thus ensuring the consistency of on-chain data.

[0071] Specifically, the steps for smart contracts to perform consistency verification are as follows: First, check the uniqueness of the event number to ensure there are no duplicate events. Then, check the dry basis inventory of the parent batch; the available dry basis inventory of the parent batch minus the dry basis consumed by all child batches must be greater than or equal to 0. Next, check the time sequence of events; the event time of the child batch must be later than the event time of the parent batch. Then, check the validity of the signatures; all digital signatures must be verifiable through the certificate. If any verification fails, an anomaly flag is set to 1, and the reason for the anomaly is recorded. The event is still recorded on the chain, but marked as an anomaly. For example, if the available dry basis inventory of the parent batch is 100kg, and the child batch consumes 110kg, the smart contract will detect insufficient inventory, set the anomaly flag to 1, record the reason for the anomaly as insufficient dry basis inventory, and retain the event record for subsequent verification.

[0072] It's important to note that incorporating dry basis continuous parameters and spectral continuity parameters into blockchain smart contract verification binds on-chain records to the conversion patterns of tea materials, rather than treating the blockchain as a simple, immutable database. This means that smart contracts automatically verify the consistency of event sequence, signatures, dry basis inventory, and parent-child relationships, ensuring the authenticity and compliance of on-chain records. For example, in a blending event, the system checks via smart contract: if the parent batch inventory is sufficient, the time sequence is correct, and the signature is valid, the verification passes; otherwise, it's marked as abnormal, guaranteeing the authenticity of on-chain data.

[0073] The above embodiments reduce on-chain storage pressure and protect the privacy of enterprise process data by storing the original evidence package in plaintext in the encrypted object storage and only putting the hash and necessary parameters on the chain. The automatic execution of consistency verification through smart contracts improves the automation and reliability of traceability authentication.

[0074] In one embodiment of the present invention, the authentication result generation module is configured as follows: Step S501: For each packaged finished product and each target certification attribute, read the source sequence elements from the set of source harvesting batches with the target certification attribute and sum them to obtain the certification ratio. Specifically, the formula for calculating the certification ratio is as follows: in, For packaging finished products Originating from authentication attributes The certification rate of the batches of harvested products covered by the source. For authentication attributes The source-harvested batches covered in the source-harvested batch set. For those with authentication attributes A collection of batches harvested from the source. For packaging finished products For the batches harvested at the source Source sequence elements; Step S502: Read continuous values ​​from the event set of the packaged finished product from harvesting to packaging, and select the smallest continuous value as the continuous lower limit. Specifically, the calculation formula for the continuous lower limit is as follows: in, For packaging finished products The continuous lower bound, For packaging finished products Any event in the process from harvesting to packaging, For packaging finished products A collection of events from harvesting to packaging. For the event In and packaged finished products The sub-batch corresponding to the inheritance path, For the event In and packaged finished products The consecutive values ​​of the sub-batch corresponding to the inheritance path; Step S503: When the continuous lower limit meets the preset continuous threshold, the authentication ratio meets the preset authentication threshold, and the abnormality is marked as no abnormal value, the authentication result is set to the pass value. Step S504: When the continuous lower limit does not meet the preset continuous threshold, the authentication ratio does not meet the preset authentication threshold, or the anomaly identifier is an abnormal value, the authentication result is set to a failure value. Specifically, the calculation formula for the authentication result is as follows: in, For packaging finished products For authentication attributes The authentication result can be either 0 or 1. For packaging finished products The continuous lower limit is set, with a preset continuous threshold of 0.92. For packaging finished products For authentication attributes The authentication rate, with a preset authentication threshold of 0.995. For packaging finished products An exception flag on the inheritance path, with a value of 0 for no exceptions and a value of 1 for exceptions; Step S505: Modification of authentication results via manual backend is prohibited; In step S506, when the authentication result is a failure value, the authentication ratio, continuous lower limit, and abnormality indicator are retained simultaneously.

[0075] It should be noted that the target certification attribute refers to the certification type of the tea product, such as geographical indication, organic certification, eco-friendly and low-carbon certification, which represents the certification type of the tea product.

[0076] The certification ratio is the dry basis share of packaged finished products derived from the set of harvested batches from the source covered by the certification attributes, representing the proportion of certified raw materials in the packaged finished products.

[0077] The continuity lower limit is the minimum value of continuous values ​​among all events experienced by the packaged product from harvesting to packaging, representing the minimum physical continuity of the packaged product throughout its entire life cycle.

[0078] The preset continuity threshold is used to determine whether the physical continuity of the packaged finished product is qualified throughout its entire life cycle. The preferred value is 0.92, which represents the qualified standard for physical continuity.

[0079] The preset certification threshold is used to determine whether the certified source share of the packaged finished product is qualified. The preferred value is 0.995, which represents the qualified standard of the certified source share.

[0080] The certification result is a binary certification status of the packaged product for the target certification attribute, with a value of 1 indicating successful certification and a value of 0 indicating unsuccessful certification.

[0081] Specifically, the definition and management method of the source harvesting batch set with target certification attributes is as follows: The source harvesting batch set corresponding to the target certification attribute is reviewed by the certification body after the batch is harvested. Once the review is passed, the batch is added to the corresponding set, and the set information is written to the blockchain, which can be queried by all nodes. Updates to the set can only be made by the certification body; enterprises and other entities cannot modify it. Each update records a transaction number for traceability. For example, for the source harvesting batch set for organic certification, after review by the certification body, harvesting batches A, B, and C are added to the set and written to the blockchain. Subsequently, any enterprise can query whether these batches belong to the source harvesting batches for organic certification, ensuring the authority of the certification information.

[0082] Specifically, the calculation timing and triggering conditions for the continuous lower bound and authentication ratio are as follows: the system automatically triggers the calculation after the packaging event is completed and all parent events have been verified. The triggering condition is that the transaction of the packaging event has been written to the blockchain and the anomaly flag is 0. At this time, the system will backtrack all parent events of the packaging, extract the continuous values ​​of each event, take the minimum value to obtain the continuous lower bound, and calculate the authentication ratio based on the source sequence. For example, after the packaging event is completed, the system detects that all parent events have been completed and automatically triggers the calculation. Backtracking reveals that the packaging has experienced 5 events with continuous values ​​of 0.98, 0.97, 0.95, 0.96, and 0.94, respectively. The continuous lower bound is 0.94, and the authentication ratio is calculated to be 0.998, thus completing the calculation of the two parameters.

[0083] Specifically, the technical implementation to prevent manual modification of authentication results is as follows: the authentication result is automatically calculated by a smart contract, written to the blockchain after calculation, and a restriction is added to the smart contract to prohibit any entity from modifying the authentication result. The authentication result will only be automatically recalculated when the source batch set or the source sequence is legally updated. When the authentication result is unsuccessful, the system will display anomaly information, including the value of the continuous lower limit, the authentication ratio, and the reason for the anomaly, such as insufficient continuous lower limit or insufficient authentication ratio.

[0084] It's important to note that physical continuity, the proportion of certified sources, and on-chain contract anomalies are unified into a deterministic certification status. This ensures that the certification result is driven by verifiable technical parameters, rather than by manual selection of whether to display a particular certification. Specifically, a certification status is only obtained when the packaged product has physical continuity throughout its entire lifecycle, the certified source share meets the requirements, and there are no on-chain anomalies. For example, if a package has a continuity lower limit of 0.93, a certification ratio of 0.996, and no anomalies, then the certification result is 1, indicating that the package has passed the corresponding certification.

[0085] The above embodiments avoid using the average value to mask key anomalies by adopting a continuous lower limit as the criterion for judging physical continuity. By linking the certification results with the certification ratio, the embodiments prevent the entire batch of finished products from being displayed as certified products due to the inclusion of a small number of certified raw materials, prohibit manual modification of certification results, and ensure the objectivity and impartiality of certification results.

[0086] In one embodiment of the present invention, the summary generation module is configured as follows: Step S601: After reading the packaging identifier, locate the packaging event transaction number and trace back the parent batch event along the batch conversion route; Step S602: Recalculate the hash value for each event and verify the hash value of the on-chain evidence packet; Step S603: Hash the transaction number, packaging identifier, authentication result, authentication ratio, continuous lower limit and source sequence sorted by time to generate a digest value; Step S604: Ensure that the summary values ​​do not contain the plaintext of the enterprise formula; Step S605: After the query request is received, verify the consistency between the summary value and the on-chain transaction number. If the consistency verification fails, output the source tag invalid value. Step S606: Generate corresponding view data according to the query subject. Specifically, the regulatory view contains the original evidence package after authorization and decryption, the enterprise view contains the plaintext of the event in which the enterprise node participated, and the consumer view contains the place of origin, key processes, certification results, logistics nodes, and hash verification values.

[0087] It should be noted that the summary value is a value obtained by hashing the transaction number, packaging identification, certification result, certification ratio, continuous lower limit and source sequence in chronological order, and is used to represent the path summary from the source harvesting batch to the finished product packaging.

[0088] The traceability tag invalidation value is an identifier returned when the consistency verification between the digest value and the on-chain transaction number fails, used to prompt the user that the traceability tag is invalid.

[0089] The view data consists of traceability information displayed at different granularities, generated based on the different permissions of the query subject, including regulatory view, enterprise view, and consumer view.

[0090] Specifically, the hash algorithm for the digest value is SHA256. The generation rule is as follows: first, all transaction numbers of the package are sorted in chronological order; then, the package identifier, authentication result, authentication ratio, continuous lower limit, and source sequence are concatenated in order; then, these data are serialized into binary; and then, a hash operation is performed to obtain the digest value.

[0091] Specifically, the access control mechanism and permission allocation for different query subjects are as follows: The regulatory body has the highest permissions, allowing access to all original evidence packages, intermediate parameters, source sequences, and other data. Enterprises can view original evidence packages and intermediate parameters for all events within their own company, but cannot view data from other companies. Consumers can only view publicly available information such as the packaging's origin, key processes, certification status, and logistics details; they cannot view original evidence packages or intermediate parameters. The access control mechanism involves the system first verifying the identity of the query subject during a query, and then generating corresponding view data based on that identity.

[0092] Specifically, when a user scans a tag to make a query, the system first extracts the summary value from the tag, then reads the corresponding transaction number and data from the blockchain, recalculates the summary value, and then compares the two summary values. If they are inconsistent, the system returns the traceability tag invalid value and prompts the user that the traceability tag is invalid and may be counterfeited. The system also prohibits the display of any cached normal pages to prevent users from being misled by counterfeit information.

[0093] It should be noted that the above embodiments verify the integrity of the entire lifecycle traceability path through summary values, and provide information display at different granularities according to the needs of different query subjects, thus balancing information transparency and corporate data privacy.

[0094] In one embodiment of the present invention, the traceability tag output module is configured as follows: Step S701: Read the packaging label, digest value and authentication result before sealing the packaging to generate a label. Step S702: Write the binding transaction between the label identifier and the packaging identifier into the blockchain; Step S703: Configure the packaging identifier, summary value, and authentication result as data fields of the traceability label. Specifically, the authentication result includes the authentication attribute identifier and the authentication result value. Step S704: Write the packaging identifier, digest value and signature digest into the QR code, and write the same data content into the near field communication data area; Step S705: Sign the QR code content and the near-field communication data area content, and perform a single valid issuance for the same packaging identifier. Specifically, both the QR code content and the near-field communication data area content are signed by the enterprise node's private key. When re-labeling, a new label identifier is generated and the old label identifier is set to invalid. Step S706: After the label is affixed, cross-validation is performed between the QR code and the content of the near-field communication data area. If the cross-validation is inconsistent, the packaged finished product is prevented from entering the warehouse and an abnormality mark is generated.

[0095] It should be noted that the label identifier is a unique identifier assigned to each traceability label, used to distinguish different traceability labels.

[0096] The near-field communication data area is the near-field communication chip area in the traceability tag used to store data and traceability information.

[0097] The signature digest is the result of hashing the traceability tag data and then signing it with the enterprise node's private key. It is used to verify the authenticity of the tag data.

[0098] Only one valid traceability label can be generated for the same packaging identifier in a single valid issuance. When re-issuing a label, a new label identifier must be generated and the old label identifier must be set to invalid, which represents the label issuance rule.

[0099] Specifically, the traceability label's QR code encoding format and near-field communication (NFC) data storage format are as follows: the QR code uses a UTF-8 format string, containing packaging identification, digest value, and signature digest. The NFC data area uses the NFC Forum Type 2 tag format, storing content that is completely identical to the QR code, ensuring that the two contents are the same. For example, if the QR code stores the string "P1 packaging identification," "abc123 digest value," and "def456 signature digest," the NFC data area will also store the same string, guaranteeing content consistency.

[0100] Specifically, the enterprise node's private key is stored in the enterprise's hardware security module, making it difficult to export. Each time a signature is performed, the signing operation is completed internally within the hardware security module, and the private key does not leave the hardware security module. The private key can only be used for signing after the event packaging is completed and the authentication result has been generated. Each signing operation is logged, making it traceable and ensuring the security of the private key.

[0101] Specifically, the implementation method and exception handling process for cross-verification of QR code and near-field communication data area content are as follows: After the label is affixed, the camera on the packaging line reads the content of the QR code, and at the same time, the near-field communication reading device reads the content of the near-field communication data area. Then the system compares whether the two contents are completely consistent. If they are consistent, the package is allowed to enter the outbound event. If they are inconsistent, the package will be intercepted, and the exception flag will be set to 1. The reason for the exception will be recorded to prevent unqualified labels from being released.

[0102] It should be noted that a non-reusable traceability certification label is generated, driven by the continuous quantity (i.e., continuous numerical value) of the dry-base spectral contribution, the parent source contribution vector, and the certification status, thus achieving a unique binding between the traceability label and the finished product packaging. The authenticity and uncopyability of the traceability label are ensured through dual storage of QR codes and near-field communication, as well as cross-validation, preventing the problem of counterfeit traceability labels.

[0103] The above embodiments improve the anti-counterfeiting capability of traceability labels by simultaneously using QR codes and near-field communication to store traceability information and performing cross-verification. The single-valid issuance mechanism prevents the problem of traceability labels being reused. By binding the traceability label to the packaging label, each finished product package has a unique and verifiable traceability certification label.

[0104] like Figure 2The diagram shows a UML flowchart of an integrated ecological product traceability and authentication system covering the entire lifecycle. From left to right, the five main functional modules are: data collection and edge gateway, continuous source-end computing module, blockchain and encrypted storage, authentication and digest module, and tagging and query terminal. The entire process is divided into five stages. Stage 1 is data collection and evidence gathering, which includes collecting batch net weight, moisture ratio, spectral sequence, loss ratio, allocation ratio, and processing category of tea products at key event nodes, and generating original evidence packages, hash values, and digital signatures to ensure data integrity and authenticity. Stage 2 is continuity and contribution calculation, where the system uses the collected data to calculate dry weight, expected dry weight, contribution ratio, and continuous values ​​to verify the physical continuity of parent and child batches. Stage 3 is source-end propagation and on-chain verification, which involves recursively propagating the source-end sequence and submitting continuous parameters, combined with blockchain records to perform anomaly checks and generate transaction numbers, ensuring the traceability and consistency of material conversion. Stage 4 is authentication and digest generation, where the module calculates the authentication ratio and continuity lower limit based on the source-end sequence, generating authentication results and digest values. Phase five involves label output and query verification, including generating traceability labels, binding them to the blockchain, generating QR codes or NFC tags, and returning validity and view data through query verification, thereby achieving traceability certification and data tamper-proofing for tea products throughout their entire lifecycle from source to sales.

[0105] It should be noted that this system can be deployed within a tea industry consortium blockchain architecture. Edge gateways are deployed at various nodes, including tea gardens, processing plants, warehouses, and logistics facilities. Networked data collection devices connect to the edge gateways, where preprocessing and intermediate parameter calculations are performed before necessary parameters are uploaded to the consortium blockchain. Raw data is stored in encrypted object storage. Enterprises can deploy a supporting management system to manage their batch information, processing data, and label issuance operations. Regulatory bodies can deploy a monitoring system to audit and certify batch sets and investigate anomalies. Consumers can scan the traceability label on product packaging using ordinary smart devices to verify the product's origin.

[0106] like Figure 3 As shown, the system ultimately generates a unique traceability certification label for each finished product package. The label includes a QR code and a near-field communication (NFC) storage area, storing packaging identification, route summary, and certification status information. For example, for an organic blended tea product, if all three batches harvested from the source have passed organic certification, the certification ratio of the finished product packaging is 0.998, the continuous lower limit is 0.94, there are no abnormal indicators, and the final certification result is "passed." Consumers can scan the code to view the product's origin, key processes, organic certification status, and logistics nodes. Regulatory authorities can view detailed intermediate parameters for verification, and enterprises can view their own processing data for production management. If the dry basis loss of a batch exceeds a reasonable range, the system will automatically mark it as abnormal, the certification result will be "failed," and the user will be notified of the relevant abnormal information, helping all parties identify problematic products.

[0107] The content of this embodiment has been described above, but this embodiment is not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this embodiment, all of which are within the protection scope of this embodiment.

Claims

1. An integrated system for ecological product traceability certification based on full life cycle chain coverage, characterized in that, include: The hash value extraction module collects batch net weight, moisture ratio, spectral sequence, loss ratio, distribution ratio and process category of tea products, and merges and extracts hash values ​​and digital signatures. The continuous numerical calculation module extracts dry weight values ​​based on batch net weight and moisture ratio, calculates expected dry weight by combining dry weight values, loss ratio, and distribution ratio, extracts dry weight residual by comparing dry weight values ​​with expected dry weight, extracts contribution ratio based on distribution ratio and dry weight values, corrects spectral sequence to obtain processing sequence, converts processing sequence to generate expected sequence by combining process type and contribution ratio, extracts spectral residual by comparing processing sequence with expected sequence, and merges dry weight residual and spectral residual to calculate continuous numerical values. The source sequence generation module propagates the contribution ratio along the transformation path and accumulates it to generate the source sequence. The anomaly verification module integrates hash values, digital signatures, dry weight values, processing sequences, continuous values, contribution ratios, and source sequences to perform verification and extract anomaly identifiers and transaction numbers. The authentication result generation module calculates the authentication ratio based on the source sequence, extracts the minimum value of the continuous values ​​covered by the transformation route as the continuous lower limit, and generates the authentication result by combining the continuous lower limit, the authentication ratio and the anomaly identifier. The summary generation module combines the transaction number, authentication result, authentication ratio, continuous lower limit, and source sequence to generate a summary value; The traceability label output module combines the authentication results and summary values ​​to output the traceability label for tea products. 2.The eco-product traceability certification integrated system based on the full life cycle chain coverage according to claim 1, wherein, The hash value extraction module is configured as follows: Step S101: Configure the picking and storage, receiving at the factory, processing, blending and grading, packaging finished products, warehousing and logistics, and sales query as event category sets, and generate batch numbers for tea batches and event numbers for events; Step S102: Obtain batch net weight, moisture ratio, spectral sequence, loss ratio, distribution ratio, and process category; Step S103: When the difference in moisture values ​​exceeds the preset moisture difference threshold, the sample is re-mixed and collected. If the difference still exceeds the preset moisture difference threshold after re-collection, a candidate anomaly marker is generated. Step S104: Combine the batch net weight, moisture ratio, spectral sequence, loss ratio, allocation ratio, process category, operator certificate number, equipment calibration number, and location code into an original evidence package; Step S105: Calculate the hash value and digital signature for the original evidence package. 3.The eco-product traceability certification integrated system based on the full life cycle chain coverage according to claim 1, wherein, The continuous numerical computation module is configured as follows: Step S201: Determine the dry weight value using the batch net weight and moisture ratio, and determine the processing sequence using the spectral sequence; Step S202: Determine the expected dry weight using the dry weight value, loss ratio, and allocation ratio. Specifically, multiply the allocation ratio of each parent batch by the dry weight value and sum the results. Then, multiply the sum by the difference obtained by subtracting the loss ratio from the constant 1 to obtain the expected dry weight. Step S203: Determine the dry weight residual using the dry weight value and the expected dry weight, and determine the contribution ratio using the allocation ratio and the dry weight value. Step S204: Determine the desired sequence according to the process type, contribution ratio, and processing sequence, and determine the spectral residuals according to the processing sequence and the desired sequence; Step S205: Determine continuous values ​​based on dry weight residuals and spectral residuals; Step S206: When the loss ratio exceeds the preset loss threshold, retain the loss ratio value and generate an anomaly identifier. When the spectral sequence lacks a fixed band, set the continuous values ​​of the corresponding sub-batch to preset continuous anomaly values ​​and generate an anomaly identifier. 4.The eco-product traceability certification integrated system based on the full life cycle chain coverage according to claim 1, wherein, The source sequence generation module is configured as follows: Step S301: Construct the batch conversion route into a directed acyclic graph from parent batch to child batch; Step S302: Assign a constant 1 to the source end sequence of the source harvesting batch in the source harvesting batch position, and assign a constant 0 to the other source harvesting batch positions; Step S303: Determine the source sequence of the child batch according to the contribution ratio and the source sequence of the parent batch; Step S304: The sub-batch source sequence that enters the next event is used as the parent batch source sequence of the next event to participate in the successive propagation. Step S305: Make the packaged finished product inherit the source sequence of the directly upstream sub-batch, and bind the source sequence with the packaging identifier; In step S306, when the batch conversion route experiences a loop, the same parent batch's dry weight inventory is repeatedly consumed, the child batch's time is earlier than the parent batch's time, or the sum of the elements in the source sequence exceeds the preset sequence and threshold range, an anomaly flag is generated. 5.The eco-product traceability certification integrated system based on the full life cycle chain coverage according to claim 1, wherein, The anomaly verification module is configured as follows: Step S401: Encapsulate the hash value, digital signature, dry weight value, processed sequence hash value, continuous value, contribution ratio, source sequence, device calibration number, location code and event type of the original evidence package into an on-chain evidence package; Step S402: Store the plaintext of the original evidence packet into the encrypted object storage, and make the on-chain evidence packet save the hash value, parameter value and index value; Step S403: Perform deterministic serialization on the on-chain evidence packet and calculate the hash value of the on-chain evidence packet; Step S404: Perform consistency checks based on the uniqueness of the event number, the dry weight inventory of the parent batch, the event time sequence, the completeness of the formula fields, and the validity of the digital signature. Step S405: When the consumption of the parent batch exceeds the difference between the available dry weight inventory of the parent batch and the registered loss, an anomaly flag is generated. Step S406: If the certificate verification fails, an exception identifier is generated, and a transaction number is generated after the verification is completed.

6. The integrated traceability and certification system for ecological products based on full lifecycle chain coverage as described in claim 1, characterized in that, The authentication result generation module is configured as follows: Step S501: For each packaged finished product and each target certification attribute, read the source sequence elements from the source harvesting batch set with the target certification attribute and sum them to obtain the certification ratio; Step S502: Read continuous values ​​from the event set experienced by the packaged finished product from picking to packaging, and select the smallest continuous value as the continuous lower limit. Step S503: When the continuous lower limit meets the preset continuous threshold, the authentication ratio meets the preset authentication threshold, and the abnormality is marked as no abnormal value, the authentication result is set to the pass value. Step S504: When the continuous lower limit does not meet the preset continuous threshold, the authentication ratio does not meet the preset authentication threshold, or the abnormality is marked as an abnormal value, the authentication result is set to a failure value. Step S505: Modification of authentication results via manual backend is prohibited; In step S506, when the authentication result is a failure value, the authentication ratio, continuous lower limit, and abnormality indicator are retained simultaneously.

7. The integrated traceability and certification system for ecological products based on full lifecycle chain coverage as described in claim 1, characterized in that, The abstract generation module is configured as follows: Step S601: After reading the packaging identifier, locate the packaging event transaction number and trace back the parent batch event along the batch conversion route; Step S602: Recalculate the hash value for each event and verify the hash value of the on-chain evidence packet; Step S603: Hash the transaction number, packaging identifier, authentication result, authentication ratio, continuous lower limit and source sequence sorted by time to generate a digest value; Step S604: Ensure that the summary values ​​do not contain the plaintext of the enterprise formula; Step S605: After the query request is received, verify the consistency between the summary value and the on-chain transaction number. If the consistency verification fails, output the source tag invalid value. Step S606: Generate corresponding view data according to the query subject.

8. The integrated traceability and certification system for ecological products based on full lifecycle chain coverage as described in claim 1, characterized in that, The traceability label output module is configured as follows: Step S701: Read the packaging label, digest value and authentication result before sealing the packaging to generate a label. Step S702: Write the binding transaction between the label identifier and the packaging identifier into the blockchain; Step S703: Configure the packaging identifier, summary value, and authentication result as data fields for the traceability label; Step S704: Write the packaging identifier, digest value and signature digest into the QR code, and write the same data content into the near field communication data area; Step S705: Sign the QR code content and the near-field communication data area content, and perform a single valid issuance for the same packaging identifier; Step S706: After the label is affixed, cross-validation is performed between the QR code and the content of the near-field communication data area. If the cross-validation is inconsistent, the packaged finished product is prevented from entering the warehouse and an abnormality mark is generated.