A big data analysis and monitoring system and method for ginger planting environment

CN120067552BActive Publication Date: 2025-11-21HUNAN TAIYANG PHARM CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510133680.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-11-21
Estimated Expiration
2045-02-06

AI Technical Summary

Technical Problem

现有技术在生姜种植环境监测中,数据质量参差不齐,缺乏高效的数据预处理方法,难以捕捉环境参数之间的复杂关系,导致生姜种植环境调整不准确,影响产量和质量。

Method used

采集生姜种植环境的图像数据和生物环境指标数据,通过构建预测模型和聚类算法处理缺失值和异常值,利用小波变换去噪图像数据,并构建CNN卷积神经网络模型进行数据分析,优化环境参数组合,设置预警器监测环境参数。

Benefits of technology

提高了数据质量和监测精度,确保生姜种植环境的优化调整准确性,实现了对生姜种植环境的实时监测和预警功能,提升了生姜产量和质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067552B_ABST
    Figure CN120067552B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of biological monitoring, and discloses a ginger planting environment big data analysis monitoring system and method; comprising: collecting biological data in the ginger planting environment, the biological data including image data and biological environment index data; performing data cleaning on the biological data to obtain accurate biological data; performing data analysis on the accurate biological data to obtain an optimal environment parameter combination; adjusting each environment parameter in the ginger planting environment based on the optimal environment parameter combination; setting an early warning device to monitor the adjusted ginger planting environment, and automatically sending early warning information to a preset database when the environment parameter of the adjusted ginger planting environment exceeds a preset safety range; the present application realizes accurate monitoring of the ginger planting environment and promotes the scientific development of ginger planting.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of biological monitoring, more particularly, the present application relates to a ginger planting environment big data analysis monitoring system and method. BACKGROUND

[0002] The patent with the application publication number CN119314572A discloses a biological reaction intelligent monitoring system and method, which belongs to the field of intelligent monitoring. The system comprises: a reaction stage division unit for dividing and determining multiple reaction stages; a variable relationship mining unit for determining dominant variables and auxiliary variables, mining linear relationships between variables, cooperating with a non-sensitive loss function, and supervising and training a soft monitoring module; a continuous monitoring and collecting unit for configuring a monitoring device group, continuously monitoring, and determining reaction monitoring data; a data analysis and screening unit for preprocessing data, performing linear analysis and abnormal reaction positioning, and determining effective monitoring data; a game equilibrium decision unit for making game equilibrium decisions on abnormal reaction identification and determining reaction adjustment strategies; and a reaction monitoring management unit for responding to adjustment strategies, performing feedback monitoring analysis and reaction monitoring management, improving biological reaction monitoring precision, realizing real-time online monitoring, and intelligently regulating and controlling abnormal situations.

[0003] Due to device aging and environmental factors in the monitoring data collection process, the quality of the collected data is often uneven, and there is a lack of efficient data preprocessing methods, which greatly affects the monitoring accuracy of the ginger planting environment. Because the growth of ginger is affected by multiple environmental parameters, traditional data preprocessing methods are difficult to capture the complex relationships between these environmental parameters. For example, environmental parameters have time series, certain trends and periodicity. Simply using an interpolation algorithm to fill in missing values when processing missing values will ignore the time series of environmental parameters, resulting in inaccurate missing value processing results. It is difficult to control the growth environment of crops through analysis of monitoring data. The adjustment of environmental parameters of the ginger planting environment often relies on experience, and there is a lack of scientific and effective methods to determine the best growth conditions, which can easily result in poor ginger planting conditions and ultimately lead to low ginger yield and quality.

[0004] In view of this, the present application provides a ginger planting environment big data analysis monitoring system and method to solve the above problems. SUMMARY

[0005] In order to overcome the above-mentioned defects of the prior art, in order to achieve the above-mentioned purposes, the present application provides the following technical scheme: a ginger planting environment big data analysis monitoring method, comprising:

[0006] S1. Collect biological data in the ginger planting environment, the biological data comprising image data and biological environment index data;

[0007] S2. Data cleaning is performed on the biological data to obtain accurate biological data;

[0008] S3. Data analysis is performed on the accurate biological data to obtain an optimal environment parameter combination; and based on the optimal environment parameter combination, each environment parameter in the ginger planting environment is adjusted;

[0009] S4. An early warning device is set to monitor the adjusted ginger planting environment, and when the environment parameter of the adjusted ginger planting environment exceeds the preset safety range, the early warning device automatically sends early warning information to a preset database.

[0010] Further, the biological data acquisition method comprises: using a high-resolution camera to collect image data, and equipping a wide-angle lens and a thermal imaging function, and setting at a suitable position in the ginger planting area; collecting corresponding environment parameters by arranging various sensors in the ginger planting area, the environment parameters including temperature, humidity, light intensity, carbon dioxide concentration and soil pH value; integrating all kinds of environment parameters to obtain biological environment index data; querying the time stamp of each image in the image data and the time stamp of each environment index data point in the biological environment index data, and matching the image data and the biological environment index data based on the time stamp, and adding the same feature code to the image data and the biological environment index data that can be matched.

[0011] Further, the method for data cleaning of the biological data comprises:

[0012] performing missing value processing on the biological environment index data to obtain complete index data; performing abnormal value processing on the complete index data to obtain normal index data; performing denoising processing on the image data to obtain enhanced image data; and integrating the normal index data and the enhanced image data to obtain accurate biological data;

[0013] The method for performing missing value processing on the biological environment index data comprises:

[0014] constructing a prediction model set, using a decision tree model as a basic framework of each prediction model; using the prediction model set to predict the missing values of the biological environment index data to obtain a prediction value of each missing index data point in the biological environment index data; and using the prediction value to fill the missing values of each missing index data point to obtain complete index data;

[0015] The method for constructing the prediction model set comprises:

[0016] Collect historical complete index data as a training set of the prediction model; take different kinds of historical environment parameters in the historical complete index data as training labels of different kinds of prediction models respectively; train the prediction model of the corresponding kind based on the historical complete index data and the different kinds of historical environment parameters, define the corresponding loss function for each kind of prediction model, calculate the function value of each loss function, when the function value of any one loss function no longer changes, fix the parameters to obtain the trained prediction model of any one kind, and integrate all the trained prediction models to obtain the prediction model set.

[0017] Further, the way of performing the abnormal value processing on the complete index data comprises:

[0018] All complete index data points belonging to any one timestamp in the complete index data are combined into a multi-dimensional vector; all multi-dimensional vectors are processed by clustering to obtain a set of grouped multi-dimensional vectors; the set of grouped multi-dimensional vectors is marked for abnormality to obtain a clustering difference, and the abnormal value is determined based on the clustering difference; the abnormal value is adjusted by querying a preset ginger planting knowledge base to obtain normal index data;

[0019] The way of processing all multi-dimensional vectors by clustering comprises:

[0020] K multi-dimensional vectors are randomly selected as initial cluster centers; the Euclidean distance between each multi-dimensional vector and any one initial cluster center is calculated; if the Euclidean distance between any one multi-dimensional vector and any one initial cluster center is less than a preset distance threshold, the multi-dimensional vector and the initial cluster center are divided into a cluster class;

[0021] The average Euclidean distance of any one multi-dimensional vector and other multi-dimensional vectors in the cluster class is calculated and averaged to obtain the average Euclidean distance of the multi-dimensional vector; the average Euclidean distance between any one multi-dimensional vector and the cluster centers of other cluster classes is calculated and averaged to obtain the cluster class average distance of the multi-dimensional vector; based on the average Euclidean distance and the cluster class average distance of the multi-dimensional vector, the clustering coefficient of the multi-dimensional vector is obtained; the clustering coefficients of all multi-dimensional vectors are calculated and averaged to obtain the average clustering coefficient;

