A selenium-rich white tea storage traceability intelligent monitoring storage management system
By constructing a differentiable computational framework constrained by the degradation kinetics of selenium and using the Hamilton Monte Carlo sampling method, the initial selenium concentration distribution of the selenium-enriched white tea tray was inverted, solving the problem of difficulty in distinguishing the causes of selenium content decline in existing technologies, and realizing dynamic verification and tamper-proof evidence preservation for fraudulent declarations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PINGLI GAOYING TEA CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies cannot reconstruct the true initial selenium concentration and its probability distribution for each pallet upon entry into the warehouse using time-series data of selenium concentration and environmental parameter vectors during storage, without relying on the initial selenium content declared by the cargo owner, and cannot distinguish the reasons for the decrease in selenium content, thus preventing low-selenium batches from being passed off as high-selenium batches.
A differentiable computational framework constrained by the degradation kinetics of selenium is constructed. Combined with the Hamiltonian Monte Carlo sampling method, the posterior probability distribution of the initial selenium concentration is derived. By immutably binding the pallet identifier through the traceability chain, dynamic verification and evidence preservation of fraudulent declarations are achieved.
It effectively distinguishes between fraudulent declarations and normal degradation fluctuations, improves the market's ability to identify low-selenium batches being passed off as high-selenium batches, and enhances the credibility of third-party traceability warehouses.
Smart Images

