Integrity verification and quality evaluation method before agricultural Internet of Things data uplink

By combining a dual-branch filling network and a multi-task deep neural network model, the problem of integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain is solved, enabling refined verification and assessment of data and improving the credibility of blockchain applications and the reliability of data.

CN121456920AActive Publication Date: 2026-02-03QINGDAO AGRI UNIV

Patent Information

Application Number
CN202610007551.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-06
Publication Date
2026-02-03
Estimated Expiration
2046-01-06

AI Technical Summary

Technical Problem

Existing agricultural IoT data processing methods lack systematic, end-to-end integrity verification and quality assessment before data is uploaded to the blockchain. This makes it difficult to handle multi-source heterogeneous data in complex agricultural environments, and there is a lack of effective identification mechanisms for data duplication, forgery, or abnormal uploads, which limits the trustworthy application value of blockchain in agricultural IoT scenarios.

Method used

A dual-branch approach is used to fill in the missing global statistical features and device-related pattern features of the network synchronous learning data, and a multi-task deep neural network model is constructed. The multi-task deep neural network model realizes the overall quality scoring at the sample level, the prediction of sensor-level anomaly confidence, and the generation of data fingerprints. Supervised training is carried out by combining a composite loss function to realize the integrity verification and quality assessment of data.

Benefits of technology

It enables refined, interpretable integrity verification and quality assessment of agricultural IoT data, supports trusted on-chain data storage, enhances the trustworthy application capability of blockchain in agricultural IoT scenarios, and reduces the risks of storing and managing erroneous information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456920A_ABST
    Figure CN121456920A_ABST
Patent Text Reader

Abstract

The invention relates to an integrity verification and quality evaluation method before agricultural Internet of Things data uploading, and belongs to the technical field of artificial intelligence and block chains. The method comprises the following steps: collecting agricultural Internet of Things data and constructing a data set; constructing a complete feature vector by adopting a double-branch filling network; generating a quality label for each sample; an integrity verification and quality evaluation model based on a deep neural network is constructed, and sample-level overall quality scoring, sensor-level abnormal confidence and data fingerprint generation are realized; performing verification and evaluation by setting thresholds of three prediction results; performing supervised training on the model through a composite loss function; and performing integrity verification and quality evaluation on to-be-evaluated agricultural Internet of Things data by adopting the trained model, and realizing reliable chaining, secure storage and trusted application of the agricultural Internet of Things data to a block chain for data samples which pass the integrity verification and have the overall quality score reaching the standard. The prediction precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence and blockchain technology, specifically relating to a method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain. Background Technology

[0002] With the continuous integration of IoT, blockchain, and AI technologies in smart agriculture, applications such as environmental monitoring, crop growth management, agricultural product traceability, and agricultural insurance in agricultural production processes place higher demands on the authenticity, integrity, and traceability of data. Agricultural IoT systems are typically deployed in complex environments such as greenhouses, open fields, or livestock farms, relying on multiple types of sensors to continuously collect soil, meteorological, and crop physiological data. This data is gradually becoming a crucial basis for agricultural decision-making, supervision, and value allocation. Especially in blockchain applications, once data is written onto the chain, it possesses the characteristic of immutability; therefore, the quality of the data uploaded directly determines the credibility and practical application value of the information on the chain. However, affected by factors such as natural environmental fluctuations, sensor aging, unstable communication links, and limited power supply, agricultural IoT data commonly suffers from problems such as random missing data, continuous missing data, abnormal drift, and noise interference during actual collection. Existing systems often only perform simple rule verification or basic cleaning before uploading data to the chain, assuming that pre-processed data is trustworthy, lacking a refined evaluation mechanism for data integrity and quality. Once low-quality or even anomalous data is written to the blockchain, it not only results in the permanent storage of erroneous information but may also lead to distorted traceability, insurance claims disputes, or errors in automated decision-making, posing significant economic and managerial risks. Existing methods still have the following drawbacks: Existing agricultural IoT data processing methods often focus on simple cleaning or statistical threshold filtering, typically separating data integrity, quality assessment, and blockchain notarization. They lack a systematic, end-to-end technical solution for "on-chain trustworthiness." Current missing value handling methods rely primarily on mean imputation, linear interpolation, or single-model prediction, ignoring complex relationships between sensors and the impact of device communication, power supply, and other operating conditions on missing data patterns, making it difficult to quantitatively assess the reliability of imputation results. Existing data quality assessment methods often use single indicators or simple classification models, failing to simultaneously characterize global quality, local sensor anomalies, and potential structural distortions, and lacking adaptability to multi-source heterogeneous data in complex agricultural environments. Existing blockchain on-chain solutions typically assume data authenticity and reliability, lacking effective mechanisms for identifying duplicate, forged, or abnormal data uploads, and failing to utilize deep features or fingerprint information to support subsequent auditing, comparison, and risk identification, thus limiting the trustworthy application value of blockchain in agricultural IoT scenarios. Summary of the Invention

[0003] To achieve the above objectives, the present invention employs the following technical solution: This invention provides a method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain, comprising the following steps: S1. Collect agricultural IoT data and build a dataset; S2. A dual-branch imputation network is used to simultaneously learn the global statistical features and device-related missing pattern features of agricultural IoT data to construct a complete feature vector; a quality label is generated for each sample based on the imputation confidence and the original data state. S3. Construct an integrity verification and quality assessment model based on deep neural networks. Employ a multi-task deep neural network model to simultaneously learn the temporal dependencies of samples, the correlations between sensors, and the device status information. This enables sample-level overall quality scoring, sensor-level anomaly confidence prediction, and data fingerprint generation. Verification and evaluation are then performed by setting thresholds for the three prediction results. S4. Supervise the training of the model by using a composite loss function, and use prior knowledge and data characteristics for regularization to obtain a well-trained model. S5. Use the trained model to perform integrity verification and quality assessment on the agricultural IoT data to be evaluated, and obtain the evaluation results. S6. For data samples that pass integrity verification and meet overall quality standards, ensure reliable on-chaining, secure storage, and trustworthy application of agricultural IoT data to the blockchain.

[0004] Furthermore, multiple IoT data acquisition nodes are deployed within the target area, with each node integrating a multi-source sensor array for continuous monitoring of environmental and crop growth parameters.