[0022] Adjust the initial clustering center number constantly, calculate the average clustering coefficient after each adjustment, fix the clustering number when the average clustering coefficient reaches the maximum value, and obtain the optimal clustering center number; update the initial clustering center based on the optimal clustering center number, and re-cluster to obtain a grouped multi-dimensional vector set; calculate the Euclidean distance between each multi-dimensional vector in the grouped multi-dimensional vector set and the clustering center of the cluster to which the multi-dimensional vector belongs, mark the multi-dimensional vector with a Euclidean distance greater than a preset classification threshold as an abnormal multi-dimensional vector; calculate the Euclidean distance between each element in each marked multi-dimensional vector and the clustering center of the cluster to which the marked multi-dimensional vector belongs, obtain the clustering difference of each element in each marked multi-dimensional vector, and determine an element with a clustering difference greater than a preset difference threshold as an outlier.

[0023] Further, the image data is denoised in the following manner:

[0024] A preset wavelet basis function is used to perform multi-scale wavelet decomposition on each image in the image data. First, low-pass and high-pass filtering is performed in the horizontal direction to obtain the low-frequency component and the high-frequency component of each image, respectively. Then, vertical filtering is performed on the low-frequency component of each image to obtain the low-frequency subgraph and the high-frequency subgraph of each image. The low-frequency subgraph of each layer is further filtered in the horizontal and vertical directions to obtain higher-level low-frequency subgraphs and high-frequency subgraphs. The multi-scale wavelet decomposition is repeated until the maximum decomposition level is reached. Wavelet coefficients are extracted from the subgraphs after each decomposition, and all wavelet coefficients are integrated to obtain a wavelet coefficient set. Threshold processing is performed on the wavelet coefficient set to obtain denoised frequency domain data. The denoised frequency domain data is reconstructed using inverse wavelet transform to obtain denoised image data.

[0025] The RGB weighted average method is used to perform grayscale processing on each denoised image in the denoised image data to obtain grayscale image data. Gaussian filtering is performed on each grayscale image in the grayscale image data to obtain filtered grayscale image data. An edge detection operator is used to calculate the pixel value change gradient of each filtered grayscale image in the filtered grayscale image data, and the edge features of each filtered grayscale image are extracted based on the pixel value change gradient. Image sharpening is performed on each filtered grayscale image based on the edge features to obtain sharpened image data. Contrast enhancement processing is performed on each sharpened image in the sharpened image data to obtain enhanced image data.

[0026] Further, the wavelet coefficient set is processed in the following manner:

[0027] A wavelet coefficient threshold is preset, and an adaptive threshold function is constructed based on the wavelet coefficient threshold. Each wavelet coefficient in the wavelet coefficient set is updated based on the adaptive threshold function to obtain an updated wavelet coefficient set, and the denoised frequency domain data is obtained.

[0028] The formula of the adaptive threshold function is:

[0029] Wherein, μ i,j represents the wavelet coefficient of the i-th level and the j-th translation position; represents the updated wavelet coefficient of the i-th level and the j-th translation position; A represents a judgment function; γ represents a preset wavelet coefficient threshold; α and β are dynamic adjustment factors.

[0030] Further, the image sharpening manner of each filtered gray-scale image comprises:

[0031] A rectangular coordinate system is constructed with the gray-scale pixel point at the lower left corner of each filtered gray-scale image as the origin; a Laplacian operator of each filtered gray-scale image is calculated to obtain an initial Laplacian operator, and all initial Laplacian operators are integrated to obtain a Laplacian operator set; a sliding window much smaller than the size of each filtered gray-scale image is constructed, and the sliding window is made to slide on any filtered gray-scale image; in the region formed by the sliding window on any filtered gray-scale image, the pixel value change gradient of all gray-scale pixel points in the region is calculated and averaged to obtain the local average change gradient of the region; an operator adjustment coefficient is defined, and a change gradient threshold is preset; the size of the operator adjustment coefficient is adjusted based on the local average change gradient of the region and the preset change gradient threshold to obtain the operator adjustment coefficient of the region.

[0032] The initial Laplacian operator is updated based on the operator adjustment coefficient of the region to obtain an updated Laplacian operator of the region; the image sharpening of the region is completed by convolution operation of the updated Laplacian operator of the region and the region; the sliding window is translated along the coordinate axis direction to sharpen the images of other regions until the sliding window traverses the entire filtered gray-scale image to complete the image sharpening and obtain a sharpened image; the image sharpening is performed on each filtered gray-scale image, and all sharpened images are integrated to obtain sharpened image data.

[0033] The contrast enhancement processing manner of each sharpened image in the sharpened image data comprises:

[0034] A rectangular coordinate system is constructed with the sharpened pixel point at the lower left corner of each sharpened image as the origin; histogram equalization processing is performed on any sharpened image to obtain the equalized pixel value of any sharpened pixel point in the sharpened image; the pixel value change gradient of any sharpened pixel point is calculated, and a weighting coefficient is calculated based on the pixel value change gradient of any sharpened pixel point; the contrast enhancement pixel value is calculated based on the equalized pixel value of any sharpened pixel point and the weighting coefficient of the sharpened pixel point; the contrast enhancement pixel value of each sharpened pixel point of each sharpened image is calculated to obtain enhanced image data.

[0035] Further, the manner of performing data analysis on the precise biological data comprises:

[0036] constructing an analysis model to process the precise biological data to obtain a suitable environment parameter combination; and optimizing the suitable environment parameter combination to obtain an optimal environment parameter combination;

[0037] The manner of constructing the analysis model comprises:

[0038] using a CNN convolutional neural network model as a basic framework of the analysis model; collecting historical precise biological data as a training set of the analysis model; constructing a growth condition score function to calculate a growth condition score of each piece of historical precise biological data, and taking the historical precise biological data with the highest growth condition score as a training label; training the analysis model using the historical precise biological data, and defining an analysis loss function; and calculating a function value of the analysis loss function until the function value of the analysis loss function no longer decreases, and fixing the parameters at this time to obtain the trained analysis model.

[0039] Further, the manner of optimizing the suitable environment parameter combination comprises:

[0040] initializing a particle population parameter, the particle population parameter comprising a population size, an iteration number, a particle individual best position, and a particle population best position; each particle individual in the particle population representing a suitable environment parameter combination;

[0041] defining an optimization objective function wherein NUM represents a maximum iteration number; t represents an iteration number; m represents a population size; ω p represents a weight of a pth element in any particle individual; represents a pth element of an lth particle individual in the tth iteration; h represents any particle individual; represents an ideal value of the pth element of the lth particle individual in the tth iteration; R cd represents an interaction intensity between a cth element and a dth element in any particle individual;

[0042] calculating a position of each particle individual and a function value of the optimization objective function of the particle at the current position at each iteration, and taking the current position as a new particle individual best position when the function value of the optimization objective function is less than a function value of the optimization objective function of the particle individual at a previous position; and taking a particle individual best position of a particle with the minimum function value of the optimization objective function as a new particle population best position after a round of iteration ends;

[0043] The iteration on the particle population is repeated until a maximum iteration number is reached; a particle individual capable of minimizing the function value of the optimization objective function is selected from all particle individuals as an optimal particle individual, and the optimal particle individual is the optimal environment parameter combination.

