A Method and System for Pumpkin Seed Traceability Management Based on the Internet of Things

By collecting pumpkin seed data streams using a hyperspectral camera, a multi-dimensional quality indicator prediction model is generated and combined with Merkle trees and blockchain evidence storage. This solves the problem of insufficient multi-dimensional feature mining in traditional pumpkin seed quality detection and traceability technologies, and realizes multi-dimensional evaluation and high-precision traceability of pumpkin seed quality.

CN122492037APending Publication Date: 2026-07-31XINJIANG JIUYI HONGLIN TRADING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XINJIANG JIUYI HONGLIN TRADING CO LTD
Filing Date
2026-07-02
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Traditional pumpkin seed quality testing and traceability technologies cannot effectively uncover multi-dimensional quality-related characteristics, have low traceability accuracy, are easily affected by noise, and cannot achieve accurate risk warning.

Method used

Pumpkin seed data streams are collected using a hyperspectral camera, and spatiotemporal features are fused to generate a multi-dimensional quality indicator prediction model. By combining Merkle tree and blockchain notarization technology, multi-dimensional acquisition and spatiotemporal binding of quality indicators are achieved, reducing feature noise interference.

Benefits of technology

It expands the dimensions of quality assessment, improves the credibility and accuracy of traceability data, reduces the impact of feature noise, and achieves reliable traceability of pumpkin seed quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492037A_ABST
    Figure CN122492037A_ABST
Patent Text Reader

Abstract

This application relates to the field of agricultural information technology. It provides a method and system for pumpkin seed traceability management based on the Internet of Things (IoT). The method includes: scanning pumpkin seeds on a conveyor belt with a hyperspectral camera to obtain a raw hyperspectral data stream; fusing the spatiotemporal features of the raw hyperspectral data stream to generate a multi-dimensional quality indicator prediction model; using the multi-dimensional quality indicator prediction model to infer the raw hyperspectral data stream and output a quality indicator dataset; binding the quality indicator dataset with spatiotemporal coordinates to obtain a time-series log of batch quality with timestamps; extracting key features from the time-series log of batch quality with timestamps to obtain a set of key quality feature vectors; constructing a Merkle tree based on the set of key quality feature vectors to generate a lightweight hash digest; and storing the lightweight hash digest in a distributed ledger to complete blockchain notarization, thereby achieving the technical effects of expanding the dimensions of quality assessment, enhancing the credibility of traceability data, and reducing feature noise interference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural information technology, and in particular to a method and system for traceability management of pumpkin seeds based on the Internet of Things. Background Technology

[0002] With increasingly stringent food safety requirements and the deepening development of agricultural product traceability systems, the need for end-to-end quality monitoring and reliable traceability of high-value agricultural products such as pumpkin seeds is becoming increasingly urgent. In industrial processing scenarios, pumpkin seeds on conveyor belts need to be monitored in real time for surface contamination, internal components, and quality evolution trends, and key data should be immutably stored on the blockchain to meet consumers' demands for quality transparency.

[0003] Traditional technologies commonly employ single-vision or spectral single-modal detection methods for quality inspection. However, this approach can only acquire information in a single dimension and cannot uncover multi-dimensional quality correlation features, resulting in significant deficiencies in comprehensive quality assessment. Traditional traceability technologies use fragmented spatiotemporal identifiers to record data, but without establishing a high-precision spatiotemporal coordinate binding mechanism, it is easy to cause misalignment between the detection data and the actual location of the sample, making it difficult to guarantee traceability accuracy. Furthermore, traditional methods only mine time-series data features through basic statistical methods, but they ignore the multi-scale dynamic evolution of quality indicators, and key quality mutation features are easily masked by noise, making it impossible to achieve accurate risk warning. Summary of the Invention

[0004] Therefore, it is necessary to provide a pumpkin seed traceability management method and system based on the Internet of Things to address the above-mentioned technical problems, so as to achieve the technical effects of expanding the dimensions of quality assessment, enhancing the credibility of traceability data, and reducing feature noise interference.

[0005] Firstly, this application provides a method for traceability management of pumpkin seeds based on the Internet of Things, the method comprising:

[0006] The original hyperspectral data stream was obtained by scanning pumpkin seeds on the conveyor belt with a hyperspectral camera; the spatiotemporal characteristics of the original hyperspectral data stream were fused to generate a multi-dimensional quality index prediction model.

[0007] The original hyperspectral data stream is inferred using a multi-dimensional quality index prediction model, and a quality index dataset is output.

[0008] The quality indicator dataset is bound to spatiotemporal coordinates to obtain a batch quality time-series log with timestamps; key features are extracted from the batch quality time-series log with timestamps to obtain a set of key quality feature vectors.

[0009] A Merkle tree is constructed based on a set of key quality feature vectors to generate a lightweight hash digest; the lightweight hash digest is then stored in a distributed ledger to complete blockchain notarization.

[0010] In one embodiment, a multi-dimensional quality index prediction model is used to infer the original hyperspectral data stream and output a quality index dataset, including:

[0011] The original hyperspectral data stream is processed by the spatial perception branch of the multi-dimensional quality index prediction model to generate a surface physical index heat map.

[0012] The spectral analysis branch of the multidimensional quality index prediction model was used to analyze the raw hyperspectral data stream and obtain the quantitative values ​​of internal biochemical indicators.

[0013] Perform cross-modal feature alignment operations to synchronize the thermal map of surface physical indicators with the quantified values ​​of internal biochemical indicators in time and space;

[0014] The quality index dataset is obtained by matrix concatenating the spatiotemporally synchronized surface physical index heatmap and the quantified values ​​of internal biochemical indexes.