[0005] Furthermore, the composition and missing states of a single agricultural IoT data sample are formally defined. The sample includes multiple sensor readings, device status codes, timestamp feature vectors, and binary vectors used to identify whether each sensor data is valid. To simultaneously capture general data association patterns across all devices and missing patterns related to specific device states, a dual-branch imputation network is used to extract global features and device pattern features from the agricultural IoT data sample. Using the output features of the dual-branch imputation network, the final missing value imputation result is calculated through an adaptive weight fusion mechanism to obtain a complete feature vector. Based on the original missing rate of the sample, the device status code, and the network imputation confidence, a comprehensive quality label is assigned to each sample for subsequent model training or data quality monitoring.

[0006] Furthermore, the input and graph structure construction of the multi-task deep neural network model are defined: The multi-task deep neural network model takes the complete feature vector as input and models the physical association and dynamic influence relationship between all sensor nodes, which is represented by a sensor relationship graph. The sensor relationship graph structure consists of a set of nodes, a set of edges, and a dynamic correlation matrix. The element values ​​of the dynamic correlation matrix are calculated from the sensor readings and timestamp features of the current sample to capture the specific instantaneous association strength of the sample.

[0007] Furthermore, a multi-branch feature extraction backbone network is constructed, which includes three parallel branches: a global temporal branch, a local graph convolution branch, and a device state condition branch. The global temporal branch employs stacked one-dimensional dilated causal convolutional layers to capture the long-range dependencies of sensor reading sequences in the time dimension; the input to the global temporal branch is the current sample and its preceding samples. The sequence is spliced ​​together from the sensor readings of historical samples, and the output is a global time-series feature vector; The local graph convolution branch employs a multi-layer graph attention network; the features obtained by mapping the sensor reading portion of the complete feature vector are used as the initial node features, and the dynamic correlation matrix is ​​used as the adjacency matrix to perform graph convolution operations to aggregate neighbor information; The device status condition branch embeds and encodes the device status code, inputs it into the multilayer perceptron, and outputs a conditional feature vector.

[0008] Furthermore, perform multi-task prediction head computation: The feature vectors output from the three parallel branches are concatenated and linearly fused to obtain a fused high-level feature vector. The fused high-level feature vector is then input into the overall quality score prediction head to predict continuous quality scores, thus obtaining the overall quality score. The fused high-level feature vector is then input into the sensor-level anomaly confidence prediction head to predict the probability of anomalies in each sensor reading, thus obtaining the sensor-level anomaly confidence. The fused high-level feature vector is then input into the data fingerprint generation prediction head to obtain the data fingerprint. Finally, a triplet containing the three prediction results is obtained.

[0009] This invention employs a composite loss function to simultaneously monitor the accuracy of three prediction tasks, and utilizes prior knowledge and data characteristics for regularization to improve the model's generalization ability and discriminative power.

[0010] Furthermore, the multi-task supervision loss supervises two prediction tasks: the overall quality score of the model and the anomaly confidence score of the sensor. It includes a quality score regression loss and anomaly confidence score supervision loss. The quality score regression loss is calculated using a smoothed L1 loss function. The anomaly confidence score supervision loss is calculated using a weakly supervised binary cross-entropy loss based on filling the difference.

[0011] Furthermore, to enhance the rationality of the sensor associations learned by the graph convolutional branch, a regularization term based on prior knowledge in the agricultural field is adopted to encourage the dynamically learned graph adjacency matrix to maintain consistency with the preset prior adjacency matrix in the overall distribution, while penalizing the establishment of strong connections between physically unrelated sensors, thus constructing a graph structure consistency loss.

[0012] Furthermore, to ensure that the generated data fingerprints have both intra-class compactness and inter-class dispersion, a contrastive learning loss based on quality labels is adopted. This encourages samples with the same quality label to have data fingerprints that are close to each other in the feature space, while samples with different labels are far apart from each other, thus obtaining the data fingerprint contrastive loss.

[0013] Furthermore, the multi-task supervision loss, graph structure consistency loss, and data fingerprint comparison loss are weighted and summed to obtain a composite loss function.

[0014] The advantages of this invention are: This invention employs an integrated approach for "integrity verification—quality assessment—trustworthy storage" before agricultural IoT data is uploaded to the blockchain. It organically integrates data imputation, quality modeling, multi-task evaluation, and blockchain-based decision-making, forming a closed-loop technical system from initial data collection to trusted application, rather than optimizing only a single stage. It utilizes a dual-branch imputation network, learning general statistical correlations across sensors through a global feature branch and explicitly modeling the impact of device conditions such as communication quality and power status on missing and anomalies through a device mode branch. An adaptive fusion mechanism dynamically balances the two types of information, achieving missing value imputation and confidence estimation that better reflect the actual operating characteristics of agricultural IoT. By constructing a base... This paper proposes a multi-task deep neural network based on dynamic sensor relationship graphs. It introduces a sample-level dynamic correlation matrix to characterize the instantaneous coupling relationship between sensors as time and environment change. Simultaneously, it jointly models temporal features, graph structure features, and equipment status features to achieve synchronous prediction of overall quality score, sensor-level anomaly confidence, and data fingerprint generation. It adopts a multi-level composite loss function to combine quality label supervision, weakly supervised anomaly learning, agricultural prior graph structure constraints, and data fingerprint comparison learning based on quality labels. This enables the model to have interpretability, stability, and fingerprint discrimination ability while ensuring prediction accuracy, thereby supporting trusted screening before on-chain and subsequent auditing, deduplication, and traceability applications. Attached Figure Description

[0015] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0016] Figure 1 This is a flowchart of the steps of the method of the present invention; Figure 2 For sensor arrays; Figure 3 Fill in the network flowchart for the two branches; Figure 4 Flowchart of the backbone network for multi-branch feature extraction; Figure 5 This is a flowchart for multi-task prediction. 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] Example 1 In this embodiment, as Figure 1 As shown, this invention provides a method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain. The specific steps include: S1. Agricultural IoT Data Acquisition and Dataset Construction A raw agricultural IoT dataset is constructed for model training and validation. The data comes from a real-world agricultural IoT monitoring system, which deploys multiple IoT data collection nodes within the target area (such as greenhouses, open farmland, or livestock farms). Figure 2 As shown, each node integrates a multi-source sensor array for continuous monitoring of environmental and crop growth parameters, including: soil temperature sensor, soil moisture sensor, air temperature sensor, air humidity sensor, light intensity sensor, carbon dioxide concentration sensor, soil pH sensor, and wind speed sensor, totaling eight types of physical sensors. They are connected to the node's central data acquisition device via wired or wireless means.

