Fertilizer traceability and quality safety management platform for smart agriculture
By constructing a blockchain and detection model, target watermark information is generated and qualification testing is performed. Combined with farmland information, fertilization strategies are generated, which solves the problem of inaccurate fertilizer traceability and achieves precision in fertilizer quality control and crop management.
Patent Information
- Application Number
- PCT/CN2024/118915
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2024-09-13
- Publication Date
- 2026-01-02
AI Technical Summary
Existing fertilizer traceability methods are not precise enough and do not test the agricultural products corresponding to the traceability information, which may lead to inaccurate traceability information input into the blockchain and cause cumbersome subsequent modification issues.
The system constructs a distribution blockchain, a regulatory blockchain, and an interaction blockchain. It generates target watermark information through hash operations and embeds it into the initial fertilizer data. It then performs qualification testing to generate fertilizer quality coefficients and uses a strategy generation model to obtain fertilization strategies. Combined with farmland information, it predicts crop growth and determines whether the fertilization process is normal.
It establishes a strong correlation between fertilizer distributor information and initial fertilizer data, preventing data modification, facilitating traceability, and guiding farm management through testing and fertilization strategies, thereby improving the accuracy of fertilizer quality control and crop management.
Smart Images

Figure CN2024118915_02012026_PF_FP_ABST
Abstract
Description
A fertilizer traceability and quality safety management platform for smart agriculture TECHNICAL FIELD
[0001] The present application relates to the technical field of agricultural management, more specifically, the present application relates to a fertilizer traceability and quality safety management platform for smart agriculture. BACKGROUND
[0002] Soil fertilizer is the basis of sustainable agricultural production, not only a key factor affecting crop growth and breeding effect, but also an important basis for promoting agricultural development. In the context of the rapid development of digital economy today, smart agriculture as a new concept emerges as the times require. Digital technology has injected new development momentum into traditional agriculture, promoting the transformation of agricultural production from traditional to modern. In smart agriculture, quality control and traceability of fertilizer are one of its important applications. Through digital means, smart agriculture can not only ensure the high quality and traceability of fertilizer, but also provide scientific guidance for farmland managers, optimize crop planting and management, and promote sustainable development of agriculture.
[0003] For example, the Chinese patent application with publication number CN115879961A discloses an agricultural production information traceability method based on blockchain. The patent generates a traceability code corresponding to the target product through a traceability platform. The traceability code corresponds to the traceability address of the target agricultural product. By scanning the traceability code, the traceability information of the target agricultural product stored in the blockchain network can be accessed.
[0004] Although the above-mentioned patent realizes information traceability, the generation of traceability code is relatively conventional and difficult to achieve accurate traceability. In addition, the patent only establishes traceability information and does not detect the agricultural products corresponding to the traceability information, which may lead to inaccurate traceability information input into the blockchain, thereby causing subsequent cumbersome changes.
[0005] In view of this, the present application provides a fertilizer traceability and quality safety management platform for smart agriculture to solve the above-mentioned problems. SUMMARY
[0006] In order to overcome the above-mentioned defects of the prior art, the present application provides a fertilizer traceability and quality safety management platform for smart agriculture.
[0007] To achieve the above-mentioned purpose, the present application provides the following technical solutions:
[0008] A fertilizer traceability and quality safety management platform for smart agriculture, comprising:
[0009] A blockchain construction module for constructing a distribution blockchain, a supervision blockchain and an interaction blockchain for fertilizer distributors, supervision platforms and farm managers, respectively;
[0010] The marking module is configured to obtain fertilizer dealer information and initial fertilizer data from the distribution blockchain, construct target watermark information according to the fertilizer dealer information, embed the target watermark information into the initial fertilizer data, and obtain target fertilizer data;
[0011] The detection module is configured to input the target fertilizer data into the supervision blockchain, perform qualification detection on a fertilizer corresponding to the target fertilizer data, obtain fertilizer detection data, generate a fertilizer quality coefficient based on the fertilizer detection data, and determine whether to input the target fertilizer data into the interaction blockchain according to the fertilizer quality coefficient;
[0012] The strategy generation module is configured to obtain farmland information from the interaction blockchain, input the target fertilizer data and the farmland information into a pre-constructed strategy generation model, and obtain a fertilization strategy.
[0013] Further, the method for constructing the target watermark information according to the fertilizer dealer information comprises:
[0014] Hashing M pieces of dealer sub-information in the fertilizer dealer information to generate M corresponding hash values, generating a target unit matrix with a size of M according to the M hash values, and taking the target unit matrix as the target watermark information, where M is an integer greater than 0.
[0015] Further, the method for embedding the target watermark information into the initial fertilizer data comprises:
[0016] Retrieving a view display function in a pre-constructed database, and embedding the target watermark information into the initial fertilizer data through the view display function.
[0017] Further, the fertilizer detection data comprises fertilizer solubility, fertilizer moisture content, fertilizer duration, fertilizer pH value, and fertilizer particle diameter variance, and the method for generating the fertilizer quality coefficient based on the fertilizer detection data comprises:
[0018] ;
[0019] FQC is the fertilizer quality coefficient, is the fertilizer solubility, is the fertilizer moisture content, is the standard moisture content, is the fertilizer pH value, is the standard pH value, is the arctangent function, is the fertilizer duration, is the standard duration, is the logarithm function with base 2, is the fertilizer particle diameter variance, is the hyperbolic cosine function, The natural constant is a constant in nature.
[0020] Further, the method for determining whether to input the target fertilizer data into the interactive blockchain according to the fertilizer quality coefficient comprises:
[0021] Determining whether the fertilizer quality coefficient is greater than a preset quality coefficient threshold, if yes, inputting the target fertilizer data into the interactive blockchain, and if no, not inputting the target fertilizer data into the interactive blockchain.
[0022] Further, the method for constructing the strategy generation model comprises:
[0023] Obtaining a sample data set, the sample data set comprising historical fertilizer data, historical farmland information and historical fertilization strategies, dividing the sample data set into a sample training set and a sample test set, constructing a regression network, taking the historical fertilizer data and the historical farmland information in the sample training set as input data of the regression network, taking the historical fertilization strategies in the sample training set as output data of the regression network, training the regression network to obtain an initial regression network for predicting real-time fertilization strategies, and testing the initial regression network by using the sample test set to output the initial regression network satisfying a preset error value as the strategy generation model.
[0024] Further, the method further comprises:
[0025] The strategy adjustment module is configured to obtain farmland sub-region images and fertilization record information from the interactive blockchain, obtain actual crop growth information based on the farmland sub-region images, input the fertilization record information into a pre-constructed growth prediction model to obtain predicted crop growth information, and determine whether the fertilization process is normal according to the predicted crop growth information and the actual crop growth information, wherein the fertilization record information is generated according to the fertilization strategy.
[0026] Further, the method for obtaining actual crop growth information based on farmland sub-region images comprises:
[0027] Obtaining an actual area of the farmland sub-region image, determining the number of detection points according to the ratio of the actual area to a standard area, constructing a target bisector based on a geometric center point and a farthest boundary point of the farmland sub-region image, dividing N equidistant detection points on the target bisector based on the number of detection points, obtaining initial crop growth information of the N equidistant detection points, and taking the mean value of the N initial crop growth information as the actual crop growth information, wherein the farthest boundary point is a point farthest from the geometric center point on the boundary of the farmland sub-region image.
[0028] Further, the method for constructing the growth prediction model comprises:
[0029] The preset sliding step and sliding window length are used to convert the historical fertilization record information into a plurality of training samples by using a sliding window method, the training samples are used as the input of the growth vigor prediction model, the historical crop growth vigor information after the preset sliding step is used as the output, the subsequent historical crop growth vigor information of each training sample is used as the prediction target, the prediction accuracy is used as the training target, and the growth vigor prediction model is trained.
[0030] Further, the method for judging the fertilization process according to the predicted crop growth vigor information and the actual crop growth vigor information comprises:
[0031] The predicted crop growth vigor information is compared with the actual crop growth vigor information one by one, a growth vigor information difference set is generated, each element in the growth vigor information difference set is compared with a corresponding preset difference threshold value, and when any element is greater than the preset difference threshold value, it is judged that the fertilization process is abnormal.
[0032] Compared with the prior art, the beneficial effects of the present application are:
[0033] The present application first constructs a distribution blockchain, a supervision blockchain and an interaction blockchain, constructs target watermark information according to fertilizer distributor information, embeds the target watermark information into initial fertilizer data to obtain target fertilizer data, detects the quality of the fertilizer corresponding to the target fertilizer data to obtain fertilizer detection data, generates a fertilizer quality coefficient based on the fertilizer detection data, judges whether to input the target fertilizer data into the interaction blockchain according to the fertilizer quality coefficient, obtains farmland information from the interaction blockchain, inputs the target fertilizer data and the farmland information into a pre-constructed strategy generation model to obtain a fertilization strategy, and generates target watermark information to realize strong association between fertilizer distributor information and initial fertilizer data, so that the initial fertilizer data can be prevented from being modified, subsequent traceability is facilitated, and agricultural products can be detected, and a fertilization strategy is generated according to the target fertilizer data and the farmland information after the detection is completed, and the fertilization strategy is used to provide production guidance for farm managers. BRIEF DESCRIPTION OF DRAWINGS
[0034] Fig. 1 is a schematic diagram of a fertilizer traceability and quality safety management platform for smart agriculture in the present application;
[0035] Fig. 2 is a schematic diagram of an initial farmland region image after segmentation in the present application;
[0036] Fig. 3 is a schematic diagram of the farthest boundary point, the geometric center point and the target bisector in the farmland sub-region image in the present application;
[0037] Fig. 4 is a schematic diagram of a computer readable storage medium in the present application;
[0038] In the drawings: 10, total planting area; 110, first crop planting area; 120, second crop planting area; 111, farthest boundary point; 112, geometric center point; 113, target bisector; 114, equidistant detection point. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0040] Embodiment 1
[0041] Please refer to FIG. 1, the embodiment discloses a fertilizer traceability and quality safety management platform for smart agriculture, comprising:
[0042] The blockchain construction module is used to construct a distribution blockchain, a supervision blockchain and an interaction blockchain for a fertilizer distributor, a supervision platform and a farm manager respectively.
[0043] It should be noted that the fertilizer distributor refers to a seller of the fertilizer, the fertilizer distributor inputs initial fertilizer data into the distribution blockchain, the supervision platform is operated by a supervision department, the supervision department can entrust a third-party detection agency to detect the quality of the fertilizer to obtain fertilizer detection data, and the farm manager uses the fertilizer in farmland after purchasing the fertilizer and continuously records fertilization information. The above-mentioned step of constructing the blockchain includes selecting a blockchain platform, such as Ethereum, defining permission management, writing, testing, auditing and deploying a smart contract. It can be understood that the construction of the blockchain is prior art, and the embodiment will not be described in more detail.
[0044] The marking module is used to obtain fertilizer distributor information and initial fertilizer data from the distribution blockchain, construct target watermark information according to the fertilizer distributor information, embed the target watermark information into the initial fertilizer data, and obtain target fertilizer data.
[0045] In the embodiment, the fertilizer distributor information includes but is not limited to a company name, a business address, a tax registration number and a bank account number, etc. It can be understood that the fertilizer distributor inputs the fertilizer distributor information and the initial fertilizer data into the distribution blockchain after encryption, and the supervision platform can decrypt it through a key. The initial fertilizer data includes but is not limited to fertilizer nutrient components, fertilizer recommended dosages, fertilizer application ranges and fertilizer organic components. The initial fertilizer data is presented in the form of an image or a document.
[0046] The method for constructing target watermark information according to the fertilizer dealer information comprises:
[0047] Hash operation is performed on M pieces of dealer sub-information in the fertilizer dealer information to generate M corresponding hash values, a target unit matrix with a size of M is generated according to the M hash values, and the target unit matrix is taken as the target watermark information, where M is an integer greater than 0;
[0048] The above implementation modes are described below in combination with specific application scenarios:
[0049] For example, the fertilizer dealer information includes 3 pieces of dealer sub-information, namely, company name, business address and tax registration number, then the hash values generated in sequence are 43b31b91c0ae, 03a52f7e68fa8, e9e7e1c1b63b3bcd, and the target unit matrix generated subsequently is:
[0050] ;
[0051] The method for embedding the target watermark information into the initial fertilizer data comprises:
[0052] The view display function in the pre-constructed database is called to embed the target watermark information into the initial fertilizer data through the view display function;
[0053] It should be noted that the view display function can be a watermark code in OpenCV, and the database in the above can be an OpenCV database. Taking the initial fertilizer data presented in the form of an image as an example, the view display function can watermark the target watermark information on the image representing the initial fertilizer data.
[0054] The detection module is configured to input the target fertilizer data into the supervision blockchain, perform qualification detection on the fertilizer corresponding to the target fertilizer data, obtain fertilizer detection data, generate a fertilizer quality coefficient based on the fertilizer detection data, and determine whether to input the target fertilizer data into the interaction blockchain according to the fertilizer quality coefficient;
[0055] In this embodiment, the fertilizer detection data includes, but is not limited to, fertilizer solubility, fertilizer moisture content, fertilizer duration, fertilizer pH value and fertilizer particle diameter variance. The fertilizer detection data can be measured by using laboratory equipment and methods, for example, the solubility is measured by placing the fertilizer sample in water and recording the dissolution time, the moisture content is measured by using a balance, the pH instrument is used to measure the pH value, and the microscope or particle size analysis instrument is used to measure the particle diameter. The fertilizer particle diameter variance in the above is a statistical quantity for measuring the distribution of particle diameters. Uniformly sized particles are helpful for uniform application, thereby improving the fertilization efficiency. Therefore, the larger the fertilizer particle diameter variance is, the worse the fertilizer quality is.
[0056] The method for generating a fertilizer quality coefficient based on fertilizer detection data comprises:
[0057] ;
[0058] FQC is a fertilizer quality coefficient, is a fertilizer solubility, is a fertilizer moisture content, is a standard moisture content, is a fertilizer pH value, is a standard pH value, is an inverse tangent function, is a fertilizer duration, is a standard duration, is a logarithmic function with base 2, is a fertilizer particle diameter variance, is a hyperbolic cosine function, is a natural constant;
[0059] It should be noted that the standard pH value, the standard moisture content and the standard duration described above can be a domestic standard or an international standard. From the above content, it can be concluded that the larger the fertilizer particle diameter variance The greater the fertilizer solubility, the better the fertilizer quality, because only fertilizers with high solubility can be effectively absorbed and utilized by plant roots. Therefore, the greater the fertilizer solubility, the better the fertilizer quality. In this embodiment, the greater the fertilizer quality coefficient, the better the fertilizer quality.
[0060] The method for determining whether to input target fertilizer data into an interactive blockchain according to a fertilizer quality coefficient comprises:
[0061] Determining whether the fertilizer quality coefficient is greater than a preset quality coefficient threshold. If yes, the target fertilizer data is input into the interactive blockchain. If no, the target fertilizer data is not input into the interactive blockchain.
[0062] It can be understood that when the fertilizer quality coefficient is less than the preset quality coefficient threshold, the target fertilizer data needs to be traced according to the target fertilizer data to find the corresponding fertilizer dealer, and the fertilizer dealer is warned and punished through the supervision platform.
[0063] The strategy generation module is used to obtain farmland information from the interactive blockchain, input the target fertilizer data and the farmland information into a pre-constructed strategy generation model, and obtain a fertilization strategy.
[0064] In this embodiment, the farmland information includes but is not limited to crop type, average precipitation, soil pH value, soil texture, and soil nutrient content. The average precipitation can be the average precipitation of the current month or the average precipitation of consecutive months. The soil texture refers to the texture structure of the soil, such as sandy soil, loamy soil, clay soil, etc.
[0065] The construction method of the strategy generation model includes:
[0066] A sample data set is obtained, which includes historical fertilizer data, historical farmland information, and historical fertilization strategies. The sample data set is divided into a sample training set and a sample test set. A regression network is constructed, with the historical fertilizer data and the historical farmland information in the sample training set as the input data of the regression network, and the historical fertilization strategies in the sample training set as the output data of the regression network. The regression network is trained to obtain an initial regression network for predicting real-time fertilization strategies. The initial regression network is tested using the sample test set, and the initial regression network that meets the preset error value is output as the strategy generation model. The initial regression network is preferably a neural network model.
[0067] It can be understood that the historical fertilization strategies are formulated according to expert experience or by technicians in the field through experiments. For example, the historical fertilization strategies include: selecting a compound fertilizer with a suitable ratio of nitrogen, phosphorus, and potassium, performing basic fertilization according to the soil nutrient content and crop demand, adjusting the application amount of the fertilizer according to the soil test results, such as reducing the application amount of phosphorus fertilizer if the soil test shows that the phosphorus content is too high, performing fertilization in stages, reasonably arranging the fertilization time according to the growth stage of the crops, such as increasing the application amount of nitrogen fertilizer during the growth period of the crops, etc.
[0068] In this embodiment, the distribution blockchain, the supervision blockchain, and the interaction blockchain are first constructed. The target watermark information is constructed according to the fertilizer distributor information, the target watermark information is embedded into the initial fertilizer data to obtain the target fertilizer data, the quality of the fertilizer corresponding to the target fertilizer data is detected to obtain fertilizer detection data, the fertilizer quality coefficient is generated based on the fertilizer detection data, it is judged whether to input the target fertilizer data into the interaction blockchain according to the fertilizer quality coefficient, the farmland information is obtained from the interaction blockchain, and the target fertilizer data and the farmland information are input into the pre-constructed strategy generation model to obtain the fertilization strategy. In this embodiment, the target watermark information is generated to realize the strong association between the fertilizer distributor information and the initial fertilizer data, which can prevent the initial fertilizer data from being modified, facilitate subsequent traceability, and also enable detection of agricultural products. After the detection is completed, the fertilization strategy is generated according to the target fertilizer data and the farmland information, and the production guidance is provided for the farm managers according to the fertilization strategy.
[0069] Embodiment 2
[0070] The fertilizer traceability and quality safety management platform for smart agriculture further comprises:
[0071] The strategy adjustment module is configured to acquire the farmland sub-region images and the fertilization record information from the interactive blockchain, acquire actual crop growth information based on the farmland sub-region images, input the fertilization record information into a pre-constructed growth prediction model to obtain predicted crop growth information, and determine whether the fertilization process is normal according to the predicted crop growth information and the actual crop growth information, wherein the fertilization record information is generated according to the fertilization strategy.
[0072] The method for acquiring the farmland sub-region images comprises:
[0073] The method for acquiring the farmland sub-region images comprises:
[0074] It should be noted that the farmland initial region image refers to an image of a total planting region, and the farmland sub-region image refers to an image of a crop planting region. For example, in FIG. 2, there are a total planting region 10, a first crop planting region 110, and a second crop planting region 120. The region growing algorithm is an image segmentation technique mainly used for segmenting an image into meaningful regions. The basic idea is to select a seed point and continuously merge adjacent pixels into the current region. The region growing algorithm is a prior art, and thus will not be described in detail in this embodiment.
[0075] The method for acquiring the actual crop growth information based on the farmland sub-region images comprises:
[0076] The method for acquiring the actual crop growth information based on the farmland sub-region images comprises:
[0077] For example, referring to FIG. 3, there are a farthest boundary point 111, a geometric center point 112, equidistant detection points 114, and a target bisector 113. It can be understood that the target bisector 113 is constructed by the farthest boundary point 111 and the geometric center point 112. In FIG. 3, the number of detection points is 4, and thus the target bisector has four equidistant detection points 114. The geometric center point 112 can or can not be the equidistant detection point 114. The above-mentioned standard region area is pre-set, and the number of detection points can be determined according to the ratio of the actual region area to the standard region area.
[0078] It should be noted that the initial crop growth information includes plant height, leaf area index and plant density, the leaf area index is a key parameter for measuring the density of the vegetation canopy, which refers to the total area of plant leaves per unit of ground surface area, and it can be understood that the actual crop growth information also includes plant height, leaf area index and plant density, but the actual crop growth information is the average of N initial crop growth information;
[0079] The fertilization record information at least includes fertilization date, fertilizer quantity, fertilizer type and weather information, and the weather information at least includes air temperature and air humidity, and it can be understood that the above-mentioned fertilizer quantity, fertilizer type and weather information are all associated with the fertilization date.
[0080] The construction method of the growth prediction model is:
[0081] The preset sliding step and the sliding window length are used to convert the historical fertilization record information into a plurality of training samples by using the sliding window method, the training samples are used as the input of the growth prediction model, the historical crop growth information after the preset sliding step is used as the output, the subsequent historical crop growth information of each training sample is used as the prediction target, the prediction accuracy is used as the training target, and the growth prediction model is trained; The growth prediction model is generated according to the real-time fertilization record information to predict the future crop growth information, and the growth prediction model is an LSTM model;
[0082] It can be understood that the above-mentioned historical crop growth information is the crop growth information corresponding to the last day of each training sample, for example, the sliding window length is set to 3, then the fertilization record information of the first day, the fertilization record information of the second day and the fertilization record information of the third day are used as a training sample, and the training sample is used as the input of the model, then the historical crop growth information is the crop growth information corresponding to the third day;
[0083] It should be noted that the sliding window method is a conventional technical means of the LSTM model, and the present application will not make a principle explanation here; but in order to facilitate the implementation of the present application, the present application provides the following examples about the sliding window method:
[0084] Suppose we want to train an LSTM model with historical data [1, 2, 3, 4, 5, 6], in this embodiment, the prediction time step is set to 1, the sliding step is set to 1 and the sliding window length is set to 3; Then generate 3 groups of training samples and corresponding prediction target data: [1, 2, 3], [2, 3, 4] and [3, 4, 5] as training samples, and [4], [5] and [6] as prediction targets respectively;
[0085] The prediction accuracy can be measured using mean square error or mean absolute error as a loss function, and the weights and biases of the model are updated by a back propagation algorithm to generate a working state prediction model.
[0086] The method for determining the fertilization process according to the predicted crop growth information and the actual crop growth information comprises:
[0087] The predicted crop growth information and the actual crop growth information are compared one by one to generate a growth information difference set, and each element in the growth information difference set is compared with a corresponding preset difference threshold value. When any element is greater than the preset difference threshold value, it is determined that the fertilization process is abnormal.
[0088] It can be understood that the predicted crop growth information and the actual crop growth information both include plant height, leaf area index and plant density, and then the corresponding plant height difference, leaf area index difference and plant density difference are all elements in the growth information difference set. The embodiment can determine whether the fertilization process is normal according to the plant height difference, the leaf area index difference and the plant density difference.
[0089] In the embodiment, the actual crop growth information is first obtained according to the farmland sub-region image, the fertilization record information is input into the pre-constructed growth prediction model to obtain the predicted crop growth information, and whether the fertilization process is normal is determined according to the predicted crop growth information and the actual crop growth information. When it is determined that the fertilization process is abnormal, the fertilization strategy needs to be adjusted in time.
[0090] Embodiment 3
[0091] The embodiment based on the embodiment 1 provides a fertilizer traceability and quality safety management method for smart agriculture, comprising:
[0092] S10: Constructing a distribution blockchain, a supervision blockchain and an interaction blockchain for a fertilizer distributor, a supervision platform and a farm manager respectively;
[0093] It should be noted that the fertilizer distributor refers to the seller of the fertilizer, the fertilizer distributor inputs the initial fertilizer data into the distribution blockchain, the supervision platform is operated by a supervision department, the supervision department can entrust a third-party detection agency to detect the quality of the fertilizer to obtain fertilizer detection data, and the farm manager uses the fertilizer in farmland after purchasing the fertilizer and continuously records the fertilization information. The above-mentioned step of constructing a blockchain includes selecting a blockchain platform, such as Ethereum, defining permission management, writing, testing, auditing and deploying a smart contract. It can be understood that the construction of the blockchain is prior art, and the embodiment will not be described in more detail.
[0094] S20: Obtain the fertilizer distributor information and the initial fertilizer data from the distribution blockchain, construct the target watermark information according to the fertilizer distributor information, embed the target watermark information into the initial fertilizer data, and obtain the target fertilizer data;
[0095] In the embodiment, the fertilizer distributor information includes but is not limited to the company name, the business address, the tax registration number, the bank account number and the like. It can be understood that the fertilizer distributor inputs the fertilizer distributor information and the initial fertilizer data into the distribution blockchain after encryption, and the supervision platform can decrypt it through the key. The initial fertilizer data includes but is not limited to the fertilizer nutrient composition, the fertilizer recommended dosage, the fertilizer application range and the fertilizer organic component. The initial fertilizer data is presented in the form of an image or a document.
[0096] The method for constructing the target watermark information according to the fertilizer distributor information includes:
[0097] Hashing the M pieces of distributor sub-information in the fertilizer distributor information to generate M corresponding hash values, generating a target unit matrix with a size of M according to the M hash values, and taking the target unit matrix as the target watermark information;
[0098] The method for embedding the target watermark information into the initial fertilizer data includes:
[0099] Retrieving the view display function in the pre-constructed database, and embedding the target watermark information into the initial fertilizer data through the view display function;
[0100] It should be noted that the view display function can be a watermark code in OpenCV, and the above-mentioned database can be an OpenCV database. Taking the initial fertilizer data presented in the form of an image as an example, the view display function can watermark the target watermark information on the image representing the initial fertilizer data.
[0101] S30: Input the target fertilizer data into the supervision blockchain, perform qualification detection on the fertilizer corresponding to the target fertilizer data, obtain fertilizer detection data, generate a fertilizer quality coefficient based on the fertilizer detection data, and determine whether to input the target fertilizer data into the interaction blockchain according to the fertilizer quality coefficient;
[0102] In this embodiment, the fertilizer detection data includes but is not limited to fertilizer solubility, fertilizer moisture content, fertilizer duration, fertilizer pH value and fertilizer particle diameter variance. The fertilizer detection data can be measured by using laboratory equipment and methods, for example, the solubility is measured by placing the fertilizer sample in water and recording the dissolution time, the moisture content is measured by using a balance, the pH value is measured by using a pH instrument, and the particle diameter is measured by using a microscope or a particle size analysis instrument. The fertilizer particle diameter variance is a statistical quantity for measuring the distribution of particle diameter. Uniform size of particles helps to uniform application, thereby improving the efficiency of fertilization. Therefore, the larger the fertilizer particle diameter variance, the worse the fertilizer quality;
[0103] The method for generating the fertilizer quality coefficient based on the fertilizer detection data comprises:
[0104] ;
[0105] FQC is the fertilizer quality coefficient, is the fertilizer solubility, is the fertilizer moisture content, is the standard moisture content, is the fertilizer pH value, is the standard pH value, is the inverse tangent function, is the fertilizer duration, is the standard duration, is the logarithmic function with base 2, is the fertilizer particle diameter variance, is the hyperbolic cosine function, is the natural constant;
[0106] The method for determining whether to input the target fertilizer data into the interactive blockchain according to the fertilizer quality coefficient comprises:
[0107] Determining whether the fertilizer quality coefficient is greater than a preset quality coefficient threshold. If yes, the target fertilizer data is input into the interactive blockchain. If no, the target fertilizer data is not input into the interactive blockchain.
[0108] It can be understood that when the fertilizer quality coefficient is less than the preset quality coefficient threshold, the target fertilizer data needs to be traced according to the target fertilizer data to find the corresponding fertilizer dealer, and the fertilizer dealer is warned and punished through the supervision platform.
[0109] S40: Obtain farmland information from the interactive blockchain, input the target fertilizer data and the farmland information into the pre-constructed strategy generation model, and obtain a fertilization strategy;
[0110] In this embodiment, the farmland information includes but is not limited to crop type, average precipitation, soil pH value, soil texture, and soil nutrient content. The average precipitation can be the average precipitation of the current month or the average precipitation of consecutive months. The soil texture refers to the texture structure of the soil, such as sandy soil, loamy soil, clay soil, etc.
[0111] The method for constructing the strategy generation model comprises:
[0112] A sample data set is obtained, which includes historical fertilizer data, historical farmland information, and historical fertilization strategies. The sample data set is divided into a sample training set and a sample test set. A regression network is constructed, with the historical fertilizer data and the historical farmland information in the sample training set as the input data of the regression network, and the historical fertilization strategies in the sample training set as the output data of the regression network. The regression network is trained to obtain an initial regression network for predicting real-time fertilization strategies. The initial regression network is tested using the sample test set, and the initial regression network that meets the preset error value is output as the strategy generation model. The initial regression network is preferably a neural network model.
[0113] It can be understood that the historical fertilization strategies described above are formulated according to expert experience or by technicians in the field through experiments. For example, the historical fertilization strategies include: selecting a compound fertilizer with a suitable ratio of nitrogen, phosphorus, and potassium, performing basic fertilization according to the soil nutrient content and crop demand, adjusting the application amount of the fertilizer according to the soil test results, such as reducing the application amount of phosphorus fertilizer if the soil test shows that the phosphorus content is too high, performing fertilization in stages, reasonably arranging the fertilization time according to the growth stage of the crops, such as increasing the application amount of nitrogen fertilizer during the growth period of the crops, etc.
[0114] Embodiment 4
[0115] The embodiment disclosed herein provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed to implement the above-mentioned fertilizer traceability and quality safety management platform for smart agriculture.
[0116] The above formulas are dimensionless numerical calculations. The formulas are obtained by collecting a large amount of data to simulate the most recent real situation. The preset parameters, weights, and threshold values in the formulas are set by technicians in the field according to actual conditions.
[0117] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired network or a wireless network. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.
[0118] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0119] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device, and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0120] In several embodiments provided by the present application, it should be understood that the disclosed system, device, and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units is only one, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units can be indirect coupling or communication connection through some interfaces, devices, or units, which can be electrical, mechanical, or other forms.
[0121] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment of the present application according to actual needs.
[0122] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0123] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0124] Finally: the above is only a preferred embodiment of the present application and is not used to limit the present application, any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A fertilizer traceability and quality safety management platform for smart agriculture, characterized in that, include: Blockchain building blocks: These are used to build distribution blockchains, regulatory blockchains, and interaction blockchains for fertilizer distributors, regulatory platforms, and farm managers, respectively. The tagging module is used to obtain fertilizer distributor information and initial fertilizer data from the distribution blockchain, construct target watermark information based on the fertilizer distributor information, and embed the target watermark information into the initial fertilizer data to obtain the target fertilizer data. The detection module is used to input target fertilizer data into the regulatory blockchain, conduct qualification testing on the fertilizer corresponding to the target fertilizer data, obtain fertilizer testing data, generate fertilizer quality coefficient based on fertilizer testing data, and determine whether to input the target fertilizer data into the interactive blockchain based on the fertilizer quality coefficient. Strategy generation module: Used to obtain farmland information from the interactive blockchain, input target fertilizer data and farmland information into a pre-built strategy generation model to obtain fertilization strategy.
2. The fertilizer traceability and quality safety management platform for smart agriculture according to claim 1, characterized in that, The method for constructing target watermark information based on fertilizer distributor information includes: Perform hash operations on the M sub-information of fertilizer distributors in the information to generate M corresponding hash values. Generate a target unit matrix of size M based on the M hash values. Use the target unit matrix as the target watermark information, where M is an integer greater than 0.
3. The fertilizer traceability and quality safety management platform for smart agriculture according to claim 2, characterized in that, The method for embedding target watermark information into initial fertilizer data includes: Call the view display function in the pre-built database, and embed the target watermark information into the initial fertilizer data through the view display function.
4. The fertilizer traceability and quality safety management platform for smart agriculture according to claim 1, characterized in that, The fertilizer testing data includes fertilizer solubility, fertilizer moisture content, fertilizer effect duration, fertilizer pH value, and fertilizer particle diameter variance. Methods for generating fertilizer quality coefficients based on the fertilizer testing data include: ; FQC is the fertilizer quality coefficient. For fertilizer solubility, This refers to the moisture content of the fertilizer. Standard moisture content, This refers to the pH value of the fertilizer. Standard pH value It is the arctangent function. For the duration of fertilizer effect, For standard duration, It is a logarithmic function with base 2. Let Variance be the diameter variance of fertilizer particles. It is a hyperbolic cosine function. It is a natural constant.
5. A fertilizer traceability and quality safety management platform for smart agriculture according to claim 4, characterized in that, The method for determining whether to input target fertilizer data into the interactive blockchain based on the fertilizer quality coefficient includes: Determine whether the fertilizer quality coefficient is greater than the preset quality coefficient threshold. If so, input the target fertilizer data into the interactive blockchain; otherwise, do not input the target fertilizer data into the interactive blockchain.
6. The fertilizer traceability and quality safety management platform for smart agriculture according to claim 1, characterized in that, The method for constructing the strategy generation model includes: A sample dataset is obtained, which includes historical fertilizer data, historical farmland information, and historical fertilization strategies. The sample dataset is divided into a sample training set and a sample test set. A regression network is constructed, using the historical fertilizer data and historical farmland information in the sample training set as input data and the historical fertilization strategies in the sample training set as output data. The regression network is trained to obtain an initial regression network for predicting real-time fertilization strategies. The initial regression network is tested using the sample test set, and the output initial regression network that meets the condition of being less than a preset error value is used as the strategy generation model.
7. A fertilizer traceability and quality safety management platform for smart agriculture according to claim 1, characterized in that, Also includes: Strategy adjustment module: used to obtain farmland sub-region images and fertilization record information from the interactive blockchain, obtain actual crop growth information based on the farmland sub-region images, input the fertilization record information into a pre-built growth prediction model to obtain predicted crop growth information, and determine whether the fertilization process is normal based on the predicted crop growth information and the actual crop growth information. The fertilization record information is generated according to the fertilization strategy.
8. A fertilizer traceability and quality safety management platform for smart agriculture according to claim 7, characterized in that, The method for obtaining actual crop growth information based on farmland sub-region images includes: The actual area of the farmland sub-region image is obtained. The number of detection points is determined based on the ratio of the actual area to the standard area. A target bisector is constructed based on the geometric center point and the farthest boundary point of the farmland sub-region image. N equidistant detection points are divided on the target bisector based on the number of detection points. The initial crop growth information of the N equidistant detection points is obtained. The average of the N initial crop growth information is used as the actual crop growth information. The farthest boundary point is the point on the boundary of the farmland sub-region image that is farthest from the geometric center point.
9. A fertilizer traceability and quality safety management platform for smart agriculture according to claim 7, characterized in that, The method for constructing the growth prediction model is as follows: The model uses a preset sliding step size and sliding window length to convert historical fertilization records into multiple training samples. These training samples are used as input to the crop growth prediction model, while the historical crop growth information after the preset sliding step size is used as output. The subsequent historical crop growth information of each training sample is used as the prediction target, and the prediction accuracy is used as the training objective to train the crop growth prediction model. This generates a crop growth prediction model that predicts future crop growth information based on real-time fertilization records.
10. A fertilizer traceability and quality safety management platform for smart agriculture according to claim 7, characterized in that, The method for determining the fertilization process based on predicted crop growth information and actual crop growth information includes: The predicted crop growth information is compared with the actual crop growth information one by one to generate a growth information difference set. Each element in the growth information difference set is compared with the corresponding preset difference threshold. If any element is greater than the preset difference threshold, the fertilization process is judged to be abnormal.
Citation Information
Patent Citations
Commodity tracing data service platform node data management system based on block chain
CN108038697A
Digital agricultural management method and device based on block chain
CN112561241A
Distributed crop growth and environment growth data traceability management system
CN114006923A
Agricultural production information tracing method based on block chain
CN115879961A
Agricultural input operation circulation and traceability recovery supervision integrated system
CN117893228A