Cross-Domain Sharing Method of Agricultural Data Smart Contracts Based on Master-Slave Chains

Through master-slave chain architecture and smart contracts, a dynamic trust level model and a spatio-temporal convolutional network are built, which solves the problems of insufficient heterogeneity and credibility of agricultural data, and realizes efficient and transparent data sharing and resource allocation.

CN120128596BActive Publication Date: 2025-07-25YUNNAN AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510591405.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-07-25
Estimated Expiration
2045-05-08

AI Technical Summary

Technical Problem

The sharing barriers and insufficient data credibility caused by the heterogeneity of agricultural data in the prior art, the lack of dynamic trust assessment and smart contract-driven cross-regional resource sharing solutions, and the inability to effectively respond to emergencies.

Method used

Based on the cross-domain sharing method of agricultural data smart contracts based on the master-slave chain, we collect multi-source heterogeneous data by deploying edge computing nodes from the chain, build a dynamic trust level model to filter data, use smart contracts to achieve transparent sharing, and build a spatio-temporal convolutional network for dynamic risk prediction and hierarchical warning, and optimize resource allocation.

Benefits of technology

It improves the transparency of agricultural data sharing and the real-time resource allocation, solves the problems of insufficient data heterogeneity and credibility, and achieves the efficiency and accuracy of resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120128596B_ABST
    Figure CN120128596B_ABST
Patent Text Reader

Abstract

The present invention discloses a cross-domain sharing method for agricultural data intelligent contracts based on a master-slave chain, specifically related to the technical field of agricultural data sharing. By deploying edge computing nodes on the slave chain, multi-source heterogeneous agricultural data is collected, a dynamic trust level model is constructed, the data is evaluated and screened for credibility, and highly credible data is synchronized to the master chain for sharing, while low-credible data is retained on the slave chain for verification; the master chain realizes the transparency of data sharing rules based on intelligent contracts, constructs a dynamic risk prediction model in combination with a spatio-temporal convolutional network, predicts the probability distribution of crop anomaly coefficients, optimizes the resource allocation plan, and uses intelligent contracts to trigger hierarchical early warnings, realizing the efficient allocation and dynamic optimization of cross-regional resources; effectively solving the problems of sharing obstacles caused by agricultural data heterogeneity, insufficient data credibility, and inaccurate resource allocation in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural data sharing. More specifically, the present invention relates to a method for cross-domain sharing of agricultural data intelligent contracts based on a master-slave chain. Background Art

[0002] With the rapid development of agricultural modernization, there is a wide variety of data types and heterogeneous sources in the process of crop production, including multi-source data such as meteorology, soil monitoring, and crop status. However, due to the lack of a unified credibility evaluation mechanism for these data, it is difficult to achieve efficient integration and sharing. In addition, the dynamic allocation of agricultural resources depends on the accuracy of real-time data and the precision of prediction models. There is a lack of a dynamic trust evaluation and intelligent contract-driven cross-regional resource sharing scheme for agricultural data in the existing technology, and it is impossible to effectively respond to sudden agricultural events such as the impact of extreme climate on crops. Summary of the Invention

[0003] In order to overcome the above-mentioned defects of the prior art, the present invention provides a method for cross-domain sharing of agricultural data intelligent contracts based on a master-slave chain to solve the problems raised in the above background art.

[0004] To achieve the above object, the present invention provides the following technical solution: A method for cross-domain sharing of agricultural data intelligent contracts based on a master-slave chain, comprising the following steps:

[0005] Step 1: Multi-source data collection and edge preprocessing: Collect multi-source heterogeneous agricultural data, including meteorological data, soil monitoring data, and crop status data, through edge computing nodes deployed on the slave chain;

[0006] Step 2: Dynamic trust level evaluation and data screening: Based on the multi-dimensional features of the collected data, construct a dynamic trust level model and output a data trust score; Synchronize the data above the trust score threshold to the master chain for sharing; Retain the data below the trust score threshold on the slave chain for verification or marking;

[0007] Step 3: Cross-domain data sharing of intelligent contracts: Use intelligent contracts in the master chain to construct data sharing rules to achieve transparent sharing of agricultural data;

[0008] Step 4: On-chain dynamic prediction and emergency response: Based on the historical data and real-time data integrated on the master chain, construct a dynamic risk prediction model to predict the probability of abnormal agricultural events; Use intelligent contracts to trigger hierarchical early warnings and dynamically allocate emergency resources.

[0009] Preferably, the construction of the dynamic trust level model includes:

[0010] Construct a multi-dimensional feature vector based on the source reliability, timestamp consistency, and historical data integrity of the collected data to obtain the original feature values;

[0011] Train historical data using the Gaussian mixture model to obtain a trust scoring function; the scoring function is used to map the original feature values to a normalized score within the range of 0 to 1;

[0012] According to the set scoring threshold, the collected agricultural data is divided into highly reliable data and low-reliability data, and output to the main chain and the sub-chain respectively.

[0013] Preferably, the verification method retained on the sub-chain includes: verification based on the consistency and trend analysis of historical data, improvement of reliability by cross-comparison of multi-source data, and judgment of whether the error is within a reasonable range through a dynamic prediction model.