[0019] The central data acquisition device synchronously reads the analog or digital signals of all sensors at a preset fixed frequency (such as every 10 minutes or every hour) and converts them into standardized physical quantity readings. At the same time, the acquisition device records its own operating status and generates two key device status codes: one is the communication signal strength level that characterizes the quality of the wireless transmission link, and the other is the battery voltage level that reflects the power supply level of the device. In addition, each data acquisition event is marked with a precise timestamp.

[0020] All data is transmitted via IoT gateways through wireless networks (such as 4G / 5G, LoRa) and aggregated to a central data server for storage, forming a raw dataset arranged in time series.

[0021] S2, Agricultural IoT Data Preprocessing and Quality Label Generation Agricultural IoT data includes time-series readings and device status codes from various types of sensors. It is characterized by high dimensionality, multiple sources, and the simultaneous presence of random and structural missing values. Conventional missing value processing techniques such as mean imputation or simple linear interpolation fail to fully consider the complex relationships between sensor data and ignore the specific missing patterns corresponding to different device states. This can easily lead to distorted data distribution after imputation and cannot provide a quantitative basis for data quality assessment.

[0022] like Figure 3 As shown, this invention employs a dual-branch imputation network to simultaneously learn the global statistical features of the data and the device-related missing pattern features, and generates a quality label for each sample based on the imputation confidence and the original data state. The specific steps are as follows: 1) Define the data sample format and missing representation. The composition and missing states of a single agricultural IoT data sample are formally defined. The sample includes multiple sensor readings, device status codes, timestamp feature vectors, and binary vectors identifying the validity of each sensor's data. Specifically... definition Indicates the first A sample of agricultural IoT data, represented as , is a 12-dimensional vector; Simultaneously define The integrity identifier vector is an 8-dimensional binary vector, whose third... Dimension is used to identify the first Whether the sensor readings were valid during the initial data acquisition, i.e. for The dimensional element value, This indicates that the statement is valid. Indicates missing; in, This represents the normalized readings from eight different physical sensors, for example, Corresponding soil temperature sensor, Corresponding soil moisture sensor, Corresponding air temperature sensor, Corresponding air humidity sensor, Corresponding light intensity sensor, Corresponding carbon dioxide concentration sensor, Corresponding soil pH sensor, Corresponding wind speed sensor; and These represent two device status codes used to characterize the device's operating condition at the sampling time. This represents the strength level of the communication signal. For example, the value ranges from 0 to 4, with higher values ​​indicating better signal strength. This represents the battery voltage level; for example, the value ranges from 0 to 3, with a higher value indicating a higher voltage. The timestamp feature vector is a periodic feature vector obtained by converting the sampled timestamp. It transforms the sampled timestamp into a feature vector containing the phase information of a natural day cycle, and includes both sine and cosine components to eliminate discontinuities at the cycle boundaries. For example, if the sampling time is 06:00 and the hour is 6, then the sine component is... The cosine component is ,but ; This represents the sample index, with a value range of [value range missing]. ; Indicates the total number of samples; This represents the sensor index, with a default value range of [value range missing]. .

[0023] It should be noted that, and This is a comprehensive status code for the entire data acquisition node or IoT gateway device, not for a single sensor. In a typical agricultural IoT node, multiple sensors are connected to a central acquisition device or gateway via wired or wireless means. This acquisition device is responsible for aggregating all sensor readings, adding timestamps, and uploading the data over the network. and This describes the overall operating condition of the data acquisition / transmission equipment, and its status affects the reliability of data acquisition and transmission for all connected sensors.

[0024] 2) Construct a dual-branch filling network To simultaneously capture common data association patterns across all devices and missing patterns related to specific device states, a two-branch imputation network is constructed. Specifically, this is a neural network with two branches: one extracts global features, and the other extracts device pattern features. definition The mapping function represents the global feature branch, which learns the shared inter-sensor correlations and statistical regularities from all samples; In one implementation, the global feature branch is a three-layer fully connected neural network with an input layer dimension of 12, a hidden layer dimension of 64, and a ReLU activation function. The output layer dimension is 12. When training the global feature branch, some sensor readings are randomly masked from the complete data as missing data. The error between the predicted value and the true value is minimized by the mean squared error loss function, so that the network learns the global statistical correlation between the sensors. By randomly generating masks on the training set without missing data to simulate missing data, the loss function only calculates the prediction error at the masked positions, ensuring that the network focuses on learning the intrinsic correlation of the data. The mapping function representing the device mode branch is used to learn the missing patterns and numerical variation rules that may occur in data under a specific device state. In one implementation, the device mode branch is a three-layer fully connected neural network with an input layer dimension of 14, a hidden layer dimension of 64, using the ReLU activation function, and an output layer dimension of 12. During training, the training data includes samples of different device states, and the loss function is mean squared error. The network operates through conditional input... and Learn the missing patterns and numerical regularities under specific states, group or weight device status codes during training, emphasize the impact of states on data, and ensure that the network captures relevant device patterns.

[0025] 3) Perform adaptive fusion filling calculation Using the output features of the two branch neural networks, the final missing value imputation result is calculated through an adaptive weight fusion mechanism, while the valid parts of the original data are retained, as shown below: , In the formula, Indicates the first The complete feature vector of a sample is the imputed complete feature vector, which is a 12-dimensional vector; This represents a binary mask vector, which is a 12-dimensional binary mask vector. For a single sample, the first The dimension of the binary mask vector of each sample is One-to-one correspondence, if If the original value of a certain dimension is valid, then The corresponding position is Otherwise binary mask vector Based on integrity identifier vector The 12-dimensional binary vector generated from the device status characteristics corresponds to the sensor reading dimensions from 1 to 8. For the device status code and timestamp dimensions corresponding to dimensions 9-12, they are always valid by default, i.e. ; Indicates and A vector of all 1s with the same dimension; This represents element-wise multiplication, i.e., the Hadamard product; Indicates the first The mask feature vector of each sample is obtained by element-wise multiplication of the original agricultural IoT data sample with the mask vector, and is expressed as: In specific implementations, the binary mask vector specifically refers to the first... The binary mask vector corresponding to each sample; Indicates adaptive fusion weights, This is used to dynamically balance the contributions of the global feature branch and the device mode branch to the filling result. A higher value indicates a greater contribution from the global feature branch, and the calculation method is as follows: ; This represents the Sigmoid activation function, which maps the input to... interval; This represents the scalar parameters of the fusion weights, which are trainable parameters; This represents the scalar parameter of the fusion bias, which is a trainable parameter; This represents the operation of calculating the arithmetic mean of the input vector.