[0044] A ginger planting environment big data analysis monitoring system is used to realize a ginger planting environment big data analysis monitoring method, comprising:

[0045] A data acquisition module is used to acquire biological data in a ginger planting environment, and the biological data comprises image data and biological environment index data.

[0046] A data cleaning module is used to clean the biological data to obtain accurate biological data.

[0047] A data analysis module is used to analyze the accurate biological data to obtain an optimal environment parameter combination; and each environment parameter in the ginger planting environment is adjusted based on the optimal environment parameter combination.

[0048] An environment monitoring module sets an alarm to monitor the adjusted ginger planting environment, and when the environment parameter of the adjusted ginger planting environment exceeds a preset safety range, automatically sends an early warning information to a preset database; and each module is connected through a wired and / or wireless manner.

[0049] The technical effects and advantages of the ginger planting environment big data analysis monitoring system and method are as follows:

[0050] The biological data is obtained by collecting image data and biological environment index data in the ginger planting environment, and the biological data is cleaned and analyzed to obtain the optimal environment parameter combination and apply it to the ginger planting environment, and an alarm is set to monitor the optimized ginger planting environment, realizing a ginger planting environment big data analysis and monitoring method; compared with the existing experience, the data collection is more extensive, not only the image data is collected for observing the ginger growth, but also the biological environment index data with the same timestamp as the image data is collected, and the same feature code is added to the image data and the biological environment index data with the same timestamp, so that the two kinds of data can be matched in subsequent operation; in the data cleaning aspect, the model and clustering algorithm are used for missing value processing and abnormal value processing of the biological environment index data, so that the biological environment index data is more complete, the value meets the normal range, and the manual intervention is reduced, and the data quality is improved; the wavelet transform is used for denoising processing of the image data, and the image sharpening and contrast enhancement are performed on each image, the image data quality is improved, and the image is clearer; in the data analysis process, the optimal environment parameter combination is obtained by constructing the model and using the optimization algorithm, and the ginger planting environment is adjusted based on the optimal parameter combination to optimize the ginger planting environment; finally, the alarm is set to monitor the parameters of the optimized ginger planting environment, and if the parameters exceed the preset range, the warning information is automatically sent, realizing the function of monitoring the ginger planting environment. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 It is a schematic diagram of a ginger planting environment big data analysis and monitoring method of the present application.

[0052] Figure 2 It is a schematic diagram of a ginger planting environment big data analysis and monitoring system of the present application. DETAILED DESCRIPTION

[0053] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0054] Embodiment 1

[0055] Please refer to Figure 1 The ginger planting environment big data analysis and monitoring method described in the present embodiment comprises:

[0056] S1. Collecting biological data in the ginger planting environment, the biological data comprising image data and biological environment index data;

[0057] S2. Data cleaning is performed on the biological data to obtain accurate biological data;

[0058] S3. Data analysis is performed on the accurate biological data to obtain an optimal environmental parameter combination; and based on the optimal environmental parameter combination, each environmental parameter in the ginger planting environment is adjusted;

[0059] S4. An early warning device is set to monitor the adjusted ginger planting environment, and when the environmental parameters of the adjusted ginger planting environment exceed the preset safety range, the early warning device automatically sends early warning information to a preset database.

[0060] The biological data can be obtained in the following manner: using a high-resolution camera to collect image data, and equipping a wide-angle lens and a thermal imaging function, and setting at a suitable position in the ginger planting area (the image data is collected to observe the growth of ginger at a certain time, the wide-angle lens can cover a larger range of ginger planting area, and the thermal imaging function is used to monitor the temperature change of the soil to infer the growth of ginger, and after the ginger grows above the ground, the temperature change of the surface of the above-ground part of the ginger can be observed through thermal imaging, and based on the temperature change, it can be identified whether the ginger is insufficient in water supply or is attacked by pests and diseases, etc.); collecting environmental parameters of corresponding types by arranging various sensors in the ginger planting area, the environmental parameters including temperature, humidity, light intensity, carbon dioxide concentration and soil pH value; (for example, a temperature sensor measures temperature data, a humidity sensor measures humidity data, a light sensor measures light intensity data, a gas sensor measures carbon dioxide concentration, and a soil sensor measures soil pH value; by using various types of sensors in combination, multi-dimensional environmental parameters can be collected, which is conducive to understanding the conditions required for the growth of ginger); integrating all types of environmental parameters to obtain biological environmental index data; querying the time stamp of each image in the image data and the time stamp of each environmental index data point in the biological environmental index data, and matching the image data and the biological environmental index data based on the time stamp, and adding the same feature code to the image data and the biological environmental index data that can be matched (for example, matching the image data and the biological environmental index data collected in the same time period and adding the same feature code; the image data and the biological environmental index data are matched based on the time stamp to facilitate observation of the growth of ginger and the change of environmental parameters in the same time period, ensure the time consistency of the biological data, and realize the synchronization and association of the image data and the biological environmental index data).

[0061] The biological data can be obtained in the following manner:

[0062] During the collection of biological data, some unexpected situations may occur, such as inaccurate measurement results of biological environment index data due to sensor aging, abnormal values, or missing values due to sensor failure; for image data, there may be noise in the collected image data, resulting in unclear images or low contrast, making the target object not obvious in the image; therefore, data cleaning is needed to obtain higher quality biological data for subsequent processing.

[0063] The biological environment index data is processed for missing values to obtain complete index data, the complete index data is processed for abnormal values to obtain normal index data, the image data is processed for denoising to obtain enhanced image data, and the normal index data and the enhanced image data are integrated to obtain precise biological data.

[0064] The way of processing the biological environment index data for missing values includes:

[0065] Since various types of environmental parameters in the biological environment index data change over time, such as the gradual increase of light intensity during the day and the gradual decrease at night, the process is repeated periodically; therefore, the biological environment index data are time series data; if only interpolation algorithm is used to process the missing values of the biological environment index data, the trend and periodic changes in the time series data may be ignored, so constructing a prediction model can provide a more effective solution.

[0066] A prediction model set is constructed, a decision tree model is used as the basic framework of each prediction model, the prediction model set is used to predict the missing values of the biological environment index data, and the predicted values of each missing index data point in the biological environment index data are obtained; the missing values of each missing index data point are filled with the predicted values to obtain complete index data.

[0067] The way of constructing the prediction model set includes:

[0068] Collect historical complete indicator data as a training set of the prediction model; different kinds of historical environment parameters in the historical complete indicator data are taken as training labels of different kinds of prediction models; train the prediction model of the corresponding kind based on the historical complete indicator data and different kinds of historical environment parameters (for different kinds of missing values, different kinds of prediction models are constructed; for example, when the kind of missing value is temperature, the temperature in the historical environment parameters is taken as the training label, and other historical environment parameters collected at the same time are taken as the features, and the prediction model learns the mapping relationship between the features and the training labels to predict the missing values; since the prediction model is used to predict the missing values of temperature, it is a temperature prediction model, and a corresponding prediction model is constructed for each environment parameter, and different prediction models are used to process the missing values of the corresponding kind), define the corresponding loss function for each kind of prediction model (for example, define the temperature mean square error function for the temperature prediction model, and the variable of the function is the predicted value of the temperature and the true value of the temperature in the historical complete indicator data), calculate the function value of each loss function, and when the function value of any one loss function no longer changes, fix the parameters to obtain a trained prediction model of any one kind, and integrate all trained prediction models to obtain a prediction model set.