Figure CN122492238A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of warehouse monitoring and traceability technology, specifically to an intelligent monitoring and storage management system for selenium-rich white tea. Background Technology
[0002] Selenium-enriched white tea refers to white tea products that achieve a high selenium content through soil enrichment or external selenium-fortified fertilizer during natural growth. Its selenium content typically ranges from 0.2 mg / kg to 4.0 mg / kg. Because selenium is easily oxidized and degraded in high-temperature, high-humidity, and high-oxygen environments, the effective selenium content in tea leaves gradually decreases over time. Therefore, the storage environment for selenium-enriched white tea requires strict control and continuous monitoring of selenium content changes to ensure that the product still meets the requirements for selenium enrichment labeling when it leaves the factory or is traded. Currently, some solutions for the storage management of selenium-enriched white tea use temperature and humidity sensors and oxygen concentration sensors to monitor the warehouse environment in real time, combined with RFID radio frequency identification technology to record the warehousing information, owner declaration data, and test reports for each batch of tea. Some third-party trading markets have also introduced traceability systems, which obtain the tea's origin, selenium content test values, and historical storage environment data by scanning QR codes or reading electronic tags.
[0003] Without relying on the initial selenium content declared by the cargo owner, how can we reconstruct the true initial selenium content and its probability distribution for each pallet at the time of entry into the warehouse using only the selenium concentration time-series data and storage environment parameter vectors collected non-destructively during the storage of selenium-rich white tea? How can we distinguish between fraudulent declarations and selenium content decreases caused by normal degradation fluctuations and environmental disturbances? At the same time, how can we bind the reconstruction results and judgment criteria to the pallet identification in an immutable manner to achieve dynamic verification and evidence preservation of low-selenium batches being passed off as high-selenium batches? Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent monitoring and storage management system for the traceability of selenium-rich white tea, in order to solve the problems mentioned above.
[0005] The objective of this invention can be achieved through the following technical solutions: A smart monitoring and storage management system for selenium-enriched white tea storage and traceability includes: The data acquisition module is used to collect the time series of selenium concentration on the surface of selenium-enriched white tea on each tray, as well as the corresponding storage environment parameter vector, and use the time series and environmental parameter vector as input data. The physical constraint calibration module, based on the input data, constructs a differentiable computational framework with the selenium degradation kinetics as the constraint condition, solves the physical residual under the differentiable computational framework, and minimizes the physical residual by adjusting the unknown degradation parameters within the differentiable computational framework, outputting the selenium concentration change trajectory after physical constraint calibration. The Bayesian inversion module takes the unknown degradation parameters and the initial selenium concentration as random variables to be inferred, and inverts the posterior probability distribution of the initial selenium concentration from the selenium concentration change trajectory, outputting the mean and confidence interval of the initial selenium concentration when each pallet is put into storage. The deviation comparison module compares the initial average selenium concentration with the declared value by the cargo owner, calculates the relative and absolute deviations, determines whether the declared value falls within the credible range, and outputs the declaration authenticity judgment result. The evidence storage and marking module generates anomaly markers based on the discrimination results. It packages the initial selenium concentration posterior probability distribution, discrimination results, and selenium concentration change trajectory into evidence storage data and uploads it to the traceability chain. It also binds the anomaly markers to the pallet identifier to complete the dynamic verification and tamper-proof evidence storage for fraudulent declarations.
[0006] As a further aspect of the present invention: the process for generating the storage environment parameter vector is as follows: Five temperature and humidity sensor nodes are deployed at the four corners and the center of each tray to simultaneously collect instantaneous temperature and humidity values; Calculate the Euclidean distance between each node and the center of the bottom surface of the tray. Then, take the weighted average of the temperature and humidity values of the five nodes with the reciprocal of the distance as the weight to obtain the weighted temperature and humidity values. The oxygen concentration values collected at the same time are arranged in sequence with the weighted temperature values and weighted humidity values to form a three-dimensional environmental parameter vector.
[0007] As a further aspect of the present invention: the construction process of the differentiable computation framework is as follows: The selenium concentration time series in the input data is used as the time independent variable. The input is a differentiable computation graph consisting of multiple nonlinear transformation layers in series. Each transformation layer maps the output of the previous layer through an activation function. A physical residual calculation branch is embedded in parallel in the computation graph. The physical residual calculation branch calculates and predicts the rate of change based on the current unknown degradation parameters and the input environmental parameter vector, according to the degradation kinetics of selenium. The actual rate of change of the computational graph output with respect to the time independent variable is obtained using automatic differentiation techniques, and the difference between the actual rate of change and the predicted rate of change is used as the physical residual.
[0008] As a further aspect of the present invention: the output of the selenium concentration change trajectory calibrated by physical constraints specifically includes: The total loss value is obtained by weighted summing of the squares of the physical residuals and the data fitting loss. The gradient descent method is used to iteratively adjust the unknown degradation parameters in the computation graph, so that the total loss value decreases round by round; When the total loss value decreases by less than 1 / 1000 for three consecutive rounds, the adjustment stops. At this point, the predicted selenium concentration values at each time point output by the differentiable calculation graph are arranged in chronological order to form a selenium concentration change trajectory calibrated by physical constraints.
[0009] As a further aspect of the present invention: the inversion of the posterior probability distribution of the initial selenium concentration specifically includes: The unknown degradation parameters and the initial selenium concentration are combined to form the initial prior distribution, and the selenium concentration change trajectory calibrated by physical constraints is used as the observation sequence. The Hamiltonian Monte Carlo sampling method with dynamic adjustment of the jump integration step size is adopted to simulate particle motion in phase space, and a set of candidate parameter combinations is generated in each round of sampling. Based on the likelihood value between the observed sequence and the predicted sequence under the combination of candidate parameters, candidate parameters are accepted or rejected. After 100,000 iterations, the system converges to a steady-state distribution. Extract the sample set corresponding to the initial selenium concentration from the steady-state distribution, calculate the mean and 95th percentile interval of the sample set, and output them as the mean and confidence interval of the initial selenium concentration.
[0010] As a further aspect of the present invention: the specific process of dynamically adjusting the jump integration step size is as follows: Set a target acceptance interval and an initial integration step size, and calculate the current acceptance rate after every 100 rounds of sampling; If the current acceptance rate is lower than the lower limit of the target acceptance range, the integration step size is multiplied by a decay factor less than one; if the current acceptance rate is higher than the upper limit of the target acceptance range, the integration step size is multiplied by a growth factor greater than one. The adjusted integration step size will be used for the phase space simulation of the subsequent 100 rounds of sampling; If the fluctuation range of the integral step size is less than 5% within three consecutive adjustment periods, the current integral step size is locked until the sampling ends.
[0011] As a further aspect of the present invention: the deviation comparison between the initial average selenium concentration and the declared value by the cargo owner specifically includes: The absolute deviation is obtained by subtracting the declared value from the initial average selenium concentration; Divide the absolute deviation by the initial average selenium concentration to obtain the relative deviation; Compare the declared value by the cargo owner with the lower and upper limits of the confidence interval. If the declared value is less than the lower limit or greater than the upper limit, it is determined to be outside the interval. When the absolute deviation is greater than 0.1 mg / kg and the relative deviation is greater than 10%, and the declared value falls outside the confidence interval, output the result of the forged declaration judgment; otherwise, output the result of the confidence judgment.
[0012] As a further aspect of the present invention: the uploading to the traceability chain specifically includes: The posterior probability distribution of the initial selenium concentration is transformed into a discrete sequence of probability density points. The discrimination result is encoded into a single-byte flag bit. The selenium concentration change trajectory is differentially compressed in time order to obtain a compressed trajectory sequence. The discrete point sequence, single-byte flag, and compressed trajectory sequence are sequentially concatenated, and a hash algorithm is used to calculate a fixed-length digest value of the concatenated data. The digest value, along with the tray identifier and the current timestamp, is assembled into a storage record and broadcast to the consensus nodes of the traceability chain; Once the evidence record is written to the new block, the block height and timestamp are written back to the QR code pasted on the tray surface to complete the binding.
[0013] The beneficial effects of this invention are: (1) This invention constructs a differentiable computational framework constrained by the degradation kinetics of selenium, and combines the Hamiltonian Monte Carlo sampling method to perform Bayesian inversion on the initial selenium concentration. This allows for the independent reconstruction of the true initial selenium concentration and its probability distribution for each pallet upon entry into the warehouse, relying solely on the selenium concentration time-series data and environmental parameter vectors collected during storage, without depending on the owner's declared value. When the absolute deviation between the inversion result and the declared value exceeds 0.1 mg / kg, the relative deviation exceeds 10%, and the declared value falls outside the confidence interval, the system automatically outputs a forged declaration judgment result. This effectively distinguishes between fraudulent declarations and normal degradation fluctuations, reduces the blindness of manual sampling, and improves the market's ability to proactively identify low-selenium batches masquerading as high-selenium batches.
[0014] (2) This invention employs a differentiable computational framework to embed the selenium degradation kinetics as a physical constraint into the data fitting process. It uses automatic differentiation technology to solve for the physical residuals and iteratively adjusts unknown degradation parameters, ensuring that the output selenium concentration change trajectory simultaneously satisfies both the degradation law and measured data. This trajectory is subsequently used for Bayesian inversion and differential compression for evidence storage, and the QR code linked to the pallet identifier allows traceability to the blockchain evidence record. Thus, the selenium decay history, environmental parameter influences, and initial selenium content inversion results for each batch during warehousing are immutably fixed, providing verifiable electronic evidence for market supervision and consumer disputes, and enhancing the credibility of third-party traceability warehouses. Attached Figure Description
[0015] The invention will now be further described with reference to the accompanying drawings.
[0016] Figure 1This is a system block diagram of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Please see Figure 1 As shown, this invention is an intelligent monitoring and storage management system for the traceability of selenium-rich white tea, comprising: The data acquisition module is used to collect the time series of selenium concentration on the surface of selenium-enriched white tea on each tray, as well as the corresponding storage environment parameter vector, and use the time series and environmental parameter vector as input data. The physical constraint calibration module, based on the input data, constructs a differentiable computational framework with the selenium degradation kinetics as the constraint condition, solves the physical residual under the differentiable computational framework, and minimizes the physical residual by adjusting the unknown degradation parameters within the differentiable computational framework, outputting the selenium concentration change trajectory after physical constraint calibration. The Bayesian inversion module takes the unknown degradation parameters and the initial selenium concentration as random variables to be inferred, and inverts the posterior probability distribution of the initial selenium concentration from the selenium concentration change trajectory, outputting the mean and confidence interval of the initial selenium concentration when each pallet is put into storage. The deviation comparison module compares the initial average selenium concentration with the declared value by the cargo owner, calculates the relative and absolute deviations, determines whether the declared value falls within the credible range, and outputs the declaration authenticity judgment result. The evidence storage and marking module generates anomaly markers based on the discrimination results. It packages the initial selenium concentration posterior probability distribution, discrimination results, and selenium concentration change trajectory into evidence storage data and uploads it to the traceability chain. It also binds the anomaly markers to the pallet identifier to complete the dynamic verification and tamper-proof evidence storage for fraudulent declarations.
[0019] The data acquisition module collects a time-series sequence of selenium concentration on the surface of selenium-enriched white tea on each tray, along with the corresponding storage environment parameter vector. The time-series sequence and environmental parameter vector are used as input data, specifically including: An electrochemical selenium concentration sensor probe is fixed to the center of the outer side of the selenium-enriched white tea packaging on each tray. This sensor probe uses a screen-printed carbon electrode coated with a selenomethionine-specific molecularly imprinted film. Every two hours, the sensor probe automatically performs a measurement: a linear scan voltage of 0.2V to 0.6V is applied to the electrode, and the current response curve is recorded, extracting the peak current value. This peak current value is then substituted into a standard curve pre-stored in the sensor's internal memory to convert the selenium concentration value at the current moment into a milligram per kilogram (mg / kg). After each measurement, the sensor probe broadcasts the measured selenium concentration value along with a timestamp of the measurement time via Bluetooth Low Energy to a data aggregation node deployed in the warehouse. The data aggregation node sequentially arranges the selenium concentration values of the same tray according to time sequence, forming a selenium concentration time series for that tray.
[0020] At each of the four corners of the tray and below the center of the tray's bottom, a temperature and humidity sensor node is fixed. Each temperature and humidity sensor node integrates a thermistor-type temperature sensor and a capacitive humidity sensor. All five temperature and humidity sensor nodes are clock-synchronized with the data aggregation node, synchronously collecting instantaneous temperature and humidity values every two hours. During data collection, the temperature sensor converts its resistance value to a Celsius temperature value, and the humidity sensor converts its capacitance value to a relative humidity percentage value.
[0021] After each data collection, the data aggregation node acquires the instantaneous temperature and humidity values at five locations on the tray and calculates the linear distance from each temperature and humidity sensor node to the center of the tray's bottom surface. The specific calculation method is as follows: taking the center of the tray's bottom surface as the origin, the offset of each node in the horizontal, vertical, and longitudinal directions is measured. The square root of the sum of the squares of these three offsets is taken to obtain the Euclidean distance. Subsequently, weighted averages are applied to both temperature and humidity. For temperature, the reciprocal of the Euclidean distance between the five nodes is used as the temperature weight for each node. The instantaneous temperature value of each node is multiplied by its corresponding temperature weight, and the sum is then divided by the sum of the temperature weights of the five nodes to obtain the weighted temperature value. For humidity, the same reciprocal of the Euclidean distance is used as the humidity weight. The instantaneous humidity value of each node is multiplied by its corresponding humidity weight, and the sum is then divided by the sum of the humidity weights of the five nodes to obtain the weighted humidity value.
[0022] An electrochemical oxygen concentration sensor probe is installed on the side of each pallet. This probe is synchronized with the data aggregation node and collects the volume percentage value of the oxygen concentration in the environment surrounding the pallet every 2 hours. The data aggregation node arranges the oxygen concentration value collected at the same time, the weighted temperature value calculated in the previous steps, and the weighted humidity value in the order of temperature first, then humidity, and finally oxygen, forming a sequence containing three values, which serves as the storage environment parameter vector for that pallet at that moment. The data aggregation node associates and stores the selenium concentration time series sequence of each pallet at each moment with the corresponding storage environment parameter vector, and uses both as input data for subsequent processing.
[0023] In the physical constraint calibration module, based on the input data, a differentiable computational framework is constructed with the selenium degradation kinetics as a constraint. The physical residual under the differentiable computational framework is solved, and the physical residual is minimized by adjusting the unknown degradation parameters within the differentiable computational framework. The resulting physical constraint calibration trajectory of selenium concentration is then output, specifically including: A differentiable computational framework was constructed. The time series sequence of selenium concentration for each tray was collected as the time variable, with time series points sequentially designated as time 1, time 2, and so on up to time N. A differentiable computational graph consisting of four cascaded nonlinear transformation layers was constructed. The first layer is the input layer, receiving the time variable values; the second layer is a hidden layer containing 32 computational nodes, each using a hyperbolic tangent function as the activation function to map the output value of the previous layer to a range between -1 and +1; the third layer is another hidden layer containing 16 computational nodes, also using a hyperbolic tangent activation function; the fourth layer is the output layer, containing one computational node, using a linear activation function to output the predicted selenium concentration value corresponding to that time moment. The computational nodes within each layer are fully connected, meaning each node in each layer receives the output values of all nodes in the previous layer, multiplies them by their respective connection weights, sums them, and then passes them through the activation function to obtain the output of that node. Initially, all connection weights are randomly assigned values between -0.01 and +0.01.
[0024] A physical residual calculation branch is embedded in parallel within the differentiable computation graph. This branch first reads the current unknown degradation parameters, including the degradation rate coefficient, activation energy exponent, humidity effect exponent, and oxygen effect exponent. Based on the selenium degradation kinetics, the predicted rate of change is equal to the degradation rate coefficient multiplied by the exponent of the predicted selenium concentration at the current moment, where the exponent is the reaction order, initially set to 1. Simultaneously, the degradation rate coefficient is calculated as follows: the degradation rate coefficient is equal to the pre-exponential factor multiplied by the natural constant e raised to the power of the exponent. The exponent of the exponent is the negative activation energy exponent divided by the product of the gas constant and the Celsius temperature converted to Kelvin temperature, then multiplied by the powers of the humidity effect exponent and the oxygen effect exponent. The humidity effect exponent is the product of the humidity effect exponent and the weighted humidity value, while the oxygen effect exponent is the product of the oxygen effect exponent and the oxygen concentration value. After calculating the predicted rate of change, the physical residual calculation branch outputs it.
[0025] The actual rate of change is obtained using automatic differentiation (ACD). ACD involves calculating the derivative of the output value of each computational node in the differentiable computational graph with respect to the time variable, and then using a chain rule to propagate backward layer by layer to obtain the derivative of the predicted selenium concentration at the output layer of the computational graph with respect to the time variable. This derivative is the actual rate of change. Subtracting the predicted rate of change from the actual rate of change yields the physical residual at that time point. This process is repeated for each time point to obtain the physical residual at each time point.
[0026] Calculate the total loss. The total loss is obtained by a weighted sum of two parts: the first part is the sum of squares of the physical residuals, which is the sum of the squares of the physical residuals at each time point; the second part is the data fitting loss, which is the sum of the squares of the differences between the predicted and measured selenium concentrations at each time point. The weight of the sum of squares of the physical residuals is set to 1, and the weight of the data fitting loss is set to 0.5. The two parts are then summed to obtain the total loss.
[0027] The gradient descent method is used to iteratively adjust the unknown degradation parameters. The gradient descent method is executed as follows: Calculate the partial derivative of the total loss value with respect to each unknown degradation parameter, obtained through automatic differentiation; subtract the learning rate multiplied by the corresponding partial derivative value from the current value of each unknown degradation parameter to obtain the updated parameter value; the learning rate is initially set to 0.001, and multiplied by 0.9 after every 100 iterations. Repeat the above iterative process, recalculating the total loss value after each iteration. Adjustment is stopped when the total loss value decreases by less than one-thousandth for three consecutive iterations.
[0028] Output the physically constrained calibrated selenium concentration change trajectory. The predicted selenium concentration values obtained by inputting the time variable at each time point in the differentiable computation graph at the point of stop adjustment are arranged chronologically to form a sequence of selenium concentration changes over time; this is the physically constrained calibrated selenium concentration change trajectory. Each value in this trajectory is constrained by the selenium degradation kinetics and is also fitted with measured data.
[0029] The following mathematical formulas are involved in calculating the degradation rate coefficient: ; In the formula, Indicates the degradation rate coefficient. Represents the pre-exponential factor, taking values of , Represents the natural constant. The activation energy index ranges from 40 to 60 kilojoules per mole. The value represents the gas constant, which is 8.314 joules per mole per Kelvin. T represents the weighted temperature value converted to Kelvin. This represents the humidity impact index, with a value ranging from 0.3 to 0.7. This represents the weighted humidity value, expressed as a percentage. The oxygen impact index ranges from 0.1 to 0.4. This indicates the volume percentage of oxygen concentration.
[0030] The following mathematical formulas are involved in calculating the predicted rate of change: ; In the formula, Indicates the predicted rate of change. Indicates the degradation rate coefficient. This represents the predicted selenium concentration at the current moment. This represents the reaction order, ranging from 0.8 to 1.2, with an initial value of 1.0.
[0031] In the Bayesian inversion module, the unknown degradation parameters and the initial selenium concentration are used as random variables to be inferred. The posterior probability distribution of the initial selenium concentration is inverted from the selenium concentration change trajectory, and the mean and confidence interval of the initial selenium concentration at the time of each pallet's entry into the warehouse are output, specifically including: Unknown degradation parameters and initial selenium concentration were assigned to the initial prior distribution. The unknown degradation parameters included the pre-exponential factor, activation energy index, humidity effect index, oxygen effect index, and reaction order within the degradation rate coefficient. A uniform distribution was used for the initial prior distribution, with the pre-exponential factor ranging from 1.0 × 10⁶ to 1.5 × 10⁶, the activation energy index ranging from 40 kJ / mol to 60 kJ / mol, the humidity effect index ranging from 0.3 to 0.7, the oxygen effect index ranging from 0.1 to 0.4, the reaction order ranging from 0.8 to 1.2, and the initial selenium concentration ranging from 0.2 mg / kg to 4.0 mg / kg. Simultaneously, the selenium concentration change trajectory, calibrated with physical constraints, was used as an observation sequence. This sequence contained selenium concentration values at one point every 2 hours from the time of storage entry, totaling 360 points (corresponding to 30 days).
[0032] A Hamiltonian Monte Carlo sampling method with dynamically adjusted jump integration step size is employed to simulate particle motion in phase space. The initial integration step size is set to 0.05, and the simulation steps are 20. Each sampling round generates a set of candidate parameter combinations, each containing the specific values of all the aforementioned unknown degradation parameters and the initial selenium concentration. During sampling, the potential energy function value is calculated based on the current parameter combination. The potential energy function value is equal to the negative logarithmic posterior probability, which is obtained by multiplying the likelihood between the observed sequence and the predicted sequence under the parameter combination by the prior probability. Then, the particle motion in phase space is simulated, updating momentum and position after each simulation step, ultimately yielding the candidate parameter combinations.
[0033] Candidate parameters are accepted or rejected based on the likelihood value between the observed sequence and the predicted sequence under the candidate parameter combination. The likelihood value is calculated as follows: Substitute the candidate parameter combination into the selenium degradation kinetics relationship, predict the selenium concentration value at each time point starting from the initial selenium concentration, and obtain the predicted sequence; calculate the square of the difference between the observed value and the predicted value at each time point, divide by twice the variance, sum the results, and then take a negative exponential function to obtain the likelihood value. The acceptance probability is the smaller value between the ratio of the posterior probability of the candidate parameter combination and the posterior probability of the current parameter combination and 1. A uniform random number between 0 and 1 is generated. If this random number is less than the acceptance probability, the candidate parameter combination is accepted as the new current parameter combination; otherwise, the original parameter combination is retained. This sampling process is repeated 100,000 times.
[0034] The integration step size is dynamically adjusted during sampling. The target acceptance range is set to 0.65 to 0.85. After every 100 sampling rounds, the number of rounds in which candidate parameter combinations were accepted is divided by 100 to obtain the current acceptance rate. If the current acceptance rate is lower than 0.65, the integration step size is multiplied by 0.9; if the current acceptance rate is higher than 0.85, the integration step size is multiplied by 1.1. The adjusted integration step size is used for phase space simulation in the subsequent 100 sampling rounds. When the change in the integration step size is less than 5% in three consecutive adjustment periods (i.e., three consecutive 100-round sampling periods), the current integration step size is locked and not adjusted again in the remaining sampling rounds until 100,000 iterations are completed.
[0035] The initial selenium concentration sample set is extracted from the steady-state distribution. After 100,000 iterations, the first 20,000 iterations are discarded as a warm-up period, and the initial selenium concentration values obtained from the last 80,000 iterations are retained to form the sample set. The arithmetic mean of all values in the sample set is calculated as the mean of the initial selenium concentration. The 95th percentile interval of the sample set is calculated: the values in the sample set are sorted from smallest to largest, the value at the 2.5th percentile is taken as the lower limit, and the value at the 97.5th percentile is taken as the upper limit. The interval between the lower limit and the upper limit is the confidence interval. The mean of the initial selenium concentration and the confidence interval are output for subsequent bias comparison.
[0036] In the deviation comparison module, the initial average selenium concentration is compared with the declared value by the cargo owner. The relative and absolute deviations are calculated, and it is determined whether the declared value falls within the confidence interval. The result of the declaration authenticity judgment is output, including: Obtain the initial average selenium concentration of each pallet after Bayesian inversion, and denote this value as a positive number in milligrams per kilogram. Simultaneously, obtain the selenium content declared by the cargo owner for this batch of tea upon entry into the warehouse, and denote this as the cargo owner's declared value, also in milligrams per kilogram.
[0037] Calculate the absolute deviation. Subtract the declared value from the initial average selenium concentration to obtain the difference. Take the absolute value of this difference; if the difference is negative, take its opposite; if the difference is positive or zero, leave it unchanged. This absolute value is the absolute deviation, expressed in milligrams per kilogram.
[0038] Calculate the relative deviation. Divide the absolute deviation obtained in the previous step by the initial average selenium concentration; the quotient is the relative deviation. The relative deviation is expressed as a percentage. To calculate it, first divide the absolute deviation by the initial average selenium concentration to obtain a decimal, then multiply the decimal by 100% to get the relative deviation as a percentage.
[0039] Simultaneously, a confidence interval for the initial selenium concentration of the pallet is obtained. This confidence interval has a lower limit and an upper limit, both in milligrams per kilogram. The declared value by the cargo owner is compared with the lower limit and the upper limit respectively: if the declared value is less than the lower limit or greater than the upper limit, the declared value is determined to be outside the confidence interval; otherwise, it is determined to be within the confidence interval.
[0040] The following three conditions are used for comprehensive judgment: the first condition is that the absolute deviation is greater than 0.1 mg / kg; the second condition is that the relative deviation is greater than 10%; and the third condition is that the declared value by the cargo owner falls outside the confidence interval. When all three conditions are met, a forged declaration judgment result is output. If any one of the conditions is not met—that is, the absolute deviation is less than or equal to 0.1 mg / kg, the relative deviation is less than or equal to 10%, or the declared value by the cargo owner falls within the confidence interval—a reliable judgment result is output. The output judgment result is stored in plaintext for subsequent anomaly marking and evidence preservation.
[0041] In the evidence storage and marking module, anomaly markers are generated based on the discrimination results. The initial selenium concentration posterior probability distribution, discrimination results, and selenium concentration change trajectory are packaged into evidence storage data and uploaded to the traceability chain. The anomaly markers are then bound to the pallet identifier to complete the dynamic verification and tamper-proof evidence storage for fraudulent declarations. Specifically, this includes: The initial selenium concentration posterior probability distribution is transformed into a discrete probability density sequence. The initial selenium concentration posterior probability distribution consists of 80,000 sampled values, which are arranged in ascending order. Starting from the minimum value, each interval of 0.01 mg / kg is defined as a separate interval. The number of sampled values falling within each interval is counted, and this number is divided by 80,000 to obtain the probability density value for that interval. The midpoint of each interval is taken as the x-axis, and the corresponding probability density value is taken as the y-axis, forming a coordinate point. All the coordinate points obtained from all intervals are arranged in ascending order of their x-coordinates to obtain the discrete probability density sequence.
[0042] The judgment result is encoded as a single-byte flag. There are two possibilities for the judgment result: a forged declaration judgment result or a reliable judgment result. The forged declaration judgment result is encoded as the binary number 00000001, and the reliable judgment result is encoded as the binary number 00000000. This binary number is the single-byte flag.
[0043] The selenium concentration change trajectory was differentially compressed in chronological order. The trajectory included predicted selenium concentration values at 360 points, one point every two hours from the time of storage entry. The value of the first point was retained as a baseline. Starting from the second point, the value of each subsequent point was subtracted from the value of the previous point, yielding the difference. These differences were arranged chronologically, and the baseline value was added to the beginning of the sequence to form the compressed trajectory sequence. Because the selenium concentration changes between adjacent time points are relatively small, the differences are usually much smaller than the original values, thus achieving compression.
[0044] The x and y coordinates of each point in the probability density discrete point sequence are sequentially expanded into decimal numbers, and then concatenated with the single-byte flag and the values in the compressed trajectory sequence to form a continuous binary data string. A secure hash algorithm is then used to calculate a 256-bit hash digest value of a fixed length.
[0045] The hash digest value, the pallet identifier (i.e., the unique digital code pre-engraved on the pallet), and the current timestamp (accurate to the second) are assembled into a proof record. This proof record is broadcast as a transaction to the consensus node network of the traceability chain, and the consensus nodes use a practical Byzantine fault-tolerant algorithm to verify and sort the proof records.
[0046] Once the evidence record is confirmed by more than two-thirds of the consensus nodes, the traceability chain writes it into a new block, generating the block height (i.e., the block's sequential number on the chain) and a timestamp. The block height and timestamp are converted into decimal strings, which are then printed into a QR code pattern affixed to the tray surface using a QR code printing device. Afterward, scanning the QR code allows the reader to read the block height and timestamp, thereby retrieving complete evidence data from the traceability chain and binding the anomaly marker to the tray identifier.
[0047] The working principle of this invention is as follows: First, the selenium concentration time series on the surface of selenium-enriched white tea on each tray and the corresponding storage environment parameter vectors are collected. Then, based on the collected input data, a differentiable computational framework constrained by the selenium degradation kinetics is constructed. The physical residuals are solved automatically by differentiation, and the unknown degradation parameters are iteratively adjusted to output the selenium concentration change trajectory calibrated by physical constraints. Next, the unknown degradation parameters and the initial selenium concentration are used as random variables to be inferred. A Hamiltonian Monte Carlo sampling method with dynamically adjusted integral step size is used to inversely derive the posterior probability distribution of the initial selenium concentration from this trajectory, thus obtaining... The mean and confidence interval of the initial selenium concentration are calculated. Then, the deviation of the initial selenium concentration mean obtained by inversion is compared with the value declared by the cargo owner. The absolute deviation and relative deviation are calculated, and it is determined whether the declared value falls within the confidence interval. When the absolute deviation is greater than 0.1 mg / kg, the relative deviation is greater than 10%, and the declared value is outside the confidence interval, the result of the forged declaration is output. Finally, an anomaly mark is generated based on the judgment result. The posterior probability distribution, the judgment result, and the calibrated selenium concentration change trajectory are packaged into evidence data and uploaded to the traceability chain. The anomaly mark is bound to the pallet identifier to realize dynamic verification and tamper-proof evidence of declaration fraud.
[0048] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A smart monitoring and storage management system for the traceability of selenium-enriched white tea, characterized in that, include: The data acquisition module is used to collect the time series of selenium concentration on the surface of selenium-enriched white tea on each tray, as well as the corresponding storage environment parameter vector, and use the time series and environmental parameter vector as input data. The physical constraint calibration module, based on the input data, constructs a differentiable computational framework with the selenium degradation kinetics as the constraint condition, solves the physical residual under the differentiable computational framework, and minimizes the physical residual by adjusting the unknown degradation parameters within the differentiable computational framework, outputting the selenium concentration change trajectory after physical constraint calibration. The Bayesian inversion module takes the unknown degradation parameters and the initial selenium concentration as random variables to be inferred, and inverts the posterior probability distribution of the initial selenium concentration from the selenium concentration change trajectory, outputting the mean and confidence interval of the initial selenium concentration when each pallet is put into storage. The deviation comparison module compares the initial average selenium concentration with the declared value by the cargo owner, calculates the relative and absolute deviations, determines whether the declared value falls within the credible range, and outputs the declaration authenticity judgment result. The evidence storage and marking module generates anomaly markers based on the discrimination results. It packages the initial selenium concentration posterior probability distribution, discrimination results, and selenium concentration change trajectory into evidence storage data and uploads it to the traceability chain. It also binds the anomaly markers to the pallet identifier to complete the dynamic verification and tamper-proof evidence storage for fraudulent declarations.
2. The intelligent monitoring and storage management system for selenium-enriched white tea storage and traceability as described in claim 1, characterized in that, The process of generating the storage environment parameter vector is as follows: Five temperature and humidity sensor nodes are deployed at the four corners and the center of each tray to simultaneously collect instantaneous temperature and humidity values; Calculate the Euclidean distance between each node and the center of the bottom surface of the tray. Then, take the weighted average of the temperature and humidity values of the five nodes with the reciprocal of the distance as the weight to obtain the weighted temperature and humidity values. The oxygen concentration values collected at the same time are arranged in sequence with the weighted temperature values and weighted humidity values to form a three-dimensional environmental parameter vector.
3. The intelligent monitoring and storage management system for selenium-enriched white tea storage and traceability as described in claim 1, characterized in that, The construction process of the differentiable computation framework is as follows: The selenium concentration time series in the input data is used as the time independent variable. The input is a differentiable computation graph consisting of multiple nonlinear transformation layers in series. Each transformation layer maps the output of the previous layer through an activation function. A physical residual calculation branch is embedded in parallel in the computation graph. The physical residual calculation branch calculates and predicts the rate of change based on the current unknown degradation parameters and the input environmental parameter vector, according to the degradation kinetics of selenium. The actual rate of change of the computational graph output with respect to the time independent variable is obtained using automatic differentiation techniques, and the difference between the actual rate of change and the predicted rate of change is used as the physical residual.
4. The intelligent monitoring and storage management system for selenium-enriched white tea storage and traceability as described in claim 1, characterized in that, The output, a physically constrained calibrated selenium concentration change trajectory, specifically includes: The total loss value is obtained by weighted summing of the squares of the physical residuals and the data fitting loss. The gradient descent method is used to iteratively adjust the unknown degradation parameters in the computation graph, so that the total loss value decreases round by round; When the total loss value decreases by less than 1 / 1000 for three consecutive rounds, the adjustment stops. At this point, the predicted selenium concentration values at each time point output by the differentiable calculation graph are arranged in chronological order to form a selenium concentration change trajectory calibrated by physical constraints.
5. The intelligent monitoring and storage management system for selenium-enriched white tea storage and traceability as described in claim 1, characterized in that, The inversion of the posterior probability distribution of the initial selenium concentration specifically includes: The unknown degradation parameters and the initial selenium concentration are combined to form the initial prior distribution, and the selenium concentration change trajectory calibrated by physical constraints is used as the observation sequence. The Hamiltonian Monte Carlo sampling method with dynamic adjustment of the jump integration step size is adopted to simulate particle motion in phase space, and a set of candidate parameter combinations is generated in each round of sampling. Based on the likelihood value between the observed sequence and the predicted sequence under the combination of candidate parameters, candidate parameters are accepted or rejected. After 100,000 iterations, the system converges to a steady-state distribution. Extract the sample set corresponding to the initial selenium concentration from the steady-state distribution, calculate the mean and 95th percentile interval of the sample set, and output them as the mean and confidence interval of the initial selenium concentration.
6. The intelligent monitoring and storage management system for selenium-enriched white tea storage and traceability as described in claim 5, characterized in that, The specific process of dynamically adjusting the jump integral step size is as follows: Set a target acceptance interval and an initial integration step size, and calculate the current acceptance rate after every 100 rounds of sampling; If the current acceptance rate is lower than the lower limit of the target acceptance range, the integration step size is multiplied by a decay factor less than one; if the current acceptance rate is higher than the upper limit of the target acceptance range, the integration step size is multiplied by a growth factor greater than one. The adjusted integration step size will be used for the phase space simulation of the subsequent 100 rounds of sampling; If the fluctuation range of the integral step size is less than 5% within three consecutive adjustment periods, the current integral step size is locked until the sampling ends.
7. The intelligent monitoring and storage management system for selenium-enriched white tea storage and traceability as described in claim 1, characterized in that, The step of comparing the initial average selenium concentration with the value declared by the cargo owner specifically includes: The absolute deviation is obtained by subtracting the declared value from the initial average selenium concentration; Divide the absolute deviation by the initial average selenium concentration to obtain the relative deviation; Compare the declared value by the cargo owner with the lower and upper limits of the confidence interval. If the declared value is less than the lower limit or greater than the upper limit, it is determined to be outside the interval. When the absolute deviation is greater than 0.1 mg / kg and the relative deviation is greater than 10%, and the declared value falls outside the confidence interval, output the result of the forged declaration judgment; otherwise, output the result of the confidence judgment.
8. The intelligent monitoring and storage management system for selenium-enriched white tea storage and traceability as described in claim 1, characterized in that, The upload to the traceability chain specifically includes: The posterior probability distribution of the initial selenium concentration is transformed into a discrete sequence of probability density points. The discrimination result is encoded into a single-byte flag bit. The selenium concentration change trajectory is differentially compressed in time order to obtain a compressed trajectory sequence. The discrete point sequence, single-byte flag, and compressed trajectory sequence are sequentially concatenated, and a hash algorithm is used to calculate a fixed-length digest value of the concatenated data. The digest value, along with the tray identifier and the current timestamp, is assembled into a record of evidence and broadcast to the consensus nodes of the traceability chain. Once the evidence record is written to the new block, the block height and timestamp are written back to the QR code pasted on the tray surface to complete the binding.