[0026] 4) Generate sample quality labels Based on the original missing rate of the sample, the device status code, and the network imputation confidence, a comprehensive quality label is assigned to each sample for subsequent model training or data quality monitoring. The generation rules are as follows: definition Indicates the first Quality labels for each sample , where the numerical value Representing "excellent quality", numerical value Representing "good quality", the numerical value This indicates "poor quality"; If the missing rate of the sample is less than And the status codes of both devices , If all values ​​are within the preset normal range, then assign a quality label. ; If the missing rate of the sample is arrive If any device status code is abnormal but the network fill confidence is high, a quality label will be assigned. ; If the missing rate of the sample is greater than or equal to If the device status code is abnormal and the network fill confidence is low, then a quality label will be assigned. .

[0027] The missing rate refers to the proportion of missing readings across the eight sensor dimensions in the sample, calculated by the integrity identifier vector. The percentage of zero values ​​was obtained. The network imputation confidence is approximated by calculating the variance of the predicted values ​​of the global feature branch and the device mode branch at the position to be imputed. Specifically, firstly, the output vectors of the global feature branch and the device mode branch on the device mode branch are obtained. Then, the average variance of the output vectors of the two branches is calculated. The smaller the variance, the more consistent the predictions of the two branches are, i.e., the higher the confidence. In one embodiment, assuming a sample has... and There are two missing sensors, targeting The output of the global feature branch is 0.5, and the output of the device mode branch is 0.6. The output of the global feature branch is 0.3, and the output of the device mode branch is 0.2. Therefore, the variance is... A smaller variance indicates a higher confidence level.

[0028] S3. Construct an integrity verification and quality assessment model based on deep neural networks. To precisely quantify potential local anomalies or sensor-specific distortions in data and capture integrity degradation caused by the coupling of complex environmental factors, this invention employs a multi-task deep neural network model. By synchronously learning the temporal dependencies of samples, the correlations between sensors, and device status information, it achieves sample-level overall quality scoring, sensor-level anomaly confidence prediction, and data fingerprint generation, thereby providing refined and interpretable integrity verification and quality assessment.

[0029] 1) Define the input and graph structure construction of the multi-task deep neural network model The multi-task deep neural network model takes the complete feature vector as input and models the physical connections and dynamic influences between all sensor nodes. It is represented by a sensor relationship graph, which consists of a set of nodes, a set of edges, and a dynamic correlation matrix. The elements of the dynamic correlation matrix are calculated from the sensor readings and timestamp features of the current sample to capture the specific instantaneous correlation strength of the sample, expressed as: , In the formula, Indicates the first Dynamic correlation matrix of samples The Middle Line number Column elements Characterized in the first Sensor relationship diagram for each sample In the middle, the first The sensor node pairs with the first The normalized influence weight of each sensor node; This indicates the index of the source sensor node, i.e., the sensor node that emitted the influence. ; This indicates the index of the target sensor node, i.e., the sensor node receiving the influence. ; Indicates difference from The target sensor node index, ; Represents the natural exponential function; Indicates the first The sensor and the first The original correlation strength score between the sensors is calculated as follows: A higher score indicates a stronger correlation between the two sensors in the current sample. Indicates the first The sensor and the first The original correlation strength score between the sensors; This represents the activation function of a linear rectifier unit with leakage, which has a non-zero slope when a negative input is received. This represents the original association strength score parameter vector, with dimension 1. , is a trainable parameter used to map the concatenated high-dimensional features to a scalar original association strength score; for transpose; This represents a vector concatenation operation; Indicates the first Complete feature vector of each sample The corresponding number in the middle scalar readings of each sensor; Indicates the first Complete feature vector of each sample The corresponding number in the middle scalar readings of each sensor; This represents the sensor reading mapping weight matrix, used to map single-dimensional sensor readings to a high-dimensional feature space with dimension 1. , are trainable parameters; This indicates the dimension of the mapped features; an example value is 16. The timestamp feature weight matrix is ​​a trainable parameter with dimension . This is used to map the timestamp periodic feature vector to a higher-dimensional feature space, thereby enhancing the model's ability to express time features and enabling time information to participate more effectively in the calculation of the correlation strength between sensors. This indicates the feature dimension of the timestamp feature mapping, with an example value of 8. Indicates the first Each sample has a timestamp feature vector with a dimension of 2; This represents the time decay factor, used to model the decay of the correlation strength between sensors as the standard sampling time interval decreases. Its calculation method is expressed as follows: ; Indicates the first The sensor and the first The standard sampling interval between sensors, in hours, is predefined according to the sensor deployment and sampling protocol; The central parameter representing the time decay factor is used to determine the time interval with the greatest correlation strength and is a trainable parameter. The scale parameter, representing the time decay factor, is used to control the decay rate and is a trainable parameter.

[0030] It should be noted that the sensor relationship graph is a weighted directed complete graph, the first... Sensor relationship diagram for each sample This is the first The graph structure dynamically constructed from the nth sample has an adjacency matrix of the nth sample. Dynamic correlation matrix of samples Each node in the diagram corresponds to a sensor. The diagram starts from the [node number]. The sensor node to the first The weight of the directed edge of the i-th sensor node is the weight of the i-th sensor node. Dynamic correlation matrix of samples elements in .

[0031] In one embodiment, assuming all sensors sample once per hour, the standard sampling interval between any two sensor readings is... The standard sampling interval is typically 0 (sampling within the same batch) or 1 (sampling hours before and after). If sensors with different sampling frequencies exist, such as a soil sensor sampling every 10 minutes and a weather sensor sampling every hour, then the standard sampling interval is... It could be 0, 0.17 (corresponding to 10 minutes / 60 minutes), etc.