[0014] Preferably, the method for constructing the dynamic risk prediction model is as follows:

[0015] Construct a spatio-temporal convolutional network and input the time-dimensional features of agricultural data and the spatial-dimensional features ;

[0016] Train the spatio-temporal convolutional network until the loss function meets the preset requirements, obtain the dynamic risk prediction model, and record the credibility score XP;

[0017] The form of the dynamic risk prediction model is:

[0018] ;

[0019] where, represents the predicted risk probability; represents the convolutional processing of spatial features, represents the convolutional processing of time features; is the activation function, which is used to avoid the negative value interference of the values in the brackets and improve the model stability.

[0020] Preferably, the process of constructing the dynamic risk prediction model further includes the step of dynamically adjusting the prediction window according to the prediction demand and error distribution:

[0021] If the current prediction error is greater than the set threshold , then shorten the prediction window to improve real-time performance;

[0022] If the error is less than the threshold , then extend the prediction window to reduce the calculation frequency, and the dynamic adjustment formula for the prediction window length is:

[0023] ;

[0024] where, represents the initial prediction window; represents the current prediction error; Indicates the standard deviation of historical errors;

[0025] Use a smart contract to record the adjustment history of the prediction window and automatically correct the threshold based on the prediction performance and to ensure that the dynamic rules adapt to different environments.

[0026] Preferably, the calculation formula for the credibility score XP is:

[0027] ;

[0028] where A represents the historical accuracy rate of the dynamic risk prediction model under the preset prediction window; Indicates the current data standard deviation; Indicates the historical data standard deviation; Indicates the adjustment coefficient.

[0029] Preferably, the use of a smart contract to trigger a graded early warning means:

[0030] Set the graded early warning rule as:

[0031] ;

[0032] where and are the risk level thresholds;

[0033] A minor event indicates a risk warning only within the released area;

[0034] A medium event indicates the initiation of local resource collaboration;

[0035] A severe event indicates triggering a cross-regional resource sharing mechanism for large-scale collaboration.

[0036] Preferably, connect the dynamic risk prediction model to the steps of crop anomaly management, and the steps of crop anomaly management include:

[0037] Step 301, regional division: Divide the agricultural area into several sub-regions according to geographical features, climate types, and crop types;

[0038] Step 302, obtain crop data: Extract crop data with data trust scores meeting the requirements from the smart contract, including: meteorological data, soil monitoring data, and crop status data;

[0039] Step 303. Analysis of crop status: Analyze meteorological data, soil monitoring data, and crop status data, and output the Environmental Suitability Index (ESI), Crop Health Index (CHI), and Resource Demand Index (RDI); Combine the ESI, CHI, and RDI, and calculate the crop anomaly coefficient through a formula. ;

[0040] Step 304. Prediction of crop anomaly coefficient: Analyze the historical and real-time crop data of the sub-region through a dynamic risk prediction model, and predict the probability distribution of the crop anomaly coefficient exceeding the preset value within the future time window; Reveal the degree to which crop anomalies may reach a certain risk level at a certain or multiple future time points, which is helpful for early warning and resource allocation.

[0041] Preferably, the method for obtaining the Environmental Suitability Index (ESI) is as follows:

[0042] Suppose there are k types of environmental parameters, and s represents the serial number of the environmental parameter; Set weights based on the influence degree of different environmental parameters on crop growth, and obtain the weight of the s-th type of environmental parameter. ; Denote the s-th type of environmental parameter (such as temperature, rainfall, soil pH value) as , and calculate ESI through the following formula:

[0043] ;

[0044] ;

[0045] Among them, represents the non-linear suitability function; represents the ideal value of the s-th environmental parameter; represents the standard deviation of the s-th parameter, which is used to control the tolerance for deviation from the ideal value; ESI→1 indicates that the environment is very suitable; ESI→0 indicates that the environmental conditions deviate from the ideal value and the suitability is poor.

[0046] The method for obtaining the Crop Health Index (CHI) is as follows:

[0047] Suppose there are Q types of crop status parameters (chlorophyll concentration, canopy temperature, leaf water content), and p represents the serial number of the crop status parameter; Set the influence coefficient of the crop status parameter on the crop target yield as the weight, and denote the weight of the p-th type of crop status parameter as ; Denote the p-th type of crop status as, and calculate CHI through the following formula:

[0048] ;

[0049] ;

[0050] Among them, represents the state consistency function, represents the reference value of the expected health state of the crop; is a small positive number such as = 0.01; CHI → 1 indicates that the current state of the crop is highly consistent with the ideal health state; CHI → 0 indicates that the crop state is highly consistent with the ideal health state;

[0051] The acquisition method of the resource demand index RDI is as follows:

[0052] Calculate the resource gap of various resources (such as water, nutrients, fertilizers, etc.) from the current level to the ideal level. If the current value exceeds the ideal value, the resource gap is 0; assign weights to each type of resource according to the importance of the resource to crop growth, weight the gap of each type of resource according to the weight, calculate the overall weighted resource gap, calculate the ratio of the weighted resource gap to the total ideal value of all resources, and output the normalized resource gap; use the ratio of the normalized resource gap to the ideal value of the resource to represent the resource demand index RDI.