[0069] A prediction model of the corresponding kind is constructed for different kinds of missing values, each prediction model can be customized according to the characteristics of the target variable, improving the flexibility of missing value processing; each prediction model in the constructed prediction model set only predicts one type of missing value, which can more accurately capture the dependency between different variables.

[0070] The way of performing the outlier processing on the complete indicator data includes:

[0071] In the growth environment monitoring data in the agricultural field, different environment parameters may not have obvious distribution characteristics, and these data may have different trends under different growth environments of different crops and different weather conditions; for this type of data, the clustering algorithm is an effective method, and the K-means clustering algorithm is selected to perform outlier processing on the complete indicator data; for the complete indicator data, multiple environment parameters are involved, and each environment parameter has a unique trend; the K-means clustering algorithm can perform overall clustering on the multi-dimensional vector composed of these environment parameters, comprehensively consider the relationship between multiple features, and thereby distinguish normal values and abnormal values.

[0072] All complete indicator data points belonging to any one timestamp in the complete indicator data are combined into a multi-dimensional vector (for example, the environment parameters corresponding to a certain timestamp are temperature T0, humidity W0, light intensity H0, carbon dioxide concentration C0 and soil pH value P0, and the multi-dimensional vector corresponding to the timestamp is X O= [T0, W0, H0, C0, P0]; wherein, X O perform clustering processing on all the multi-dimensional vectors to obtain a set of grouped multi-dimensional vectors; perform abnormal marking on the set of grouped multi-dimensional vectors to obtain clustering differences, and determine abnormal values based on the clustering differences; and adjust the abnormal values by querying a preset ginger planting knowledge base to obtain normal index data (each environmental parameter should have a suitable change range and normal change trend in the growth process of ginger, and it is impossible to suddenly increase or decrease greatly, so the real value range and change trend of the abnormal values are obtained by querying the preset ginger planting knowledge base, and the abnormal values are adjusted based on this).

[0073] The manner of performing clustering processing on all the multi-dimensional vectors includes:

[0074] randomly selecting K multi-dimensional vectors as initial clustering centers; calculating the Euclidean distance between each multi-dimensional vector and any one of the initial clustering centers; and if the Euclidean distance between any one of the multi-dimensional vectors and any one of the initial clustering centers is less than a preset distance threshold, then the multi-dimensional vector and the initial clustering center are divided into a cluster class.

[0075] calculating the Euclidean distance between any one of the multi-dimensional vectors and other multi-dimensional vectors in the cluster class in which the multi-dimensional vector is located and taking an average value to obtain the average Euclidean distance of the multi-dimensional vector; calculating the Euclidean distance between any one of the multi-dimensional vectors and the clustering centers of other cluster classes and taking an average value to obtain the cluster class average distance of the multi-dimensional vector; based on the average Euclidean distance and the cluster class average distance of the multi-dimensional vector, obtaining the clustering coefficient of the multi-dimensional vector; and calculating the clustering coefficients of all the multi-dimensional vectors and taking an average value to obtain the average clustering coefficient.

[0076] continuously adjusting the number of initial clustering centers, while calculating the average clustering coefficient after each adjustment, when the average clustering coefficient reaches a maximum value, fixing the clustering number at this time to obtain the optimal number of clustering centers; updating the initial clustering centers based on the optimal number of clustering centers, and re-performing clustering processing to obtain the set of grouped multi-dimensional vectors; calculating the Euclidean distance between each multi-dimensional vector in the set of grouped multi-dimensional vectors and the clustering center of the cluster class to which the multi-dimensional vector belongs, and marking the multi-dimensional vectors with a Euclidean distance greater than a preset classification threshold as abnormal; calculating the Euclidean distance between each element in each marked multi-dimensional vector and the clustering center of the cluster class to which the multi-dimensional vector belongs to obtain the clustering difference of each element in each marked multi-dimensional vector, and determining an element with a clustering difference greater than a preset difference threshold as an abnormal value.

[0077] The cluster algorithm is used for abnormal value processing, is suitable for processing multi-dimensional data, is convenient for processing complex mutual relations between different environmental parameters, and can efficiently process abnormal values of large data sets, improve work efficiency, and reduce manual intervention.

[0078] The image data is denoised in the following manner:

[0079] Compared with a traditional denoising method (for example, a mean filter algorithm), the wavelet transform has better denoising effect; in order to more accurately separate noise and effective signals, the image data is subjected to multi-scale wavelet decomposition to obtain subgraphs at different levels, and according to the decomposition level and a suitable threshold processing method, noise at different frequencies can be removed at different levels; meanwhile, the wavelet transform denoising can effectively retain edge and texture information in the image, and avoids the loss of image information caused by denoising.

[0080] A preset wavelet basis function is used to perform multi-scale wavelet decomposition on each image in the image data; first, low-pass and high-pass filtering is performed in the horizontal direction to obtain low-frequency components and high-frequency components of each image, and then vertical filtering is performed on the low-frequency components of each image to obtain low-frequency subgraphs and high-frequency subgraphs of each image (a suitable wavelet basis function is selected, for example, a Daubechies wavelet basis function; a filter corresponding to the wavelet basis function is used for filtering, for example, a Daubechies filter is used for filtering; the low-frequency subgraph mainly includes main information and a general outline of the image, and the high-frequency subgraph includes three parts, namely a horizontal high-frequency part, a vertical high-frequency part, and a diagonal high-frequency part, which respectively contain detail and noise information of the image in the horizontal direction, the vertical direction, and the diagonal direction); the low-frequency subgraph at each level is subjected to horizontal and vertical filtering again to obtain higher-level low-frequency subgraphs and high-frequency subgraphs; the multi-scale wavelet decomposition is repeatedly performed on each image until the maximum decomposition level is reached (the maximum decomposition level floor = log2[min(CH, KA)]; wherein CH represents the length of the image, and KA represents the width of the image; for example, for an image of 512x1024, floor = log2(512) = 9, that is, the maximum decomposition level is 9); wavelet coefficients are extracted from the subgraph after each decomposition, and all wavelet coefficients are integrated to obtain a wavelet coefficient set (the pixel value in the subgraph after each decomposition represents the frequency component of the subgraph at a certain scale and position, and the wavelet coefficient is the numerical form of the frequency component); the wavelet coefficient set is subjected to threshold processing to obtain denoising frequency domain data; the denoising frequency domain data is subjected to signal reconstruction by inverse wavelet transform to obtain denoised image data.

[0081] The noise has been removed in each denoised image of the denoised image data, but some unclear areas in the image are not caused by noise; there are many factors leading to unclear denoised images in complex environmental conditions, such as too low brightness, too low contrast or instrument failure leading to low resolution of the captured image, etc., which can cause the denoised image to be blurred, so it is necessary to perform edge detection, image sharpening and contrast enhancement on the denoised image.

[0082] The RGB weighted average method (a commonly used image gray scale algorithm, which converts a color image into a gray scale image by assigning different weights to different color channels of the color image) is used to gray scale each denoised image in the denoised image data to obtain gray scale image data; Gaussian filtering is performed on each gray scale image in the gray scale image data (Gaussian filtering is used to smooth the image, making the image more smooth and continuous, which can reduce the edge detection error caused by small-scale details, and make the main structure and contour of the image easier to identify), to obtain filtered gray scale image data; an edge detection operator (such as the Sobel operator) is used to calculate the pixel value change gradient of each filtered gray scale image in the filtered gray scale image data (the pixel value change gradient in the gray scale image refers to the change rate of the gray scale), and the edge features of each filtered gray scale image are extracted based on the pixel value change gradient (the edge features refer to the contour, boundary and structure of the object in the image, and the greater the pixel value change gradient value of a point, the more likely it represents the edge features in the image); image sharpening is performed on each filtered gray scale image based on the edge features to obtain sharpened image data; and contrast enhancement processing is performed on each sharpened image in the sharpened image data to obtain enhanced image data.

[0083] The threshold processing method for the wavelet coefficient set includes:

[0084] There are two traditional methods for threshold processing of wavelet coefficients, including hard threshold processing method and soft threshold processing method, which are used to process different situations respectively; the traditional method may not be suitable for different types and intensities of noise, so an adaptive threshold function is constructed for threshold processing; by adjusting the dynamic adjustment factor in the adaptive threshold function, the adaptive threshold function can adaptively update the wavelet coefficients that need to be denoised; using this function for threshold processing provides higher flexibility when processing image noise, and also improves the denoising efficiency.

[0085] A preset wavelet coefficient threshold is constructed based on the wavelet coefficient threshold; each wavelet coefficient in the wavelet coefficient set is updated based on the adaptive threshold function to obtain an updated wavelet coefficient set, and denoised frequency domain data is obtained.

[0086] The calculation formula of the adaptive threshold function is:

[0087] wherein μ i,j represents the wavelet coefficient of the i-th level and the j-th translation position (as the multi-scale wavelet decomposition is repeated for multiple times, the wavelet coefficient exists on each level of decomposition, which is less than or equal to the maximum decomposition level; the translation position refers to the specific position, i.e. the specific coordinate, of the wavelet coefficient in the subgraph obtained by decomposition); represents the updated wavelet coefficient of the i-th level and the j-th translation position; A represents a judging function (when the variable in the judging function is greater than 0, the function takes the value of 1; when the variable in the judging function is equal to 0, the function takes the value of 0; when the variable in the judging function is less than 0, the function takes the value of -1); γ represents a preset wavelet coefficient threshold value wherein σ i represents the noise standard deviation of all wavelet coefficients of the i-th level; N represents the size of the subgraph to which the wavelet coefficient of the i-th level belongs); and α and β are dynamic adjustment factors (α∈[0,1]; β∈[0,+∞]; α is used to control the degree of change of the wavelet coefficient, and β is used to ensure the continuity of the adaptive threshold function, making the function more smooth and continuous).