[0015] In one embodiment, the spectral analysis branch of a multi-dimensional quality index prediction model is used to analyze the raw hyperspectral data stream to obtain quantified values ​​of internal biochemical indicators, including:

[0016] In the spectral analysis branch, feature band focusing is performed to extract key absorption spectra;

[0017] The deep features of key absorption spectra are analyzed by multi-level residual networks to generate implicit representations of biochemical indicators.

[0018] An attention-weighted regression mechanism is applied to process the implicit representation of biochemical indicators to obtain the quantitative values ​​of internal biochemical indicators.

[0019] In one embodiment, the quality metric dataset is bound to spatiotemporal coordinates to obtain a timestamped batch quality time-series log, including:

[0020] Establish a dynamic batch partitioning strategy and define a time window sequence;

[0021] Within the time window sequence, the quality indicator dataset is spatiotemporally mapped to obtain quality records with spatiotemporal stamps.

[0022] Aggregate all quality records with time stamps within the time window sequence to obtain a batch quality time-series log with timestamps.

[0023] In one embodiment, a multi-dimensional quality index prediction model is generated by fusing the spatiotemporal features of the original hyperspectral data stream, including:

[0024] Spatial features were extracted from the raw hyperspectral data stream to obtain the surface morphological features of the grains;

[0025] Temporal features are extracted from the raw hyperspectral data stream to obtain dynamic quality evolution characteristics;

[0026] By integrating the surface morphological characteristics of grains and the dynamic evolution characteristics of quality, a combined spectral-spatial-temporal characteristic is obtained;

[0027] A multi-task prediction network is trained based on spectral-spatial-temporal joint features to generate a multi-dimensional quality index prediction model.

[0028] In one embodiment, key features are extracted from the timestamped batch quality time-series logs to obtain a set of key quality feature vectors, including:

[0029] Multi-scale time slicing is performed on the batch quality time-series log with timestamps to obtain hierarchical time segments;

[0030] Within each time segment at each level, key quality indicators are selected through a feature importance assessment model to generate a dynamic feature subset;

[0031] Spatiotemporal compression encoding is performed on a dynamic feature subset to obtain a single-segment feature vector;

[0032] Aggregate the single-segment feature vectors of all time segments at all levels to generate a set of key quality feature vectors.

[0033] Secondly, this application also provides an IoT-based pumpkin seed traceability management system, which includes:

[0034] The hyperspectral modeling module is used to scan pumpkin seeds on a conveyor belt with a hyperspectral camera to obtain the raw hyperspectral data stream; the spatiotemporal features of the raw hyperspectral data stream are fused to generate a multi-dimensional quality index prediction model.

[0035] The quality index inference module is used to infer the raw hyperspectral data stream using a multi-dimensional quality index prediction model and output the quality index dataset.

[0036] The spatiotemporal feature extraction module is used to bind the quality indicator dataset with spatiotemporal coordinates to obtain batch quality time-series logs with timestamps; and to extract key features from the batch quality time-series logs with timestamps to obtain a set of key quality feature vectors.

[0037] The blockchain evidence storage module is used to construct a Merkle tree based on a set of key quality feature vectors, generate a lightweight hash digest, and store the lightweight hash digest into a distributed ledger to complete the blockchain evidence storage.