[0053] Preferably, the crop anomaly management step is connected to the resource scheduling step, and the resource scheduling step includes:

[0054] Knowledge graph construction: Based on the sub-region environmental characteristics, historical allocation records, and resource supply and demand relationships, construct an agricultural resource knowledge graph, and define the paths and rules for resource allocation between sub-regions;

[0055] Dynamic evaluation and scheduling strategy generation: Combine the change trend of the crop anomaly coefficient in the future period of time, evaluate the resource demand and current supply capacity of each region, and generate a resource adjustment plan for each sub-region;

[0056] Smart contract trigger: According to the resource scheduling plan, trigger the smart contract for cross-domain resource allocation, including: calling the resource provider and automatically recording the allocation process;

[0057] Dynamic optimization and feedback: Use the data after scheduling execution to adjust the knowledge graph and dynamic evaluation weights to improve the subsequent scheduling efficiency.

[0058] The technical effects and advantages of the present invention:

[0059] The cross - domain sharing method of agricultural data intelligent contract based on master - slave chains in the present invention screens multi - source data through a dynamic trust level model to ensure data quality and improve sharing credibility; uses a spatio - temporal convolutional network to predict the change trend of crop anomaly coefficients and optimize the resource allocation plan; combines intelligent contracts to trigger hierarchical early warnings and cross - domain resource allocation to achieve the efficiency and accuracy of resource allocation; the present invention effectively solves the sharing obstacles caused by data heterogeneity, significantly improves the transparency of agricultural production data sharing and the real - time nature of resource allocation, and effectively solves the problems of data heterogeneity, insufficient credibility and inaccurate resource allocation in the prior art. Brief Description of the Drawings

[0060] Figure 1 It is a flowchart of the cross - domain sharing method of agricultural data intelligent contract of the present invention.

[0061] Figure 2 It is a flowchart of crop anomaly management of the present invention. Detailed Embodiments

[0062] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0063] At the same time, it should be understood that, for the sake of description, the dimensions of the various parts shown in the drawings are not drawn in actual proportional relationships.

[0064] The description of at least one exemplary embodiment below is merely illustrative in nature and in no way serves as a limitation to the application and its use.

[0065] Technologies, methods and devices known to those of ordinary skill in the relevant fields may not be discussed in detail, but where appropriate, the said technologies, methods and devices should be regarded as part of the specification.

[0066] Example 1. Refer to Figure 1 the flowchart of the cross - domain sharing method of agricultural data intelligent contract, and the present invention provides a cross - domain sharing method of agricultural data intelligent contract based on master - slave chains as shown in Figure 1 the following steps:

[0067] Step 1: Multi-source data collection and edge preprocessing: Collect multi-source heterogeneous agricultural data, including meteorological data, soil monitoring data, and crop status data, from edge computing nodes deployed on the chain (including distributed sensor networks, drone devices, and soil monitoring devices). Use edge computing to standardize the format, filter noise, and encrypt and store the collected data;

[0068] Explanation: Edge computing nodes are used to perform real-time adaptation and preprocessing on heterogeneous data to ensure data quality and transmission security;

[0069] Step 2: Dynamic trust level assessment and data screening: Based on multi-dimensional features such as the source reliability, timestamp consistency, and historical performance (historical data integrity) of the collected data, construct a dynamic trust level model and output a data trust score; Synchronize high-trust data, that is, data above the trust score threshold, to the main chain for sharing, and retain low-trust data, that is, data below the trust score threshold, on the sub-chain for verification or marking;

[0070] Explanation: The dynamic trust level model ensures the high reliability of the transmitted data through real-time evaluation, thereby improving the quality and efficiency of data sharing; Optimize data transmission, reduce the occupancy of main chain resources by low-quality data, and improve the accuracy of data sharing;

[0071] Step 3: Cross-chain data sharing of smart contracts: Use smart contracts in the main chain to construct data sharing rules to achieve transparent sharing of agricultural data;

[0072] Explanation, the data sharing rules include: sharing permissions (which users or nodes can access or use which data), data scope (the type, format, and time range of the shared data), data transparency (whether the sharing process is publicly queryable), incentives and fees (how data providers obtain incentives and how users pay fees);

[0073] Step 4: On-chain dynamic prediction and emergency response: Based on the historical data and real-time data integrated in the main chain, construct a dynamic risk prediction model to predict the probability of abnormal agricultural events (such as droughts, floods); Use smart contracts to trigger hierarchical warnings and dynamically allocate emergency resources.

[0074] Explanation, the smart contract refers to a protocol that, based on blockchain technology, executes and verifies contract terms in an automated manner by writing program code; Smart contracts do not require the intervention of intermediary institutions and can automatically execute preset contract content when specific conditions are met; In the present invention, smart contracts are used to define and execute agricultural data sharing rules, ensuring the transparency of data, sharing permissions, and automated execution of incentive mechanisms, reducing the possibility of human intervention and errors.

