A method and system for tracing tobacco field planting spatial data values based on remote sensing and blockchain
By adopting remote sensing and blockchain-based data value proof and traceability methods in the tobacco cultivation industry, the problems of data fragmentation and management are solved, and efficient and secure data management and the development of precise agriculture are achieved.
Patent Information
- Application Number
- CN202510006803.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2045-01-03
AI Technical Summary
The tobacco cultivation industry has problems such as fragmentation of data, difficulty in management, low efficiency of traditional recording methods and easy to lead to data loss or tampering, which is difficult to meet the needs of precision agriculture.
The method of proof-keeping and traceability of the tobacco planting space data value based on remote sensing and blockchain is adopted. By obtaining the corrected multimodal data for pre-processing, lightweight summary information is generated and stored on the blockchain. At the same time, the original remote sensing image and metadata are saved through cloud storage, and data and service interactions across blockchain platforms are performed through smart contracts.
It improves the security and efficiency of data management, promotes the development of precision agriculture, and accelerates data access efficiency through behavior prediction algorithms and edge computing nodes.
Smart Images

Figure CN119397611B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of agricultural information technology, and specifically to a method and system for tracing the spatial data values of tobacco field planting based on remote sensing and blockchain. Background Art
[0002] In the tobacco planting industry, compared with large-scale agriculture, tobacco leaf planting has the characteristics of complex processes and delicate operations, and there is a low level of regionalization and a small average tobacco planting area per household. These factors make it difficult for the industry to effectively control the tobacco planting situation, resulting in fragmented data, increased management difficulty and information integration costs. At the same time, traditional tobacco field management methods mainly rely on manual records and paper documents, which is not only inefficient, but also prone to data loss or tampering, and it is difficult to meet the needs of modern precision agriculture.
[0003] The Chinese invention patent with publication number CN117764607A discloses a blockchain-based method and system for tracing the source of Buddhist peaches. The data of the entire cultivation cycle and the entire supply chain of Buddhist peaches are put on the chain; the cultivation data and supply chain data are read using the evaluation smart contract to evaluate and predict the product; a unique traceability code is generated to provide a traceability path for the product; the implementation of this method includes the cultivation data on the chain, the fruit evaluation for sale, the logistics data on the chain, the sales data on the chain, and the traceability code generation query. The traceability code is the unique identifier of the Buddhist peach product. The traceability code is generated when the cultivation data is put on the chain. The generated traceability code is used by consumers to trace the source of the Buddhist peach product. The invention uses the characteristics of blockchain that cannot be tampered with to provide authenticity guarantee for the data entry of the entire cycle of Buddhist peach cultivation, ensuring that the source can be traced. At the same time, putting the cultivation data on the chain can also help the entire supply chain to operate efficiently.
[0004] In the process of data value storage and traceability using the above and similar traceability methods, due to the characteristics of the crop growth cycle, remote sensing images acquired at different time points need to maintain consistent spatial resolution and spectral characteristics to support accurate analysis. However, due to changes in satellite transit time and weather conditions, image quality can easily differ. Therefore, before tracing the spatial data value of tobacco field planting based on the data, it is necessary to ensure that the remote sensing images acquired at different time points remain consistent in quality. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for tracing the spatial data values of tobacco field planting based on remote sensing and blockchain to solve the problems raised in the above-mentioned background technology.
[0006] To achieve the above purpose, the present invention provides the following technical solution: a tobacco field planting space data value storage and traceability method based on remote sensing and blockchain, comprising:
[0007] S1: Obtain corrected multimodal data: Use the multimodal data as input of the atmospheric correction model, and output the corrected multimodal data;
[0008] S2: Preprocessing of multimodal data: preprocessing the corrected multimodal data, and setting a compression ratio according to the divided regions to obtain lightweight summary information;
[0009] S3: Establish a data management system: store the lightweight summary information through blockchain, store the original remote sensing images and metadata through cloud storage, and exchange information through smart contracts, including:
[0010] S3.1: Blockchain stores lightweight summary information: The lightweight summary information is stored in the blockchain. The lightweight summary information recorded in the blockchain is specifically:
[0011]
[0012] in: is the set of hash codes recorded in the Qth block, is the multi-scale hash code corresponding to the first lightweight summary information, is the multi-scale hash code corresponding to the second lightweight summary information, is the multi-scale hash code corresponding to the nth lightweight summary information, is the total number of lightweight summary information in the Qth block;
[0013] S3.2: Cloud storage saves original remote sensing images and metadata: pre-access data is stored through edge computing nodes, and hot spot data is stored through local cache;
[0014] S3.3: Modular design of smart contracts: Through the smart contract interfaces of multiple blockchains, the information on different blockchains can interact with each other.
[0015] Furthermore, the corrected multimodal data is output, including:
[0016] S1.1: Data preprocessing: obtaining multimodal data through multispectral, shortwave infrared band and synthetic aperture radar data, and preprocessing the multimodal data;
[0017] S1.2: Atmospheric correction: construct an atmospheric correction model, and use the preprocessed multimodal data as input features, and output the corrected multimodal data.
[0018] Furthermore, the corrected multimodal data is output, including:
[0019] M1: Multi-source data fusion: fusing the pre-processed multi-modal data with external data to obtain fused data;
[0020] M2: Establishing an atmospheric correction model: Establishing an atmospheric correction model based on the fusion data, specifically:
[0021]
[0022] in: is the surface reflectivity, is the radiance in multi-source data, is the atmospheric path radiance, is the direct solar irradiance, is the atmospheric transmittance;
[0023] M3: Establishing a fused atmospheric correction model: By using a Bayesian neural network, a confidence interval is set in the predicted value of the atmospheric correction model to obtain the final predicted value.
[0024] Furthermore, the final prediction value is obtained, including:
[0025] N1: Setting the variational inference layer: Setting the variational inference layer through the convolutional neural network, and setting a Gaussian distribution in each variational inference layer, specifically:
[0026]
[0027] in: is the network weight, is the mean parameter of the normal distribution, is the variance parameter, is a Gaussian distribution;
[0028] N2: Set the loss function: Get the loss function containing the log-likelihood term and the KL divergence term, specifically:
[0029]
[0030] in: is the loss function, is the negative log-likelihood, is the predicted probability distribution, is the KL divergence term, is the balance factor, is the KL divergence, is the posterior distribution, is the prior distribution, is the predicted value of the output, is the input parameter, is the parameter set;
[0031] N3: Obtaining predicted values: According to the variational inference layer and the loss function, the preprocessed multimodal data is used as input data, and the average predicted value corresponding to the input data is obtained through multiple forward propagations, specifically:
[0032]
[0033] in: is the average predicted value, is the number of samplings, is the sampling index, is the predicted value of the i-th sampling.
[0034] Furthermore, obtaining the final prediction value also includes:
[0035] N4: Obtain prediction standard deviation: According to the average prediction value and the sampled prediction value corresponding to the input data, obtain the sampled prediction standard deviation corresponding to the prediction value, specifically:
[0036]
[0037] in: is the sample prediction standard deviation, is the average predicted value, is the number of samplings, is the sampling index, is the predicted value of the i-th sampling;
[0038] N5: Determine the final prediction value: compare the sample prediction standard deviation with the preset standard deviation threshold, and determine the final prediction value based on the comparison result, specifically:
[0039] When the sampling prediction standard deviation is greater than the preset standard deviation threshold, steps M1 to N5 are repeated to reacquire the prediction value; otherwise, the average prediction value corresponding to the sampling prediction standard deviation is the final required prediction value.
[0040] Furthermore, lightweight summary information is obtained, including:
[0041] S2.1: Determine the compression ratio: pre-process the corrected multimodal data to obtain feature data, divide the regions according to the feature data, and set the compression ratio for the divided regions;
[0042] S2.2: Generate lightweight summary information: construct a set of hash functions for each type of image data, and map the hash functions into a hash table.
[0043] Furthermore, setting a compression ratio for the divided area includes:
[0044] W1: Preprocessing the corrected image: converting the RGB color space in the corrected image into the HSV color space, and resizing the image after the color space conversion;
[0045] W2: Feature data extraction: The frequency of different colors appearing in the image is determined by the color histogram, the surface structure of the image is quantified by the gray-level co-occurrence matrix, and the contour of the object in the image is identified by the Canny operator, specifically:
[0046]
[0047] in: is the number of pixels in the i-th interval in the color histogram, is the pixel intensity value at position (a, b), is the boundary of the i-th interval in the color histogram, For the offset Lower Gray Level and grayscale The probability of simultaneous occurrence, In order to satisfy the requirement of "a pixel gray value is And in The gray value of another pixel in the direction is "The number of pixel pairs corresponding to the condition, is the total pixel pair, is the image after Gaussian filtering, is the grayscale value of the original input image, is the gradient magnitude at position (x, y), is a Gaussian smoothing filter, is the first-order partial derivative in the x direction, is the first-order partial derivative in the y direction;
[0048] W3: Histogram equalization: Enhance the feature data through the cumulative distribution function, specifically:
[0049]
[0050] in: From the minimum gray level to the current gray level The cumulative number of pixels, is the number of pixels of gray level k, is the gray level index, is the total number of gray levels;
[0051] W4: Set compression ratio: According to the enhanced feature data, the image is divided into a background area and a non-background area. At the same time, according to the JPWG quality factor set to a standard below 70, a compression ratio is set for the background area, and according to the JPWG quality factor set to a standard above 90, a compression ratio is set for the non-background area.
[0052] Furthermore, mapping the hash function into a hash table includes:
[0053] E1: Obtain binary hash code: Obtain the feature vector of the image through the convolutional neural network, and obtain the binary hash code according to the random projection matrix, specifically:
[0054]
[0055] in: is a binary hash code, is the random projection matrix, is the i-th eigenvector;
[0056] E2: Adjust the weight of the random projection matrix: The weight of the random projection matrix is adjusted by minimizing the Hamming distance between the binary hash codes, specifically:
[0057]
[0058] in: is the random projection matrix, is a set of similar items, Belongs to the set The index pair of is the Hamming distance function, For the The binary hash code corresponding to each data point is For the The binary hash code corresponding to each data point;
[0059] E3: Obtain multi-scale hash codes: According to the adjusted random projection matrix, obtain the down-sampled versions of different levels corresponding to the image picture, and obtain the independent hash code corresponding to each of the down-sampled versions, and obtain the multi-scale hash code according to the independent hash code corresponding to each of the down-sampled versions, specifically:
[0060]
[0061] in: is a multi-scale hash code, is the independent hash code corresponding to the first downsampled version, is the independent hash code corresponding to the second downsampled version, is the independent hash code corresponding to the Lth downsampled version, is the total number of downsampled versions.
[0062] Furthermore, during the process of information interaction through the smart contract interface, data transmission is encrypted through zero-knowledge proof and homomorphic encryption.
[0063] A tobacco field planting space data value storage and traceability system based on remote sensing and blockchain uses any of the above-mentioned tobacco field planting space data value storage and traceability methods based on remote sensing and blockchain.
[0064] Compared with the prior art, the present invention has the following beneficial effects:
[0065] First, the present invention pre-processes and extracts features of the corrected remote sensing images to generate lightweight summary information, stores the lightweight summary information in blockchain, stores the original remote sensing images and their metadata in cloud storage, and interacts with data and services across blockchain platforms through smart contract interfaces. The security and privacy protection of data transmission are guaranteed through zero-knowledge proof and homomorphic encryption technology, thereby not only improving the security and efficiency of data management, but also promoting the development of precision agriculture.
[0066] Second: The present invention obtains pre-access data through a behavior prediction algorithm, and manages the pre-access data through an edge computing node for fast retrieval. At the same time, for frequently accessed data, it is managed through a local cache to speed up the response time, thereby improving data access efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a flow chart of the tobacco field planting space data value evidence storage and traceability method in the present invention;
[0068] Figure 2 This is a Sentinel-2 multispectral image of a tobacco field in the present invention;
[0069] Figure 3 The synthetic aperture radar data image of the tobacco field in the present invention;
[0070] Figure 4 It is a schematic diagram of the process of obtaining the final prediction value in the present invention. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0072] In the process of data value storage and traceability of existing traceability methods, due to the characteristics of crop growth cycles, remote sensing images acquired at different time points need to maintain consistent spatial resolution and spectral characteristics to support accurate analysis. However, due to changes in satellite transit time and weather conditions, image quality is easily different. Therefore, before tracing the spatial data value of tobacco field planting based on data, it is necessary to ensure that the remote sensing images acquired at different time points are consistent in quality. The technical solution of this application preprocesses and extracts features from the corrected remote sensing images, generates lightweight summary information, and stores the lightweight summary information blockchain. At the same time, the original remote sensing images and their metadata are stored through cloud storage, and pre-access data and hotspot data are managed through edge computing nodes and local caches to improve data access efficiency. At the same time, data and service interactions across blockchain platforms are performed through smart contract interfaces, and the security and privacy protection of data transmission are guaranteed through zero-knowledge proof and homomorphic encryption technology, thereby not only improving the security and efficiency of data management, but also promoting the development of precision agriculture.
[0073] refer to Figure 1-Figure 4 This embodiment provides a tobacco field planting space data value storage and traceability method based on remote sensing and blockchain, and the tobacco field planting space data value storage and traceability method includes the following steps:
[0074] Step S1: Obtain corrected multimodal data. That is, construct an atmospheric correction model, and use the obtained multimodal data (optical image and radar image) as input data of the atmospheric correction model, and output the corresponding correction data. The details are as follows:
[0075] Step S1.1: Data preprocessing. Acquire multimodal data (i.e., optical images and radar images), and preprocess the acquired multimodal data (i.e., data cleaning and preliminary processing) to obtain preprocessed multimodal data.
[0076] In this embodiment, the optical image is the multi-spectral and short-wave infrared bands provided by the Sentinel-2 satellite, and the radar image is the synthetic aperture radar data provided by the Sentinel-1 satellite. Furthermore, when the multimodal data obtained is pre-processed in this embodiment, the low-quality images caused by factors such as clouds and haze are automatically detected and eliminated through the quality assessment tool of machine learning. For example, in multimodal learning, the text is scanned and filtered by formulating precise cleaning rules combined with the corresponding keyword set, so as to identify and remove the noise or useless elements therein. Furthermore, the 6S radiation transfer model or other physical models (such as MODTRAN) are used to eliminate the influence of atmospheric scattering and absorption.
[0077] Step S1.2: Atmospheric correction. That is, through the constructed atmospheric correction model, the data obtained in step S1.1 (such as direct solar irradiance, atmospheric path radiance and atmospheric transmittance) are used as the input features of the atmospheric correction model, and the corresponding data after correction (such as corrected direct solar irradiance, corrected atmospheric path radiance and corrected atmospheric transmittance) are obtained as output. The details are as follows:
[0078] Step M1: Multi-source data fusion. The pre-processed data in step S1.1 is fused with external data to obtain fused data. Specifically, remote sensing images and corresponding historical meteorological data in different geographical regions, seasons and weather conditions are obtained through Sentinel-2 satellite multispectral images. At the same time, historical meteorological data in the global meteorological station network, including but not limited to temperature, humidity, and air pressure, are used to fuse the remote sensing image and the corresponding historical meteorological data with the historical meteorological data in the global meteorological station network to obtain fused meteorological data.
[0079] Furthermore, the acquired remote sensing images are subjected to geometric transformations such as rotation, flipping, and scaling, and pixel-level transformations such as brightness, contrast, and saturation are adjusted to obtain images corresponding to different observation angles and lighting conditions. At the same time, spatial features are extracted from the acquired remote sensing images through the CNN architecture.
[0080] Step M2: Establish an atmospheric correction model. That is, establish an atmospheric correction model based on the fused multi-source data obtained in step M1, specifically:
[0081]
[0082] in: is the surface reflectivity, is the radiance in multi-source data, is the atmospheric path radiance, is the direct solar irradiance, is the atmospheric transmittance.
[0083] Step M3: Establish the fused atmospheric correction model. That is, through the Bayesian neural network, set the confidence interval in the predicted value output by the atmospheric correction model to obtain the final predicted value. The details are as follows:
[0084] Step N1: Setting the variational inference layer. That is, setting the variational inference layer through the convolutional neural network, and setting a Gaussian distribution in each variational inference layer, specifically:
[0085]
[0086] in: is the network weight, is the mean parameter of the normal distribution, is the variance parameter, is a Gaussian distribution.
[0087] Step N2: Set the loss function. That is, define the loss function including the log-likelihood term and the KL divergence term, specifically:
[0088]
[0089] in: is the loss function, is the negative log-likelihood, is the predicted probability distribution, is the KL divergence term, is the balance factor, is the KL divergence, is the posterior distribution, is the prior distribution, is the predicted value of the output, is the input parameter, is a parameter set.
[0090] Step N3: Get the predicted value. That is, according to the variational inference layer set in step N1 and the loss function set in step N2, the preprocessed data obtained in step S1.1 is used as input data. In other words, in the process of prediction, multiple forward propagations are performed, that is, the weights are resampled from the weight distribution defined in the previous section each time. That is, according to the different sampling times, multiple different prediction results can be obtained. At the same time, according to the multiple different prediction results obtained, the average prediction value is used as the final prediction value, specifically:
[0091]
[0092] in: is the average predicted value, is the number of samplings, is the sampling index, is the predicted value of the i-th sampling.
[0093] Step N4: Obtain the prediction standard deviation. That is, through the sampled prediction value and the average prediction value obtained in step N3, determine the sampled prediction standard deviation corresponding to the prediction value, specifically:
[0094]
[0095] in: is the sample prediction standard deviation, is the average predicted value, is the number of samplings, is the sampling index, is the predicted value of the i-th sampling.
[0096] Step N5: Determine the final prediction value. That is, according to the sample prediction standard deviation obtained in step N4 , determine the sample prediction standard deviation Whether the corresponding predicted value is the final predicted value. In other words, according to the obtained sample prediction standard deviation , determine the corresponding average prediction value The accuracy of the obtained sample prediction is that when the obtained sample prediction standard deviation is greater than the preset standard deviation threshold, it indicates that the obtained average prediction value If the uncertainty is high, it is necessary to re-acquire the predicted value, that is, repeat steps M1 to N5, re-acquire the predicted value, and test and confirm the obtained predicted value. Otherwise, the average predicted value obtained is It is worth noting that the preset standard deviation threshold in this embodiment can be specifically set according to actual needs, so its size is not specifically set in this embodiment.
[0097] In the implementation process, Sentinel-2 multispectral images of tobacco fields within a specific time period were used (ref. Figure 2 ) and synthetic aperture radar data (reference Figure 3 ), and there are also ground-measured meteorological data for the same period. The specific parameters of the ground-measured meteorological data are as follows in Table 1:
[0098] Table 1
[0099]
[0100] According to the picture and the data in the above table, it can be seen that: the average prediction value is 0.75, the sampling prediction standard deviation is 0.05, and the preset standard deviation threshold in this embodiment is 0.1, that is, the current sampling prediction standard deviation is less than the preset standard deviation threshold, that is, the average prediction value is the final required prediction value, so its size is 0.75.
[0101] Step S2: Preprocessing of multimodal data. That is, the final prediction value and image obtained in step N5 are preprocessed and feature extracted for the image. At the same time, according to the extracted features, the region is divided and different compression ratios are set to obtain lightweight summary information. The details are as follows:
[0102] Step S2.1: Determine the compression ratio. That is, preprocess the corrected image, extract feature data from the preprocessed image, divide the image into regions based on the extracted feature data, and set the corresponding compression ratio based on the divided regions. The details are as follows:
[0103] Step W1: Preprocess the corrected image. That is, convert the RGB color space in the image to HSV to separate its brightness information and other visual attributes. Specifically:
[0104]
[0105] in: is the hue of the image. is the value of the red channel in the image, is the value of the green channel in the image, is the value of the blue channel in the image, is the saturation of the image, is the brightness value of the image.
[0106] Furthermore, the size of the image after color conversion is adjusted, that is, the specific size is adjusted according to the specific needs in the actual use process to reduce the amount of calculation without affecting its main features.
[0107] Step W2: Feature data extraction. That is, the frequency of occurrence of different colors in the image is counted through the color histogram, the surface structure is quantified through the gray-level co-occurrence matrix, and the significant edges in the image are detected through the Canny operator to identify the contours of the objects in the image. Specifically:
[0108]
[0109] in: is the number of pixels in the i-th interval in the color histogram, is the pixel intensity value at position (a, b), is the boundary of the i-th interval in the color histogram, For the offset Lower Gray Level and grayscale The probability of simultaneous occurrence, In order to satisfy the requirement of "a pixel gray value is And in The gray value of another pixel in the direction is "The number of pixel pairs corresponding to the condition, is the total pixel pair, is the image after Gaussian filtering, is the grayscale value of the original input image, is the gradient magnitude at position (x, y), is a Gaussian smoothing filter, is the first-order partial derivative in the x direction, is the first-order partial derivative in the y direction.
[0110] Step W3: Histogram equalization. The feature data extracted in step W2 is enhanced by the cumulative distribution function to improve its contrast, and the enhanced cumulative distribution function is displayed in the form of a histogram. In this embodiment, the feature data is enhanced by the cumulative distribution function, specifically:
[0111]
[0112] in: From the minimum gray level to the current gray level The cumulative number of pixels, is the number of pixels of gray level k, is the gray level index, is the total number of gray levels.
[0113] Step W4: Set the compression ratio. That is, according to the characteristic data shown in step W3, the image area is divided, and different compression ratios are set according to the divided image areas. Specifically, the image area is divided into a background area and a non-background area, and the background area is set to a compression ratio according to a JPWG quality factor of less than 70. The non-background area is set to a compression ratio according to a JPWG quality factor of more than 90.
[0114] Step S2.2: Generate lightweight summary information. That is, through the spatial correlation and temporal redundancy characteristics of the image, a set of hash functions is constructed for each type of image data, and the image is mapped to the corresponding hash table through the constructed hash function. The details are as follows:
[0115] Step E1: Obtaining a binary hash code. That is, extracting features from the image data through a convolutional neural network, that is, obtaining a feature vector, and using the obtained feature vector as input, mapping it to a lower-dimensional space through a random projection matrix to obtain a binary hash code, specifically:
[0116]
[0117] in: is a binary hash code, is the random projection matrix, is the ith eigenvector.
[0118] Step E2: Adjust the weight of the random projection matrix. That is, adjust the weight of the random projection matrix by minimizing the Hamming distance between binary hash codes, specifically:
[0119]
[0120] in: is the random projection matrix, is a set of similar items, Belongs to the set The index pair of is the Hamming distance function, For the The binary hash code corresponding to each data point is For the The binary hash code corresponding to each data point.
[0121] Step E3: Obtain multi-scale hash codes. The image is downsampled at different levels, and each downsampled version is used as a simplified view of the original image to retain structural information at different levels. At the same time, an independent hash code corresponding to each downsampled version is obtained, and all independent hash codes are spliced to obtain a multi-scale hash code, which is:
[0122]
[0123] in: is a multi-scale hash code, is the independent hash code corresponding to the first downsampled version, is the independent hash code corresponding to the second downsampled version, is the independent hash code corresponding to the Lth downsampled version, is the total number of downsampled versions.
[0124] In the process of specific implementation, a data set containing 100 remote sensing images of tobacco fields is set up. The size of each picture is 256x256 pixels and the color depth is RGB (that is, each pixel has three channels). At the same time, after each picture is processed by the convolutional neural network, the corresponding feature vector dimension is 4096. In other words, it is necessary to construct a 4096×644096×64 random projection matrix to map the high-dimensional feature vector to a 64-bit binary space. It is worth noting that when the product of the feature vector in the picture and the random projection matrix is positive, the binary value of the corresponding position is 1, otherwise the binary value of the corresponding position is 0. In other words, 100 64-bit binary hash codes can be obtained. That is, the 100 64-bit binary hash codes are spliced to obtain the final lightweight summary information.
[0125] Step S3: Establish a data management system. The multi-scale hash code obtained in step E3 is used as lightweight summary information and stored in the blockchain. The original remote sensing image and metadata are stored in the cloud storage, and information exchange between different blockchain platforms is carried out through smart contracts. The details are as follows:
[0126] Step S3.1: Blockchain stores lightweight summary information. The lightweight summary information obtained in step E3 is recorded in the blockchain. Since the lightweight summary information is composed of multi-scale hash codes, its overall size is small, thereby reducing the amount of data uploaded to the main chain.
[0127] In the specific implementation process, when the height of the block is Q, the set of hash codes recorded in the Qth block can be expressed as:
[0128]
[0129] in: is the set of hash codes recorded in the Qth block, is the multi-scale hash code corresponding to the first lightweight summary information, is the multi-scale hash code corresponding to the second lightweight summary information, is the multi-scale hash code corresponding to the nth lightweight summary information, is the total number of lightweight summary information in the Qth block.
[0130] In the specific implementation process, the height of the block in this embodiment is set to 10, that is, the lightweight summary information of 100 pictures is recorded in the 10th block. Furthermore, the lightweight summary information in this embodiment is composed of multi-scale hash codes, that is, each lightweight summary information is 64 bits, so the total number of lightweight summary information stored in the 10th block is not more than 100.
[0131] Step S3.2: Cloud storage saves the original remote sensing images and metadata, that is, loading the pre-accessed data into the edge computing node and keeping the hot data (i.e., frequently accessed data) in the local cache.
[0132] In this embodiment, the user's access pattern is analyzed through a behavior prediction algorithm in machine learning (such as time series prediction, regression analysis or classification method) to predict the data that the user may request to access, that is, pre-access data. In other words, the predicted pre-access data is stored in the edge computing node for preservation.
[0133] Furthermore, by collecting and analyzing the access records of each file, the number of access requests for each file in the same time period can be determined. It is worth noting that files that are requested multiple times with a short interval between each request are hot data. In other words, the determined hot data is retained in the local cache.
[0134] Furthermore, in this embodiment, the stored pre-access data and hotspot data are compressed by lossless compression technology, that is, only the file size is reduced without damaging the quality of the file. It is worth noting that for a distributed storage system, erasure coding can be used for auxiliary compression.
[0135] In the specific implementation process, after analyzing the user's access pattern, in the past month, 20 pictures were requested multiple times with an interval of no more than one day, that is, these 20 pictures are hot data, and these 20 pictures are saved in the local cache. Furthermore, through the behavior prediction algorithm in machine learning, it is shown that 10 pictures will be accessed in the next week, that is, these 10 pictures are pre-access data, that is, these 10 pictures are saved through the edge computing node.
[0136] Step S3.3: Modular design of smart contracts. That is, through the smart contract interfaces of multiple blockchain platforms, assets and services on different chains can interact with each other.
[0137] It is worth noting that in this embodiment, data transmission is encrypted through zero-knowledge proof and homomorphic encryption. Specifically, zero-knowledge proof can verify the established properties without revealing the specific content, and homomorphic encryption can perform calculations directly in the encrypted state without decrypting the data itself. In other words, the confidentiality of the data can also be maintained during the cloud processing process.
[0138] This embodiment also provides a tobacco field planting space data value storage and traceability system based on remote sensing and blockchain. The tobacco field planting space data value storage and traceability system uses a tobacco field planting space data value storage and traceability method based on remote sensing and blockchain described in the above embodiment.
[0139] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is limited by the attached embodiments and their equivalents.
Claims
1. A method for tracing tobacco field planting spatial data values based on remote sensing and blockchain, characterized in that: Included are: S1: Obtain corrected multimodal data: Use the multimodal data as input to the atmospheric correction model, and output the corrected multimodal data, including: S1.1: Data preprocessing: obtaining multimodal data through multispectral, shortwave infrared band and synthetic aperture radar data, and preprocessing the multimodal data; S1.2: Atmospheric correction: construct an atmospheric correction model, and use the preprocessed multimodal data as input features, and output the corrected multimodal data, including: M1: Multi-source data fusion: fusing the pre-processed multi-modal data with external data to obtain fused data; M2: Establishing an atmospheric correction model: Establishing an atmospheric correction model based on the fusion data, specifically: in: is the surface reflectivity, is the radiance in multi-source data, is the atmospheric path radiance, is the direct solar irradiance, is the atmospheric transmittance; M3: Establishing the fused atmospheric correction model: Setting the confidence interval in the predicted value of the atmospheric correction model through the Bayesian neural network to obtain the final predicted value, including: N1: Setting the variational inference layer: Setting the variational inference layer through the convolutional neural network, and setting a Gaussian distribution in each variational inference layer, specifically: in: is the network weight, is the mean parameter of the normal distribution, is the variance parameter, is a Gaussian distribution; N2: Set the loss function: Get the loss function containing the log-likelihood term and the KL divergence term, specifically: in: is the loss function, is the negative log-likelihood, is the predicted probability distribution, is the KL divergence term, is the balance factor, is the KL divergence, is the posterior distribution, is the prior distribution, is the predicted value of the output, is the input parameter, is the parameter set; N3: Obtaining predicted values: According to the variational inference layer and the loss function, the preprocessed multimodal data is used as input data, and the average predicted value corresponding to the input data is obtained through multiple forward propagations, specifically: in: is the average predicted value, is the number of samplings, is the sampling index, is the predicted value of the i-th sampling; S2: Preprocessing of multimodal data: preprocessing the corrected multimodal data, and setting a compression ratio according to the divided regions to obtain lightweight summary information; S3: Establish a data management system: store the lightweight summary information through blockchain, store the original remote sensing images and metadata through cloud storage, and exchange information through smart contracts, including: S3.1: Blockchain stores lightweight summary information: The lightweight summary information is stored in the blockchain. The lightweight summary information recorded in the blockchain is specifically: in: is the set of hash codes recorded in the Qth block, is the multi-scale hash code corresponding to the first lightweight summary information, is the multi-scale hash code corresponding to the second lightweight summary information, is the multi-scale hash code corresponding to the nth lightweight summary information, is the total number of lightweight summary information in the Qth block; S3.2: Cloud storage saves original remote sensing images and metadata: pre-access data is stored through edge computing nodes, and hot spot data is stored through local cache; S3.3: Modular design of smart contracts: Through the smart contract interfaces of multiple blockchains, the information on different blockchains can interact with each other.
2. According to claim 1, a tobacco field planting space data value evidence storage and traceability method based on remote sensing and blockchain is characterized in that: Get the final prediction value, including: N4: Obtain prediction standard deviation: According to the average prediction value and the sampled prediction value corresponding to the input data, obtain the sampled prediction standard deviation corresponding to the prediction value, specifically: in: is the sample prediction standard deviation, is the average predicted value, is the number of samplings, is the sampling index, is the predicted value of the i-th sampling; N5: Determine the final prediction value: compare the sample prediction standard deviation with the preset standard deviation threshold, and determine the final prediction value based on the comparison result, specifically: When the sampling prediction standard deviation is greater than the preset standard deviation threshold, steps M1 to N5 are repeated to reacquire the prediction value; otherwise, the average prediction value corresponding to the sampling prediction standard deviation is the final required prediction value.
3. According to claim 1, a tobacco field planting space data value evidence storage and traceability method based on remote sensing and blockchain is characterized in that: Get lightweight summary information, including: S2.1: Determine the compression ratio: pre-process the corrected multimodal data to obtain feature data, divide the regions according to the feature data, and set the compression ratio for the divided regions; S2.2: Generate lightweight summary information: construct a set of hash functions for each type of image data, and map the hash functions into a hash table.
4. According to claim 3, a tobacco field planting space data value evidence storage and traceability method based on remote sensing and blockchain is characterized in that: The compression ratio is set for the divided area, including: W1: Preprocessing the corrected image: converting the RGB color space in the corrected image into the HSV color space, and resizing the image after the color space conversion; W2: Feature data extraction: The frequency of different colors appearing in the image is determined by the color histogram, the surface structure of the image is quantified by the gray-level co-occurrence matrix, and the contour of the object in the image is identified by the Canny operator, specifically: in: is the number of pixels in the i-th interval in the color histogram, is the pixel intensity value at position (a, b), is the boundary of the i-th interval in the color histogram, For the offset Lower Gray Level and grayscale The probability of simultaneous occurrence, To satisfy the condition "a pixel gray value is And in The gray value of another pixel in the direction is "The number of pixel pairs corresponding to the condition, is the total pixel pair, is the image after Gaussian filtering, is the grayscale value of the original input image, is the gradient magnitude at position (x, y), is a Gaussian smoothing filter, is the first-order partial derivative in the x direction, is the first-order partial derivative in the y direction; W3: Histogram equalization: Enhance the feature data through the cumulative distribution function, specifically: in: From the minimum gray level to the current gray level The cumulative number of pixels, is the number of pixels of gray level k, is the gray level index, is the total number of gray levels; W4: Set compression ratio: According to the enhanced feature data, the image is divided into a background area and a non-background area. At the same time, according to the JPWG quality factor set to a standard below 70, a compression ratio is set for the background area, and according to the JPWG quality factor set to a standard above 90, a compression ratio is set for the non-background area.
5. According to claim 3, a tobacco field planting space data value storage and traceability method based on remote sensing and blockchain is characterized in that: Mapping the hash function into a hash table includes: E1: Obtain binary hash code: Obtain the feature vector of the image through the convolutional neural network, and obtain the binary hash code according to the random projection matrix, specifically: in: is a binary hash code, is the random projection matrix, is the i-th eigenvector; E2: Adjust the weight of the random projection matrix: The weight of the random projection matrix is adjusted by minimizing the Hamming distance between the binary hash codes, specifically: in: is the random projection matrix, is a set of similar items, Belongs to the set The index pair of is the Hamming distance function, For the The binary hash code corresponding to each data point is For the The binary hash code corresponding to each data point; E3: Obtain multi-scale hash codes: According to the adjusted random projection matrix, obtain the down-sampled versions of different levels corresponding to the image picture, and obtain the independent hash code corresponding to each of the down-sampled versions, and obtain the multi-scale hash code according to the independent hash code corresponding to each of the down-sampled versions, specifically: in: is a multi-scale hash code, is the independent hash code corresponding to the first downsampled version, is the independent hash code corresponding to the second downsampled version, is the independent hash code corresponding to the Lth downsampled version, is the total number of downsampled versions.
6. According to claim 1, a tobacco field planting space data value evidence storage and traceability method based on remote sensing and blockchain is characterized in that: During the information interaction through the smart contract interface, data transmission is encrypted through zero-knowledge proof and homomorphic encryption.
7. A tobacco field planting spatial data value evidence storage and traceability system based on remote sensing and blockchain, characterized in that: A tobacco field planting spatial data value storage and traceability method based on remote sensing and blockchain as described in any one of claims 1-6 is used.
Citation Information
Patent Citations
Buddhist peach traceability method and system based on block chain
CN117764607A
Optical remote-sensing image, GIS automatic registration and water body extraction integrated method
CN103400151A
Marine disaster data processing method based on remote sensing monitoring
CN118865600A