A system and method for collecting and analyzing water and fertilizer consumption data for fruit and vegetable planting
By calculating the sensor reading deviation and trust weight, abnormal water and fertilizer consumption data in fruit and melon planting is corrected, and the problem of irrigation decision errors caused by sensor data conflicts is solved, and data reliability and accuracy of agricultural production are improved.
Patent Information
- Application Number
- CN202411224917.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-09-03
AI Technical Summary
During the planting of fruits and melons, different types of sensors may produce conflicting readings due to factors such as technical differences, installation location and sensitivity, which makes it difficult for the system to judge the actual situation, which in turn leads to incorrect irrigation decisions, which may cause excessive or insufficient irrigation and affect crop growth.
By obtaining real-time readings of multiple sensors over different time periods, the reading deviation value is calculated, and the data marked with a deviation greater than the threshold is conflicting data. Then, based on the degree of correlation abnormality between sensor readings and the change in measurement accuracy, the trust weight of each sensor is determined, and the weighted average calculation is performed to obtain the abnormal coefficient of the water and fertilizer consumption data. Finally, based on the comparative analysis of the anomaly coefficient and the gradient standard threshold, the sensor readings are corrected and the irrigation plan is dynamically adjusted.
Effectively identify and correct conflicts in sensor data, improve data reliability, reduce wrong irrigation decisions, improve the accuracy and sustainability of agricultural production, and ensure that crops obtain appropriate water and fertilizer supply.
Smart Images