[0075] The data sharing rules refer to the specific protocols and conditions set to ensure the openness, security, and traceability of data during the sharing of agricultural data. The data sharing rules include sharing permissions (which users or nodes can access which data), the scope of shared data (data types, formats, time ranges), data transparency (whether it is publicly queryable), as well as incentive mechanisms and fees (how data providers obtain rewards and how users pay fees). Through the data sharing rules, fair, efficient, and trustworthy sharing of agricultural data can be ensured.

[0076] The way to achieve transparent sharing of agricultural data is as follows: By setting clear data sharing rules in the main chain through smart contracts, transparent sharing of agricultural data is realized. The smart contract will automatically execute data sharing permissions, data queryability, and incentive mechanisms for data providers and users to ensure that all participants can exchange data in an open, transparent, and auditable environment; through the automatic execution of smart contracts, human manipulation and information asymmetry are avoided, thereby enhancing the trust and efficiency of data sharing.

[0077] Explanation: The dynamic risk prediction model is used to analyze data trends in real time, and the hierarchical early warning mechanism combines with smart contracts to execute emergency strategies, improving the response speed and accuracy of agricultural disasters.

[0078] In the embodiments of the present invention, it needs to be further explained that the construction of the dynamic trust level model includes:

[0079] Step 101: Construct a multi-dimensional feature vector based on the source reliability of the collected data (such as the accuracy of sensor devices, brand reputation, etc.), timestamp consistency (the matching degree between the data generation time and the expected time), and historical data integrity (data continuity and missing conditions);

[0080] Step 102: Set that there are n-dimensional feature vectors, and use i to represent the sequence number; Denote the multi-dimensional feature vector as , represents the original feature value corresponding to the i-th feature vector (such as represents the data source reliability score, represents the timestamp consistency score)

[0081] Step 103: Use the Gaussian mixture model to train the historical data to obtain the trust scoring function ;

[0082] ;;

[0083] Among them, is the feature weight of the i-th feature vector, and is the corresponding scoring function;

[0084] The scoring function is used to map the original feature values to a normalized score within the range of 0 to 1. The embodiments of the present invention do not specifically limit this and it is selected based on the actual situation. The scoring function can be a linear normalization function, a non-linear scoring function, such as a logarithmic normalization function. For example , an exponential scoring function (such as , where k is used to control the growth rate; a larger k will cause the score to quickly approach 1), a mixed scoring function (combining multiple scoring functions and selecting the most suitable function according to the nature of the feature);

[0085] Step 104: According to the set scoring threshold, divide the collected agricultural data into high-trust data and low-trust data, and output them to the main chain and the sub-chain respectively.

[0086] In the embodiments of the present invention, it needs to be further explained that the feature weight is obtained in the following way:

[0087] Step 201: Determine the initial weight : According to the importance priority of the feature, assign the initial weight. The theoretical importance of each feature (such as the reliability of the data source, the consistency of the timestamp, etc.) to the credibility is assigned the initial weight through expert knowledge or historical experience ;

[0088] Step 202: Calculate the dynamic volatility : Calculate the standard deviation of the feature in the current dataset;

[0089] Step 203: Calculate the information entropy Hi: Calculate the information entropy through the probability distribution of the feature values Calculate the information entropy:

[0090] Step 204: Dynamically adjust the weight wi according to the volatility and the information entropy Hi, and normalize to ensure that the sum is 1.

[0091] In a possible embodiment, the calculation formula of the feature weight is expressed as:

[0092] ;

[0093] Where: reflects the static importance, represents the feature in the standard deviation of the current data, indicating its volatility; represents the feature of the information entropy, measuring the distribution uncertainty of the feature; , represent the adjustment coefficients of each item, reflecting the volatility and the impact on the weight adjustment; and 。

[0094] In the embodiments of the present invention, it needs to be further explained that the manner in which the low-trust data is retained, verified, or marked in the slave chain is as follows:

[0095] In a possible embodiment, verification is performed based on historical data:

[0096] Through the historical data stored in the slave chain, consistency and trend analysis are performed on the low-trust data to verify its rationality and reliability; First, check whether the low-trust data conforms to a specific pattern of historical data (such as seasonal fluctuations in meteorological data), and predict its reasonable range through time series analysis (such as moving window average, ARIMA model), and determine whether the data is within a reasonable range; It is applicable to data with strong continuity (such as meteorological data and soil monitoring data) to ensure that the low-trust data conforms to historical laws;

[0097] In a possible embodiment, cross-verification is performed based on multi-source data:

[0098] Cross-verification is performed on the low-trust data using similar data from multiple data sources in the slave chain, and the verification reliability is improved through data source comparison and anomaly detection; Specifically, compare the low-trust data with similar data collected by other sensors or devices, and use statistical methods (such as box plots or Z-scores) to quantify the deviation and screen for outliers; It is suitable for environmental data (such as soil humidity and temperature) in a multi-sensor network, and reduces the impact of single-point data errors through multi-source collaboration;

[0099] In a possible embodiment, verification is performed based on a dynamic prediction model:

[0100] Use a dynamic prediction model to perform intelligent verification on the low-trust data, and judge its effectiveness through the error between the predicted value and the low-trust data; The specific method includes using high-trust data and historical data as inputs to generate model predicted values, and comparing the differences between the low-trust data and the predicted values; If the error is lower than the set threshold, the data passes the verification, otherwise it is marked as invalid; It is applicable to data with large dynamic changes (such as crop health status and pest and disease monitoring), and improves the verification efficiency through intelligent modeling;

[0101] In a possible embodiment, real-time verification is performed based on edge computing:

[0102] Deploy a real-time verification mechanism on the edge nodes to quickly process low-trust data and reduce the burden on the main chain. First, use anomaly detection algorithms (such as Isolation Forest, Support Vector Machine) to screen outliers in the collected data in real time, and then quickly compare the real-time data with the cached high-trust data to verify consistency. After verification, dynamically adjust the data score according to the result and record the verification result. It is applicable to high-frequency acquisition scenarios (such as meteorological change monitoring), reducing the consumption of main chain resources while ensuring real-time verification.

[0103] In the embodiments of the present invention, it needs to be further explained that the method for constructing the dynamic risk prediction model is as follows:

[0104] Construct a spatio-temporal convolutional network and input the time-dimensional features of agricultural data representing the time series of historical and real-time data, and determining the time range and spatial-dimensional features of the time-dimensional features based on the size of the prediction window representing the geographical and environmental variables of different regions; where n1 represents the number of time-dimensional features and n2 represents the number of spatial-dimensional features;

[0105] Train until the loss function meets the preset requirements. The loss function is used to quantify the error between the model prediction value and the actual observed value Y, and select the mean square error (MSE) or cross-entropy loss; the training process combines an early stopping mechanism to avoid overfitting. When the loss value on the validation set does not decrease significantly after iteration, terminate the training to obtain the dynamic risk prediction model and record the credibility score XP;

[0106] The form of the dynamic risk prediction model is:

[0107] ;

[0108] where, represents the predicted risk probability; represents the convolutional processing of spatial features, represents the convolutional processing of time features; is the activation function, which is used to avoid the negative value interference of the value in the parentheses and improve the model stability;

[0109] Furthermore, on the side chain, use edge computing devices to analyze local data features in real time and quickly process high-frequency data (such as meteorological monitoring, crop status, etc.). The main chain integrates the side chain data and historical data for global optimization prediction.

[0110] Explanation: The dynamic prediction model is used to improve the spatio-temporal prediction accuracy of extreme agricultural events (such as meteorological disasters, pests and diseases); the spatio-temporal convolutional network is a deep learning model that combines time series and spatial features, and its core advantage in agricultural scenarios is that it can capture the dynamic changes of data in both time and space dimensions simultaneously, thus improving the prediction accuracy of extreme events; in agricultural prediction scenarios, spatial features and time features are two relatively independent dimensions, and their prediction contributions can be obtained through superimposed modeling to obtain a comprehensive estimate of the probability of an event occurring.

[0111] In the embodiment of the present invention, it needs to be further explained that the process of constructing the dynamic risk prediction model further includes the step of dynamically adjusting the prediction window according to the prediction demand and error distribution:

[0112] If the current prediction error is between the threshold and the threshold , it indicates that the prediction window meets the requirements and no measures are taken;

[0113] If the current prediction error is greater than the set threshold , the prediction window is shortened to improve real-time performance;

[0114] If the error is less than the threshold , the prediction window is extended to reduce the calculation frequency. The dynamic adjustment formula for the prediction window length is:

[0115] ;

[0116] where, represents the initial prediction window; represents the current prediction error; represents the historical error standard deviation;

[0117] Furthermore, the adjustment history of the prediction window is recorded using a smart contract, and the thresholds , are automatically corrected based on the prediction performance to ensure that the dynamic rules adapt to different environments.

[0118] In the embodiment of the present invention, it needs to be further explained that the use of a smart contract to trigger a hierarchical early warning means:

[0119] Set the hierarchical early warning rule as:

[0120] ;

[0121] where, and are risk level thresholds;

[0122] A minor event means only a risk reminder within the released area;

[0123] Medium events indicate the initiation of local resource collaboration (such as deploying irrigation equipment);

[0124] Severe events indicate triggering the cross - regional resource sharing mechanism for large - scale collaboration. In the embodiments of the present invention, it needs to be further explained that the calculation formula of the credibility score XP is:

[0125] ;

[0126] Wherein, A represents the historical accuracy rate of the dynamic risk prediction model under the preset prediction window; represents the current data standard deviation; represents the historical data standard deviation; represents the adjustment coefficient; The weight coefficient of the historical accuracy rate reflects the importance of historical data in the credibility score, and its value range is 0.5 to 1.5 in the embodiments of the present invention; The weight coefficient of the current fluctuation score controls the influence of the current data fluctuation on the credibility score, and its value range is 0.1 to 1 in the embodiments of the present invention.

[0127] In a possible embodiment, and The ratio of can be dynamically adjusted according to the actual scenario. For example:

[0128] For long - term stable data, increase the weight of ;

[0129] For short - term highly fluctuating data, appropriately increase the weight of ;

[0130] In a possible embodiment, obtaining the curve of the credibility score changing with the prediction window provides an important basis for optimizing the dynamic risk prediction model and its practical application, and helps to obtain the optimal prediction window;