[0032] 2) Construct a multi-branch feature extraction backbone network like Figure 4 As shown, the model backbone network consists of three parallel branches, which are used to extract global temporal features, local graph structure features, and device state condition features, respectively. Specifically: Global temporal branch: The global temporal branch uses stacked one-dimensional dilated causal convolutional layers to capture the long-range dependencies of sensor reading sequences in the time dimension; The input to the global temporal branch is the current sample and its preceding samples. A sequence composed of sensor readings from a historical sample. , dimension The output is a global temporal feature vector. , dimension ; In specific implementation, the first Sensor reading history sequence matrix corresponding to each sample Indicates the first A time series sequence with n samples as endpoints, assuming a historical window length of n... ,but By the To the The sensor readings from a total of 10 consecutive samples (i.e.) It is formed by concatenating the first 8 dimensions of the vector. For the sample at the beginning of the sequence, that is... When necessary, the zero vector or the first sample can be repeated to fill the gaps; in, This indicates the length of the history window; an example value is 10. Indicates the first A sensor reading history sequence matrix corresponding to each sample; Indicates the first Global temporal feature vectors of each sample; This represents the output feature dimension of the global time series branch, with an example value of 64.

[0033] Local graph convolution branch: The local graph convolution branch uses the features obtained by mapping the sensor reading part of the complete feature vector as the initial node features, and uses the dynamic correlation matrix as the adjacency matrix to perform graph convolution operation to aggregate neighbor information; The local graph convolutional branch employs a multi-layer graph attention network, whose... The propagation method of layers is represented as follows: , In the formula, Indicates the first The sample was processed by the first... After layer graph convolution, the first Feature vectors of each sensor node; denoted as the exponential linear unit activation function, it is a continuous and differentiable activation function everywhere; Indicates the first Sensor relationship diagram for each sample In the middle, the first The set of neighboring nodes of each sensor node; Indicates the first In a layered graph attention network, the first... The sensor node pairs with the first The attention coefficients of each sensor node are used for weighted aggregation of neighbor information, and are calculated as follows: ; Indicates the first The weight matrix of the layered graph attention network, used for feature transformation, is a trainable parameter; Indicates the first The sample was processed by the first... After layer graph convolution, the first Feature vectors of each sensor node; Indicates the first The sample was processed by the first... After layer graph convolution, the first Feature vectors of each sensor node; Indicates the first The sample was processed by the first... After layer graph convolution, the first Feature vectors of each sensor node; Indicates the first The attention parameter vector of a layered graph attention network is a trainable parameter. for The transpose of .

[0034] In one implementation, the local graph convolution branch employs a two-layer graph attention network, performing average pooling on the features of all sensor nodes in the last layer to obtain the... Graph structure feature vectors of each sample , dimension , This indicates the output feature dimension of the partial graph convolution branch, with an example value of 64.

[0035] In one implementation, each node (sensor) is defined to be connected to all other nodes (a fully connected graph). Therefore, the first... The set of neighbor nodes of each sensor node Including The other 7 sensor nodes besides itself.

[0036] Device status condition branch: The device status condition branch will display the device status code. and After embedding encoding, the input is a multilayer perceptron, and the output is a conditional feature vector. ; In practical implementation, device status codes and These are discrete categorical variables, which are first transformed into dense vectors through an embedding layer, for example, There are 5 possibilities, which can be embedded into a 5-dimensional vector. There are four possibilities. The embedding can be a 4-dimensional vector, and then the two embedding vectors are concatenated and input into a multilayer perceptron. This multilayer perceptron can be a two-layer fully connected network. The input is the concatenated embedding vector, the hidden layer dimension can be 32, and the ReLU activation function is used. The output layer dimension is... That is, to obtain the conditional eigenvector. ; in, Indicates the first The feature vector of equipment status conditions for each sample represents the impact of equipment operating conditions on data quality, with dimensions of [missing information]. ; This represents the output feature dimension of the device state condition branch, with an example value of 32.

[0037] 3) Perform multi-task prediction head calculation The feature vectors output from the three branches are concatenated and linearly fused to obtain a fused high-level feature vector. Then, the overall quality score, sensor-level anomaly confidence, and data fingerprint are calculated using three independent prediction heads. The calculation method of the fused high-level feature vector is expressed as follows: , In the formula, Indicates the first The fused high-level feature vector of each sample integrates information from three aspects: temporal sequence, graph structure, and device status. It serves as the shared foundational feature for multi-task prediction, with a dimension of [missing information]. ; This indicates the dimension of the fused high-level feature vectors; The weight matrix of the feature fusion layer is a trainable parameter used to perform a linear transformation on the concatenated high-dimensional features. The bias vector of the feature fusion layer is a trainable parameter that adds bias to the fused features.

[0038] Furthermore, multi-task prediction head calculations are performed through overall quality score regression, sensor-level anomaly confidence, and data fingerprint generation tasks, such as... Figure 5 As shown, the details are as follows: Task 1: Overall Quality Score Regression The continuous quality score predicted based on the fusion of high-level feature vectors is expressed as: , In the formula, The weight vector representing the overall quality score regression task is a trainable parameter used to map fused features to scalar scores. for transpose; The bias scalar represents the overall quality score regression task; it is a trainable parameter used to add bias. The model predicts the first The overall quality score for each sample is given, with a higher value indicating better overall data quality. The value range is [value range missing]. .

[0039] Task 2: Sensor-level Anomaly Confidence The probability of anomalies in each sensor reading is predicted based on the fusion of high-level feature vectors, and is expressed as: , In the formula, The weight matrix representing the sensor-level anomaly confidence prediction task is a trainable parameter with dimension 1. This is used to simultaneously map fused features to the anomaly confidence scores corresponding to 8 sensors; The bias vector, representing the sensor-level anomaly confidence prediction task, is a trainable parameter with dimension . , which are the bias terms added to the 8 outputs respectively; The model predicts the first The sensor-level anomaly confidence vector for each sample has a dimension of 8, and , its first The element corresponds to the first element. The abnormal confidence level of a sensor reading; the higher the value, the greater the probability that the sensor reading is abnormal.

[0040] Task 3: Data Fingerprint Generation Based on the fusion of high-level feature vectors, a low-dimensional, discriminative vector is generated as a unique representation of the data, expressed as: , In the formula, This represents the L2 norm normalization operation, used to scale a vector to unit length; The weight matrix representing the data fingerprint generation task is a trainable parameter with dimension . ; This represents the dimension of the data fingerprint vector; an example value is 32. The bias vector representing the data fingerprint generation task is a trainable parameter with dimension . ; The model is represented as the first The data fingerprint vector generated for each sample is a low-dimensional dense vector that serves as a unique representation of that sample, with dimensions of 1. .