[0088] The image sharpening manner for each filtered grayscale image comprises:

[0089] The image sharpening of the filtered grayscale image is to enhance the edges and details in the image, so that the image is clearer, and therefore the Laplace operator is selected for image sharpening processing. In order to make the Laplace operator adapt to the changes in different regions of the image, a method of adjusting the Laplace operator based on the pixel value change gradient of the local region is designed. The image is processed block by block through the construction of a sliding window, and each region is analyzed and processed to ensure that each detail can be appropriately enhanced. An operator adjustment coefficient is defined, the value of which is updated based on the pixel value change gradient of the sliding window region, and the adjusted Laplace operator of the sliding window region is adjusted using the updated operator adjustment coefficient, so that the Laplace operator can apply different degrees of sharpening to different regions. Not only the calculation efficiency of the Laplace operator is improved, but also the flexibility of image sharpening is improved.

[0090] A rectangular coordinate system is constructed with the gray pixel point at the lower left corner of each filtered grayscale image as the origin (the X-axis direction is to the right, and the Y-axis direction is upward); the Laplace operator of each filtered grayscale image is calculated to obtain an initial Laplace operator, and all initial Laplace operators are integrated to obtain a Laplace operator set (the Laplace operator Wherein, I(x, y) represents the pixel value of the image at the (x, y) position; each Laplace operator acts on the local area of the entire image); a sliding window is constructed, which is much smaller than the size of each filtered gray image (much smaller means that the size of the filtered gray image is at least 100 times the size of the sliding window; for example, the size of the sliding window is 3x3, and the size of a certain filtered gray image is 512x512), and the sliding window is made to slide on any one filtered gray image; in the area formed by the sliding window on any one filtered gray image, the pixel value change gradient of all gray pixels in the area is calculated and averaged to obtain the local average change gradient of the area; the operator adjustment coefficient is defined, and the change gradient threshold is preset; the size of the operator adjustment coefficient is adjusted based on the local average change gradient of the area and the preset change gradient threshold to obtain the operator adjustment coefficient of the area (if the local average change gradient of any one area is greater than the preset change gradient threshold, the operator adjustment coefficient B = 1 + log |G avg -G|; wherein, G avg represents the local average change gradient of any one area; G represents the preset change gradient threshold; if the local average change gradient of any one area is less than or equal to the preset change gradient threshold, the operator adjustment coefficient B = 0.5).

[0091] The initial Laplace operator is updated based on the operator adjustment coefficient of the area to obtain the updated Laplace operator of the area (the value of the updated Laplace operator is the product of the operator adjustment coefficient of the area and the initial Laplace operator); the image sharpening of the area is completed by using the convolution operation of the updated Laplace operator of the area and the area; the sliding window is translated along the coordinate axis direction, and the image sharpening of other areas is performed until the sliding window traverses the entire filtered gray image, the image sharpening is completed, and the sharpened image is obtained; the image sharpening is performed on each filtered gray image, and all sharpened images are integrated to obtain the sharpened image data.

[0092] The manner of performing contrast enhancement processing on each sharpened image in the sharpened image data includes:

[0093] In the process of performing contrast enhancement on the sharpened image, the degree of contrast enhancement is controlled by performing histogram equalization and dynamically adjusting the weighting coefficient on the sharpened image, so as to ensure that the sharpened image is appropriately enhanced in contrast while the image details are preserved.

[0094] A right-angle coordinate system is constructed with the sharpened pixel point in the lower left corner of each sharpened image as the origin; histogram equalization processing is performed on any one of the sharpened images to obtain an equalized pixel value of any one of the sharpened pixel points in any one of the sharpened images (histogram equalization is a commonly used contrast enhancement algorithm, which is mapped through a cumulative distribution function, and the calculation formula is: U(a, b) = CDF[U0(a, b)]x[max(U0)-min(U0)]; wherein, U0(a, b) represents the pixel value of the sharpened image U0 at the position (a, b); max(U0) represents the maximum pixel value in the sharpened image U0, and min(U0) represents the minimum pixel value in the sharpened image U0; CDF represents the cumulative distribution function; and U(a, b) represents the equalized pixel value of the sharpened image U0 at the position (a, b)); the pixel value change gradient of any one of the sharpened pixel points is calculated, and a weighting coefficient is calculated based on the pixel value change gradient of any one of the sharpened pixel points (the weighting coefficient wherein, G0(a, b) represents the pixel value change gradient of the sharpened pixel point at the position (a, b); and δ represents a constant, δ∈(-∞, +∞)); a contrast-enhanced pixel value is calculated based on the equalized pixel value of any one of the sharpened pixel points and the weighting coefficient of the sharpened pixel point (the calculation formula of the contrast-enhanced pixel value is: U after (a, b) = U(a, b) + W(a, b)x|U(a, b)-U0(a, b)|; wherein, U after (a, b) represents the contrast-enhanced pixel value of the sharpened pixel point at the position (a, b)); the contrast-enhanced pixel value of each sharpened pixel point of each sharpened image is calculated to obtain enhanced image data.

[0095] By sequentially performing image sharpening and contrast enhancement on the filtered gray-scale image, the edges and details in the image are made clearer, the image quality is improved, and the working efficiency of subsequent operations is indirectly improved.

[0096] The manner of performing data analysis on the precise biological data includes:

[0097] The purpose of performing data analysis on the precise biological data is to obtain an optimal environment parameter combination and apply the optimal environment parameter combination to the planting environment of ginger; therefore, the precise biological data is first processed by using a model, the image features reflect the external growth state of the ginger, the environment parameter combination reflects the internal influencing factors of the growth of the ginger, the model comprehensively evaluates the optimal growth state by combining the two, and obtains image data and a suitable environment parameter combination that can reflect the optimal growth state; the suitable environment parameter combination is further optimized by using an optimization algorithm, the optimal environment parameter combination is obtained by constructing an optimization objective function and minimizing the optimization objective function; and the optimal environment parameter combination is applied to the planting environment of the ginger to adjust the growth environment of the ginger.

[0098] The analysis model is constructed to process the precise biological data to obtain a suitable environmental parameter combination, and the suitable environmental parameter combination is optimized to obtain an optimal environmental parameter combination.

[0099] The analysis model is constructed in the following ways:

[0100] The CNN convolutional neural network model is used as the basic framework of the analysis model; historical precise biological data (including historical enhanced image data and historical normal index data; the historical enhanced image data and the historical normal index data are obtained by collecting historical image data and historical index data and adding a feature code based on a timestamp, and the historical enhanced image data is obtained by denoising the historical image data, and the historical normal index data is obtained by sequentially processing the historical index data for missing values and outliers) are used as the training set of the analysis model; a growth condition scoring function is constructed, and the growth condition score of each historical precise biological data is calculated, and the historical precise biological data with the highest growth condition score is used as the training label (the growth condition scoring function is the sum of the growth condition scores of the historical enhanced image data and the historical index data with the same feature code; the method for obtaining the growth condition score of the historical index data is to weight and sum all the environmental parameters, and the importance of each environmental parameter is determined by querying a preset ginger planting knowledge base, and a greater weight is given to the environmental parameter with greater importance; the method for obtaining the growth condition score of the historical enhanced image data is to compare each historical enhanced image with the image data in the preset ginger planting knowledge base to determine the growth condition of the ginger at this moment, for example, to check the color and shape of the leaves, the size of the tubers, and whether there is rot or damage, and to check whether there are abnormal colors caused by spots or diseases and pests on the ginger; the growth features of each historical enhanced image are extracted by using OpenCV to obtain the growth features of each historical enhanced image; the scoring standard is defined based on the image data in the preset ginger planting knowledge base, different score ranges and weights are set for the health degree, tuber size and disease condition, and the growth condition score of each historical enhanced image is calculated based on the scoring standard); the historical precise biological data is used to train the analysis model, and an analysis loss function (such as a mean square error function, in which the variable is the growth condition score) is defined; the function value of the analysis loss function is calculated until the function value of the analysis loss function no longer decreases, and the parameters at this time are fixed to obtain the trained analysis model; the trained analysis model is used to process the precise biological data, and the normal index data and the enhanced image data with the same feature code in the precise biological data are converted into an index vector and an image vector respectively, the index vector is a vector composed of environmental parameters, and the image vector is a vector composed of image features; the two vectors are combined into a precise biological vector, and the precise biological vector and the growth condition score corresponding to the vector are the input data of the analysis model; the model output data is also in the form of a vector, and the index vector and the image vector in the vector are restored to an environmental parameter combination and image data respectively, and the environmental parameter combination at this time is the appropriate environmental parameter combination.

[0101] The appropriate environmental parameter combination is optimized in the following ways:

[0102] Since the optimization of suitable environment parameter combination is a high-dimensional continuous variable optimization problem, each environment parameter has different values, forming a complex search space, therefore particle swarm optimization is selected to optimize suitable environment parameter combination; considering that there are different stages in the whole growth cycle of ginger and the possible mutual influence between environment parameters, an optimization objective function is constructed as the fitness function of particle swarm optimization, and the feasible solution is constantly searched in the search space to make the function value of the optimization objective function reach the minimum, and finally the optimal solution is obtained, that is, the optimal environment parameter combination.

[0103] Initialize particle population parameters, including population size, iteration number, particle individual best position and particle population best position; each particle individual in the particle population represents a suitable environment parameter combination.

[0104] Define optimization objective function Where, NUM represents the maximum iteration number; t represents the iteration number; m represents the population size; ω p represents the weight of the pth element in any particle individual; represents the pth element of the lth particle individual in the tth iteration; h represents any particle individual (any particle individual can be represented as [h1, h2, h3, h4, h5]; wherein h1, h2, h3, h4 and h5 represent temperature, humidity, light intensity, carbon dioxide concentration and soil pH value in any suitable environment parameter combination); represents the ideal value of the pth element of the lth particle individual in the tth iteration (the ideal value is adjusted based on the growth cycle of ginger, which is divided into seedling stage and tuber growth period; the values of the corresponding environment parameters when the ginger is in the best growth state in the theory are obtained by querying the preset ginger planting knowledge base); R cd represents the interaction intensity of the cth element and the dth element in any particle individual (c, d ∈ [1, 5]; the interaction intensity refers to the interaction relationship between two environment parameters in any environment parameter combination, for example, temperature rise leads to humidity drop or light intensity increases leads to carbon dioxide concentration increase, etc.; the interaction intensity is valued by querying the relevant field experience in the preset ginger planting knowledge base, for example, the interaction intensity of temperature and humidity is valued at 0.8); the smaller the function value of the optimization objective function, the smaller the difference between the elements in the particle individual corresponding to the function value and the ideal state.

[0105] At each iteration, the position of each particle individual and the function value of the optimization objective function at the current position of the particle are calculated, and when the function value of the optimization objective function is less than the function value of the optimization objective function at the previous position of the particle individual, the current position is taken as the new optimal position of the particle individual (at each iteration, the speed of the particle individual at the current iteration is calculated based on the optimal position of the particle individual at the last iteration and the optimal position of the particle population at the last iteration, and the calculation formula is: wherein, Vt+1, l represents the speed of the lth particle individual at the t+1th iteration; ω V represents the inertia weight of the particle individual speed, which is a variable constant with a value range of (0, 1), and is used to balance the global search and local search capabilities; Xt, l represents the optimal position of the lth particle individual at the tth iteration; gBest t represents the optimal position of the particle population at the tth iteration; Xt, l represents the position of the lth particle individual at the tth iteration; c1 and c2 represent acceleration factors, which are both variable constants with a value range of [0, 4], and are used to control the speed of the particle approaching the optimal position of the particle individual and the optimal position of the particle population, respectively; e1 and e2 are both random constants with a value range of [0, 1]); after a round of iteration, the optimal position of the particle individual at which the particle is located and which has the minimum function value of the optimization objective function is taken as the new optimal position of the particle population.

[0106] The iteration of the particle population is repeated until the maximum number of iterations is reached; the optimal particle individual that can make the function value of the optimization objective function reach the minimum is selected from all particle individuals as the optimal particle individual, and the optimal particle individual is the optimal environmental parameter combination.

[0107] The particle swarm optimization algorithm is easy to implement and has high computational efficiency; the optimization algorithm has strong adaptability and can well adapt to the complex requirements of environmental parameter combination optimization, and has strong robustness.