[0131] By plotting the curve of the credibility score changing with the prediction window, the performance of the model at different time spans can be intuitively understood; for example:

[0132] When the prediction window is short, the credibility score curve is high, indicating that the model has strong reliability in short - term prediction;

[0133] When the prediction window is long, the credibility score curve is low, indicating that the model has low reliability in long - term prediction.

[0134] Embodiment 2. The difference between the embodiment of the present invention and Embodiment 1 is that the dynamic risk prediction model is connected to the steps of crop anomaly management. Refer to Figure 2 The crop anomaly management flowchart of, the steps of crop anomaly management include:

[0135] Step 301, Regional Division: Divide the agricultural area into several sub - regions according to geographical features (such as terrain, soil type), climate types (such as precipitation, temperature and humidity), and crop types (such as wheat, rice, corn);

[0136] Explanation: Dividing according to the above - mentioned scheme can ensure that each sub - region has relatively consistent environmental conditions and crop characteristics, which is convenient for subsequent data collection, status analysis and management decision - making; for example, based on remote sensing technology combined with an agricultural database, determine the geographical boundaries of the sub - regions;

[0137] Step 302, Obtain Crop Data: Extract crop data with data trust scores meeting the requirements from the smart contract, including:

[0138] Meteorological data (such as temperature, rainfall, wind speed, radiation);

[0139] Soil monitoring data (such as water content, nutrient content, pH value);

[0140] Crop status data (such as leaf health index, canopy temperature, chlorophyll concentration).

[0141] Explanation: The smart contract ensures the authenticity and high quality of the data. The edge computing node pre - processes the collected data to eliminate outliers or incomplete data points;

[0142] Step 303, Crop Status Analysis: Analyze the meteorological data, soil monitoring data and crop status data, and output the Environmental Suitability Index (ESI), Crop Health Index (CHI) and Resource Demand Index (RDI); Combine the ESI, CHI and RDI, and through the formula Calculate the crop anomaly coefficient ;

[0143] Step 304, Predict the Crop Anomaly Coefficient: Analyze the historical and real - time crop data of the sub - region through a dynamic risk prediction model to predict the probability distribution of the crop anomaly coefficient exceeding the preset value within the future time window; It reveals the degree to which crop anomalies may reach a certain risk level at a certain or multiple future time points, which helps with early warning and resource allocation.

[0144] Explanation: Respectively predict the probability distribution of the crop anomaly coefficient exceeding the preset value for the next 1 to T days, assign a larger weight to the probability distribution of exceeding the preset value for the near - time point, assign a smaller weight to the far - time point, and output the weighted probability distribution of the crop anomaly coefficient exceeding the preset value; At the same time, dynamically adjust the weight in combination with the credibility of the dynamic risk prediction model to make the prediction closer to the actual situation; If simplification is needed, directly predict the probability distribution of the average crop anomaly coefficient exceeding the preset value for the next T days.

[0145] In the embodiments of the present invention, it needs to be further explained that the acquisition method of the environmental suitability index ESI is as follows:

[0146] Suppose there are k types of environmental parameters, and s represents the sequence number of the environmental parameters; set weights based on the influence degree of different environmental parameters on crop growth, and obtain the weight of the s-th type of environmental parameter ; Denote the s-th type of environmental parameter (such as temperature, rainfall, soil pH value) as , and calculate ESI through the following formula:

[0147] ;

[0148] ;

[0149] Wherein, represents a non-linear suitability function; represents the ideal value of the s-th environmental parameter; represents the standard deviation of the s-th parameter, which is used to control the tolerance of deviation from the ideal value; ESI→1 indicates that the environment is very suitable; ESI→0 indicates that the environmental conditions deviate from the ideal value and the suitability is poor;

[0150] The acquisition method of the crop health index CHI is as follows:

[0151] Suppose there are Q types of crop state parameters (chlorophyll concentration, canopy temperature, leaf water content), and p represents the sequence number of the crop state parameters; set the influence coefficient of the crop state parameters on the crop target yield as the weight, and denote the weight of the p-th type of crop state parameter as ; Denote the p-th type of crop state as , and calculate CHI through the following formula:

[0152] ;

[0153] ;

[0154] Wherein, represents the state consistency function, represents the reference value of the expected healthy state of the crop; is a small positive number such as =0.01; CHI→1 indicates that the current state of the crop is highly consistent with the ideal healthy state; CHI→0 indicates that the crop state is highly consistent with the ideal healthy state;

[0155] The acquisition method of the resource demand index RDI is as follows:

[0156] Calculate the resource gap of various resources (such as water, nutrients, fertilizers, etc.) from the current level to the ideal level. If the current value exceeds the ideal value, the resource gap is 0; allocate weights to each type of resource according to the importance of the resource to crop growth, weight the gap of each type of resource according to the weight, calculate the overall weighted resource gap, calculate the ratio of the weighted resource gap to the sum of the ideal values of all resources, and output the normalized resource gap; use the ratio of the normalized resource gap to the ideal value of the resource to represent the resource demand index RDI.

