Holographic full-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method and device
Through the real-time intelligent discovery and early warning methods and devices for quality and safety of grain and oil products, the convolutional neural network model and knowledge graph are used to solve the problem that grain and oil products are difficult to monitor and control in real time, and real-time risk prevention and control of the entire process of grain and oil products is achieved.
Patent Information
- Application Number
- CN202510318243.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-03-18
AI Technical Summary
Food safety crises occur frequently, making it difficult to monitor and control the quality and safety of grain and oil products in real time, affecting people's health.
Provide a real-time intelligent discovery and prevention and control warning method and device for the quality and safety of holographic and full-chain grain and oil products. It predicts the content of each pollutant through a convolutional neural network model, and constructs a knowledge graph for prediction and prevention and control warning.
Real-time monitoring and prevention and early warning of pollutant content in any link in the production, purchase, storage, processing and sales of grain and oil products has been achieved, and real-time risk prevention and control capabilities for food safety have been improved.
Smart Images

Figure CN120162677A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of food safety, and particularly to a method and device for real-time intelligent discovery, prevention and control warning of the quality and safety of holographic full-chain grain and oil products. Background Art
[0002] In recent years, food safety crises have occurred frequently, seriously affecting people's physical health and attracting wide attention worldwide. Therefore, it is very important to conduct real-time monitoring and prevention and control warning of the quality and safety of any link in the production, acquisition, storage, processing and sales links of grain and oil products. Summary of the Invention
[0003] The purpose of the present application is to provide a method and device for real-time intelligent discovery, prevention and control warning of the quality and safety of holographic full-chain grain and oil products, which can conduct real-time monitoring and prevention and control warning of the pollutant content in any link of the production, acquisition, storage, processing and sales links of grain and oil products.
[0004] To achieve the above purpose, the present application provides the following solutions:
[0005] In the first aspect, the present application provides a method for real-time intelligent discovery, prevention and control warning of the quality and safety of holographic full-chain grain and oil products, including:
[0006] For any variety of crops planted in the target planting area, in the current cycle, input the values of the main influencing factors at each preset position in the target planting area into the corresponding pollutant content prediction models of the crops of this variety, and obtain the contents of various pollutants in the crops of this variety planted at each preset position; the crops of this variety are used to produce the target grain and oil products; one cycle includes the production link, acquisition link, storage link, processing link and sales link of the target grain and oil products; the pollutant content prediction model corresponding to the crops of this variety is obtained by training a convolutional neural network model according to the main influencing factors and the pollutant content in the crops of this variety planted at each target sampling point in the target planting area in the current cycle; the main influencing factors are obtained by screening environmental variables and spatial structure variables;
[0007] Determine the contents of various pollutants in the crops of this variety planted at each preset position and each target sampling point as the contents of various pollutants in the production link of the target grain and oil products;
[0008] Obtain the contents of various pollutants in the newly harvested crops of this variety planted at each preset position and each target sampling point as the contents of various pollutants in the acquisition link of the target grain and oil products;
[0009] Store the crops of the said variety planted at each preset location and each target sampling point after acquisition in a warehouse. Determine the content of each pollutant at the time of warehousing as the content of each pollutant in the storage link of the target grain and oil products. Determine the content of each pollutant at the time of warehousing as the content of each pollutant in the processing link of the target grain and oil products;
[0010] Process the crops of the said variety after warehousing to obtain the target grain and oil products. Take the content of each pollutant in the target grain and oil products to be sold as the content of each pollutant in the sales link of the target grain and oil products; The content of each pollutant in the target grain and oil products to be sold is within the preset range;
[0011] Based on the threshold range of each pollutant, the content of each pollutant in the production link, acquisition link, storage link, processing link and sales link of the target grain and oil products in the current cycle, and the entities on the holographic traceability chain of the entire grain and oil process, construct the knowledge graph corresponding to each pollutant;
[0012] According to the knowledge graph corresponding to each pollutant and the content of each pollutant in the production link of the target grain and oil products in the next cycle, predict the content of each pollutant in the acquisition link, storage link, processing link and sales link of the target grain and oil products in the next cycle to obtain predicted values, and conduct prevention and control early warnings based on the predicted values.
[0013] Optionally, the process of determining the target sampling points specifically includes:
[0014] For any variety of crops planted in the target planting area, obtain the remote sensing data of the target planting area in the current cycle;
[0015] Divide the remote sensing data into grids, and determine the crop planting density and area of each grid; The said variety of crops is planted within the grid;
[0016] According to the crop planting density and area of each grid, divide the remote sensing data according to the crop planting density level to obtain all grids corresponding to each crop planting density level;
[0017] According to all grids corresponding to each crop planting density level, determine the sampling points in the target planting area as the target sampling points according to the principle of stratified sampling.
[0018] Optionally, based on the threshold range of each pollutant, the content of each pollutant in the production link, acquisition link, storage link, processing link and sales link of the target grain and oil products in the current cycle, and the entities on the holographic traceability chain of the entire grain and oil process, constructing the knowledge graph corresponding to each pollutant specifically includes:
[0019] Based on the threshold ranges of various pollutants, the contents of various pollutants in the production, acquisition, storage, processing, and sales links of the target grain and oil products in the current cycle, entity recognition and relationship recognition are performed on the entities in the full-process holographic traceability chain of grain and oil to obtain multiple entities and the relationships between the entities;
[0020] Construct knowledge graphs corresponding to various pollutants according to the entities and the relationships between the entities.
[0021] Optionally, before constructing the knowledge graphs corresponding to various pollutants based on the threshold ranges of various pollutants, the contents of various pollutants in the production, acquisition, storage, processing, and sales links of the target grain and oil products in the current cycle, and the entities in the full-process holographic traceability chain of grain and oil, it further includes:
[0022] Store the target acquisition data, monitoring data, and values of main influencing factors at each preset position in the target planting area in the current cycle, as well as the target acquisition data, monitoring data, and values of main influencing factors at each target sampling point on the full-process holographic traceability chain of grain and oil; the target acquisition data includes: longitude and latitude, crop variety, plot where it is located, sampling time; the monitoring data includes: crop production information, crop planting information, crop fertilization and irrigation information, crop pest and disease control information, and the contents of various pollutants in the production, acquisition, storage, processing, and sales links of the target grain and oil products.
[0023] Optionally, predict the contents of various pollutants in the acquisition, storage, processing, and sales links of the target grain and oil products in the next cycle based on the knowledge graphs corresponding to various pollutants and the contents of various pollutants in the production link of the target grain and oil products in the next cycle to obtain predicted values, and perform prevention and control early warning according to the predicted values, specifically including:
[0024] For any one of the acquisition, storage, processing, and sales links of the target grain and oil products in the next cycle, predict the contents of various pollutants in the link in the next cycle based on the knowledge graphs corresponding to various pollutants and the contents of various pollutants in the production link of the target grain and oil products in the next cycle to obtain predicted values;
[0025] For any one pollutant, if the predicted value of the content of the pollutant in the link in the next cycle exceeds the set threshold, perform prevention and control early warning on the pollutant in the link in the next cycle.
[0026] Optionally, the environmental variables include: ecological elements and human activity elements, and the spatial structure variables include: longitude and latitude, spatial autocorrelation variables, and spatial regionalization variables.
[0027] Optionally, for any variety of crops planted in the target planting area, the process of determining the value of the spatial regionalization variable at the preset position in the target planting area is:
[0028] For any pollutant, the content of the pollutant in the crops of the variety planted at each target sampling point in the target planting area is processed to obtain the content of the processed pollutant in the crops of the variety planted at each target sampling point in the target planting area; the content of the processed pollutant in the crops of the variety planted at each target sampling point in the target planting area conforms to a normal distribution;
[0029] Spatial statistics is performed on the content of the processed pollutant in the crops of the variety planted at each target sampling point in the target planting area to obtain the high clustering value range and the low clustering value range of the target planting area;
[0030] According to the high clustering value range and the low clustering value range of the target planting area, the target planting area is divided into multiple sub - regions by the natural break method, and the average value of the pollutant corresponding to each sub - region is determined as the value of the spatial regionalization variable; the average value of the pollutant corresponding to the sub - region is the average value of the content of the pollutant in the crops for making grain and oil products planted at each target sampling point within the sub - region.
[0031] Optionally, the process of obtaining the high clustering value range and the low clustering value range of the target planting area by performing spatial statistics on the content of the processed pollutant in the crops of the variety planted at each target sampling point in the target planting area is as follows:
[0032] Local Moran's I spatial statistics is performed on the content of the processed pollutant in the crops of the variety planted at each target sampling point in the target planting area to obtain the high clustering value range and the low clustering value range of the target planting area.
[0033] Optionally, the process of determining the value of the spatial autocorrelation variable at a preset position is as follows:
[0034] The variogram distance is obtained by fitting the semivariogram function;
[0035] For any preset position, the distances between each point in the set of nearest neighbor points corresponding to the preset position and the preset position are determined to obtain the distance set corresponding to the preset position; the set of nearest neighbor points corresponding to the preset position includes the k nearest target sampling points of the preset position in the target planting area;
[0036] The variogram distance and the distance set corresponding to the preset position are determined as the value of the spatial autocorrelation variable at the preset position.
[0037] In a second aspect, the present application provides a holographic full - chain grain and oil product quality and safety real - time intelligent discovery and prevention and control warning device, including:
[0038] The pollutant content prediction module is used for any variety of crops planted in the target planting area. In the current cycle, the values of the main influencing factors at each preset position in the target planting area are input into the pollutant content prediction model corresponding to the crop of the variety, so as to obtain the content of each pollutant in the crop of the variety planted at each preset position; the crop of the variety is used to make the target grain and oil products; one cycle includes the production link, acquisition link, storage link, processing link and sales link of the target grain and oil products; the pollutant content prediction model corresponding to the crop of the variety is obtained by training the convolutional neural network model according to the main influencing factors at each target sampling point in the target planting area in the current cycle and the content of pollutants in the crop of the variety planted at each target sampling point; the main influencing factors are obtained by screening environmental variables and spatial structure variables;
[0039] A production link pollutant content determination module is used to determine the content of each pollutant in the crops of the variety planted at each preset position and each target sampling point as the content of each pollutant in the production link of the target grain and oil product;
[0040] A pollutant content determination module in the purchasing stage is used to obtain the content of each pollutant in the newly harvested crops of the variety planted at each preset position and each target sampling point as the content of each pollutant in the purchasing stage of the target grain and oil products;
[0041] The pollutant content determination module for the storage link and the processing link is used to store the crops of the said variety planted at each preset position and each target sampling point purchased into the warehouse, determine the content of each pollutant when entering the warehouse as the content of each pollutant in the storage link of the target grain and oil product, and determine the content of each pollutant when leaving the warehouse as the content of each pollutant in the processing link of the target grain and oil product;
[0042] The pollutant content determination module in the sales link is used to process the crops of the variety after leaving the warehouse to obtain the target grain and oil products, and use the content of each pollutant in the target grain and oil products to be sold as the content of each pollutant in the sales link of the target grain and oil products; the content of each pollutant in the target grain and oil products to be sold is within the preset range;
[0043] The knowledge graph construction module is used to construct the knowledge graph corresponding to each pollutant based on the threshold range of each pollutant, the content of each pollutant in the production, acquisition, storage, processing and sales links of the target grain and oil products in the current cycle, and the entities in the holographic traceability chain of the whole process of grain and oil;
[0044] A prevention and control early warning module is used to predict the content of each pollutant in the acquisition, storage, processing, and sales links of the target grain and oil products in the next cycle based on the knowledge graph corresponding to each pollutant and the content of each pollutant in the production link of the target grain and oil products in the next cycle, and perform prevention and control early warning based on the predicted values.
[0045] According to the specific embodiments provided by the present application, the present application has the following technical effects:
[0046] The present application provides a method and device for real-time intelligent discovery and prevention and control early warning of the quality and safety of holographic full-chain grain and oil products. By inputting the values of the main influencing factors at the preset positions into the prediction models of the content of each pollutant, the content of each pollutant in the crops planted at the preset positions is obtained; determining the content of each pollutant in the crops planted at the preset positions and the target sampling points as the content of each pollutant in the production link; obtaining the content of each pollutant in the newly harvested crops as the content of each pollutant in the acquisition link; storing the crops of the said variety planted at each preset position and each target sampling point in the warehouse, determining the content of each pollutant at the time of warehousing as the content of each pollutant in the storage link of the target grain and oil products, and determining the content of each pollutant at the time of outwarehousing as the content of each pollutant in the processing link of the target grain and oil products; taking the content of each pollutant in the target grain and oil products to be sold as the content of each pollutant in the sales link of the target grain and oil products, it is possible to realize real-time monitoring of the content of pollutants in any one of the production, acquisition, storage, processing, and sales links of grain and oil products. And by predicting the content of each pollutant in the acquisition, storage, processing, and sales links of the target grain and oil products in the next cycle based on the knowledge graph corresponding to each pollutant and the content of each pollutant in the production link of the target grain and oil products in the next cycle to obtain predicted values, and performing prevention and control early warning based on the predicted values, it is possible to predict and prevent and control the content of pollutants in each link of the acquisition, storage, processing, and sales links. Description of the Drawings
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0048] Figure 1 It is a schematic flow chart of a method for real-time intelligent discovery and prevention and control early warning of the quality and safety of holographic full-chain grain and oil products provided by an embodiment of the present application;
[0049] Figure 2 It is a schematic diagram of the divided areas of high and low aggregation values of cadmium in rice in the planting area;
[0050] Figure 3 It is a semi-variance function fitting curve graph;
[0051] Figure 4 It is a linear fitting result graph of the model prediction value and the measured value;
[0052] Figure 5 It is a cadmium content distribution map. Specific implementation manners
[0053] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a 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 those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0054] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0055] In an exemplary embodiment, as Figure 1 shown, a real-time intelligent discovery and prevention and control warning method for the quality and safety of holographic full-chain grain and oil products is provided. The method includes the following steps, where:
[0056] Step 201: For any variety of crops planted in the target planting area, in the current cycle, input the values of the main influencing factors at each preset position in the target planting area into the corresponding pollutant content prediction models of the variety of crops to obtain the contents of various pollutants in the variety of crops planted at each preset position. The variety of crops is used to produce the target grain and oil products; one cycle includes the production link, acquisition link, storage link, processing link, and sales link of the target grain and oil products; the pollutant content prediction model corresponding to the variety of crops is obtained by training a convolutional neural network model based on the main influencing factors at each target sampling point in the target planting area in the current cycle and the contents of pollutants in the variety of crops planted at each target sampling point; the main influencing factors are obtained by screening environmental variables and spatial structure variables. The pollutants can be mycotoxins and heavy metals.
[0057] Step 202: Determine the contents of various pollutants in the variety of crops planted at each preset position and each target sampling point as the contents of various pollutants in the production link of the target grain and oil products.
[0058] Step 203: Obtain the contents of various pollutants in the variety of crops newly harvested at each preset position and each target sampling point as the contents of various pollutants in the acquisition link of the target grain and oil products.
[0059] Step 204: Store the crops of the said variety planted at each preset location and each target sampling point after acquisition in a warehouse. Determine the content of each pollutant at the time of warehousing as the content of each pollutant in the storage link of the target grain and oil products, and determine the content of each pollutant at the time of warehousing as the content of each pollutant in the processing link of the target grain and oil products.
[0060] Step 205: Process the crops of the said variety after warehousing to obtain target grain and oil products. Take the content of each pollutant in the target grain and oil products to be sold as the content of each pollutant in the sales link of the target grain and oil products; the content of each pollutant in the target grain and oil products to be sold is within the preset range.
[0061] Step 206: Based on the threshold range of each pollutant, the content of each pollutant in the production link, acquisition link, storage link, processing link and sales link of the target grain and oil products in the current cycle, and the entities on the holographic traceability chain of the entire grain and oil process, construct a knowledge graph corresponding to each pollutant.
[0062] Step 207: According to the knowledge graph corresponding to each pollutant and the content of each pollutant in the production link of the target grain and oil products in the next cycle, predict the content of each pollutant in the acquisition link, storage link, processing link and sales link of the target grain and oil products in the next cycle to obtain predicted values, and conduct prevention and control early warnings based on the predicted values.
[0063] Implementing the above steps 201 to 207 can monitor the content of pollutants in any link of the production, acquisition, storage, processing and sales of grain and oil products in real time and conduct prevention and control early warnings.
[0064] In another exemplary embodiment of the present application, the process of determining the target sampling points specifically includes:
[0065] For any variety of crops planted in the target planting area, obtain the remote sensing data of the target planting area in the current cycle.
[0066] Perform grid division on the remote sensing data and determine the crop planting density and area of each grid; the said variety of crops is planted within the grid.
[0067] According to the crop planting density and area of each grid, divide the remote sensing data according to the crop planting density level to obtain all grids corresponding to each crop planting density level.
[0068] According to all grids corresponding to each crop planting density level, determine the sampling points in the target planting area as the target sampling points according to the principle of stratified sampling.
[0069] In another exemplary embodiment of the present application, based on the threshold ranges of various pollutants, the contents of various pollutants in the production, acquisition, storage, processing, and sales links of the target grain and oil products in the current cycle, and the entities on the whole-process holographic traceability chain of grain and oil, a knowledge graph corresponding to each pollutant is constructed, specifically including:
[0070] Based on the threshold ranges of various pollutants, the contents of various pollutants in the production, acquisition, storage, processing, and sales links of the target grain and oil products in the current cycle, entity recognition and relationship recognition are performed on the entities on the whole-process holographic traceability chain of grain and oil to obtain multiple entities and the relationships between the entities. The whole-process holographic traceability chain of grain and oil is used to trace the grain and oil products.
[0071] According to the entities and the relationships between the entities, a knowledge graph corresponding to each pollutant is constructed.
[0072] In another exemplary embodiment of the present application, before constructing the knowledge graph corresponding to each pollutant based on the threshold ranges of various pollutants, the contents of various pollutants in the production, acquisition, storage, processing, and sales links of the target grain and oil products in the current cycle, and the entities on the whole-process holographic traceability chain of grain and oil, it further includes:
[0073] The target acquisition data, monitoring data, and values of the main influencing factors at each preset position in the target planting area in the current cycle, as well as the target acquisition data, monitoring data, and values of the main influencing factors at each target sampling point, are stored on the whole-process holographic traceability chain of grain and oil; the target acquisition data includes: longitude and latitude, crop variety, plot where it is located, sampling time; the monitoring data includes: crop production information, crop planting information, crop fertilization and irrigation information, crop pest control information, and the contents of various pollutants in the production, acquisition, storage, processing, and sales links of the target grain and oil products.
[0074] In another exemplary embodiment of the present application, according to the knowledge graph corresponding to each pollutant and the contents of various pollutants in the production link of the target grain and oil products in the next cycle, the contents of various pollutants in the acquisition, storage, processing, and sales links of the target grain and oil products in the next cycle are predicted to obtain predicted values, and prevention and control early warnings are made according to the predicted values, specifically including:
[0075] For any one of the acquisition, storage, processing, and sales links of the target grain and oil products in the next cycle, according to the knowledge graph corresponding to each pollutant and the contents of various pollutants in the production link of the target grain and oil products in the next cycle, the contents of various pollutants in the said link in the next cycle are predicted to obtain predicted values.
[0076] For any pollutant, if the predicted value of the content of the pollutant in the said link in the next cycle exceeds the set threshold, a prevention and control warning is issued for the pollutant in the said link in the next cycle.
[0077] In another exemplary embodiment of the present application, the environmental variables include: ecological elements and human activity elements, and the spatial structure variables include: longitude and latitude, spatial autocorrelation variables, and spatial regionalization variables. The ecological elements include: soil properties, topography, and climate. The human activity elements include: road density and agricultural inputs.
[0078] In another exemplary embodiment of the present application, for any variety of crops planted in the target planting area, the process of determining the value of the spatial regionalization variable at the preset position in the target planting area is as follows:
[0079] For any pollutant, the content of the pollutant in the crops of the said variety planted at each target sampling point in the target planting area is processed to obtain the content of the processed pollutant in the crops of the said variety planted at each target sampling point in the target planting area; the content of the processed pollutant in the crops of the said variety planted at each target sampling point in the target planting area conforms to a normal distribution.
[0080] Spatial statistics are performed on the content of the processed pollutant in the crops of the said variety planted at each target sampling point in the target planting area to obtain the high clustering value range and the low clustering value range of the target planting area.
[0081] According to the high clustering value range and the low clustering value range of the target planting area, the target planting area is divided into multiple sub-regions by the natural break method, and the average value of the said pollutant corresponding to each sub-region is determined as the value of the spatial regionalization variable; the average value of the said pollutant corresponding to the sub-region is the average value of the content of the pollutant in the crops for making grain and oil products planted at each target sampling point in the sub-region.
[0082] In another exemplary embodiment of the present application, spatial statistics are performed on the content of the processed pollutant in the crops of the said variety planted at each target sampling point in the target planting area to obtain the high clustering value range and the low clustering value range of the target planting area. Specifically:
[0083] Local Moran's I spatial statistics are performed on the content of the processed pollutant in the crops of the said variety planted at each target sampling point in the target planting area to obtain the high clustering value range and the low clustering value range of the target planting area.
[0084] In another exemplary embodiment of the present application, the process of determining the value of the spatial autocorrelation variable at the preset position is as follows:
[0085] The variogram function is fitted to obtain the range distance.
[0086] For any preset position, the distances between each point in the set of nearest neighbor points corresponding to the preset position and the preset position are determined to obtain the distance set corresponding to the preset position; the set of nearest neighbor points corresponding to the preset position includes the k nearest target sampling points of the preset position in the target planting area.
[0087] The range distance and the distance set corresponding to the preset position are determined as the value of the spatial autocorrelation variable at the preset position.
[0088] This application can use a pollutant content prediction model to predict pollutants in the spatial dimension, use a knowledge graph to achieve pollutant prediction in the time dimension, and use a knowledge graph to perform predictions to obtain prediction values for each link. Then, the exceeding-standard links can be determined and early warnings can be issued. When product quality problems are found, the production links can be accurately located, and at the same time, risk prediction and early warning in the quality control process can be achieved. It can well evaluate the real-time risk prevention and control of the whole chain of "three flows in one" (production flow, logistics, control flow) of grain and oil products from the place of origin to the product, providing important technical support for food quality safety supervision and prevention and control.
[0089] This application provides a specific embodiment taking heavy metal cadmium as an example to introduce the above method in detail:
[0090] Step 1: In the crop planting and production link, based on the characteristics of the crop such as spectrum, shape, and texture, satellite remote sensing data including the corresponding crop planting range and planting density is obtained, with a resolution of 1 km × 1 km.
[0091] Step 2: Based on the remote sensing data in Step 1, according to the regional planting density distribution and planting area, the sampling quantity and specific sampling locations of the target planting area are determined. The crops are planted in the target planting area.
[0092] Specifically, for any variety of crops in the target planting area, the grids with different planting densities and the number of grids are counted, and the grids are divided into corresponding crop planting density levels, so that the sum of the planting areas of the grids in each crop planting density level accounts for approximately the same proportion of the total planting area. Then, the sampling quantity and sampling points for each level are determined, and the longitude and latitude information of the sampling points is converted into specific sampling addresses through a map software.
[0093] Taking rice as an example: The satellite remote sensing data of rice is a 1 km × 1 km grid with sequential coding numbers and longitude and latitude. Each grid has a corresponding rice planting density, and the density × the number of grids is the corresponding planting area, with the unit of km 2 , that is, the planting area of the i-th grid is its corresponding rice planting density, and the sum of the planting areas of all grids is SN , let \(L\) be the total number of crop planting density levels, and \(L\) can be determined by itself according to the total sampling amount \(M\) (the larger \(L\) is, the different planting density levels can be fully reflected in the distribution of points). According to the formula , the average area is obtained. Based on the average area and the planting area of each rice planting density, the rice planting area of each crop planting density level is obtained, ensuring that the rice planting areas of each crop planting density level are approximately equal and similar to the average area. According to the formula , all grids corresponding to the \(l\)-th crop planting density level are obtained, where \(S\) l represents the sum of the rice planting areas of the \(l\)-th crop planting density level, and \(s\) i is the planting area of the \(i\)-th grid. If the grid density corresponding to the \(l\)-th level includes planting densities \(a\), \(b\), and \(c\), then all grids corresponding to the \(l\)-th level include all grids corresponding to planting densities \(a\), \(b\), and \(c\). According to the formula , the total number of samples \(m\) of each level is obtained. Based on all grids corresponding to each level obtained above and the total number of samples of each level, the sampling points (i.e., the extracted grids) of each level are determined. Specifically, which grid to extract can use a random extraction tool to extract numbers in the corresponding grouping interval coding and obtain the corresponding longitude and latitude, that is, the sampling point location. One grouping interval corresponds to one level, and the coding in the grouping interval is the planting density value included in the corresponding level. For specific sampling statistics, refer to Table 1.
[0094] Table 1 Example Table of Sampling Statistics
[0095]
[0096]
[0097] Step 3: In the production link, after determining the sampling points, convey the specific sampling points to the drone. The drone collects the crops at the sampling points and the target acquisition data at the sampling points, and stores the target acquisition data on the whole-process holographic traceability chain of grain and oil for later traceability. Automatically send the collected samples (crops at the sampling points) to the unmanned inspection and testing equipment for testing relevant quality indicators and safety indicators to obtain the content of each pollutant. In this embodiment, it is the content of cadmium. The detected data (content of cadmium) is directly and automatically transmitted to the whole-process holographic traceability chain of grain and oil to form monitoring data with other information in the production link, which is also used for traceability later. The said monitoring data includes: production information, planting information, fertilization and irrigation information, pest and disease control information, and content of cadmium, etc.
[0098] Step 4: Determine the input parameters of the neural network model and construct the neural network model.
[0099] Specifically, by methods such as principal component analysis, correlation analysis, or variance inflation factor test, the environmental variables and spatial structure variables are screened to obtain the main influencing factors as input parameters. The environmental variables include ecological factors (soil properties, terrain, climate, etc.), human activity factors (road density, agricultural inputs, etc.), and the spatial structure variables include geographical location (latitude and longitude), spatial autocorrelation variables, and spatial regionalization variables. This step fully considers the environmental variables and spatial structure variables, making the cadmium content predicted by the model more accurate in the later stage.
[0100] The steps for determining the spatial regionalization variables are as follows:
[0101] Process the cadmium content collected in Step 3 to make it conform to a normal distribution. Conduct a local Moran's I statistic on the processed cadmium content to determine the high clustering value range and low clustering value range of the target planting area, as shown in Figure 2 . According to the high clustering value range and low clustering value range, divide the target planting area into different sub-regions by the natural breaks method, and take the average value of the cadmium content at the sampling points within each sub-region as the spatial regionalization variable.
[0102] The steps for determining the spatial autocorrelation variables are as follows:
[0103] Fit the semivariogram function (as shown in Figure 3 ) to obtain the range distance, and the results are shown in Table 2. Calculate the distances between the preset positions and the 5 nearest sampling points to obtain a distance set. Take the range distance and the distances within the distance set as the spatial autocorrelation variables.
[0104] Table 2 Semivariogram function parameter table
[0105]
[0106] In the target planting area, characterize the environmental variable and spatial structure variable data as input data, and take the cadmium content in rice as the output data to establish a convolutional neural network model. This convolutional neural network model is the Convolutional Neural Network-Rice Heavy Metal (CNN-RHM) model.
[0107] Specifically: The structure of the CNN-RHM model consists of a convolutional layer, an activation function, a pooling layer, a fully connected layer, and an output layer connected in sequence. In the CNN-RHM model, first, the convolutional layer performs convolution on the main influencing factors to further extract features. The number of convolutional kernels is 10; the size of each convolutional kernel is 3×3, that is, 10 feature maps are generated, representing different features extracted from the original input data; the stride is set to 1 to ensure the size consistency of the input and output. An activation function that supports the convolutional layer is added after the convolutional layer. In this model, the common ReLU activation function is used. Subsequently, it is the pooling layer, and the maximum pooling operation is used to improve the prediction accuracy. The size of the pooling window is 2×2, and the stride is 2. A fully connected layer is established behind the pooling layer. The fully connected layer is arranged in a chain, and the number of neurons is 100. Finally, it is the output layer.
[0108] Step 5: Train and validate the neural network model constructed in Step 4 to obtain a cadmium content prediction model.
[0109] The specific process is as follows: The input data and output data are respectively divided into a training set and a validation set according to the ratio of 70%:30%. The training set is input into the model. The mean squared error loss function is selected, and the gradient descent and its variant Adam optimization algorithm are selected. The learning rate is 0.001 to train the model. By continuously adjusting the setting parameters of the convolutional layer, pooling layer, and fully connected layer, the optimal CNN-RHM model is obtained.
[0110] The validation set is input into the trained model, and the accuracy evaluation indicators of the coefficient of determination (R 2 ), root mean square error (RMSE), and mean absolute error (MAE) are used to validate the model. The results show that the CNN-RHM model that fully considers environmental variables has a higher R 2 (>0.85) and lower MAE and RMSE, and the predicted value is closest to the test result, indicating that it shows good performance in modeling and prediction. Figure 4 The blue line in it is obtained by linearly fitting the predicted value and the measured value of the sampling points. The predicted value should be equal to the measured value. Therefore, a reference line (gray line) is provided to view the closeness of the blue line to the measured value. From Figure 4 it can be seen that the CNN-RHM model that fully considers environmental variables and spatial structure variables has good performance in predicting the cadmium content in rice in the study area. Figure 4 In part (a) of it is the ordinary Kriging model that only considers spatial structure variables and does not consider environmental variables. Figure 4 In part (b) of it is the CNN-RHM model that fully considers environmental variables and spatial structure variables.
[0111] Step 6: Based on the cadmium content prediction model obtained in Step 5, predict the cadmium content of rice at the preset location in the target planting area, and obtain the predicted values and distribution maps of the cadmium content of rice in the entire target planting area.
[0112] The specific process is as follows: Determine the preset location, then obtain the longitude and latitude of the preset location, extract the key influencing factors at the preset location, substitute them into the cadmium content prediction model to obtain the predicted value of the cadmium content at the preset location, ensure sufficient sample points, and convert to a raster to draw the cadmium content distribution map. As Figure 5 shown, Figure 5 Part A in it is the layout plan of sampling points, Figure 5 and Part B in it is the layout plan of prediction points.
[0113] Step 7: Embed the predicted value of cadmium content in rice obtained in Step 6 into the whole-process holographic traceability chain of grain and oil, and obtain the cadmium content values of other links.
[0114] Specifically, irrigation, soil, atmosphere, pesticide application, etc. in the production link will all cause changes in the cadmium content of grains in this link. Therefore, cadmium detection and prediction are carried out during the grain planting stage, and the cadmium content obtained from the detection and prediction is automatically assigned to the production link of the traceability chain through the traceability system, that is, the cadmium content prediction value obtained in the above Step 6 and the cadmium content sampled in Step 3 are stored as the cadmium content in the production link on the traceability chain.
[0115] When newly harvested grains are purchased, cadmium detection is carried out to obtain the cadmium content in the grains, which is used as the cadmium content in the acquisition link of the target grain and oil products. During the storage link, since the grains are mostly in a static state, the influence of cadmium can be almost ignored. Therefore, the cadmium content at the time of storage is determined as the cadmium content in the storage link of the target grain and oil products. After the grains are transported from the storage link to the processing link after leaving the warehouse, cadmium detection is carried out on the cadmium content at the time of leaving the warehouse to obtain the cadmium content in the processing link. The crops of the above variety are processed after leaving the warehouse to obtain the target grain and oil products. The cadmium content of the target grain and oil products is measured, and the measured cadmium content is compared with the cadmium content in the production, acquisition, and storage links, and threshold judgment is carried out in each link. The products that do not exceed the standard continue to flow to the sales link. The cadmium content collected in each link of production, acquisition, storage, processing, and sales is embedded in the whole-process holographic traceability chain of the grain and oil product prevention and control warning and traceability system.
[0116] Step 8: Construct a knowledge graph, and combine the key focus points of heavy metals in the HACCP quality system. Using the established knowledge graph, carry out cadmium prediction and warning on the vertical time axis of "production, acquisition, storage, processing, and sales" of grain circulation.
[0117] Specifically, according to the cadmium threshold range in the national standard, initially obtain the original cadmium warning data required for constructing the knowledge graph, that is, the cadmium threshold range.
[0118] Based on the cadmium threshold range, the cadmium content in the production, acquisition, storage, processing, and sales links of target grain and oil products in the current cycle, combined with regional characteristics and climate change, entity recognition is performed on the entities stored in the full-process holographic traceability chain using natural language processing technology to identify the entities in the grain and oil full-process holographic traceability chain, such as production enterprises, products, batches, transport vehicles, etc. Relationship extraction is carried out on the entities to identify the relationships between the entities, such as the relationship between the production enterprise and the product, the relationship between the product and the batch, the relationship between the batch and the transport vehicle, etc. The entities and relationships are represented as nodes and edges in the graph, and a knowledge graph corresponding to cadmium constructed using the cadmium threshold can be extracted.
[0119] In the next cycle, based on the knowledge graph corresponding to cadmium and the cadmium content in the production link of the next cycle, predict the cadmium content in other links to achieve the prediction of cadmium content on the longitudinal time axis of "production, acquisition, storage, processing, and sales", and issue a warning in combination with the cadmium content safety threshold specified in the HACCP quality system.
[0120] Use an inference algorithm to infer the knowledge graph to discover the hidden relationships and rules between the nodes of the knowledge graph. Visualize the knowledge graph to provide an intuitive graphical interface for users to view and analyze.
[0121] This application establishes a knowledge graph and a pollutant content prediction model to realize the functions of preventing, controlling, warning, and monitoring data for grain products, covering the entire process of grain production, acquisition, storage, processing, and sales.
[0122] Based on the same inventive concept, the embodiments of this application also provide a holographic full-chain grain and oil product quality safety real-time intelligent discovery and prevention and control warning device for implementing the above-mentioned holographic full-chain grain and oil product quality safety real-time intelligent discovery and prevention and control warning method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the holographic full-chain grain and oil product quality safety real-time intelligent discovery and prevention and control warning device provided below can refer to the limitations on the holographic full-chain grain and oil product quality safety real-time intelligent discovery and prevention and control warning method in the above text, and will not be repeated here.
[0123] In an exemplary embodiment, a holographic full-chain grain and oil product quality safety real-time intelligent discovery and prevention and control warning device is provided, including:
[0124] The pollutant content prediction module is used for inputting the values of the main influencing factors at each preset position of the target planting area into the pollutant content prediction model corresponding to the crop of any variety planted in the target planting area within the current cycle, so as to obtain the content of each pollutant in the crop of the variety planted at each preset position; the crop of the variety is used to make the target grain and oil products; one cycle includes the production link, purchase link, storage link, processing link and sales link of the target grain and oil products; the pollutant content prediction model corresponding to the crop of the variety is obtained by training the convolutional neural network model according to the main influencing factors at each target sampling point in the target planting area within the current cycle and the content of pollutants in the crop of the variety planted at each target sampling point; the main influencing factors are obtained by screening environmental variables and spatial structure variables.
[0125] The production link pollutant content determination module is used to determine the content of each pollutant in the crops of the said variety planted at each preset position and each target sampling point as the content of each pollutant in the production link of the target grain and oil product.
[0126] The pollutant content determination module in the purchasing stage is used to obtain the content of each pollutant in the newly harvested crops of the said variety planted at each preset position and each target sampling point as the content of each pollutant in the purchasing stage of the target grain and oil products.
[0127] The pollutant content determination module for the storage and processing links is used to store the crops of the said varieties purchased and planted at each preset position and each target sampling point in the warehouse, determine the content of each pollutant when entering the warehouse as the content of each pollutant in the storage link of the target grain and oil products, and determine the content of each pollutant when leaving the warehouse as the content of each pollutant in the processing link of the target grain and oil products.
[0128] The pollutant content determination module in the sales link is used to process the crops of the said variety after leaving the warehouse to obtain the target grain and oil products, and use the content of each pollutant in the target grain and oil products to be sold as the content of each pollutant in the sales link of the target grain and oil products; the content of each pollutant in the target grain and oil products to be sold is within the preset range.
[0129] The knowledge graph construction module is used to construct the knowledge graph corresponding to each pollutant based on the threshold range of each pollutant, the content of each pollutant in the production, procurement, storage, processing and sales links of the target grain and oil products in the current cycle, and the entities in the holographic traceability chain of the entire grain and oil process.
[0130] The prevention and control early warning module is used to predict the contents of various pollutants in the acquisition, storage, processing, and sales links of the target grain and oil products in the next cycle based on the knowledge graph corresponding to each pollutant and the contents of various pollutants in the production link of the target grain and oil products in the next cycle, and perform prevention and control early warning based on the predicted values.
[0131] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0132] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0133] Specific examples are used in this article to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, based on the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A holographic and full-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method, characterized in that: The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method includes: For any variety of crops planted in the target planting area, in the current cycle, the values of the main influencing factors at each preset position in the target planting area are input into the pollutant content prediction model corresponding to the crop of the variety, and the content of each pollutant in the crop of the variety planted at each preset position is obtained; the crop of the variety is used to make the target grain and oil products; one cycle includes the production link, acquisition link, storage link, processing link and sales link of the target grain and oil products; the pollutant content prediction model corresponding to the crop of the variety is obtained by training the convolutional neural network model according to the main influencing factors at each target sampling point in the target planting area in the current cycle and the content of pollutants in the crop of the variety planted at each target sampling point; the main influencing factors are obtained by screening environmental variables and spatial structure variables; Determine the content of each pollutant in the crops of the variety planted at each preset position and each target sampling point as the content of each pollutant in the production link of the target grain and oil product; Obtaining the content of each pollutant in the newly harvested crops of the variety planted at each preset location and each target sampling point as the content of each pollutant in the purchase link of the target grain and oil products; The crops of the variety planted at each preset location and each target sampling point purchased are stored in a warehouse, and the content of each pollutant when entering the warehouse is determined as the content of each pollutant in the storage link of the target grain and oil products, and the content of each pollutant when leaving the warehouse is determined as the content of each pollutant in the processing link of the target grain and oil products; The target grain and oil products are obtained by processing the crops of the said varieties after they are released from the warehouse, and the contents of various pollutants in the target grain and oil products to be sold are used as the contents of various pollutants in the sales link of the target grain and oil products; the contents of various pollutants in the target grain and oil products to be sold are all within the preset range; Based on the threshold range of each pollutant, the content of each pollutant in the production, acquisition, storage, processing and sales links of the target grain and oil products in the current cycle, and the entities in the holographic traceability chain of the whole process of grain and oil, the knowledge graph corresponding to each pollutant is constructed; According to the knowledge graph corresponding to each pollutant and the content of each pollutant in the production link of the target grain and oil products in the next cycle, the content of each pollutant in the acquisition link, storage link, processing link and sales link of the target grain and oil products in the next cycle is predicted to obtain the predicted value, and prevention and control early warning is carried out according to the predicted value.
2. The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method according to claim 1 is characterized in that: The process of determining the target sampling point includes: For any crop variety planted in the target planting area, remote sensing data of the target planting area is obtained within the current cycle; Dividing the remote sensing data into grids, and determining the crop planting density and area of each grid; planting the crops of the variety in the grids; According to the crop planting density and area of each grid, the remote sensing data is divided according to the crop planting density level to obtain all grids corresponding to each crop planting density level; According to all the grids corresponding to each crop planting density level, the sampling points in the target planting area are determined as the target sampling points based on the stratified sampling principle.
3. The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method according to claim 1 is characterized in that: Based on the threshold range of each pollutant, the content of each pollutant in the production, acquisition, storage, processing and sales links of the target grain and oil products in the current cycle, and the entities in the holographic traceability chain of the whole process of grain and oil, the knowledge graph corresponding to each pollutant is constructed, including: Based on the threshold range of each pollutant and the content of each pollutant in the production, acquisition, storage, processing and sales links of the target grain and oil products in the current cycle, the entities on the holographic traceability chain of the whole process of grain and oil are identified and the relationship between multiple entities is obtained; Construct the knowledge graph corresponding to each pollutant based on the entities and the relationships between them.
4. The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method according to claim 1 is characterized in that: Before building the knowledge graph corresponding to each pollutant based on the threshold range of each pollutant, the content of each pollutant in the production, acquisition, storage, processing and sales links of the target grain and oil products in the current cycle, and the entities in the holographic traceability chain of the whole process of grain and oil, it also includes: The target collection data, monitoring data and values of main influencing factors at each preset position in the target planting area during the current cycle, as well as the target collection data, monitoring data and values of main influencing factors at each target sampling point are stored in the holographic traceability chain of the entire grain and oil process; the target collection data include: longitude and latitude, crop variety, location, and sampling time; the monitoring data include: crop production information, crop planting information, crop fertilization and irrigation information, crop disease and pest control information, and the content of each pollutant in the production, procurement, storage, processing, and sales links of the target grain and oil products.
5. The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method according to claim 1 is characterized in that: According to the knowledge graph corresponding to each pollutant and the content of each pollutant in the production link of the target grain and oil products in the next cycle, the content of each pollutant in the acquisition link, storage link, processing link and sales link of the target grain and oil products in the next cycle is predicted to obtain the predicted value, and prevention and control warnings are carried out according to the predicted value, including: For any link in the acquisition, storage, processing and sales of target grain and oil products in the next cycle, the content of each pollutant in the link in the next cycle is predicted according to the knowledge graph corresponding to each pollutant and the content of each pollutant in the production link of the target grain and oil products in the next cycle to obtain a predicted value; For any pollutant, if the predicted value of the pollutant content in the link in the next cycle exceeds the set threshold, a prevention and control warning will be issued for the pollutant in the link in the next cycle.
6. The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method according to claim 1 is characterized in that: The environmental variables include ecological factors and human activity factors, and the spatial structure variables include longitude and latitude, spatial autocorrelation variables and spatial regionalization variables.
7. The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method according to claim 6 is characterized in that: For any crop variety planted in the target planting area, the process of determining the value of the spatial regionalization variable at the preset position of the target planting area is: For any pollutant, the content of the pollutant in the crops of the variety planted at each target sampling point in the target planting area is processed to obtain the content of the pollutant in the crops of the variety planted at each target sampling point in the target planting area after processing; the content of the pollutant in the crops of the variety planted at each target sampling point in the target planting area after processing conforms to the normal distribution; Performing spatial statistics on the content of the pollutants in the crops of the variety planted at each target sampling point in the target planting area after treatment to obtain a high clustering value range and a low clustering value range in the target planting area; According to the high clustering value range and the low clustering value range of the target planting area, the target planting area is divided into multiple sub-areas according to the natural break method, and the average value of the pollutant corresponding to each sub-area is determined as the value of the spatial regionalization variable; the average value of the pollutant corresponding to the sub-area is the average value of the content of the pollutant in the crops for making grain and oil products planted at each target sampling point in the sub-area.
8. The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method according to claim 7 is characterized in that: The content of the pollutants in the crops of the variety planted at each target sampling point in the target planting area after treatment is spatially statistically analyzed to obtain the high clustering value range and the low clustering value range of the target planting area, specifically: The high clustering value range and the low clustering value range of the target planting area are obtained by performing local Moran's I spatial statistics on the content of the pollutants after treatment in the crops of the variety planted at each target sampling point in the target planting area.
9. The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning method according to claim 6 is characterized in that: The process of determining the value of the spatial autocorrelation variable at the preset location is: Fitting the semivariogram function yields the range distance; For any preset position, determine the distance between each point in the nearest neighbor point set corresponding to the preset position and the preset position to obtain a distance set corresponding to the preset position; The nearest neighbor point set corresponding to the preset position includes k nearest neighbor target sampling points of the preset position in the target planting area; The range distance and the distance set corresponding to the preset position are determined as the value of the spatial autocorrelation variable at the preset position.
10. A holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning device, characterized in that: The holographic whole-chain grain and oil product quality safety real-time intelligent discovery and prevention and control early warning device includes: The pollutant content prediction module is used for inputting the values of the main influencing factors at each preset position of the target planting area into the pollutant content prediction model corresponding to the crop of the variety for any crop variety planted in the current cycle, so as to obtain the content of each pollutant in the crop of the variety planted at each preset position; the crop of the variety is used to make the target grain and oil products; one cycle includes the production link, acquisition link, storage link, processing link and sales link of the target grain and oil products; the pollutant content prediction model corresponding to the crop of the variety is obtained by training the convolutional neural network model according to the main influencing factors at each target sampling point in the target planting area in the current cycle and the content of pollutants in the crop of the variety planted at each target sampling point; the main influencing factors are obtained by screening environmental variables and spatial structure variables; A production link pollutant content determination module is used to determine the content of each pollutant in the crops of the variety planted at each preset position and each target sampling point as the content of each pollutant in the production link of the target grain and oil product; A pollutant content determination module in the purchasing stage is used to obtain the content of each pollutant in the newly harvested crops of the variety planted at each preset position and each target sampling point as the content of each pollutant in the purchasing stage of the target grain and oil products; The pollutant content determination module for the storage link and the processing link is used to store the crops of the said variety planted at each preset position and each target sampling point purchased into the warehouse, determine the content of each pollutant when entering the warehouse as the content of each pollutant in the storage link of the target grain and oil product, and determine the content of each pollutant when leaving the warehouse as the content of each pollutant in the processing link of the target grain and oil product; The pollutant content determination module in the sales link is used to process the crops of the variety after leaving the warehouse to obtain the target grain and oil products, and use the content of each pollutant in the target grain and oil products to be sold as the content of each pollutant in the sales link of the target grain and oil products; the content of each pollutant in the target grain and oil products to be sold is within the preset range; The knowledge graph construction module is used to construct the knowledge graph corresponding to each pollutant based on the threshold range of each pollutant, the content of each pollutant in the production, acquisition, storage, processing and sales links of the target grain and oil products in the current cycle, and the entities in the holographic traceability chain of the whole process of grain and oil; The prevention, control and early warning module is used to predict the content of each pollutant in the acquisition, storage, processing and sales links of target grain and oil products in the next cycle according to the knowledge graph corresponding to each pollutant and the content of each pollutant in the production link of target grain and oil products in the next cycle to obtain predicted values, and to carry out prevention, control and early warning based on the predicted values.
Citation Information
Patent Citations
Grain and oil product quality control and tracing platform and construction method
CN111915333A
Pollutant prediction method and device, storage medium and electronic device
CN119378663A