[0108] The embodiment combines image data and biological environment index data in the ginger planting environment into biological data, and performs data cleaning and data analysis on the biological data to obtain an optimal environment parameter combination and apply it to the ginger planting environment. An alarm is set to monitor the optimized ginger planting environment, and a ginger planting environment big data analysis and monitoring method is realized. Compared with existing experience, the data collection is more extensive. Not only image data is collected to observe the growth of ginger, but also biological environment index data with the same timestamp as the image data is collected. The same feature code is added to the image data and biological environment index data with the same timestamp, which facilitates matching of the two types of data in subsequent operations. In terms of data cleaning, the model and clustering algorithm are used to process missing values and outliers for biological environment index data, respectively, so that the biological environment index data is more complete, the value is within the normal range, and the data quality is improved. For image data, wavelet transform is used for denoising, and image sharpening and contrast enhancement are performed on each image to improve the quality of image data and make the image clearer. In the data analysis process, the optimal environment parameter combination is obtained by constructing a model and using an optimization algorithm, and the ginger planting environment is adjusted based on the optimal parameter combination to optimize the ginger planting environment. Finally, an alarm is set to monitor the parameters of the optimized ginger planting environment. If the parameters exceed the preset range, an early warning information is automatically sent to realize the function of monitoring the ginger planting environment.

[0109] Embodiment 2;

[0110] Please refer to Figure 2 The embodiment does not describe some parts in detail, which can be seen from the description of embodiment 1. A ginger planting environment big data analysis and monitoring system is provided, which includes:

[0111] A data collection module is configured to collect biological data in the ginger planting environment, and the biological data includes image data and biological environment index data.

[0112] A data cleaning module is configured to clean the biological data to obtain accurate biological data.

[0113] A data analysis module is configured to analyze the accurate biological data to obtain an optimal environment parameter combination, and adjust the environment parameters in the ginger planting environment based on the optimal environment parameter combination.

[0114] An environment monitoring module is configured to set an alarm to monitor the adjusted ginger planting environment. When the environment parameters of the adjusted ginger planting environment exceed the preset safety range, the alarm automatically sends an early warning information to the preset database. The modules are connected by wired and / or wireless means.

[0115] Embodiment 3;

[0116] The embodiment discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the operation mode of the provided ginger planting environment big data analysis and monitoring method when executing the computer program.

[0117] Since the electronic device introduced in the embodiment is the electronic device used to implement the ginger planting environment big data analysis and monitoring method in the embodiment, the specific implementation mode of the electronic device and various changes thereof can be understood by those skilled in the art based on the ginger planting environment big data analysis and monitoring method introduced in the embodiment, so the implementation of the electronic device in the method of the embodiment will not be introduced in detail. As long as the electronic device used to implement the ginger planting environment big data analysis and monitoring method in the embodiment is implemented by those skilled in the art, it belongs to the scope of protection of the present application.

[0118] The above formulas are dimensionless values calculated, and the formulas are obtained by collecting a large amount of data to simulate the most recent real situation. The preset parameters and threshold values in the formulas are set by those skilled in the art according to the actual situation.

[0119] The above is only the preferred embodiment of the present application, and the protection scope of the present application is not limited to the above-mentioned embodiments. Any technical solution falling within the scope of the present application is also within the protection scope of the present application. It should be noted that, for ordinary technical users in the technical field, some improvements and refinements without departing from the principles of the present application are also considered to be within the protection scope of the present application.

Claims

1. A method for big data analysis and monitoring of ginger cultivation environment, characterized in that, include: S1. Collect biological data from the ginger growing environment, including image data and biological environmental index data; the acquisition methods for the biological data include: using a high-resolution camera to collect image data, equipped with a wide-angle lens and thermal imaging function, and setting it at a suitable location within the ginger growing area; collecting corresponding environmental parameters by deploying multiple sensors within the ginger growing area, including temperature, humidity, light intensity, carbon dioxide concentration, and soil pH; integrating all types of environmental parameters to obtain biological environmental index data; querying the timestamp of each image in the image data and the timestamp of each environmental index data point in the biological environmental index data, matching the image data and biological environmental index data based on the timestamps, and adding the same feature code to the matching image data and biological environmental index data; S2. Perform data cleaning on biological data, including: Missing values ​​in biological environmental indicator data are processed to obtain complete indicator data; outlier values ​​in the complete indicator data are processed to obtain normal indicator data; noise is removed from image data to obtain enhanced image data; and the normal indicator data and enhanced image data are integrated to obtain accurate biological data. Methods for handling missing values ​​in biological environmental indicator data include: A set of prediction models is constructed, with the decision tree model serving as the basic framework for each prediction model. The set of prediction models is used to predict the missing values ​​of the biological environmental indicator data, resulting in the predicted value for each missing indicator data point. The predicted values ​​are then used to fill in the missing values ​​for each missing indicator data point, resulting in complete indicator data. Methods for constructing a predictive model ensemble include: Collect complete historical indicator data as the training set for the prediction model; use different types of historical environmental parameters in the complete historical indicator data as training labels for different types of prediction models; train the corresponding type of prediction model based on the complete historical indicator data and different types of historical environmental parameters, define a corresponding loss function for each type of prediction model, calculate the function value of each loss function, and when the function value of any loss function no longer decreases, fix the parameters to obtain the trained prediction model of any type, and integrate all trained prediction models to obtain the prediction model set. The methods for handling outliers in complete indicator data include: All complete indicator data points belonging to any timestamp in the complete indicator data are combined into a multi-dimensional vector; all multi-dimensional vectors are clustered to obtain a set of grouped multi-dimensional vectors; anomalies are marked on the set of grouped multi-dimensional vectors to obtain cluster differences, and outliers are determined based on the cluster differences; outliers are adjusted by querying a preset ginger planting knowledge base to obtain normal indicator data; Methods for clustering all multidimensional vectors include: Random selection Use 1 multidimensional vector as the initial cluster center; calculate the Euclidean distance between each multidimensional vector and any initial cluster center; if the Euclidean distance between any multidimensional vector and any initial cluster center is less than a preset distance threshold, then classify the multidimensional vector and the initial cluster center into one cluster. Calculate the Euclidean distance between any multidimensional vector and other multidimensional vectors in its cluster, and take the average to obtain the mean Euclidean distance of the multidimensional vector; calculate the Euclidean distance between any multidimensional vector and the cluster centers of other clusters, and take the average to obtain the average cluster distance of the multidimensional vector; based on the mean Euclidean distance and the average cluster distance of the multidimensional vector, obtain the clustering coefficient of the multidimensional vector; calculate the clustering coefficients of all multidimensional vectors, and take the average to obtain the average clustering coefficient. The initial number of cluster centers is continuously adjusted, and the average clustering coefficient after each adjustment is calculated. When the average clustering coefficient reaches its maximum value, the number of clusters is fixed to obtain the optimal number of cluster centers. The initial cluster centers are updated based on the optimal number of cluster centers, and the clustering process is repeated to obtain a set of grouped multidimensional vectors. The Euclidean distance between each multidimensional vector in the set of grouped multidimensional vectors and the cluster center of its respective cluster is calculated. Multidimensional vectors with an Euclidean distance greater than a preset classification threshold are marked as anomalies and are recorded as labeled multidimensional vectors. The Euclidean distance between each element in each labeled multidimensional vector and the cluster center of the cluster to which the labeled multidimensional vector belongs is calculated to obtain the clustering difference of each element in each labeled multidimensional vector. Elements with clustering differences greater than a preset difference threshold are judged as outliers. S3. Perform data analysis on precise biological data to obtain the optimal combination of environmental parameters; adjust various environmental parameters in the ginger cultivation environment based on the optimal combination of environmental parameters; S4. Set up an early warning system to monitor the adjusted ginger planting environment. When the environmental parameters of the adjusted ginger planting environment exceed the preset safety range, automatically send an early warning message to the preset database.