[0157] In the embodiments of the present invention, it needs to be further explained that the crop anomaly management step is connected to the resource scheduling step, and the resource scheduling step includes:

[0158] Knowledge graph construction: Based on the sub-region environmental characteristics, historical allocation records, and resource supply and demand relationships, construct an agricultural resource knowledge graph, and define the paths and rules for resource allocation between sub-regions;

[0159] Dynamic evaluation and scheduling strategy generation: Combine the change trend of the crop anomaly coefficient in the future period of time, evaluate the resource demand and current supply capacity of each region, and generate a resource adjustment plan for each sub-region;

[0160] Smart contract trigger: According to the resource scheduling plan, trigger the smart contract for cross-domain resource allocation, including: calling resource providers (such as irrigation equipment, drones); automatically recording the allocation process (such as time, quantity, allocation method);

[0161] Dynamic optimization and feedback: Use the data after the scheduling execution to adjust the knowledge graph and dynamic evaluation weights to improve the subsequent scheduling efficiency.

[0162] Explanation: In Embodiment 1, the dynamic risk prediction model can predict the probability of occurrence of a single event such as continuous drought (based on rainfall and soil moisture trends) or extreme precipitation (based on rainfall and temperature data); in Embodiment 2, the dynamic risk prediction model can predict the probability that a compound event exceeds a threshold, for example, the probability distribution that the crop anomaly coefficient (calculated based on the environmental suitability index, crop health index, and resource demand index) exceeds a preset value, and determine whether a systemic risk will occur.

[0163] In a possible embodiment, it includes a model optimization step, including:

[0164] Continuously obtain multi-source agricultural data such as meteorology, soil, and crop health, establish a data time series, and monitor its change trend;

[0165] Based on the influence degree of each data source on crop growth, combined with the real-time feedback of environmental changes, use the analytic hierarchy process (AHP) method to calculate the weight coefficients of each data source;

[0166] When the weight coefficient of a certain data source deviates from the preset standard value (for example, the deviation exceeds 10%), the adjustment mechanism is automatically triggered to correct the weight coefficient of the data source;

[0167] Trust score and risk prediction optimization: According to the dynamically adjusted weight coefficients, update the trust score function and the dynamic risk prediction model to ensure that the contribution degrees of various types of data in the model adapt to the changes in the actual environment;

[0168] After the end of each cycle, verify the accuracy of the updated dynamic risk prediction model in agricultural data prediction and risk assessment. If the error exceeds the set threshold (for example, the error exceeds 5%), further adjust the feedback mechanism to optimize the response capabilities of the weight coefficients and the prediction model;

[0169] Based on the optimized trust score function and dynamic risk prediction model, precisely adjust the emergency response strategy to ensure that the resource scheduling plan is more refined and real-time, and can cope with the sudden changes caused by environmental fluctuations and the uncertainties brought by data fluctuations.

[0170] Finally: The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An agricultural data intelligent contract cross - domain sharing method based on a master - slave chain, characterized in that Including the following steps: Collect multi-source heterogeneous agricultural data, including meteorological data, soil monitoring data, and crop status data, through edge computing nodes deployed from the chain; Based on the multi-dimensional features of the collected data, construct a dynamic trust level model and output data trust scores; synchronize the data above the trust score threshold to the main chain for sharing; retain the data below the trust score threshold on the sub-chain for verification or marking; Use smart contracts in the main chain to construct data sharing rules to achieve transparent sharing of agricultural data in different geographical regions; Based on the historical data and real-time data integrated by the main chain, construct a dynamic risk prediction model to predict the probability of abnormal agricultural events; Use smart contracts to trigger hierarchical warnings and dynamically allocate emergency resources; Connect the dynamic risk prediction model to the crop anomaly management steps, which include: Step 301, regional division: Divide the agricultural area into several sub-regions according to geographical features, climate types, and crop varieties; Step 302, obtain crop data: Extract crop data with data trust scores meeting the requirements from the smart contract; Step 303. Crop status analysis: Analyze meteorological data, soil monitoring data, and crop status data, and output the environmental suitability index ESI, the crop health index CHI, and the resource demand index RDI; Combine the environmental suitability index ESI, the crop health index CHI, and the resource demand index RDI, and through the formula Calculate the crop anomaly coefficient , = 0.01; Step 304, predict the crop anomaly coefficient: Analyze the historical and real-time crop data of the sub-region through the dynamic risk prediction model to predict the probability distribution of the crop anomaly coefficient exceeding the preset value within the future time window.

2. The cross - domain sharing method of agricultural data intelligent contract based on master - slave chain according to claim 1, characterized in that, The construction of the dynamic trust level model includes: Construct a multi-dimensional feature vector based on the source reliability, timestamp consistency, and historical data integrity of the collected data to obtain the original feature values; Use the Gaussian mixture model to train the historical data to obtain a trust score function; the score function is used to map the original feature values to a standardized score within the range of 0 to 1; According to the set score threshold, divide the collected agricultural data into high-trust data and low-trust data, and output them to the main chain and sub-chain respectively.