[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods in the first aspect of this application.

[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods in the first aspect of this application.

[0040] This application provides a method and system for pumpkin seed traceability management based on the Internet of Things. It collects raw hyperspectral data streams of pumpkin seeds using a hyperspectral camera, integrates the spatiotemporal features to construct a multi-dimensional quality indicator prediction model, and uses the model to infer the data stream to achieve multi-dimensional acquisition of quality indicators, thereby expanding the dimensions of quality assessment. The quality indicator dataset is bound to spatiotemporal coordinates to obtain a batch quality time-series log with timestamps. Valid information is extracted and filtered through key features to reduce redundant interference and thus reduce the impact of feature noise. A Merkle tree is constructed based on key quality feature vectors to generate a lightweight hash digest, which is then stored in a distributed ledger. Leveraging the data correlation brought by spatiotemporal binding and the evidence storage characteristics of blockchain, the credibility of the traceability data is further improved. Attached Figure Description

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

[0042] Figure 1 A flowchart illustrating a pumpkin seed traceability management method based on the Internet of Things (IoT) in one embodiment of the present invention;

[0043] Figure 2 This is a flowchart illustrating how to bind a quality indicator dataset and spatiotemporal coordinates to obtain a batch quality time-series log with timestamps, as described in one embodiment of the present invention.

[0044] Figure 3 This is a structural diagram of an IoT-based pumpkin seed traceability management system according to one embodiment of the present invention. Detailed Implementation

[0045] To make the above-mentioned objects, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0046] In this application embodiment, an IoT-based pumpkin seed traceability management method and system are provided, applicable to but not limited to quality traceability scenarios in large-scale pumpkin seed processing production lines, traceability control scenarios in the circulation of high-value agricultural products, full-process quality monitoring scenarios in agricultural product processing enterprises, and traceability verification scenarios in food safety regulatory departments.

[0047] In illustrative purposes, the pumpkin seed traceability management method and system based on the Internet of Things provided in this application embodiment can also be applied to other similar oilseed crop processing traceability scenarios, full-chain traceability scenarios for specialty economic crops, quality traceability verification scenarios for agricultural e-commerce platforms, and quality traceability control scenarios for agricultural product supply chains. This is only an example and does not limit the specific application scenarios.

[0048] like Figure 1 As shown, this application provides a pumpkin seed traceability management method based on the Internet of Things, the method including:

[0049] S101: Obtain the raw hyperspectral data stream by scanning pumpkin seeds on the conveyor belt with a hyperspectral camera; fuse the spatiotemporal characteristics of the raw hyperspectral data stream to generate a multi-dimensional quality index prediction model.

[0050] For example, relying on the real-time acquisition capability of a hyperspectral camera, an IoT sensing terminal performs a full-coverage scan of pumpkin seeds during the conveyor belt transport process, simultaneously acquiring spatial morphological information and multi-band spectral temporal information of the pumpkin seeds, integrating various acquired information and completing standardized processing, thereby obtaining the raw hyperspectral data stream.

[0051] For the acquired raw hyperspectral data stream, the IoT sensing terminal disassembles the data structure layer by layer, extracts the spatial and temporal features contained in the data, completes the synergistic fusion of the two types of heterogeneous features, strengthens the correlation and complementarity of information in different dimensions, and realizes the integrated combination of spatiotemporal features.

[0052] By combining the complete spatiotemporal feature data after fusion processing, the IoT sensing terminal performs model training and parameter iteration optimization, establishes the correspondence between hyperspectral data features and pumpkin seed quality indicators, and generates a multi-dimensional quality indicator prediction model through systematic feature learning and model convergence optimization.

[0053] S102: Use a multi-dimensional quality index prediction model to infer the original hyperspectral data stream and output a quality index dataset.

[0054] For example, based on the operating specifications of the multi-dimensional quality index prediction model, the IoT sensing terminal performs input adaptation processing on the acquired raw hyperspectral data stream, completes format correction and redundant information removal, ensures that the data content meets the access standards for model inference, and imports the processed raw hyperspectral data stream completely into the model, relying on the built-in parsing logic to mine the core features related to the quality of pumpkin seeds.

[0055] After feature mining is completed, the multi-dimensional quality indicator prediction model comprehensively extrapolates and assesses the quality of the extracted core features, systematically analyzing various quality parameters of pumpkin seeds. The IoT sensing terminal collects all the analysis results, integrates, organizes, and standardizes them according to a unified standard, outputting a quality indicator dataset.

[0056] S103: Bind the quality indicator dataset with spatiotemporal coordinates to obtain a batch quality time-series log with timestamps; extract key features from the batch quality time-series log with timestamps to obtain a set of key quality feature vectors.

[0057] For example, the IoT sensing terminal acquires the real-time spatiotemporal coordinate information corresponding to the pumpkin seed collection process, establishes a one-to-one correspondence between the quality indicator dataset and the spatiotemporal coordinates, matches a unique spatiotemporal identifier to each set of quality indicator data and adds a timestamp record. On this basis, the IoT sensing terminal classifies and integrates the quality indicator data with spatiotemporal identifiers according to preset batch division rules, sorts out the temporal correlation between data, obtains structured batch quality records, and generates a batch quality time-series log with timestamps.

[0058] The IoT sensing terminal preprocesses the time-series logs of batch quality data with timestamps, removing invalid and interfering information and standardizing the data format to provide a standardized data foundation for feature extraction. Based on a pre-defined feature filtering mechanism, key information strongly correlated with the core quality of pumpkin seeds is identified and extracted from the time-series logs. The extracted, scattered key information is then systematically integrated and feature-encoded to obtain a set of key quality feature vectors.

[0059] S104: Construct a Merkle tree based on a set of key quality feature vectors to generate a lightweight hash digest; store the lightweight hash digest in a distributed ledger to complete blockchain notarization.

[0060] For example, based on the construction specifications of Merkle trees, the IoT sensing terminal performs standardized and regularized processing on a set of key quality feature vectors. The feature vectors are then grouped hierarchically according to preset rules. The underlying hash value of each group of feature data is calculated sequentially. Based on the underlying hash value, recursive calculations are performed layer by layer upwards to generate the hash of the parent node at each level, gradually building a complete Merkle tree structure. Once the Merkle tree is constructed, the IoT sensing terminal extracts the hash value of the root node of the tree and determines it as a lightweight hash digest, ensuring that the digest can comprehensively map the core information of a set of key quality feature vectors.

[0061] After generating the lightweight hash digest, the IoT sensing terminal establishes a secure and stable communication connection with the blockchain network. It performs format verification and validity checks on the generated lightweight hash digest before transmission to ensure the digest data meets the storage requirements of the distributed ledger. Once verification is successful, the IoT sensing terminal uploads the lightweight hash digest to the blockchain's distributed ledger, awaiting data synchronization and consensus verification from all ledger nodes. When the lightweight hash digest is confirmed to have been successfully written to the distributed ledger, blockchain notarization is complete.

[0062] One embodiment of this application provides a pumpkin seed traceability management method based on the Internet of Things. It collects raw hyperspectral data streams of pumpkin seeds using a hyperspectral camera, integrates the spatiotemporal features to construct a multi-dimensional quality indicator prediction model, and uses the model to infer the data stream to achieve multi-dimensional acquisition of quality indicators, thereby expanding the dimensions of quality assessment. The quality indicator dataset is bound to spatiotemporal coordinates to obtain a batch quality time-series log with timestamps. Valid information is extracted and filtered through key features to reduce redundant interference, thereby reducing the impact of feature noise. A Merkle tree is constructed based on key quality feature vectors to generate a lightweight hash digest, which is then stored in a distributed ledger. Relying on the data correlation brought by spatiotemporal binding and the evidence storage characteristics of blockchain, the credibility of the traceability data is further improved.

[0063] In one embodiment, a multi-dimensional quality index prediction model is used to infer the original hyperspectral data stream and output a quality index dataset, including:

[0064] (1) The original hyperspectral data stream is processed by the spatial perception branch of the multidimensional quality index prediction model to generate a surface physical index heat map.

[0065] For example, the IoT sensing terminal inputs the raw hyperspectral data stream into the spatial sensing branch of the multi-dimensional quality index prediction model. This branch decomposes the two-dimensional spatial imaging information in the raw hyperspectral data stream layer by layer through convolution operations, extracting spatial features corresponding to the pumpkin seed appearance outline, surface texture roughness, and external damage degree in each region. Then, combined with a preset surface physical property evaluation system, feature weights are assigned to all pixel units and quality levels are divided. The high-dimensional spatial features are mapped into an intuitive heatmap form through a visualization rendering algorithm, generating a complete surface physical index heatmap. The calculation formula for the surface physical index heatmap is as follows:

[0066]

[0067] In the formula, Thermograph representing surface physical properties Represents the raw hyperspectral data stream. Represents spatial feature convolution extraction operation, Represents the convolution kernel weight matrix. This represents the convolution bias vector. Represents the pixel quality weighting coefficient. Represents spatial feature vectors. Representative feature normalization operation, This represents the normalization function for pixel values ​​in a heatmap.

[0068] The spatial perception branch of the multi-dimensional quality index prediction model includes a spatial feature convolution extraction unit, a pixel quality weight allocation unit, a feature normalization processing unit, and a heatmap visualization rendering unit.

[0069] (2) The original hyperspectral data stream was analyzed by using the spectral analysis branch of the multidimensional quality index prediction model to obtain the quantitative values ​​of internal biochemical indicators.

[0070] For example, the IoT sensing terminal synchronously transmits the original hyperspectral data stream to the spectral analysis branch of the multi-dimensional quality index prediction model. This branch activates a feature band focusing mechanism, and based on the spectral response law of the internal biochemical components of pumpkin seeds, it selects key absorption spectra that are strongly correlated with biochemical indicators. Through a multi-level residual network, it mines the deep features of the key absorption spectra and generates an implicit representation of the biochemical indicators. Then, it applies an attention-weighted regression mechanism to quantify the implicit representation and obtain the quantified values ​​of the internal biochemical indicators.

[0071] The spectral analysis branch of the multi-dimensional quality index prediction model includes a feature band focusing and screening unit, a multi-level residual network analysis unit, an attention weight allocation unit, and a biochemical index quantitative regression unit.

[0072] (3) Perform cross-modal feature alignment operation to synchronize the surface physical index thermal map with the internal biochemical index quantification value in time and space.

[0073] For example, the IoT sensing terminal initiates a cross-modal feature alignment operation, synchronously collecting the spatial positioning reference of the surface physical index heat map, the collection time stamp, and the sampling coordinates and time record identifier of the internal biochemical index quantification value. The spatial offset and temporal difference of the two types of data are quantified through a spatiotemporal deviation calculation algorithm. Based on the deviation results, the coordinates of the surface physical index heat map are calibrated, and the temporal synchronization correction of the internal biochemical index quantification value is performed. A unified spatiotemporal reference system is established to achieve full-domain spatiotemporal synchronization between the surface physical index heat map and the internal biochemical index quantification value.

[0074] (4) The thermal map of the spatiotemporally synchronized surface physical indicators and the quantitative values ​​of the internal biochemical indicators are matrix-stitched together to obtain the quality indicator dataset.

[0075] For example, the IoT sensing terminal retrieves the spatiotemporally synchronized surface physical indicator heat map and internal biochemical indicator quantification values, and uniformly adapts and adjusts the matrix dimensions and data arrangement format of the two types of data. The two-dimensional visual matrix of the surface physical indicator heat map is converted into a high-dimensional feature vector, and the one-dimensional numerical vector of the internal biochemical indicator quantification values ​​is expanded into a matrix form with matching dimensions. The matrix splicing operation is performed according to the preset fusion dimension order to integrate all the effective information of the appearance physical detection and internal biochemical detection. The spliced ​​matrix is ​​then structurally encapsulated and standardized to obtain the quality indicator dataset.

[0076] In one embodiment, the spectral analysis branch of a multi-dimensional quality index prediction model is used to analyze the raw hyperspectral data stream to obtain quantified values ​​of internal biochemical indicators, including:

[0077] (1) Implement characteristic band focusing in the spectral analysis branch to extract key absorption spectra.

[0078] For example, the IoT sensing terminal performs feature band focusing in the spectral analysis branch of the multi-dimensional quality index prediction model. Combining the unique spectral response patterns of various internal biochemical substances in pumpkin seeds, it delineates the effective analysis interval of the original hyperspectral data stream and filters out invalid signals corresponding to redundant interference bands. Relying on adaptive band filtering logic to compress useless data dimensions, it locks in the core spectral intervals highly correlated with biochemical components, completing the filtering and integration of effective signals. Key absorption spectra are extracted from the original hyperspectral data stream, where the calculation formula for the key absorption spectrum is:

[0079]

[0080] In the formula, Represents the key absorption spectrum, This represents the spectral response signal of the original hyperspectral data stream in the corresponding characteristic band. The correlation weight coefficient represents a single set of characteristic bands. The wavelength parameter representing the effective screening band. The critical threshold for band selection is represented. Represents a nonlinear constraint activation function. This represents the total number of feature bands that have been completely screened.

[0081] The characteristic band focusing mechanism includes step-by-step operations such as spectral range delineation, band weight assignment, invalid signal suppression, and effective spectral signal aggregation.

[0082] (2) The depth characteristics of key absorption spectra are analyzed by multi-level residual networks to generate implicit representations of biochemical indicators.

[0083] For example, the IoT sensing terminal inputs the extracted key absorption spectrum completely into a multi-level residual network. Relying on the network's multi-level progressive feature extraction structure, it performs deep analysis of the spectral information layer by layer. The residual connection method compensates for information loss during deep feature transmission, and a multi-level feature fusion strategy integrates shallow detail information with deep abstract information. This continuously mines the deep correlation features hidden within the key absorption spectrum, completing feature mapping and optimization layer by layer, and stably generating implicit representations of biochemical indicators. The calculation formula for the implicit representation of biochemical indicators is as follows:

[0084]

[0085] In the formula, This represents the implicit representation of biochemical indicators. Represents the key absorption spectrum, Representing the residual network Layer feature mapping operation, This represents the residual difference compensation operation. This represents the correction amount for the mean of a single-layer feature. Represents the adjustment coefficient for multi-level feature fusion. This represents the number of stacking levels in the residual network. This represents a non-linear activation operation.

[0086] Among them, the multi-level residual network includes a progressive spectral feature mapping structure, a cross-level residual information transmission structure, a multi-scale feature fusion and control structure, and an abstract feature nonlinear activation structure.

[0087] (3) Apply attention-weighted regression mechanism to process the implicit representation of biochemical indicators and obtain the quantitative values ​​of internal biochemical indicators.

[0088] For example, the IoT sensing terminal introduces an attention-weighted regression mechanism for the implicit representation of the generated biochemical indicators. This mechanism uniformly calculates the correlation contribution of each implicit feature and assigns differentiated attention weights based on the strength of feature correlation. Normalization is used to reasonably constrain the weight values, and regression mapping is combined to complete the transformation and fitting of feature dimensions. Global bias parameters are added to correct overall computational errors, completing the conversion from implicit features to concrete indicators and obtaining the quantified values ​​of the internal biochemical indicators.

[0089] like Figure 2 As shown, by binding the quality metric dataset with spatiotemporal coordinates, a batch quality time-series log with timestamps is obtained, including:

[0090] S201: Establish a dynamic batch partitioning strategy and define a time window sequence.

[0091] For example, based on the collection frequency of quality index data and the actual needs of pumpkin seed detection scenarios, the IoT sensing terminal establishes a dynamic batch division strategy, analyzes the traffic distribution pattern of historical data collection, determines the adaptive adjustment threshold of the time window length, sets the time definition rules for the start and end of the window, and dynamically optimizes the window interval in combination with the real-time data volume of the detection task to generate an ordered time window sequence, providing a unified framework for subsequent batch data division.

[0092]

[0093]

[0094]

[0095] In the formula, Represents a time window series. Representing the A time window, Representing the The start time of each window, Representing the The end time of each window. Represents the total number of time windows. Represents the baseline window length. Representing the The amount of prediction data corresponding to each window Represents the historical average data volume. Represents the threshold coefficient for data volume. This represents an adaptively adjusted activation function.

[0096] The dynamic batch partitioning strategy includes a data flow distribution analysis unit, a window length adaptive adjustment unit, a time window boundary definition unit, and a sequence generation optimization unit.

[0097] S202: Within the time window sequence, perform spatiotemporal coordinate mapping on the quality indicator dataset to obtain quality records with spatiotemporal stamps.

[0098] For example, within the generated time window sequence framework, the IoT sensing terminal performs spatiotemporal coordinate mapping on the quality indicator dataset, synchronously retrieves the spatial positioning parameters (including detection area coordinates and sampling point location information) and collection time point data corresponding to each quality indicator data collection, and then establishes a one-to-one correspondence rule between the quality indicator data and the spatiotemporal parameters. It matches a unique spatial coordinate identifier and time record identifier for each quality indicator data, combines them to form a complete spatiotemporal stamp, and obtains a quality record with a unique spatiotemporal stamp for each data.

[0099] The spatiotemporal coordinate mapping operation includes a spatial positioning parameter acquisition unit, an acquisition time point synchronization unit, a data-spatiotemporal parameter association unit, and a spatiotemporal stamp encoding generation unit.

[0100] S203: Aggregate all quality records with time stamps within the time window sequence to obtain a batch quality time-series log with timestamps.

[0101] For example, after generating time-stamped quality records within a single time window, the IoT sensing terminal performs record aggregation. Following the time window sequence, it collects all generated time-stamped quality records within each window one by one. Based on the timestamp information of each record, it performs a time-series sorting operation on the records within the window, removing invalid records that are duplicated or have abnormal data. A unified batch timestamp is assigned to each time window (based on the window's start or end time). The sorted valid records are then integrated in a structured format to form a time-series log of batch quality data containing batch identifiers, time-series information, and complete quality data. The calculation formula for the batch quality time-series log is as follows:

[0102]

[0103] In the formula, Representing the Batch quality time-series logs with timestamps corresponding to each time window. Representing the A time window, Representing the Quality records of striped spatiotemporal stamps, Representing the The time point of collection for each record. This represents the function for filtering invalid records. Represents a time-series sorting function. Representing the A unified timestamp for each batch This represents a structured integration function.

[0104] In one embodiment, a multi-dimensional quality index prediction model is generated by fusing the spatiotemporal features of the original hyperspectral data stream, including:

[0105] (1) Extract spatial features from the original hyperspectral data stream to obtain the surface morphological features of the grains.

[0106] For example, the IoT sensing terminal performs a full-domain hierarchical decomposition of the two-dimensional spatial imaging information carried by the original hyperspectral data stream. Relying on a dedicated spatial feature mining algorithm, it analyzes the texture details, contour boundaries, and surface structure information within the imaging image. It filters out feature interference caused by imaging noise and invalid stray information layer by layer. The purified spatially effective information undergoes dimensional compression and feature condensation processing to mine the inherent attribute information corresponding to the grain's appearance structure, stably obtaining the grain surface morphology features. The calculation formula for the grain surface morphology features is as follows:

[0107]

[0108] In the formula, Represents the surface morphological characteristics of the grain. Represents the raw hyperspectral data stream. The convolution kernel matrix represents spatial feature mining. Represents spatial convolution correlation operation. The bias vector for spatial feature extraction represents the vector. This represents a nonlinear purification function that reflects spatial characteristics.

[0109] (2) Extract time-series features from the original hyperspectral data stream to obtain the dynamic evolution features of quality.

[0110] For example, the IoT sensing terminal intercepts the time-series data formed by the continuous acquisition of raw hyperspectral data streams, sorts out the continuous change pattern of the spectral signal according to the order of detection, captures the fluctuation trend of the spectral signal at different acquisition stages through time-series correlation analysis algorithm, identifies the subtle changes in grain quality status over time, suppresses abnormal features caused by random fluctuations in the time-series data, and performs deep abstraction and feature condensation processing on the continuous time-series information to fully obtain the dynamic evolution characteristics of quality. The calculation formula for the dynamic evolution characteristics of quality is as follows:

[0111]

[0112] In the formula, It represents the dynamic evolution characteristics of quality. This represents the spectral data of the original hyperspectral data stream at the corresponding time node. Represents the correlation weight matrix of time-series features. Represents the complete set of detection time sequences. A function that represents the abstract and condensed characteristics of time series.

[0113] (3) By integrating the surface morphological characteristics of grains and the dynamic evolution characteristics of quality, a combined spectral-spatial-temporal characteristic is obtained.

[0114] For example, the IoT sensing terminal unifies and standardizes the feature dimensions and data distribution of the surface morphology and quality dynamic evolution of grains. It eliminates the inter-domain differences between spatial and temporal features by relying on cross-domain feature fusion operations. It establishes multi-dimensional information correlation by combining the intrinsic spectral features of the original hyperspectral data stream. It dynamically balances the contribution weights of different types of features, realizes the deep cross-linking and integration of spatial, temporal and spectral information, and generates spectral-spatial-temporal joint features in an integrated manner.

[0115] (4) A multi-task prediction network is trained based on the joint features of spectral-spatial-temporal features to generate a multi-dimensional quality index prediction model.

[0116] For example, the IoT sensing terminal inputs the integrated spectral-spatial-temporal joint features into the multi-task prediction network. Based on the multi-dimensional quality detection requirements of grains, it sets diversified training supervision objectives. Through an iterative training mechanism, it continuously adjusts the internal parameter weights and global bias content of the multi-task prediction network, continuously reduces the error value between the network output results and the real quality indicators, gradually strengthens the network's comprehensive reasoning ability for multiple quality indicators, completes the full training iteration of the multi-task prediction network, and generates a multi-dimensional quality indicator prediction model.

[0117] In one embodiment, key features are extracted from the timestamped batch quality time-series logs to obtain a set of key quality feature vectors, including:

[0118] (1) Perform multi-scale time slicing on the batch quality time-series log with timestamps to obtain hierarchical time segments.

[0119] For example, the IoT sensing terminal reads the stored batch quality time-series logs with timestamps. Combining the inherent quality change cycle and time-series data distribution characteristics of the batch quality time-series logs, it divides time intervals into differentiated granularities based on multi-scale time-series segmentation logic. Following a coarse-to-fine hierarchical segmentation logic, the IoT sensing terminal sequentially completes the segmentation of large-scale time intervals, medium-scale time intervals, and fine-scale time intervals. For each segmented time interval, boundary correction and time range locking are performed, completing the multi-scale time slicing processing of the timestamped batch quality time-series logs to obtain hierarchical time segments.

[0120] (2) Within each time segment of the hierarchy, key quality indicators are selected through the feature importance assessment model to generate a dynamic feature subset.

[0121] For example, the IoT sensing terminal inputs all the time segments of the completed hierarchy into the feature importance assessment model one by one. The feature importance assessment model quantifies the correlation between various quality indicators and time-series log data, and determines the effective contribution ratio of a single quality indicator based on the quantification results.

[0122] The IoT sensing terminal retains the core indicators that play a key role in quality evaluation, removes invalid indicators that have information overlap and interference, and adaptively adjusts the indicator selection range based on the differences in data characteristics of different time segments to complete the differentiated indicator selection output and generate a dynamic feature subset that corresponds one-to-one with each time segment.

[0123] (3) Spatiotemporal compression coding is performed on the dynamic feature subset to obtain a single fragment feature vector.

[0124] For example, the IoT sensing terminal captures a dynamic feature subset matched by a single-level time segment, binds the spatial location information and time sequence record information associated with the dynamic feature subset, and applies dimensionality reduction constraints to the high-dimensional original features based on lightweight spatiotemporal compression coding rules.

[0125] The IoT sensing terminal uniformly resolves the differences in data distribution among different categories of features, integrates the correlation information of spatial and temporal dimensions, completes the unified representation transformation of multi-source heterogeneous features through fixed coding mapping rules, realizes the compact expression of dynamic feature subsets, and obtains a single fragment feature vector.

[0126] (4) Aggregate the single segment feature vectors of all time segments at all levels to generate a set of key quality feature vectors.

[0127] For example, the IoT sensing terminal aggregates the single-segment feature vectors generated from all time segments at all levels, and uniformly adapts and corrects the matrix dimensions and data arrangement format of all single-segment feature vectors to eliminate the feature dimension deviation caused by multi-scale time series division.

[0128] The IoT sensing terminal strictly follows the temporal sequence of hierarchical time segments to complete the orderly arrangement of features. Through cross-scale feature aggregation operations, it integrates multi-segment feature information to complete the normalization, fusion and unified encapsulation of global features, resulting in a set of key quality feature vectors.

[0129] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0130] In one embodiment, such as Figure 3 As shown, this application also provides an IoT-based pumpkin seed traceability management system 300, which includes:

[0131] The hyperspectral modeling module 301 is used to scan pumpkin seeds on the conveyor belt with a hyperspectral camera to obtain the original hyperspectral data stream; and to fuse the spatiotemporal features of the original hyperspectral data stream to generate a multi-dimensional quality index prediction model.

[0132] The quality index inference module 302 is used to infer the original hyperspectral data stream using a multi-dimensional quality index prediction model and output the quality index dataset.

[0133] The spatiotemporal feature extraction module 303 is used to bind the quality indicator dataset and spatiotemporal coordinates to obtain a batch quality time-series log with timestamps; and to extract key features from the batch quality time-series log with timestamps to obtain a set of key quality feature vectors.

[0134] The blockchain evidence storage module 304 is used to construct a Merkle tree based on a set of key quality feature vectors, generate a lightweight hash digest, and store the lightweight hash digest into a distributed ledger to complete the blockchain evidence storage.

[0135] Specifically, the IoT sensing terminal includes a hyperspectral modeling module 301, a quality index inference module 302, a spatiotemporal feature extraction module 303, and a blockchain evidence storage module 304.

[0136] The hyperspectral modeling module, equipped with a hyperspectral device, continuously scans and collects data on the pumpkin seeds transported on the conveyor belt, capturing complete spectral response information corresponding to the surface and internal components of the seeds. It then performs signal purification and format standardization on the real-time acquired raw spectral information, stably outputting a standardized raw hyperspectral data stream. The module further mines the spatial and temporal dimensions embedded within the raw hyperspectral data stream, achieving deep fusion and correlation of multiple heterogeneous features. Based on the fused joint features, it completes iterative network training and parameter optimization, ultimately generating a multi-dimensional quality indicator prediction model adapted to pumpkin seed quality testing scenarios.

[0137] The quality index inference module retrieves the multi-dimensional quality index prediction model generated by the hyperspectral modeling module and inputs the real-time acquired raw hyperspectral data stream completely into the multi-dimensional quality index prediction model. The quality index inference module utilizes the model's built-in dual-branch analytical structure to complete spatial information analysis and spectral information analysis respectively, uniformly completing the spatiotemporal calibration and dimensional adaptation of the two types of heterogeneous detection data. Following standardized data fusion rules, it integrates appearance inspection information and biochemical inspection information, systematically completing the overall encapsulation of multi-dimensional quality information and outputting a standardized quality index dataset.

[0138] The spatiotemporal feature extraction module retrieves the quality indicator dataset, establishes a one-to-one binding relationship between the quality indicator dataset and the actual spatiotemporal coordinates on site, divides continuous time series intervals based on adaptive batch segmentation rules, collects all related data records within each time series interval, organizes the time series arrangement, and uniformly adds batch time identifiers to generate standardized and complete batch quality time series logs with timestamps. The spatiotemporal feature extraction module performs multi-scale time series segmentation on the timestamped batch quality time series logs, progressively completing the selection of core quality indicators, spatiotemporal information compression encoding, and orderly aggregation of fragment features, refining deep-seated correlation information layer by layer to obtain a set of key quality feature vectors.

[0139] The blockchain evidence storage module receives a set of key quality feature vectors output by the spatiotemporal feature extraction module. Following the rules of the encrypted tree structure construction, it performs node data calculations and associations layer by layer to build a complete tree topology. It then optimizes the top-level aggregated information to generate an immutable, lightweight hash digest. The module synchronously pushes the lightweight hash digest to the distributed ledger network system, adhering to the distributed node consensus mechanism to verify data legitimacy. This achieves distributed synchronous storage and permanent retention of the digest information, completing the blockchain evidence storage operation for pumpkin seed traceability data.

[0140] The quality index inference module 302 is also used for:

[0141] The original hyperspectral data stream is processed by the spatial perception branch of the multi-dimensional quality index prediction model to generate a surface physical index heat map.

[0142] The spectral analysis branch of the multidimensional quality index prediction model was used to analyze the raw hyperspectral data stream and obtain the quantitative values ​​of internal biochemical indicators.

[0143] Perform cross-modal feature alignment operations to synchronize the thermal map of surface physical indicators with the quantified values ​​of internal biochemical indicators in time and space;

[0144] The quality index dataset is obtained by matrix concatenating the spatiotemporally synchronized surface physical index heatmap and the quantified values ​​of internal biochemical indexes.

[0145] The quality index inference module 302 is also used for:

[0146] In the spectral analysis branch, feature band focusing is performed to extract key absorption spectra;

[0147] The deep features of key absorption spectra are analyzed by multi-level residual networks to generate implicit representations of biochemical indicators.

[0148] An attention-weighted regression mechanism is applied to process the implicit representation of biochemical indicators to obtain the quantitative values ​​of internal biochemical indicators.

[0149] The spatiotemporal feature extraction module 303 is also used for:

[0150] Establish a dynamic batch partitioning strategy and define a time window sequence;

[0151] Within the time window sequence, the quality indicator dataset is spatiotemporally mapped to obtain quality records with spatiotemporal stamps.

[0152] Aggregate all quality records with time stamps within the time window sequence to obtain a batch quality time-series log with timestamps.

[0153] The hyperspectral modeling module 301 is also used for:

[0154] Spatial features were extracted from the raw hyperspectral data stream to obtain the surface morphological features of the grains;

[0155] Temporal features are extracted from the raw hyperspectral data stream to obtain dynamic quality evolution characteristics;

[0156] By integrating the surface morphological characteristics of grains and the dynamic evolution characteristics of quality, a combined spectral-spatial-temporal characteristic is obtained;

[0157] A multi-task prediction network is trained based on spectral-spatial-temporal joint features to generate a multi-dimensional quality index prediction model.

[0158] The spatiotemporal feature extraction module 303 is also used for:

[0159] Multi-scale time slicing is performed on the batch quality time-series log with timestamps to obtain hierarchical time segments;

[0160] Within each time segment at each level, key quality indicators are selected through a feature importance assessment model to generate a dynamic feature subset;

[0161] Spatiotemporal compression encoding is performed on a dynamic feature subset to obtain a single-segment feature vector;

[0162] Aggregate the single-segment feature vectors of all time segments at all levels to generate a set of key quality feature vectors.

[0163] In one embodiment, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0164] In one embodiment, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.