2. The method for big data analysis and monitoring of ginger planting environment according to claim 1, characterized in that, Methods for denoising image data include: A pre-defined wavelet basis function is used to perform multi-scale wavelet decomposition on each image in the image data. First, horizontal low-pass and high-pass filtering is applied to obtain the low-frequency and high-frequency components of each image, respectively. Then, vertical filtering is applied to the low-frequency components of each image to obtain low-frequency and high-frequency sub-images. The low-frequency sub-images at each level are then filtered again horizontally and vertically to obtain higher-level low-frequency and high-frequency sub-images. This multi-scale wavelet decomposition is repeated for each image until the maximum decomposition level is reached. Wavelet coefficients are extracted from the sub-images after each decomposition, and all wavelet coefficients are integrated to obtain a wavelet coefficient set. Thresholding is applied to the wavelet coefficient set to obtain denoised frequency domain data. Inverse wavelet transform is used to reconstruct the signal from the denoised frequency domain data to obtain denoised image data. Each denoised image in the denoised image data is converted to grayscale using the RGB weighted average method to obtain grayscale image data. Each grayscale image in the grayscale image data is then subjected to Gaussian filtering to obtain filtered grayscale image data. An edge detection operator is used to calculate the pixel value change gradient of each filtered grayscale image in the filtered grayscale image data, and edge features of each filtered grayscale image are extracted based on the pixel value change gradient. Based on the edge features, each filtered grayscale image is then sharpened to obtain sharpened image data. Finally, each sharpened image in the sharpened image data undergoes contrast enhancement processing to obtain enhanced image data.

3. The method for big data analysis and monitoring of ginger planting environment according to claim 2, characterized in that, Thresholding methods for wavelet coefficient sets include: A preset wavelet coefficient threshold is set, and an adaptive threshold function is constructed based on the wavelet coefficient threshold. Each wavelet coefficient in the wavelet coefficient set is updated based on the adaptive threshold function to obtain the updated wavelet coefficient set and thus the denoised frequency domain data. The formula for calculating the adaptive threshold function is: ;in, Indicates the first Level 1 Wavelet coefficients of the translation position; Indicates the first Level 1 Update wavelet coefficients for translational position; Represent a conditional function; This represents the preset wavelet coefficient threshold; and It is a dynamic adjustment factor.

4. The method for big data analysis and monitoring of ginger planting environment according to claim 3, characterized in that, The methods for sharpening each filtered grayscale image include: A Cartesian coordinate system is constructed with the grayscale pixel at the bottom left corner of each filtered grayscale image as the origin. The Laplacian operator for each filtered grayscale image is calculated to obtain an initial Laplacian operator. All initial Laplacian operators are integrated to obtain a set of Laplacian operators. A sliding window much smaller than the size of each filtered grayscale image is constructed and slid across any filtered grayscale image. Within the region formed by the sliding window on any filtered grayscale image, the pixel value change gradient of all grayscale pixels in that region is calculated and averaged to obtain the local average change gradient of that region. An operator adjustment coefficient is defined, and a preset change gradient threshold is established. Based on the local average change gradient of that region and the preset change gradient threshold, the operator adjustment coefficient is adjusted to obtain the operator adjustment coefficient for that region. The initial Laplacian operator is updated based on the operator adjustment coefficients of this region to obtain the updated Laplacian operator for this region; the updated Laplacian operator for this region is then convolved with the region to complete image sharpening of this region; the sliding window is translated along the coordinate axis to perform image sharpening on other regions until the sliding window has traversed the entire filtered grayscale image, completing image sharpening and obtaining a sharpened image; image sharpening is performed on each filtered grayscale image, and all sharpened images are integrated to obtain sharpened image data; Methods for enhancing the contrast of each sharpened image in the sharpened image data include: A Cartesian coordinate system is constructed with the sharpened pixel at the bottom left corner of each sharpened image as the origin. Histogram equalization is performed on any sharpened image to obtain the equalized pixel value of any sharpened pixel in any sharpened image. The pixel value change gradient of any sharpened pixel is calculated, and a weighting coefficient is calculated based on the pixel value change gradient of any sharpened pixel. The contrast enhancement pixel value is calculated based on the equalized pixel value of any sharpened pixel and the weighting coefficient of that sharpened pixel. The contrast enhancement pixel value of each sharpened pixel in each sharpened image is calculated to obtain the enhanced image data.

5. The method for big data analysis and monitoring of ginger planting environment according to claim 4, characterized in that, The methods for analyzing precise biological data include: An analytical model is constructed to process precise biological data to obtain a suitable combination of environmental parameters; the suitable combination of environmental parameters is then optimized to obtain the optimal combination of environmental parameters. The ways to build analytical models include: A CNN convolutional neural network model is used as the basic framework of the analysis model; historical precise biological data is collected as the training set of the analysis model; a growth status scoring function is constructed to calculate the growth status score of each historical precise biological data set, and the historical precise biological data with the highest growth status score is used as the training label; the analysis model is trained using historical precise biological data, and an analysis loss function is defined; the function value of the analysis loss function is calculated until the function value of the analysis loss function no longer decreases, and the parameters are fixed at this point to obtain the trained analysis model.

6. The method for big data analysis and monitoring of ginger planting environment according to claim 5, characterized in that, The methods for optimizing suitable combinations of environmental parameters include: Initialize the particle swarm parameters, which include swarm size, number of iterations, optimal position of individual particles, and optimal position of the swarm. Each individual particle in the swarm represents a suitable combination of environmental parameters. Define the optimization objective function ;in, Indicates the maximum number of iterations; Indicates the number of iterations; Indicates population size; Represents the first individual particle. The weight of each element; Indicates the first The iteration of the ... The first individual particle One element; Represents any individual particle; Indicates the first The iteration of the ... The first individual particle The ideal value of each element; Represents the first particle in any individual particle. The element and the first The interaction strength of each element; In each iteration, the position of each particle and the value of the objective function at the current position are calculated. If the value of the objective function is less than the value of the objective function at the previous position of the particle, the current position is taken as the new optimal position of the particle. After one round of iteration, the optimal position of the particle with the smallest objective function value is taken as the new optimal position of the particle population. Repeatedly iterate over the particle population until the maximum number of iterations is reached; select the particle that minimizes the function value of the objective function from all particles as the optimal particle, which is the optimal combination of environmental parameters.

7. A big data analysis and monitoring system for ginger cultivation environment, used to implement the big data analysis and monitoring method for ginger cultivation environment as described in any one of claims 1-6, characterized in that, include: The data acquisition module is used to collect biological data from the ginger growing environment, including image data and biological environmental index data. The data cleaning module is used to clean biological data to obtain accurate biological data. The data analysis module is used to analyze precise biological data to obtain the optimal combination of environmental parameters; and to adjust various environmental parameters in the ginger cultivation environment based on the optimal combination of environmental parameters. The environmental monitoring module is equipped with an early warning device to monitor the adjusted ginger planting environment. When the environmental parameters of the adjusted ginger planting environment exceed the preset safety range, it automatically sends an early warning message to the preset database. The modules are connected to each other via wired and / or wireless means.

Citation Information

Patent Citations

  • Biological reaction intelligent monitoring system and method

    CN119314572A

  • Plant growth precision control method based on production base

    CN112197819A

  • Time sequence prediction closed-loop framework based on digital-analog symbiosis

    CN116775687A

  • Cloud planting cabin crop growth monitoring method and system based on big data technology

    CN118689119A