Figure CN119106259B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of melon and fruit planting, and in particular to a system and method for collecting and analyzing water and fertilizer consumption data in melon and fruit planting. Background Art
[0002] The collection and analysis of water and fertilizer consumption data for fruit and vegetable cultivation refers to the collection and analysis of data on water and fertilizer usage related to the growth of these crops during the cultivation of melons and fruit crops. However, sudden extreme rainfall may cause the soil moisture content to increase instantly, resulting in abnormally high moisture data read by the sensor, which in turn affects the system's judgment of irrigation needs. If the system fails to identify these abnormalities and continues to operate automatically, it may lead to over-irrigation in a short period of time, resulting in poor soil drainage, lack of oxygen at the roots of crops, or disease outbreaks, ultimately leading to large-scale crop losses.
[0003] In the prior art, multi-sensor data fusion is achieved by arranging various types of sensors in the planting area, such as soil moisture sensors and meteorological sensors. When sudden rainfall occurs, the system can monitor the rainfall and climate change in real time through meteorological sensors, and conduct a comprehensive analysis in combination with the data from soil moisture sensors. If the meteorological sensor detects a large amount of rainfall and the soil moisture sensor also shows a significant increase in humidity, the system can recognize that this is caused by rainfall and automatically suspend or adjust the irrigation plan to avoid over-irrigation.
[0004] The prior art has the following deficiencies:
[0005] Different types of sensors (such as soil moisture sensors, rain gauges, temperature and humidity sensors, etc.) may produce conflicting readings due to technical differences, installation locations, sensitivity, etc. For example, a soil moisture sensor may show a subtle increase in humidity, while a rain gauge records a large amount of rainfall, or vice versa. Such data conflicts can make it difficult for the system to judge the actual situation and lead to incorrect decisions. For example, the system may ignore the actual soil moisture conditions and continue to irrigate, resulting in over-irrigation, or conversely, the system may mistakenly believe that the soil is already too wet and stop necessary irrigation, resulting in crop water shortage. Summary of the invention
[0006] The purpose of the present invention is to provide a system and method for collecting and analyzing water and fertilizer consumption data in fruit and vegetable planting, so as to overcome the deficiencies in the background technology.
[0007] In order to achieve the above object, the present invention provides the following technical solution: a method for collecting and analyzing water and fertilizer consumption data of melon and fruit planting, comprising the following steps:
[0008] S1: Obtain real-time readings of several sensors measuring water and fertilizer consumption data of fruit and vegetable planting in different time periods, calculate the reading deviation value between each sensor in the same time period, and if the reading deviation value is greater than a predetermined threshold, mark the data measured in the time period as conflicting data;
[0009] S2: For the time period when conflicting data is generated, the trust weight assignment of each sensor is determined according to the abnormal degree of correlation between different sensor readings and the change in sensor measurement accuracy. The water and fertilizer consumption data abnormality coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period;
[0010] S3: Compare and analyze the calculated abnormal coefficient of water and fertilizer consumption data with the gradient standard threshold, and correct the sensor reading according to the analysis result. The gradient standard threshold includes a first standard threshold and a second standard threshold, and dynamically adjust the irrigation plan according to the correction effect of the sensor reading.
[0011] Preferably, in S1, the reading deviation values between the sensors in the same time period are calculated. If the reading deviation value is greater than a predetermined threshold, the data measured in the time period is marked as conflicting data, specifically:
[0012] Get the real-time readings from each sensor in the same time period, calculate the average reading of all sensors in the time period as the baseline value, and for each sensor, calculate the deviation between its reading and the baseline value in the same time period. The deviation value formula is: Deviation value = |R i -R baseline |Where: R i is the reading of the ith sensor, R baseline is the baseline value;
[0013] Compare the deviation value of each sensor with a predetermined threshold: if the deviation value is less than or equal to the reference deviation threshold, the sensor data in this time period is normal, and a data normal signal is generated;
[0014] If the deviation value is greater than the reference deviation threshold, there is a conflict in the sensor data within this time period and it is marked as conflicting data. At this time, a data normal signal is generated.
[0015] Preferably, in S2, a correlation anomaly index is generated according to the degree of correlation anomaly between different sensor readings, and the method for obtaining the correlation anomaly index is:
[0016] The data of each pair of sensors are subjected to correlation analysis, and the Pearson correlation coefficient GF between the conflicting data in the conflicting time period is calculated. The expression is: In the formula, R i and R j are the readings of the i-th and j-th sensors, respectively. and are their average values respectively. The Pearson correlation coefficient between the conflicting data calculated in real time is compared with the standard Pearson correlation coefficient under the preset sensor normal data monitoring state. If the Pearson correlation coefficient between the conflicting data calculated in real time is less than the standard Pearson correlation coefficient under the preset sensor normal data monitoring state, the absolute value of the difference is calculated and recorded as the correlation anomaly index.
[0017] Preferably, in S2, a measurement accuracy drift index is generated according to the change in the measurement accuracy of the sensor, and the method for obtaining the measurement accuracy drift index is:
[0018] In the initial state, the prior distribution P(θ) of the sensor measurement accuracy is set, where θ represents the preset standard measurement accuracy of the sensor, and the Gaussian distribution N(μ0,σ02) is used to establish the likelihood function P(x t |θ), which means that under a given measurement accuracy θ, the sensor reading x t The probability of occurrence, if the sensor measurement error obeys the normal distribution, the likelihood function is expressed as: Among them, μ0 is the initial accuracy estimate, σ0 is the prior prediction value, t represents time, μ t is the expected measurement of the sensor at time t. The measurement accuracy distribution of the sensor is updated by the Bayesian formula to obtain the posterior distribution P(θ|x t ), the expression is: In the formula, P(x t ) is the marginal likelihood of the observed data, which is calculated by integration and is expressed as: P(x t )=∫P(x t |θ)*P(θ)dθ; at the next time step t+1, the posterior distribution P(θ|x t ) as the new prior distribution P(θ), and proceed to the next step of Bayesian update to calculate the posterior distribution P(θ|x t ) is used as the estimate of the sensor measurement accuracy at the current time t, and the measurement accuracy drift index D is calculated. t , the expression is: In the formula, μ θ,t is the mean of the posterior distribution at the current time t, and μ0 is the mean of the initial prior distribution.
[0019] Preferably, the trust weight assignment of each sensor is determined, and the water and fertilizer consumption data abnormality coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period;
[0020] The correlation anomaly index and the measurement accuracy drift index are converted into the first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model predicts the trust weight assignment label of each sensor with each group of first eigenvectors as the prediction target, and minimizes the sum of prediction errors of the trust weight assignment labels of all sensors as the training target. The machine learning model is trained until the sum of prediction errors converges and the model training is stopped. The trust weight assignment of each sensor is determined according to the model output results, and the water and fertilizer consumption data anomaly coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period. Among them, the machine learning model is a polynomial regression model.
[0021] Preferably, in S3, the calculated water and fertilizer consumption data abnormal coefficient is compared and analyzed with the gradient standard threshold, and the sensor reading is corrected according to the analysis result. The gradient standard threshold includes a first standard threshold and a second standard threshold, specifically:
[0022] The acquired abnormal coefficient of water and fertilizer consumption data is compared with the gradient standard threshold, the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the abnormal coefficient of water and fertilizer consumption data is compared with the first standard threshold and the second standard threshold respectively;
[0023] If the abnormal coefficient of water and fertilizer consumption data is greater than the second standard threshold, it means that the abnormal coefficient exceeds the maximum tolerance range, indicating that there is a serious abnormality in the sensor data. At this time, a first-level warning signal is generated, the automatic irrigation system is immediately suspended, and a comprehensive system inspection is carried out;
[0024] If the abnormal coefficient of water and fertilizer consumption data is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, it indicates that the sensor data has moderate abnormality, and the data is corrected. At this time, a secondary warning signal is generated to correct the sensor readings. According to the corrected readings, the irrigation plan is dynamically adjusted;
[0025] If the abnormal coefficient of water and fertilizer consumption data is less than the first standard threshold, it indicates that there is no significant abnormality in the sensor data. At this time, no warning signal is generated, and there is no need to correct the sensor readings. The irrigation plan continues to be executed as planned without adjustment.
[0026] The present invention also provides a fruit and vegetable planting water and fertilizer consumption data collection and analysis system, comprising a data acquisition module, a calculation module and an analysis and adjustment module;
[0027] Data acquisition module: obtains the real-time readings of several sensors measuring water and fertilizer consumption data of fruit and vegetable planting in different time periods, calculates the reading deviation value between each sensor in the same time period, and if the reading deviation value is greater than a predetermined threshold, marks the data measured in the time period as conflicting data;
[0028] Calculation module: For the time period when conflicting data is generated, the trust weight assignment of each sensor is determined according to the abnormal degree of correlation between different sensor readings and the change in sensor measurement accuracy. The water and fertilizer consumption data abnormal coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period;
[0029] Analysis and adjustment module: Compare and analyze the calculated abnormal coefficient of water and fertilizer consumption data with the gradient standard threshold, and correct the sensor reading according to the analysis results. The gradient standard threshold includes the first standard threshold and the second standard threshold, and dynamically adjust the irrigation plan according to the correction effect of the sensor reading.
[0030] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0031] 1. The present invention solves the data conflict problem caused by technical differences, installation locations and sensitivity of different types of sensors in water and fertilizer management of fruit and vegetable planting through a series of intelligent data collection and analysis methods. By calculating the deviation of sensor data, evaluating the correlation anomaly index and measurement accuracy drift index, the system can accurately identify and mark conflicting data, and dynamically assign the trust weight of the sensor using a machine learning model, thereby accurately calculating the anomaly coefficient of water and fertilizer consumption data.
[0032] 2. The present invention compares and analyzes the abnormal coefficients by combining the gradient standard threshold. The system can generate early warning signals in real time and perform automatic processing to ensure the accuracy of sensor data and the efficient operation of the irrigation system. Ultimately, the present invention improves the reliability of data, reduces erroneous irrigation decisions caused by inconsistent sensor data, significantly improves the accuracy and sustainability of agricultural production, and helps to achieve the rational use of water and fertilizer resources and the healthy growth of crops. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0034] Figure 1 The present invention is a flow chart of the method.
[0035] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] Example 1, please refer to Figure 1 As shown, the method for collecting and analyzing water and fertilizer consumption data for fruit and vegetable planting described in this embodiment includes the following steps:
[0038] S1: Obtain real-time readings of several sensors measuring water and fertilizer consumption data of fruit and vegetable planting in different time periods, calculate the reading deviation value between each sensor in the same time period, and if the reading deviation value is greater than a predetermined threshold, mark the data measured in the time period as conflicting data;
[0039] S2: For the time period when conflicting data is generated, the trust weight assignment of each sensor is determined according to the abnormal degree of correlation between different sensor readings and the change in sensor measurement accuracy. The water and fertilizer consumption data abnormality coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period;
[0040] S3: Compare and analyze the calculated abnormal coefficient of water and fertilizer consumption data with the gradient standard threshold, and correct the sensor reading according to the analysis result. The gradient standard threshold includes a first standard threshold and a second standard threshold, and dynamically adjust the irrigation plan according to the correction effect of the sensor reading.
[0041] Among them, in S1, the real-time readings of several sensors measuring the water and fertilizer consumption data of fruit and vegetable planting in different time periods are obtained, and the reading deviation value between each sensor in the same time period is calculated. If the reading deviation value is greater than a predetermined threshold, the data measured in the time period is marked as conflicting data, specifically:
[0042] Get real-time readings from each sensor over the same time period. For example, soil moisture, temperature, fertilizer concentration, etc.
[0043] Ensure that all sensor readings are aligned to the same point in time. If the sensors have different sampling frequencies, use interpolation or take the most recent timestamp to synchronize the data.
[0044] Calculate the average reading of all sensors in the time period as the reference value. For each sensor, calculate the deviation between its reading and the reference value in the same time period. The deviation value formula is: Deviation value = |R i -R baseline|Where: R i is the reading of the ith sensor, R baseline is the reference value.
[0045] A reference deviation threshold (eg, an absolute difference of 5% or 0.05) is preset, and is determined according to actual requirements and sensor accuracy.
[0046] Compare the deviation value of each sensor with the predetermined threshold: if the deviation value is less than or equal to the reference deviation threshold, the sensor data in this time period is considered normal, and a data normal signal is generated;
[0047] If the deviation value is greater than the reference deviation threshold, it is considered that the sensor data within this time period is conflicting and marked as conflicting data. At this time, a data normal signal is generated.
[0048] For data marked as conflicting, a variety of processing methods can be adopted, such as interpolation correction using data from adjacent time periods, correction with reference to readings from other sensors, or direct elimination of the data.
[0049] S2: For the time period in which conflicting data is generated, the trust weight assignment of each sensor is determined according to the abnormal degree of correlation between different sensor readings and the change in sensor measurement accuracy. The water and fertilizer consumption data abnormality coefficient is obtained by performing a weighted average calculation on the trust weight assignment of the conflicting data in each time period.
[0050] Get all the measurement data of each sensor in the conflict time period and ensure that the data is aligned in time. For the identified conflict time periods, mark the sensor data in these time periods for subsequent processing.
[0051] The correlation anomaly index is generated according to the degree of correlation anomaly between different sensor readings. The method for obtaining the correlation anomaly index is as follows:
[0052] The data of each pair of sensors are subjected to correlation analysis, and the Pearson correlation coefficient GF between the conflicting data in the conflicting time period is calculated. The expression is: In the formula, R i and R j are the readings of the i-th and j-th sensors, respectively. and are their average values respectively. The Pearson correlation coefficient between the conflicting data calculated in real time is compared with the standard Pearson correlation coefficient under the preset sensor normal data monitoring state. If the Pearson correlation coefficient between the conflicting data calculated in real time is less than the standard Pearson correlation coefficient under the preset sensor normal data monitoring state, the absolute value of the difference is calculated and recorded as the correlation anomaly index.
[0053] The larger the correlation anomaly index, the more significant the deviation between the readings of different sensors is, and the more the relationship between the sensor data is inconsistent with expectations, which indicates that the water and fertilizer consumption data is more likely to be abnormal. This situation usually means that the sensor data may be affected by external interference, sensor failure, or environmental mutations, which requires special attention and further analysis or correction.
[0054] The measurement accuracy drift index is generated according to the change of the sensor measurement accuracy. The method for obtaining the measurement accuracy drift index is:
[0055] In the initial state, the prior distribution P(θ) of the sensor measurement accuracy is set, where θ represents the preset standard measurement accuracy of the sensor, and the Gaussian distribution N(μ0,σ02) is used to establish the likelihood function P(x t |θ), which means that under a given measurement accuracy θ, the sensor reading x t The probability of occurrence, if the sensor measurement error obeys the normal distribution, the likelihood function is expressed as: Among them, μ0 is the initial accuracy estimate, σ0 is the prior prediction value, t represents time, μ t is the expected measurement of the sensor at time t. The measurement accuracy distribution of the sensor is updated by the Bayesian formula to obtain the posterior distribution P(θ|x t ), the expression is: In the formula, P(x t ) is the marginal likelihood of the observed data, which is calculated by integration and is expressed as: P(x t )=∫P(x t |θ)*P(θ)dθ; at the next time step t+1, the posterior distribution P(θ|x t ) as the new prior distribution P(θ), and proceed to the next step of Bayesian update to calculate the posterior distribution P(θ|x t ) is used as the estimate of the sensor measurement accuracy at the current time t, and the measurement accuracy drift index D is calculated. t , the expression is: In the formula, μ θ,t is the mean of the posterior distribution at the current time t, and μ0 is the mean of the initial prior distribution.
[0056] The larger the measurement accuracy drift index, the greater the deviation of the sensor's measurement accuracy from the initial state, which means that the sensor's readings may become unreliable or inaccurate, resulting in a higher probability of abnormal water and fertilizer consumption data. In this case, the system may need data correction, sensor calibration, or other intervention measures to ensure data accuracy and decision reliability.
[0057] The correlation anomaly index and the measurement accuracy drift index are converted into the first eigenvector, and the first eigenvector is used as the input of the machine learning model. The machine learning model predicts the trust weight assignment label of each sensor with each group of first eigenvectors as the prediction target, and minimizes the sum of prediction errors of the trust weight assignment labels of all sensors as the training target. The machine learning model is trained until the sum of prediction errors converges and the model training is stopped. The trust weight assignment of each sensor is determined according to the model output results, and the water and fertilizer consumption data anomaly coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period. Among them, the machine learning model is a polynomial regression model.
[0058] The method for obtaining the trust weight assignment of each sensor is as follows: from the first feature vector training data of the trained machine learning model, the corresponding function expression is obtained: CR = f1(SQ, D t ), where f1 is the output function of the model, SQ is the correlation anomaly index, and D t is the measurement accuracy drift index, and CR is the trust weight assigned to each sensor.
[0059] S3: Compare and analyze the calculated abnormal coefficient of water and fertilizer consumption data with the gradient standard threshold, and correct the sensor reading according to the analysis result. The gradient standard threshold includes a first standard threshold and a second standard threshold, and dynamically adjust the irrigation plan according to the correction effect of the sensor reading.
[0060] The acquired abnormal coefficient of water and fertilizer consumption data is compared with the gradient standard threshold, the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the abnormal coefficient of water and fertilizer consumption data is compared with the first standard threshold and the second standard threshold respectively;
[0061] If the abnormal coefficient of water and fertilizer consumption data is greater than the second standard threshold, it means that the abnormal coefficient exceeds the maximum tolerance range, indicating that there is a serious abnormality in the sensor data. At this time, a first-level warning signal is generated. In this case, it is recommended to immediately suspend the automatic irrigation system and conduct a comprehensive system inspection, including recalibration or replacement of the sensor. Manual intervention can be performed to ensure that the water and fertilizer needs of the crops are correctly met.
[0062] If the abnormal coefficient of water and fertilizer consumption data is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, the abnormal coefficient is higher than the allowable range, indicating that there is a moderate abnormality and the data may need to be corrected. At this time, a secondary warning signal is generated to correct the sensor reading and adjust the reading to be closer to the expected value. Based on the corrected reading, the irrigation plan is dynamically adjusted to avoid over- or under-irrigation. For example, the irrigation amount can be slightly reduced or increased to compensate for possible data deviations.
[0063] If the abnormal coefficient of water and fertilizer consumption data is less than the first standard threshold and is within the allowable range, it indicates that the data is close to the expected value and there is no significant abnormality. At this time, no warning signal is generated and there is no need to correct the sensor readings. The irrigation plan can continue to be executed as planned without adjustment.
[0064] It should be noted here that the importance of the first-level warning signal is greater than that of the second-level warning signal, and relevant personnel can take corresponding management measures based on different warning signals.
[0065] After performing sensor reading corrections and adjusting the irrigation plan, continue to monitor system performance to ensure that the corrections are effective. If the correction effect is not obvious or the abnormal coefficient continues to be high, further system intervention or sensor adjustment should be considered. Based on the changing trend of sensor data and the effect of the correction, dynamically adjust the irrigation plan to ensure that the crop receives the appropriate water and fertilizer supply. Adjustments can include fine-tuning of irrigation time, frequency, or water and fertilizer amount.
[0066] In this embodiment, by obtaining the real-time readings of several sensors measuring the water and fertilizer consumption data of fruit and vegetable planting in different time periods, the reading deviation value between each sensor in the same time period is calculated. If the reading deviation value is greater than a predetermined threshold, the data measured in the time period is marked as conflicting data; for the time period in which the conflicting data is generated, the trust weight assignment of each sensor is determined according to the abnormal degree of correlation between the readings of different sensors and the change in the sensor measurement accuracy, and the water and fertilizer consumption data abnormal coefficient is obtained after the weighted average calculation of the trust weight assignment of the conflicting data in each time period; the calculated water and fertilizer consumption data abnormal coefficient is compared and analyzed with the gradient standard threshold, and the sensor reading is corrected according to the analysis result, and the gradient standard threshold includes a first standard threshold and a second standard threshold, and the irrigation plan is dynamically adjusted according to the correction effect of the sensor reading. It can effectively correct the sensor reading and optimize the irrigation plan, thereby reducing resource waste, improving crop yield and quality, and ensuring the sustainability of agricultural production.
[0067] Example 2, please refer to Figure 2 As shown, the water and fertilizer consumption data collection and analysis system for fruit and vegetable planting described in this embodiment includes a data acquisition module, a calculation module and an analysis and adjustment module;
[0068] Data acquisition module: obtains the real-time readings of several sensors measuring water and fertilizer consumption data of fruit and vegetable planting in different time periods, calculates the reading deviation value between each sensor in the same time period, and if the reading deviation value is greater than a predetermined threshold, marks the data measured in the time period as conflicting data;
[0069] Calculation module: For the time period when conflicting data is generated, the trust weight assignment of each sensor is determined according to the abnormal degree of correlation between different sensor readings and the change in sensor measurement accuracy. The water and fertilizer consumption data abnormal coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period;
[0070] Analysis and adjustment module: Compare and analyze the calculated abnormal coefficient of water and fertilizer consumption data with the gradient standard threshold, and correct the sensor reading according to the analysis results. The gradient standard threshold includes the first standard threshold and the second standard threshold, and dynamically adjust the irrigation plan according to the correction effect of the sensor reading.
[0071] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0072] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0073] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0074] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0075] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0076] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for collecting and analyzing water and fertilizer consumption data for fruit and vegetable planting, characterized in that: The steps include: S1: Obtain real-time readings of several sensors measuring water and fertilizer consumption data of fruit and vegetable planting in different time periods, calculate the reading deviation value between each sensor in the same time period, and if the reading deviation value is greater than a predetermined threshold, mark the data measured in the time period as conflicting data; S2: For the time period when conflicting data is generated, the trust weight assignment of each sensor is determined according to the abnormal degree of correlation between different sensor readings and the change in sensor measurement accuracy. The water and fertilizer consumption data abnormality coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period; The measurement accuracy drift index is generated according to the change of the sensor measurement accuracy. The method for obtaining the measurement accuracy drift index is as follows: In the initial state, the prior distribution of the sensor measurement accuracy is set , where θ represents the preset standard measurement accuracy of the sensor, using Gaussian distribution Building the likelihood function , indicating that under a given measurement accuracy θ, the sensor reading The probability of occurrence is assumed to be that the sensor measurement error follows a normal distribution, and the likelihood function is expressed as: ;in, is the initial accuracy estimate, is the prior prediction value, where t represents time, is the expected measurement of the sensor at time t. The measurement accuracy distribution of the sensor is updated by the Bayesian formula to obtain the posterior distribution , the expression is: ; In the formula, is the marginal likelihood of the observed data, which is calculated by integration as follows: ; At the next time step t+1, the posterior distribution of the current time t is As a new prior distribution , proceed to the next step of Bayesian update and calculate the posterior distribution The mean of the values is used as an estimate of the sensor measurement accuracy at the current time t to calculate the measurement accuracy drift index. , the expression is: ; In the formula, is the mean of the posterior distribution at the current time t, is the mean of the initial prior distribution; S3: Compare and analyze the calculated abnormal coefficient of water and fertilizer consumption data with the gradient standard threshold, and correct the sensor reading according to the analysis result. The gradient standard threshold includes a first standard threshold and a second standard threshold, and dynamically adjust the irrigation plan according to the correction effect of the sensor reading.
2. The method for collecting and analyzing water and fertilizer consumption data for fruit and vegetable planting according to claim 1, characterized in that: In S1, the reading deviation values between the sensors in the same time period are calculated. If the reading deviation value is greater than a predetermined threshold, the data measured in the time period is marked as conflicting data, specifically: Get the real-time readings from each sensor in the same time period, calculate the average reading of all sensors in the time period as the baseline value, and for each sensor, calculate the deviation between its reading and the baseline value in the same time period. The deviation value formula is: Deviation value = in: is the reading of the ith sensor, is the baseline value; Compare the deviation value of each sensor with a predetermined threshold: if the deviation value is less than or equal to the reference deviation threshold, the sensor data in this time period is normal, and a data normal signal is generated; If the deviation value is greater than the reference deviation threshold, there is a conflict in the sensor data within this time period and it is marked as conflicting data. At this time, a data anomaly signal is generated.
3. The method for collecting and analyzing water and fertilizer consumption data for fruit and vegetable planting according to claim 1, characterized in that: In S2, a correlation anomaly index is generated according to the degree of correlation anomaly between different sensor readings. The method for obtaining the correlation anomaly index is: Perform correlation analysis on the data of each pair of sensors and calculate the Pearson correlation coefficient between the conflicting data during the conflict period , the expression is: ; In the formula, and are the readings of the i-th and j-th sensors, respectively. and are their average values respectively. The Pearson correlation coefficient between the conflicting data calculated in real time is compared with the standard Pearson correlation coefficient under the preset sensor normal data monitoring state. If the Pearson correlation coefficient between the conflicting data calculated in real time is less than the standard Pearson correlation coefficient under the preset sensor normal data monitoring state, the absolute value of the difference is calculated and recorded as the correlation anomaly index.
4. The method for collecting and analyzing water and fertilizer consumption data for fruit and vegetable planting according to claim 3 is characterized in that: Determine the trust weight assignment of each sensor, and perform weighted average calculation on the trust weight assignment of conflicting data in each time period to obtain the water and fertilizer consumption data anomaly coefficient; convert the correlation anomaly index and the measurement accuracy drift index into the first eigenvector, and use the first eigenvector as the input of the machine learning model. The machine learning model predicts the trust weight assignment label of each sensor with each group of first eigenvectors as the prediction target, and takes minimizing the sum of prediction errors of the trust weight assignment labels of all sensors as the training target. The machine learning model is trained until the sum of prediction errors converges and the model training is stopped. The trust weight assignment of each sensor is determined according to the model output results, and the water and fertilizer consumption data anomaly coefficient is obtained by weighted average calculation on the trust weight assignment of conflicting data in each time period, wherein the machine learning model is a polynomial regression model.
5. The method for collecting and analyzing water and fertilizer consumption data for fruit and vegetable planting according to claim 4, characterized in that: In S3, the calculated water and fertilizer consumption data abnormal coefficient is compared and analyzed with the gradient standard threshold, and the sensor reading is corrected according to the analysis result. The gradient standard threshold includes a first standard threshold and a second standard threshold, which are specifically: The acquired abnormal coefficient of water and fertilizer consumption data is compared with the gradient standard threshold, the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the abnormal coefficient of water and fertilizer consumption data is compared with the first standard threshold and the second standard threshold respectively; If the abnormal coefficient of water and fertilizer consumption data is greater than the second standard threshold, it means that the abnormal coefficient exceeds the maximum tolerance range, indicating that there is a serious abnormality in the sensor data. At this time, a first-level warning signal is generated, the automatic irrigation system is immediately suspended, and a comprehensive system inspection is carried out; If the abnormal coefficient of water and fertilizer consumption data is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, it indicates that the sensor data has moderate abnormality, and the data is corrected. At this time, a secondary warning signal is generated to correct the sensor readings. According to the corrected readings, the irrigation plan is dynamically adjusted; If the abnormal coefficient of water and fertilizer consumption data is less than the first standard threshold, it indicates that there is no significant abnormality in the sensor data. At this time, no warning signal is generated, and there is no need to correct the sensor readings. The irrigation plan continues to be executed as planned without adjustment.
6. A fruit and vegetable planting water and fertilizer consumption data collection and analysis system, used to implement a fruit and vegetable planting water and fertilizer consumption data collection and analysis method according to any one of claims 1 to 5, characterized in that: It includes data acquisition module, calculation module and analysis and adjustment module; Data acquisition module: obtains the real-time readings of several sensors measuring water and fertilizer consumption data of fruit and vegetable planting in different time periods, calculates the reading deviation value between each sensor in the same time period, and if the reading deviation value is greater than a predetermined threshold, marks the data measured in the time period as conflicting data; Calculation module: For the time period when conflicting data is generated, the trust weight assignment of each sensor is determined according to the abnormal degree of correlation between different sensor readings and the change in sensor measurement accuracy. The water and fertilizer consumption data abnormal coefficient is obtained by weighted average calculation of the trust weight assignment of conflicting data in each time period; Analysis and adjustment module: Compare and analyze the calculated abnormal coefficient of water and fertilizer consumption data with the gradient standard threshold, and correct the sensor reading according to the analysis results. The gradient standard threshold includes the first standard threshold and the second standard threshold, and dynamically adjust the irrigation plan according to the correction effect of the sensor reading.
Citation Information
Patent Citations
Intelligent anti-misoperation processing method suitable for special operation and emergency operation
CN118428741A