[0041] 4) Define the model output and validation logic The final output of the model is a triplet containing the three predictions. Based on this output, the integrity verification and quality assessment logic is defined as follows: Overall quality assessment: Set an overall quality score threshold. ,like If the sample passes the integrity check and its data quality is deemed satisfactory, it can be prioritized for upload to the blockchain. Example value: 0.7; Local anomaly alarm: Set the sensor anomaly confidence threshold ,right Check each dimension in the data; if its value is greater than... This will trigger an alarm for the corresponding sensor, indicating that on-site maintenance or calibration may be required. Example value: 0.5; Data fingerprint comparison: Storing the data fingerprints of important samples on-chain or in a local database, and then comparing them with new samples. When doubt arises, calculate its comparison with historical samples. Cosine similarity of fingerprints If the similarity is extremely high and the timestamps are close, it may indicate a risk of duplicate data uploads or forgery. Indicates the first The first sample and the first Cosine similarity between the data fingerprint vectors of each sample The model is represented as the first The data fingerprint vector generated from each sample, The model is represented as the first The data fingerprint vector generated from each sample, This indicates the index of the new sample that needs to be validated. This represents the index of a stored sample in the historical sample database.

[0042] S4. Loss Function Calculation and Model Training S401 Loss Function Calculation This invention employs a composite loss function to simultaneously supervise the accuracy of three prediction tasks, and utilizes prior knowledge and data characteristics for regularization to improve the model's generalization ability and discriminative power. The specific steps are as follows: 1) Multi-task monitoring loss Multi-task supervised loss directly supervises two prediction tasks: the overall quality score of the model and the confidence level of sensor anomalies. Specifically, The quality score regression loss is calculated using the smoothed L1 loss function, and is expressed as: , In the formula, This represents the quality score regression loss, which is the overall quality score predicted by the supervised model. It should be as close as possible to the target value obtained from the quality label conversion; Indicates the first The overall quality score target value for the sample is derived from the first... Quality label of a sample The conversion is as follows: This results in excellent quality, good quality, and poor quality corresponding to target scores of 1.0, 0.5, and 0.0, respectively. This indicates taking the larger of the two values; This represents a smoothed L1 loss function, which is insensitive to outliers, thus enhancing training stability.

[0043] Furthermore, the anomaly confidence supervision loss is calculated using the weakly supervised binary cross-entropy loss based on imputation of dissimilarity, and is expressed as: , In the formula, Indicates the first The anomalous pseudo-label of the nth sample is the nth Each sample is obtained by imputing discrepancies and normalizing for abnormal pseudo-labels; This represents a logarithmic function, with the default base being the natural constant.

[0044] In one implementation, the first Abnormal pseudo-labels of individual samples The data is calculated by a two-branch fill-in network, specifically for sensor readings that are not missing. The value is manually masked (i.e., treated as missing), and then "filled" in using a two-branch network to obtain the predicted value. Then, calculate the absolute error. Then, it is normalized to pseudo-labels; that is, for all samples and all sensors within a batch, the distribution of their imputation error is calculated, and further, the... Mapped to via a predefined Sigmoid function Intervals, as pseudo-labels for anomaly confidence, for example, ,in This represents the average error of the batch. This represents the standard deviation of the batch error. The larger the error, the more significant the standard deviation. Abnormal pseudo-labels of individual samples The closer the value is to 1, the more likely the reading is to be abnormal.

[0045] 2) Graph structure consistency loss based on agricultural data characteristics To enhance the rationality of sensor associations learned in the graph convolutional branch, a regularization term based on prior knowledge in the agricultural field is adopted. This encourages the dynamically learned graph adjacency matrix to maintain consistency with the pre-set prior adjacency matrix in overall distribution, while penalizing the establishment of strong connections between physically unrelated sensors. The graph structure consistency loss is calculated as follows: , In the formula, The graph structure consistency loss is used to constrain the dynamic graph structure learned by the model to avoid deviating too much from the physical common sense of the agricultural field, thereby improving the interpretability and generalization ability of the model. The prior adjacency matrix is ​​a fixed adjacency matrix defined based on agricultural prior knowledge. Its elements are pre-set according to the strength of the physical correlation between sensors, such as the strong correlation between soil temperature and soil moisture. Indicates the first Dynamic correlation matrix of samples The average row vector is denoted as... This characterizes the average intensity distribution of the influence of each sensor on other sensors in the sample; Represents the prior adjacency matrix The average row vector is denoted as... , used to characterize the prior sensor average influence distribution; This represents the Kullback-Leibler divergence, used to measure the difference between two probability distributions; This represents the weighting coefficient of the Kullback-Leibler divergence loss term, used to control the strength of the prior distribution constraint; an example value is 0.1. The penalty mask matrix is ​​a binary matrix used to identify sensor pairs that are physically unrelated. Denotes the Frobenius norm; This represents the weighting coefficient of the Frobenius norm regularization term, used to penalize excessive weighting between unrelated sensors; an example value is 0.01.