[0165] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0166] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. A pumpkin seed traceability management method based on the Internet of Things, characterized in that, The method includes: Pumpkin seeds on a conveyor belt are scanned by a hyperspectral camera to obtain the original hyperspectral data stream; the spatiotemporal characteristics of the original hyperspectral data stream are fused to generate a multi-dimensional quality index prediction model. The original hyperspectral data stream is inferred using the multi-dimensional quality index prediction model, and a quality index dataset is output. The quality indicator dataset is bound to spatiotemporal coordinates to obtain a batch quality time-series log with timestamps; key features are extracted from the batch quality time-series log with timestamps to obtain a set of key quality feature vectors. A Merkle tree is constructed based on the set of key quality feature vectors to generate a lightweight hash digest; the lightweight hash digest is then stored in a distributed ledger to complete blockchain notarization. 2.The pumpkin seed traceability management method based on the Internet of Things according to claim 1, characterized in that, The process of using the multi-dimensional quality index prediction model to infer the original hyperspectral data stream and output a quality index dataset includes: The original hyperspectral data stream is processed by the spatial perception branch of the multi-dimensional quality index prediction model to generate a surface physical index heat map. The original hyperspectral data stream was analyzed using the spectral analysis branch of the multidimensional quality index prediction model to obtain the quantitative values ​​of internal biochemical indicators. Perform cross-modal feature alignment operation to synchronize the surface physical index thermogram with the quantified values ​​of the internal biochemical index in time and space; The quality index dataset is obtained by matrix concatenating the spatiotemporally synchronized surface physical index heatmap and the internal biochemical index quantification values. 3.The pumpkin seed traceability management method based on the Internet of Things according to claim 2, characterized in that, The process of analyzing the original hyperspectral data stream using the spectral analysis branch of the multi-dimensional quality index prediction model to obtain quantified values ​​of internal biochemical indicators includes: In the spectral analysis branch, characteristic band focusing is performed to extract key absorption spectra; The deep features of the key absorption spectra are analyzed by using a multi-level residual network to generate implicit representations of biochemical indicators. An attention-weighted regression mechanism is applied to process the implicit representation of the biochemical indicators to obtain the quantitative values ​​of the internal biochemical indicators.