3. The cross-domain sharing method of agricultural data intelligent contract based on the master-slave chain according to claim 1, characterized in that, The verification method retained on the sub-chain includes: verification based on the consistency and trend analysis of historical data, improving reliability through cross-comparison of multi-source data, and judging whether the error is within a reasonable range through a dynamic prediction model.

4. The cross-domain sharing method of agricultural data intelligent contract based on master-slave chain according to claim 1, characterized in that, The method for constructing the dynamic risk prediction model is: Construct a spatio-temporal convolutional network and input the time-dimensional features of agricultural data and the spatial-dimensional features ; Train a spatio-temporal convolutional network to a loss function Meet the preset requirements to obtain a dynamic risk prediction model and record the credibility score XP; The form of the dynamic risk prediction model is: ; Among them, represents the predicted risk probability; represents the convolutional processing of spatial features, represents the convolutional processing of temporal features; is an activation function, which is used to avoid the negative value interference of the values in the brackets and improve the model stability.

5. The method for cross - domain sharing of agricultural data intelligent contracts based on the master - slave chain according to claim 4, wherein, The process of constructing the dynamic risk prediction model also includes the step of dynamically adjusting the prediction window according to the prediction requirements and error distribution: If the current prediction error is greater than the set threshold , then shorten the prediction window to improve real-time performance; If the error is less than the threshold , then extend the prediction window, reduce the calculation frequency, and the dynamic adjustment formula for the prediction window length is as follows: ; Among them, represents the initial prediction window; represents the current prediction error; represents the historical error standard deviation; Use smart contracts to record the adjustment history of the prediction window and automatically correct the threshold based on the prediction performance , to ensure that the dynamic rules adapt to different environments.

6. The cross-domain sharing method of agricultural data intelligent contract based on master-slave chain according to claim 4, characterized in that The calculation formula for the credibility score XP is: ; where A represents the historical accuracy rate of the dynamic risk prediction model under a preset prediction window; represents the current data standard deviation; represents the historical data standard deviation; represents the adjustment coefficient.

7. The method for cross - domain sharing of agricultural data intelligent contracts based on the master - slave chain according to claim 4, characterized in that, The use of smart contracts to trigger hierarchical warnings refers to: Set the hierarchical warning rules as: ; wherein, and are risk level thresholds; Minor events indicate only risk warnings within the region; Medium events indicate the initiation of local resource collaboration; Severe events indicate triggering a cross-regional resource sharing mechanism for large-scale collaboration.

8. The cross-domain sharing method of agricultural data intelligent contract based on master-slave chain according to claim 1, characterized in that, The acquisition method for the environmental suitability index ESI is: Suppose there are k types of environmental parameters, and s represents the sequential number of the environmental parameters; weights are set based on the influence degrees of different environmental parameters on crop growth, and the weight of the s-th type of environmental parameter is obtained ; Denote the s-th type of environmental parameter (such as temperature, rainfall, soil pH value) as , and calculate ESI through the following formula: ; ; Among them, represents a non-linear suitability function; represents the ideal value of the s-th environmental parameter; represents the standard deviation of the s-th parameter, which is used to control the tolerance for deviation from the ideal value; The acquisition method for the crop health index CHI is: Suppose there are Q types of crop status parameters, and p represents the sequential number of the crop status parameters; the influence coefficient of the crop status parameters on the target crop yield is set as the weight, and the weight of the p-th type of crop status parameter is denoted as ; the p-th type of crop status is denoted as , and CHI is calculated through the following formula: ; ; Among them, represents the state consistency function, represents the reference value of the expected health state of the crop; The acquisition method for the resource demand index RDI is: Calculate the resource gap of various resources from the current level to the ideal level. If the current value exceeds the ideal value, the resource gap is 0; allocate weights to each type of resource according to the importance of the resource for crop growth, weight the gap of each type of resource according to the weight, calculate the overall weighted resource gap, calculate the ratio of the weighted resource gap to the sum of the ideal values of all resources, and output the normalized resource gap; use the ratio of the normalized resource gap to the ideal value of the resource to represent the resource demand index RDI.

9. The cross - domain sharing method of agricultural data intelligent contract based on master - slave chain according to claim 1, characterized in that, The crop anomaly management step is connected to the resource scheduling step, and the resource scheduling step includes: Knowledge graph construction: Construct an agricultural resource knowledge graph based on the sub-region environmental characteristics, historical allocation records, and resource supply and demand relationships, and define the paths and rules for resource allocation between sub-regions; Dynamic evaluation and scheduling strategy generation: Combine the changing trend of the crop anomaly coefficient in the future period of time, evaluate the resource demand and current supply capacity of each region, and generate a resource adjustment plan for each sub-region; Smart contract trigger: According to the resource scheduling plan, trigger the smart contract for cross-domain resource allocation, including: calling the resource provider; automatically recording the allocation process; Dynamic optimization and feedback: Use the data after the scheduling execution to adjust the knowledge graph and the dynamic evaluation weights to improve the subsequent scheduling efficiency.

Citation Information

Patent Citations

  • Dynamic credit evaluation method and system based on multi-dimensional factors of block chain

    CN112561624A

  • Smart contract cross-domain access method based on master-slave chain architecture

    CN119363424A