[0046] In one implementation, the prior adjacency matrix It is a symmetric / asymmetric matrix manually defined based on expert knowledge, for example, soil temperature ( ) and soil moisture ( If the physical relationship is strong, then define air temperature ( ) and air humidity ( If the association is strong, then define ,illumination( ) and carbon dioxide ( In photosynthesis, it is related to the definition of .

[0047] In one implementation, the penalty mask matrix Used to identify sensor pairs that are physically unlikely to have a direct strong correlation, such as soil pH. ) and wind speed ( It is generally assumed that there is no direct relationship, so let's assume... (A penalty is required), and for associated sensor pairs, the penalty is set to 0.

[0048] 3) Data fingerprint clustering and dispersion loss To ensure that the generated data fingerprints possess both intra-class compactness and inter-class dispersion, a contrastive learning loss based on quality labels is employed. This encourages samples with the same quality label to have data fingerprints that are close to each other in the feature space, while samples with different labels are far apart. This is expressed as: , In the formula, This refers to the data fingerprint contrast loss, which forces the model to learn data fingerprints that not only contain the original information of the samples, but also effectively encode their quality attributes, thereby improving the fingerprint's discriminative ability and practicality in subsequent quality assessment, abnormal sample clustering, or similar sample retrieval tasks. This represents the batch sample set, which is the set of indices of all samples in the current training batch; This indicates the number of elements in the batch sample set, i.e., the size of the current training batch; Indicates the relationship between the batch and the first All samples have the same quality label The set of sample indices, i.e., the set of positive samples; Represents a set The number of elements; Indicates the positive sample index, and ; This indicates cosine similarity calculation, used to measure the degree of similarity between two data fingerprint vectors in a direction; The model is represented as the first The data fingerprint vector generated from each sample; The model is represented as the first The data fingerprint vector generated from each sample; This represents a temperature parameter used to adjust the sharpness of the similarity distribution; an example value is 0.1. Represents the negative sample index, and ; Indicates that, except for the first in the batch The set of all other samples besides the one sample.

[0049] 4) Calculation of composite loss function The composite loss function, which serves as the total loss function for model training, is obtained by a weighted sum of four sub-losses, and is expressed as: In the formula, The total loss during model training represents the overall objective function that needs to be minimized during model training. This represents the weighting coefficient for the quality score regression loss, with an example value of 1.0. This represents the weighting coefficient for the anomaly confidence supervision loss, with an example value of 0.8. The weighting coefficient represents the loss of graph structure consistency; an example value is 0.5. This represents the weighting coefficient for the data fingerprint comparison loss, with an example value of 0.3.

[0050] S402, Integrity Verification and Quality Assessment Model Training First, the model parameters are initialized. For example, a random initialization strategy is used to initialize all trainable parameters in a multi-task deep neural network. The training process is carried out iteratively on the data divided into training set, validation set and test set. In each training iteration, a batch of data is sampled from the training set and input into the constructed multi-task deep neural network model; The model performs forward propagation, sequentially constructing a dynamic sensor relationship graph, extracting multi-branch features, and calculating three prediction heads to obtain the overall quality score prediction value, sensor-level anomaly confidence prediction vector, and data fingerprint vector for each sample in the current batch. Subsequently, the total loss is calculated according to the composite loss function defined in S401, which integrates the quality score regression loss, anomaly confidence supervision loss, graph structure consistency loss, and data fingerprint comparison loss. Using the backpropagation algorithm, the gradient of the total loss with respect to all trainable parameters of the model is calculated; Then, the Adam optimizer is used to update the model parameters based on the calculated gradients to minimize the total loss objective. This process is repeated, and the model gradually learns from the training data, mastering the ability to accurately predict data quality scores, identify potential sensor anomalies, and generate discriminative data fingerprints from features that fuse temporal, graph structure, and device state information.

[0051] During training, the model performance is periodically evaluated on independent validation sets to monitor its generalization ability.

[0052] S403, Stop Iteration Condition Judgment Define and execute the stopping iteration condition for model training to ensure that training terminates at an appropriate time, thereby obtaining a final model with good generalization performance and no overfitting. The stopping iteration judgment is mainly based on two criteria: The first criterion is a preset maximum number of training epochs. When the training iterations reach this limit, the training process will be forcibly stopped regardless of other conditions. The second criterion is an early stopping strategy based on validation set performance. After each training iteration, the model will perform forward propagation on the validation set and calculate the smooth L1 loss of the overall quality score regression task on the validation set as the core monitoring metric.

[0053] The system will continuously track the changes in the validation loss and set a "patience" round value. If, in several consecutive rounds (i.e., the number of "patience" rounds) of training, the monitoring metric on the validation set no longer decreases (i.e., the model performance no longer improves) or begins to rise (indicating overfitting), the early stopping condition is triggered, and the training process is terminated prematurely.

[0054] When training stops, the system automatically saves a snapshot of the model parameters corresponding to the iteration with the best performance on the validation set (i.e., the minimum validation loss), which serves as the final complete training integrity verification and quality assessment model for subsequent deployment and application.

[0055] S5. Agricultural IoT Data Integrity Verification and Quality Assessment The best-trained and saved model is used to perform practical integrity verification and quality assessment on new, unassessed agricultural IoT data. Specifically, First, the new raw data samples need to go through the same preprocessing process as the training phase, that is, as described in S2, they need to be processed by a dual-branch filling network to generate the corresponding complete feature vector. Then, the complete feature vector is input into the trained multi-task deep neural network model. The model performs forward computation and outputs the triplet evaluation results of the sample: overall quality score, sensor-level anomaly confidence vector, and data fingerprint vector. Based on the triplet evaluation results, the system executes the preset verification and evaluation logic. That is, based on whether the overall quality score reaches or exceeds the preset pass threshold, the system determines whether the data passes the integrity verification and whether the data quality is acceptable. At the same time, iterate through each dimension of the sensor-level anomaly confidence vector. If the anomaly confidence of a certain sensor exceeds the alarm threshold, generate a local anomaly alarm for that specific sensor, indicating that there may be sensor drift, malfunction or interference, which requires attention or on-site maintenance. In addition, the generated data fingerprint vector can be used to calculate its cosine similarity with historically stored data fingerprints. If an abnormally high fingerprint similarity is found between samples with similar timestamps, it may indicate that the data was uploaded repeatedly or that there is a risk of forgery.

[0056] Based on this, a comprehensive evaluation report is generated, including whether the data is recommended to be uploaded to the blockchain, the overall quality level, which specific sensor readings are questionable, and possible risk warnings, providing a comprehensive and granular basis for the decision to upload the data to the blockchain.

[0057] S6, Agricultural IoT Data On-Chain, Storage and Application Based on the evaluation results of the preceding steps, this step enables the reliable on-chaining, secure storage, and trusted application of agricultural IoT data on the blockchain. Only data samples that pass integrity verification and meet the overall quality score in S5 will be allowed to enter the on-chain process.

[0058] When data is uploaded to the blockchain, the evaluated data (which may include key sensor readings, timestamps, device status, etc.) is packaged together with its corresponding quality evaluation results (such as overall quality score and quality label) and the data fingerprint generated by the model to form a blockchain transaction data unit. By invoking a smart contract deployed on the blockchain, the data unit is written as the content of a transaction into a new block of the blockchain; Nodes in a blockchain network verify and confirm transactions through a consensus mechanism. Once confirmed, the data and its quality information are permanently and immutably recorded on a distributed ledger, ensuring the traceability and auditability of the data source.

[0059] In addition, the blockchain itself stores the hash fingerprint, key digest and quality certificate of the data. The complete historical dataset can be selectively stored in a trusted off-chain database or distributed file system based on business needs, and associated with on-chain records through hash values.

[0060] At the application layer, high-quality, reliable data once on-chain can be widely used. For example, in agricultural product traceability systems, consumers can scan QR codes to query tamper-proof environmental data throughout the entire crop growth cycle. In the field of agricultural insurance, smart contracts can automatically trigger claims processes based on reliable environmental data (such as records of severe weather). All parties in the supply chain can conduct efficient collaboration and settlement based on shared, quality-assessed blockchain data. Data fingerprints can be used for rapid comparison and deduplication to ensure the uniqueness and authenticity of datasets, thereby maximizing the value of agricultural IoT data in the smart agriculture ecosystem.

[0061] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain, characterized in that, Includes the following steps: S1. Collect agricultural IoT data and build a dataset; S2. A dual-branch imputation network is used to simultaneously learn the global statistical features and device-related missing pattern features of agricultural IoT data to construct a complete feature vector; a quality label is generated for each sample based on the imputation confidence and the original data state. S3. Construct an integrity verification and quality assessment model based on deep neural networks. Employ a multi-task deep neural network model to simultaneously learn the temporal dependencies of samples, the correlations between sensors, and the device status information. This enables sample-level overall quality scoring, sensor-level anomaly confidence prediction, and data fingerprint generation. Verification and evaluation are then performed by setting thresholds for the three prediction results. S4. Supervise the training of the model by using a composite loss function, and use prior knowledge and data characteristics for regularization to obtain a well-trained model. S5. Use the trained model to perform integrity verification and quality assessment on the agricultural IoT data to be evaluated, and obtain the evaluation results. S6. For data samples that pass integrity verification and meet overall quality standards, ensure reliable on-chaining, secure storage, and trustworthy application of agricultural IoT data to the blockchain.

2. The method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain according to claim 1, characterized in that, Multiple IoT data acquisition nodes are deployed within the target area. Each node integrates a multi-source sensor array for continuous monitoring of environmental and crop growth parameters.

3. The method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain according to claim 2, characterized in that, The composition and missing states of a single agricultural IoT data sample are formally defined. The sample includes multiple sensor readings, device status codes, timestamp feature vectors, and binary vectors used to identify whether each sensor data is valid. Global features and device mode features are extracted from the agricultural IoT data sample through a dual-branch imputation network. By utilizing the output features of the dual-branch imputation network, the final missing value imputation result is calculated through an adaptive weight fusion mechanism to obtain a complete feature vector. Based on the original missing rate of the sample, the device status code, and the network imputation confidence, a comprehensive quality label is assigned to each sample.

4. The method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain according to claim 3, characterized in that, In S3, the input and graph structure construction of the multi-task deep neural network model are defined: The multi-task deep neural network model takes the complete feature vector as input and models the physical association and dynamic influence relationship between all sensor nodes, which is represented by a sensor relationship graph. The sensor relationship graph structure consists of a set of nodes, a set of edges, and a dynamic correlation matrix. The element values ​​of the dynamic correlation matrix are calculated from the sensor readings and timestamp features of the current sample.

5. The method for integrity verification and quality assessment of agricultural IoT data before uploading to the blockchain according to claim 4, characterized in that, In S3, a multi-branch feature extraction backbone network is constructed. This multi-branch feature extraction backbone network includes three parallel branches: a global temporal branch, a local graph convolution branch, and a device state condition branch. The global temporal branch employs stacked one-dimensional dilated causal convolutional layers; the input to the global temporal branch is the current sample and its preceding samples. The sequence is spliced ​​together from the sensor readings of historical samples, and the output is a global time-series feature vector; The local graph convolution branch employs a multi-layer graph attention network; the features obtained by mapping the sensor reading portion of the complete feature vector are used as the initial node features, and the dynamic correlation matrix is ​​used as the adjacency matrix to perform graph convolution operations to aggregate neighbor information; The device status condition branch embeds and encodes the device status code, inputs it into the multilayer perceptron, and outputs a conditional feature vector.

6. The method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain according to claim 5, characterized in that, In S3, multi-task prediction head computation is performed: The feature vectors output from the three parallel branches are concatenated and linearly fused to obtain a fused high-level feature vector; the fused high-level feature vector is then input into the overall quality score prediction head to predict continuous quality scores and obtain the overall quality score. The fused high-level feature vector is input into the sensor-level anomaly confidence prediction head to predict the probability of anomalies in each sensor reading, thus obtaining the sensor-level anomaly confidence. The high-level feature vector is fused and input into the data fingerprint generation prediction head to obtain the data fingerprint; finally, a triplet containing three prediction results is obtained.

7. The method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain according to claim 6, characterized in that, The multi-task supervised loss supervises two prediction tasks: the overall quality score of the model and the anomaly confidence score of the sensor. It includes a quality score regression loss and anomaly confidence score supervised loss. The quality score regression loss is calculated using a smoothed L1 loss function. The anomaly confidence score supervised loss is calculated using a weakly supervised binary cross-entropy loss based on imputation of differences.

8. The method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain according to claim 7, characterized in that, A regularization term based on prior knowledge in the agricultural field is adopted to encourage the dynamically learned graph adjacency matrix to maintain consistency with the pre-set prior adjacency matrix in the overall distribution, while penalizing the establishment of strong connections between physically unrelated sensors, thus constructing a graph structure consistency loss.

9. The method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain according to claim 8, characterized in that, A contrastive learning loss based on quality labels is adopted to encourage samples with the same quality label to have their data fingerprints close to each other in the feature space, while samples with different labels are far apart, thus obtaining the data fingerprint contrastive loss.

10. The method for integrity verification and quality assessment of agricultural IoT data before it is uploaded to the blockchain according to claim 9, characterized in that, The composite loss function is obtained by weighting and summing the multi-task supervision loss, graph structure consistency loss, and data fingerprint comparison loss.

Citation Information

Patent Citations

  • Backfill compaction degree quality evaluation method based on deep neural network model

    CN120450534A

  • Data quality evaluation method and equipment based on AHP and block chain

    CN120596473A

  • Block chain enabled aquatic product traceability and quality evaluation method

    CN120894042A

  • Traditional Chinese medicine whole industry chain quality tracing and supervision system and method based on block chain technology

    CN120996629A

  • Agricultural product supply chain traceability data integrity verification method based on machine learning

    CN120996835A

Cited By

  • Complex simulation system-oriented verification cascade failure early warning method and device

    CN121711265A