4. The method for traceability management of pumpkin seeds based on the Internet of Things according to claim 1, characterized in that, The step of binding the quality indicator dataset with spatiotemporal coordinates to obtain a batch quality time-series log with timestamps includes: Establish a dynamic batch partitioning strategy and define a time window sequence; Within the time window sequence, the quality indicator dataset is spatiotemporally mapped to obtain quality records with spatiotemporal stamps. All the quality records with time stamps within the time window sequence are aggregated to obtain the batch quality time-series log with timestamps.

5. The method for traceability management of pumpkin seeds based on the Internet of Things according to claim 1, characterized in that, The process of fusing the spatiotemporal features of the original hyperspectral data stream to generate a multi-dimensional quality index prediction model includes: Spatial features are extracted from the original hyperspectral data stream to obtain the surface morphological features of the grains; Temporal features are extracted from the original hyperspectral data stream to obtain dynamic quality evolution features; By integrating the surface morphological characteristics of the grains and the dynamic evolution characteristics of quality, a combined spectral-spatial-temporal characteristic is obtained. The multi-task prediction network is trained based on the spectral-spatial-temporal joint features to generate the multi-dimensional quality index prediction model.

6. The method for traceability management of pumpkin seeds based on the Internet of Things according to claim 1, characterized in that, The key feature extraction of the timestamped batch quality time-series log yields a set of key quality feature vectors, including: Multi-scale time slicing is performed on the timestamped batch quality time-series log to obtain hierarchical time segments; Within each of the aforementioned time segments, key quality indicators are selected using a feature importance evaluation model to generate a dynamic feature subset; Spatiotemporal compression encoding is performed on the dynamic feature subset to obtain a single segment feature vector; The feature vectors of each single segment from all the time segments at the aforementioned levels are aggregated to generate the set of key quality feature vectors.

7. A pumpkin seed traceability management system based on the Internet of Things, characterized in that, The system includes: The hyperspectral modeling module is used to scan pumpkin seeds on a conveyor belt using a hyperspectral camera to obtain the raw hyperspectral data stream; and to fuse the spatiotemporal features of the raw hyperspectral data stream to generate a multi-dimensional quality index prediction model. The quality index inference module is used to infer the original hyperspectral data stream using the multi-dimensional quality index prediction model and output the quality index dataset. The spatiotemporal feature extraction module is used to bind the quality indicator dataset with spatiotemporal coordinates to obtain a batch quality time-series log with timestamps; and to extract key features from the batch quality time-series log with timestamps to obtain a set of key quality feature vectors. The blockchain evidence storage module is used to construct a Merkle tree based on the set of key quality feature vectors, generate a lightweight hash digest, and store the lightweight hash digest into a distributed ledger to complete the blockchain evidence storage.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the pumpkin seed traceability management method based on the Internet of Things as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the pumpkin seed traceability management method based on the Internet of Things as described in any one of claims 1 to 6.