Agricultural planting environment data processing method and system
By obtaining multiple time series data in the agricultural planting environment, calculating correlation coefficients and correcting abnormal data, the accuracy of soil monitoring data in scenarios with large changes in the external environment is solved, and the credibility of the data is improved.
Patent Information
- Application Number
- CN202510387960.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-31
AI Technical Summary
In application scenarios where the external environment changes greatly, the accuracy of soil monitoring data is low, which affects the credibility of the data.
By obtaining multiple time series data in agricultural planting environments, including soil pH and soil moisture content, the correlation coefficients are calculated to verify the accuracy of the first time series data and correct the abnormal data to improve the accuracy and credibility of the data.
By verifying and correcting monitoring data such as soil pH and alkaline values, the accuracy and credibility of the data are significantly improved, and the reliability of the data processing in agricultural planting environment is ensured.
Smart Images

Figure CN119885050A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and specifically to a method and system for processing agricultural planting environment data. Background Art
[0002] With the global population growth, increasing resource constraints and challenges brought by climate change, agricultural production is facing unprecedented pressure. In order to achieve the goals of food security, efficient resource utilization and sustainable development, the traditional agricultural management model that relies on human experience and intuition can no longer meet the needs. The rise of agricultural planting environment data processing technology is a response to the call for the development of precision agriculture and smart agriculture. Through scientific data collection and analysis, it creates the best conditions for crop growth, improves yield and quality, and reduces input costs and environmental burdens.
[0003] In modern agricultural planting, based on the progress of modern Internet of Things and sensor technology, agricultural producers will collect crop planting environment data during the agricultural planting process, analyze the crop planting environment, and then provide a scientific basis for the scientific planting of crops based on the characteristics of the crop growth environment. Take the soil acid-base environment monitoring of the agricultural planting environment as an example. For example, by monitoring the pH value of the soil where crops are planted, the soil acid-base information is mastered to provide theoretical support for soil fertilization. When the prior art monitors the soil acid-base environment, it usually directly measures the pH value of the soil through an inserted pH sensor and then transmits the data. However, because the soil pH detection sensor is often on the surface of the soil, in the agricultural planting environment, the farmland soil is located in the wild, which is not a constant temperature and humidity environment. The soil is greatly affected by changes in the external environment, and the accuracy of the data collected by the soil pH sensor is easily disturbed. This makes the accuracy of the collected data on the pH value of the soil low, affecting the credibility of the data. Summary of the invention
[0004] The purpose of this application is to provide an agricultural planting environment data processing method and system to solve the technical problem of low accuracy of soil monitoring data in application scenarios with large changes in the external environment.
[0005] To achieve the above objectives, this application provides the following technical solutions: In the first aspect, the present application proposes a technical solution for a method for processing agricultural planting environment data, the method for processing agricultural planting environment data comprising: Acquire environmental data for agricultural planting; the environmental data at least includes time series data of soil pH, soil moisture content, air temperature, air humidity, wind speed, sunshine duration and precipitation; Based on the environment data, first time series data and second time series data are acquired; the first time series data is any type of time series data in the environment data; the second time series data is any type of time series data in the environment data that is different from the first time series data; Based on the first time series data and the second time series data, a current correlation coefficient is obtained; the current correlation coefficient is at least used to represent the influence of the data value in the second time series data on the size of the data value in the first time series data; Based on the current correlation coefficient, the data value in the first time series data is corrected.
[0006] As a specific solution in the technical solution of the present application, the obtaining of the current correlation coefficient based on the first time series data and the second time series data includes: Based on the first time series data, a first data value is acquired; the first data value is a time series value of any time series in the first time series data; Based on the second time series data, a second data value is acquired; the second data value is a data value in the second time series data having the same time series as the first data value; Based on the first data value and the second data value, obtaining an initial correlation coefficient; Based on the initial correlation coefficient, the current correlation coefficient is obtained.
[0007] As a specific solution in the technical solution of the present application, the obtaining of the current correlation coefficient based on the initial correlation coefficient includes: Based on the first time series data, obtaining a first time series change curve; Based on the first time series change curve, a plurality of first time series data line segments are acquired; the slope of each first time series data line segment is greater than or equal to the average slope of each data point of the first time series change curve; Based on the second time series data, obtaining a second time series change curve; Based on the second time series change curve, a plurality of second time series data line segments are acquired; the slope of each second time series data line segment is greater than or equal to the average slope of each data point of the second time series change curve; Based on each first time series data line segment and each second time series data line segment, a first coefficient is obtained; the first coefficient is at least used to characterize the time correlation between the first time series data line segment and the second time series data line segment with the same time sequence; The current correlation coefficient is obtained based on the first coefficient and the initial correlation coefficient.
[0008] As a specific solution in the technical solution of the present application, the calculation formula for obtaining the first coefficient based on each first time series data line segment and each second time series data line segment is as follows: ; in, A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; Indicates the start time of the zth first time series data segment; Indicates the start time of the zth second time series data segment; represents the difference between the duration of the zth first time series data line segment and the zth second time series data line segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
[0009] As a specific solution in the technical solution of the present application, the obtaining of the current correlation coefficient based on the first coefficient and the initial correlation coefficient includes: Based on each first time series data line segment and each second time series data line segment, a second coefficient is obtained; the second coefficient is at least used to characterize the magnitude of the fluctuation correlation between the first time series data line segment and the second time series data line segment with the same time series; Based on the first coefficient and the second coefficient, obtaining a third coefficient; The current correlation coefficient is obtained based on the third coefficient and the initial correlation coefficient.
[0010] As a specific solution in the technical solution of the present application, based on each first time series data line segment and each second time series data line segment, the calculation formula for obtaining the second coefficient is as follows: ; in, represents the second coefficient of the zth first time series data line segment and the zth second time series data line segment; X represents the minimum number of data points in the zth first time series data line segment and the zth second time series data line segment; represents the slope corresponding to the i-th data point in the z-th first time series data segment; represents the slope corresponding to the i-th data point in the z-th second time series data segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
[0011] As a specific solution in the technical solution of the present application, the calculation formula for obtaining the third coefficient based on the first coefficient and the second coefficient is as follows: ; Wherein, m represents the third coefficient; n represents the logarithm of the first time series data line segment and the second time series data line segment with equal time series; A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; The second coefficient representing the zth first timing data segment and the zth second timing data segment.
[0012] As a specific solution in the technical solution of the present application, based on the third coefficient and the initial correlation coefficient, the calculation formula for obtaining the current correlation coefficient is as follows: ; Wherein, q represents the current correlation coefficient; m represents the third coefficient; represents the initial correlation coefficient; Represents a normalization function, which is used to map the values in the brackets to the range of [0, 1].
[0013] As a specific solution in the technical solution of the present application, the step of correcting the data value in the first time series data based on the current correlation coefficient includes: Based on the first time series data, a third data value is acquired; the third data value is a time series value of any time series in the first time series data; Based on the second time series data, a fourth data value and a plurality of fifth data values are acquired; the fourth data value is a data value in the second time series data having the same time series as the third data value; the fifth data value is a data value in the second time series data equal to the fourth data value; Based on the plurality of fifth data values, obtaining a plurality of historical correlation coefficients corresponding one-to-one to the plurality of fifth data values; Based on multiple historical correlation coefficients, obtain the average correlation coefficient; If the current correlation coefficient is less than the correlation coefficient average value, the third data value is corrected.
[0014] In the second aspect, the present application proposes a technical solution for an agricultural planting environment data processing system, the agricultural planting environment data processing system comprising: A reader for obtaining environmental data for agricultural planting; the environmental data at least includes time series data of soil pH, soil moisture content, air temperature, air humidity, wind speed, sunshine duration and precipitation; A server, configured to obtain first time series data and second time series data based on the environment data; the first time series data is any type of time series data in the environment data; the second time series data is any type of time series data in the environment data that is different from the first time series data; And, based on the first time series data and the second time series data, a current correlation coefficient is obtained; the current correlation coefficient is at least used to represent the influence of the data value in the second time series data on the size of the data value in the first time series data; And, based on the current correlation coefficient, the data value in the first time series data is corrected.
[0015] As a specific solution in the technical solution of the present application, the server is further used to obtain a first data value based on the first time series data; the first data value is a time series value of any time series in the first time series data; And, based on the second time series data, obtaining a second data value; the second data value is a data value in the second time series data having the same time series as the first data value; and, based on the first data value and the second data value, obtaining an initial correlation coefficient; And, based on the initial correlation coefficient, the current correlation coefficient is obtained.
[0016] As a specific solution in the technical solution of the present application, the server is further used to obtain a first time series change curve based on the first time series data; And, based on the first time series change curve, a plurality of first time series data line segments are obtained; the slope of each first time series data line segment is greater than or equal to the average slope of each data point of the first time series change curve; And, based on the second time series data, obtaining a second time series change curve; And, based on the second time series change curve, a plurality of second time series data line segments are obtained; the slope of each second time series data line segment is greater than or equal to the average slope of each data point of the second time series change curve; And, based on each first time series data line segment and each second time series data line segment, a first coefficient is obtained; the first coefficient is at least used to characterize the time correlation between the first time series data line segment and the second time series data line segment with the same time sequence; And, based on the first coefficient and the initial correlation coefficient, the current correlation coefficient is obtained.
[0017] As a specific solution in the technical solution of the present application, the server obtains the calculation formula of the first coefficient based on each first time series data line segment and each second time series data line segment as follows: ; in, A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; Indicates the start time of the zth first time series data segment; Indicates the start time of the zth second time series data segment; represents the difference between the duration of the zth first time series data line segment and the zth second time series data line segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
[0018] As a specific solution in the technical solution of the present application, the server is further used to obtain a second coefficient based on each first time series data line segment and each second time series data line segment; the second coefficient is at least used to characterize the fluctuation correlation between the first time series data line segment and the second time series data line segment with the same time series; and, based on the first coefficient and the second coefficient, obtaining a third coefficient; And, based on the third coefficient and the initial correlation coefficient, the current correlation coefficient is obtained.
[0019] As a specific solution in the technical solution of the present application, the server obtains the calculation formula of the second coefficient based on each first time series data line segment and each second time series data line segment as follows: ; in, represents the second coefficient of the zth first time series data line segment and the zth second time series data line segment; X represents the minimum number of data points in the zth first time series data line segment and the zth second time series data line segment; represents the slope corresponding to the i-th data point in the z-th first time series data segment; represents the slope corresponding to the i-th data point in the z-th second time series data segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
[0020] As a specific solution in the technical solution of the present application, the server obtains a calculation formula for the third coefficient based on the first coefficient and the second coefficient as follows: ; Wherein, m represents the third coefficient; n represents the logarithm of the first time series data line segment and the second time series data line segment with equal time series; A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; The second coefficient representing the zth first timing data segment and the zth second timing data segment.
[0021] As a specific solution in the technical solution of the present application, the server obtains the calculation formula of the current correlation coefficient based on the third coefficient and the initial correlation coefficient as follows: ; Wherein, q represents the current correlation coefficient; m represents the third coefficient; represents the initial correlation coefficient; Represents a normalization function, which is used to map the values in the brackets to the range of [0, 1].
[0022] As a specific solution in the technical solution of the present application, the server is further used to obtain a third data value based on the first time series data; the third data value is a time series value of any time series in the first time series data; And, based on the second time series data, a fourth data value and a plurality of fifth data values are obtained; the fourth data value is a data value in the second time series data having the same time series as the third data value; the fifth data value is a data value in the second time series data equal to the fourth data value; and, based on the plurality of fifth data values, obtaining a plurality of historical correlation coefficients corresponding one-to-one to the plurality of fifth data values; and, based on a plurality of historical correlation coefficients, obtaining an average value of the correlation coefficient; And, if the current correlation coefficient is less than the correlation coefficient average value, the third data value is corrected.
[0023] Compared with the prior art, the beneficial effects of this application are: The present application verifies the accuracy of the first time series data through the second time series data (for example, soil moisture content) in the environmental data of agricultural planting that is different from the first time series data (for example, soil pH value). If the first time series data is abnormal, the first time series data is corrected to improve the accuracy of the first time series data, that is, to improve the credibility of the first time series data. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a flow chart of an agricultural planting environment data processing method proposed in an embodiment of the present application; Figure 2 This is a structural schematic diagram of an agricultural planting environment data processing system proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The terms "first", "second", etc. in the description of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, such as the first time series data and the second time series data proposed below, which belong to different time series data. It should be understood that the time series data used in this way can be interchangeable under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of modules that appear in the embodiments of the present application is only a logical division. There may be other division methods when implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in the embodiments of the present application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment of the present application.
[0027] In order to solve the technical problem of low accuracy of soil monitoring data in application scenarios with large changes in the external environment proposed by the background technology, this application proposes a method for processing agricultural planting environment data, such as Figure 1 As shown, the agricultural planting environment data processing method includes steps S100 to S400.
[0028] Step S100: Acquire environmental data of agricultural planting.
[0029] It should be understood that in the embodiments of the present application, the environmental data at least includes but is not limited to time series data such as soil pH, soil moisture content, air temperature, air humidity, wind speed, sunshine duration and precipitation.
[0030] Step S200: Based on the environmental data, obtain first time series data and second time series data.
[0031] It should be clear that in the embodiment of the present application, the first time series data is any type of time series data in the environmental data, and the second time series data is any type of time series data in the environmental data that is different from the first time series data. That is to say, in the embodiment of the application, it is determined whether the first time series data needs to be corrected based on the second time series data (see below for the specific method).
[0032] It should be noted that in the embodiment of the present application, the first time series data and the second time series data are a combination of any two data in the environmental data, but in order to avoid redundancy, in the embodiment of the present application, a single agricultural planting area is taken as an example to collect environmental data of the agricultural planting area, in order to more comprehensively grasp the environmental data of agricultural planting and make decisions as scientific and reasonable as possible. This application uses the time series data of soil pH value (that is, the first time series data) and the time series data of soil moisture content (that is, the second time series data) of agricultural planting environmental data to illustrate the present application. It does not mean that the agricultural planting environmental data processing method proposed in this application is only applicable to correcting soil pH value based on soil moisture content. It should be understood that the method can also be applied to correcting soil pH value based on precipitation, or correcting air suitability based on precipitation, etc., which will not be listed one by one here.
[0033] In an embodiment of the present application, an insertion type pH sensor is set in a single agricultural planting area, and the induction electrode of the sensor is inserted into the open and flat farmland soil in the farmland, and the farmland soil moisture is collected at the same time to obtain the soil moisture content. The data acquisition frequency is 1 time / s, and then the soil moisture content time series data and the soil pH value time series data are obtained. And according to the actual data obtained, a time series curve is formed according to the time sequence of the acquisition. In an embodiment of the present application, the soil pH value online real-time detection system includes two parts: a sensor and a collector. The sensor part has a time-sharing power supply module, a pH value detection module, a moisture content detection module, and the measurement result is collected by a single-chip microcomputer. The collector part includes an STM32 single-chip microcomputer, a power management module, a clock module, an SD storage module, and an OLED display module, which can realize data acquisition, storage and real-time display. In the technical field, the soil pH value online real-time detection system is a mature technology, which will not be repeated here.
[0034] Step S300: Obtain a current correlation coefficient based on the first time series data and the second time series data.
[0035] It should be clear that the current correlation coefficient is at least used to represent the influence of the data value in the second time series data on the size of the data value in the first time series data. It is easy to understand that if the correlation between the first time series data and the second time series data is large, the second time series data has a greater influence on the first time series data; if the correlation between the first time series data and the second time series data is small, the second time series data has a smaller influence on the first time series data. It is easy to understand that if the correlation between the first time series data and the second time series data is large, and a time series data value in the first time series data is abnormal (for example: a sharp increase or drop in the absence of human interference), then it can be determined whether the time series data value in the first time series data is abnormal based on the corresponding time series data value in the second time series data.
[0036] It should be clear that in the embodiments of the present application, any reasonable method can be used to obtain the current correlation coefficient based on the first time series data and the second time series data. For example, in one embodiment of the present application, step S300, based on the first time series data and the second time series data, obtains the current correlation coefficient, including steps S310 to S340.
[0037] Step S310: Obtain a first data value based on the first time series data.
[0038] It should be clear that in this embodiment, the first data value is a time series value of any time series in the first time series data. Obtaining any one data value from multiple data values is a mature technology and will not be described in detail here.
[0039] Step S320: Based on the second time series data, obtain a second data value.
[0040] It should be noted that, in this embodiment, the second data value is a data value in the second time series data with the same time series as the first data value. Obtaining any one data value from multiple data values is a mature technology and will not be described in detail here.
[0041] Step S330: obtaining an initial correlation coefficient based on the first data value and the second data value.
[0042] It should be clear that in the embodiment of the present application, the initial correlation coefficient is a correlation coefficient reflecting the relationship between the first data value and the second data value. In the embodiment of the present application, the initial correlation coefficient of the first data value and the second data value can be obtained by using a cross-correlation function, a Pearson correlation coefficient, or an autocorrelation function. For example, in a specific embodiment of the present application, step S330, based on the first data value and the second data value, the calculation formula for obtaining the initial correlation coefficient is as follows: in, represents the initial correlation coefficient; w represents the Pearson equation function; represents the first data value; D represents the second data value.
[0043] Step S340: Based on the initial correlation coefficient, obtain the current correlation coefficient.
[0044] In the embodiments of the present application, the initial correlation coefficient can be directly used as the current correlation coefficient. However, it should be noted that the pH value of the soil is related to the concentration of inorganic salt ions in the soil, and the concentration of inorganic salts (i.e., the ratio of solute mass to solvent mass) changes mainly depending on the change in water content in the soil. In other words, changes in soil moisture content can cause changes in the concentration of inorganic salts in the soil, thereby causing changes in the pH value of the soil. In other words, the change in the pH value of the soil has a certain correlation with the soil moisture content. Therefore, by analyzing the correlation between the change in soil moisture content and the change in soil pH value, the abnormal data of the soil pH value can be judged, and the pH value of the abnormal soil can be corrected. Relevant personnel in the industry have also shown that the correlation between the change in soil pH value and soil moisture content has a scientific basis. The online real-time detection system of soil pH value based on moisture content and temperature compensation (doi: 106041 / jissn.000-1298.19.3.017) points out that on the basis of analyzing and improving the soil pH value measurement method, the influence of moisture content on the measurement is used by the least square method to realize the real-time detection of soil pH value. The experiment shows that the linear fitting determination coefficient of soil pH value and moisture content is greater than 0.99, indicating that there is a high correlation between soil pH value and moisture content change, and the correlation is high. Because the Pearson function equation is more sensitive to outliers when calculating the correlation, a few extreme data may significantly affect the correlation coefficient between the pH value and moisture content of the two soils, especially in the agricultural planting environment, the moisture content in the farmland soil varies greatly, for example: during precipitation, the soil moisture content increases rapidly; under high temperature irradiation, the water in the soil evaporates rapidly, and the soil moisture content decreases rapidly. The rapid change of moisture content can produce nonlinear changes, which will cause a large error in the correlation coefficient, thereby affecting the judgment of the accuracy of soil pH value. Therefore, in view of the changing characteristics of soil pH when soil moisture content changes dramatically, it is necessary to calculate the correlation between their changes. That is to say, in the embodiment of the present application, it is difficult to accurately characterize the correlation between the first time series data and the second time series data by only using the Pearson correlation coefficient as the current correlation coefficient.
[0045] In order to more accurately characterize the correlation between the first time series data and the second time series data, in one embodiment of the present application, step S340, based on the initial correlation coefficient, obtains the current correlation coefficient, including steps S341 to S346.
[0046] Step S341: Based on the first time series data, obtain a first time series change curve.
[0047] It should be clear that obtaining corresponding curves based on multiple time series data values is a mature technology and will not be described in detail here.
[0048] Step S342: Based on the first timing change curve, obtain a plurality of first timing data segments.
[0049] In the present application, the slope of each first time series data line segment is greater than or equal to the average slope of each data point of the first time series change curve. In a specific embodiment of the present application, taking the saline-alkali land in the northwest region as an example, when the water content in the soil rises rapidly, the concentration of inorganic salt particles in the soil decreases rapidly, and the pH value of the soil decreases rapidly. On the contrary, when the water content in the soil decreases rapidly, the concentration of inorganic salt particles in the soil increases rapidly, and the pH value of the soil increases rapidly. That is to say, the changing trends of the water content and pH value in the soil are inversely proportional.
[0050] In this embodiment, the mean of the instantaneous change rate of each time series change curve is calculated , the calculation formula is expressed as ,in, It represents the slope of the value change between the zth moment and the z-1th moment adjacent to the zth moment. Select the change curve line segments whose continuous slopes of the time series curve are greater than the mean, that is, . Several segments of soil pH and water content changes with large local change rates on the time series change curve were obtained.
[0051] Step S343: Based on the second time series data, obtain a second time series change curve.
[0052] It should be clear that obtaining corresponding curves based on multiple time series data values is a mature technology and will not be described in detail here.
[0053] Step S344: Based on the second timing change curve, obtain a plurality of second timing data segments.
[0054] In the present application, the slope of each second time series data line segment is greater than or equal to the average slope of each data point of the second time series change curve. The method of acquiring each second time series data line segment is similar to the method of acquiring each first time series data line segment, which will not be repeated here.
[0055] Step S345: Obtain the first coefficient based on each first time series data segment and each second time series data segment.
[0056] It should be clear that the first coefficient is at least used to characterize the time correlation between a first time series data segment and a second time series data segment with the same time series.
[0057] It should be clear that if the correlation between each first time series data segment and each second time series data segment is large, the change trend of each first time series data segment and the corresponding second time series data segment is related. For example, as mentioned above, if the soil moisture content rises rapidly, the soil pH value drops rapidly.
[0058] In a specific embodiment of the present application, in step S345, based on each first time series data line segment and each second time series data line segment, a calculation formula for obtaining the first coefficient is as follows: ; in, A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; Indicates the start time of the zth first time series data segment; Indicates the start time of the zth second time series data segment; represents the difference between the duration of the zth first time series data line segment and the zth second time series data line segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
[0059] As can be seen from the previous text, when the water content in the soil (that is, the second time series data segment) changes dramatically, the inorganic salt concentration in the soil changes rapidly, that is, the pH value in the soil (that is, the first time series data segment) changes rapidly, which is synchronous. That is to say, when the local curve of the water content in the soil fluctuates, the local curve of the pH value of the soil should also fluctuate dramatically, that is, the time when the local fluctuation curve produces abnormal fluctuations has a certain synchronization correlation.
[0060] In the embodiment of the present application, when the starting time of the zth first timing data line segment is closer to the starting time of the zth second timing data line segment, that is, The smaller it is, the more consistent the start time of the two changes and fluctuations is. The smaller the value, the more consistent the duration of the fluctuations between the two. In other words, when the second time series data changes, the first time series data also changes, and the two have a certain consistency in time change. That is, the greater the correlation between the two in the change time, the more consistent the fluctuations between the two. The bigger.
[0061] Step S346: Based on the first coefficient and the initial correlation coefficient, obtain the current correlation coefficient.
[0062] It should be clear that in the embodiments of the present application, the current correlation coefficient can be obtained based on the first coefficient and the initial correlation coefficient in any reasonable manner. For example, the first coefficient and the initial correlation coefficient can be added to obtain the current correlation coefficient, or the first coefficient and the initial correlation coefficient can be multiplied to obtain the current correlation coefficient.
[0063] It should be noted that, in an embodiment of the present application, the correlation between the zth first time series data segment and the zth second time series data segment is also reflected in the correlation of fluctuations. For example: the change in soil pH is due to the change in the moisture content in the soil, that is, the fluctuation in pH in the soil is affected by the soil moisture content. When the soil moisture content changes rapidly, the soil pH should also change rapidly, and the change in its fluctuation has a certain correlation. Therefore, in order to more accurately obtain the current correlation coefficient, in one embodiment of the present application, step S346, based on the first coefficient and the initial correlation coefficient, obtains the current correlation coefficient, including steps S347 to S349.
[0064] Step S347: Obtain the second coefficient based on each first time series data segment and each second time series data segment.
[0065] It should be clear that in the embodiment of the present application, the second coefficient is at least used to characterize the magnitude of the fluctuation correlation between the first time series data segment and the second time series data segment with the same time series. In the embodiment of the present application, the slope of each first time series data segment and each second time series data segment can be used to characterize the magnitude of the fluctuation correlation between the two. For example, in a specific embodiment of the present application, step S347, based on each first time series data segment and each second time series data segment, the calculation formula for obtaining the second coefficient is as follows: ; in, represents the second coefficient of the zth first time series data line segment and the zth second time series data line segment; X represents the minimum number of data points in the zth first time series data line segment and the zth second time series data line segment; represents the slope corresponding to the i-th data point in the z-th first time series data segment; represents the slope corresponding to the i-th data point in the z-th second time series data segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
[0066] It should be noted that in this embodiment and Respectively represent the change trends of the zth first time series data segment and the zth second time series data segment. For example: Since the change in moisture content (i.e., the zth second time series data segment) has an inverse effect on the change in pH value (i.e., the zth first time series data segment), the higher the soil moisture content, the lower the soil pH value. Therefore, the closer the change trends of the zth first time series data segment and the zth second time series data segment are, the closer they are to 1, i.e. The smaller it is, the more similar the trend of its change is, that is, the final The bigger.
[0067] Step S348: obtaining a third coefficient based on the first coefficient and the second coefficient; It should be clear that in the embodiment of the present application, the first coefficient and the second coefficient can be added to form the third coefficient, or the first coefficient and the second coefficient can be multiplied to form the third coefficient. In a specific embodiment of the present application, step S348, based on the first coefficient and the second coefficient, the calculation formula for obtaining the third coefficient is as follows: ; Wherein, m represents the third coefficient; n represents the logarithm of the first time series data line segment and the second time series data line segment with equal time series; A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; The second coefficient representing the zth first timing data segment and the zth second timing data segment.
[0068] Step S349: Based on the third coefficient and the initial correlation coefficient, obtain the current correlation coefficient.
[0069] It should be clear that in an embodiment of the present application, the third coefficient and the initial correlation coefficient may be added to obtain the current correlation coefficient, or the third coefficient and the initial correlation coefficient may be multiplied to obtain the current correlation coefficient. In a specific embodiment of the present application, step S349, based on the third coefficient and the initial correlation coefficient, obtains the calculation formula of the current correlation coefficient as follows: ; Wherein, q represents the current correlation coefficient; m represents the third coefficient; represents the initial correlation coefficient; Represents a normalization function, which is used to map the values in the brackets to the range of [0, 1].
[0070] It is easy to understand that when the correlation between soil moisture content and pH value is higher, the accuracy of pH value monitoring is higher. Conversely, when the correlation between soil moisture content and pH value is lower, the accuracy of pH value monitoring is lower. If the accuracy of pH value monitoring is low, the pH value needs to be corrected.
[0071] Step S400: Based on the current correlation coefficient, correct the data value in the first time series data.
[0072] It should be clear that in the embodiments of the present application, any suitable method can be used to correct the data value in the first time series data based on the current correlation coefficient. For example, the data value in the first time series data can be adjusted based on historical data. In a specific embodiment of the present application, step S400, based on the current correlation coefficient, corrects the data value in the first time series data, including steps S410 to S450.
[0073] Step S410: Obtain a third data value based on the first time series data.
[0074] It should be clear that in this embodiment, the third data value is the time series value of any time series in the first time series data. That is, in the embodiment of the present application, any data in the first time series data can be checked to confirm whether the data is abnormal and whether it needs to be corrected.
[0075] Step S420: Based on the second time series data, obtain a fourth data value and multiple fifth data values.
[0076] It should be noted that, in this embodiment, the fourth data value is a data value in the second time series data that is the same time series as the third data value. The fifth data value is a data value in the second time series data that is equal to the fourth data value.
[0077] Step S430: Based on the multiple fifth data values, obtain multiple historical correlation coefficients corresponding to the multiple fifth data values one by one.
[0078] It should be noted that, based on the fifth data value, obtaining the historical correlation coefficient corresponding to the fifth data value is as described in step S100 to step S300, which will not be described in detail here.
[0079] Step S440: Based on multiple historical correlation coefficients, obtain an average correlation coefficient.
[0080] It should be clear that based on multiple values, obtaining the average of these values is a mature technology.
[0081] Step S450: If the current correlation coefficient is less than the correlation coefficient average value, the third data value is corrected.
[0082] It is easy to understand that if the current correlation coefficient corresponding to the third data value is less than the average value of the correlation coefficient, it means that the third data value is inaccurate and needs to be corrected. In an embodiment of the present application, the average value of the data values corresponding to the first time series data and the plurality of fifth data value time series can be used as the corrected third data value. In a specific embodiment of the present application, step S450: if the current correlation coefficient is less than the average value of the correlation coefficient, the calculation formula for correcting the third data value is as follows: ; in, represents the third data value after correction; represents the third data value before correction; represents the current correlation coefficient; Represents an average value of data values corresponding to the first time series data and a plurality of fifth data value time series.
[0083] It should be clear that the embodiment of the agricultural planting environment data processing method proposed in the present application verifies the accuracy of the first time series data through the second time series data (for example, soil moisture content) in the agricultural planting environment data that is different from the first time series data (for example, soil pH value). If the first time series data is abnormal, the first time series data is corrected to improve the accuracy of the first time series data, that is, to improve the credibility of the first time series data.
[0084] After introducing the agricultural planting environment data processing method proposed in the embodiment of the present application, the following introduces an embodiment of an agricultural planting environment data processing system proposed in the present application. Figure 2 As shown, the agricultural planting environment data processing system includes: Reader 11, used to obtain environmental data for agricultural planting; the environmental data at least includes time series data of soil pH, soil moisture content, air temperature, air humidity, wind speed, sunshine duration and precipitation; The server 12 is used to obtain first time series data and second time series data based on the environment data; the first time series data is any type of time series data in the environment data; the second time series data is any type of time series data in the environment data that is different from the first time series data; And, based on the first time series data and the second time series data, a current correlation coefficient is obtained; the current correlation coefficient is at least used to represent the influence of the data value in the second time series data on the size of the data value in the first time series data; And, based on the current correlation coefficient, the data value in the first time series data is corrected.
[0085] As a specific embodiment of the present application, the server 12 is further configured to obtain a first data value based on the first time series data; the first data value is a time series value of any time series in the first time series data; And, based on the second time series data, obtaining a second data value; the second data value is a data value in the second time series data having the same time series as the first data value; and, based on the first data value and the second data value, obtaining an initial correlation coefficient; And, based on the initial correlation coefficient, the current correlation coefficient is obtained.
[0086] As a specific embodiment of the present application, the server 12 is further configured to obtain a first time series change curve based on the first time series data; And, based on the first time series change curve, a plurality of first time series data line segments are obtained; the slope of each first time series data line segment is greater than or equal to the average slope of each data point of the first time series change curve; And, based on the second time series data, obtaining a second time series change curve; And, based on the second time series change curve, a plurality of second time series data line segments are obtained; the slope of each second time series data line segment is greater than or equal to the average slope of each data point of the second time series change curve; And, based on each first time series data line segment and each second time series data line segment, a first coefficient is obtained; the first coefficient is at least used to characterize the time correlation between the first time series data line segment and the second time series data line segment with the same time sequence; And, based on the first coefficient and the initial correlation coefficient, the current correlation coefficient is obtained.
[0087] As a specific embodiment of the present application, the server 12 obtains the calculation formula of the first coefficient based on each first time series data line segment and each second time series data line segment as follows: ; in, A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; Indicates the start time of the zth first time series data segment; Indicates the start time of the zth second time series data segment; represents the difference between the duration of the zth first time series data line segment and the zth second time series data line segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
[0088] As a specific embodiment of the present application, the server 12 is further used to obtain a second coefficient based on each first time series data line segment and each second time series data line segment; the second coefficient is at least used to characterize the fluctuation correlation between the first time series data line segment and the second time series data line segment with the same time series; and, based on the first coefficient and the second coefficient, obtaining a third coefficient; And, based on the third coefficient and the initial correlation coefficient, the current correlation coefficient is obtained.
[0089] As a specific embodiment of the present application, the server 12 obtains the calculation formula of the second coefficient based on each first time series data segment and each second time series data segment as follows: ; in, represents the second coefficient of the zth first time series data line segment and the zth second time series data line segment; X represents the minimum number of data points in the zth first time series data line segment and the zth second time series data line segment; represents the slope corresponding to the i-th data point in the z-th first time series data segment; represents the slope corresponding to the i-th data point in the z-th second time series data segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
[0090] As a specific embodiment of the present application, the server 12 obtains a calculation formula for a third coefficient based on the first coefficient and the second coefficient as follows: ; Wherein, m represents the third coefficient; n represents the logarithm of the first time series data line segment and the second time series data line segment with equal time series; A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; The second coefficient representing the zth first timing data segment and the zth second timing data segment.
[0091] As a specific embodiment of the present application, the server 12 obtains the calculation formula of the current correlation coefficient based on the third coefficient and the initial correlation coefficient as follows: ; Wherein, q represents the current correlation coefficient; m represents the third coefficient; represents the initial correlation coefficient; Represents a normalization function, which is used to map the values in the brackets to the range of [0, 1].
[0092] As a specific embodiment of the present application, the server 12 is further configured to obtain a third data value based on the first time series data; the third data value is a time series value of any time series in the first time series data; And, based on the second time series data, a fourth data value and a plurality of fifth data values are obtained; the fourth data value is a data value in the second time series data having the same time series as the third data value; the fifth data value is a data value in the second time series data equal to the fourth data value; and, based on the plurality of fifth data values, obtaining a plurality of historical correlation coefficients corresponding one-to-one to the plurality of fifth data values; and, based on a plurality of historical correlation coefficients, obtaining an average value of the correlation coefficient; And, if the current correlation coefficient is less than the correlation coefficient average value, the third data value is corrected.
[0093] It should be clear that the embodiment of the agricultural planting environment data processing system proposed in the present application verifies the accuracy of the first time series data through the second time series data (for example, soil moisture content) in the agricultural planting environment data that is different from the first time series data (for example, soil pH value). If the first time series data is abnormal, the first time series data is corrected to improve the accuracy of the first time series data, that is, to improve the credibility of the first time series data.
[0094] After introducing the agricultural planting environment data processing system proposed in the embodiments of the present application, the following introduces a computer-readable storage medium proposed in the present application, on which a computer program is stored. When the computer program is executed by a processor, it implements the agricultural planting environment data processing method as described in any of the above embodiments.
[0095] It should be clear that the computer-readable storage media in this application include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory, static random access memory, dynamic random access memory, other types of random access memory, read-only memory, electrically erasable programmable read-only memory, flash memory or other memory technology, read-only compact disc read-only memory, digital versatile disc or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media, such as modulated data signals and carrier waves.
[0096] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the methods, devices and equipment described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0098] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0099] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0100] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0101] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0102] The computer program product includes one or more computer instructions. When the computer program is loaded and 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 may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may 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 may be transmitted from a website site, a computer, a server, or a data center to another website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disk), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0103] Although the embodiments of the present application have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles of the present application.
Claims
1. A method for processing agricultural planting environment data, characterized in that: include: Acquire environmental data for agricultural planting; the environmental data at least includes time series data of soil pH, soil moisture content, air temperature, air humidity, wind speed, sunshine duration and precipitation; Based on the environmental data, first time series data and second time series data are acquired; the first time series data is any type of time series data in the environmental data; The second time series data is any type of time series data in the environment data that is different from the first time series data; Based on the first time series data and the second time series data, a current correlation coefficient is obtained; the current correlation coefficient is at least used to represent the influence of the data value in the second time series data on the size of the data value in the first time series data; Based on the current correlation coefficient, the data value in the first time series data is corrected.
2. The agricultural planting environment data processing method according to claim 1, characterized in that: The acquiring a current correlation coefficient based on the first time series data and the second time series data includes: Based on the first time series data, a first data value is acquired; the first data value is a time series value of any time series in the first time series data; Based on the second time series data, a second data value is acquired; the second data value is a data value in the second time series data having the same time series as the first data value; Based on the first data value and the second data value, obtaining an initial correlation coefficient; Based on the initial correlation coefficient, the current correlation coefficient is obtained.
3. The agricultural planting environment data processing method according to claim 2, characterized in that: The acquiring the current correlation coefficient based on the initial correlation coefficient comprises: Based on the first time series data, obtaining a first time series change curve; Based on the first time series change curve, a plurality of first time series data line segments are acquired; the slope of each first time series data line segment is greater than or equal to the average slope of each data point of the first time series change curve; Based on the second time series data, obtaining a second time series change curve; Based on the second time series change curve, a plurality of second time series data line segments are acquired; the slope of each second time series data line segment is greater than or equal to the average slope of each data point of the second time series change curve; Based on each first time series data line segment and each second time series data line segment, a first coefficient is obtained; the first coefficient is at least used to characterize the time correlation between the first time series data line segment and the second time series data line segment with the same time sequence; The current correlation coefficient is obtained based on the first coefficient and the initial correlation coefficient.
4. The agricultural planting environment data processing method according to claim 3 is characterized in that: The calculation formula for obtaining the first coefficient based on each first time series data line segment and each second time series data line segment is as follows: ; in, A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; Indicates the start time of the zth first time series data segment; Indicates the start time of the zth second time series data segment; represents the difference between the duration of the zth first time series data line segment and the zth second time series data line segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
5. The agricultural planting environment data processing method according to claim 3, characterized in that: The acquiring the current correlation coefficient based on the first coefficient and the initial correlation coefficient includes: Based on each first time series data line segment and each second time series data line segment, a second coefficient is obtained; the second coefficient is at least used to characterize the magnitude of the fluctuation correlation between the first time series data line segment and the second time series data line segment with the same time series; Based on the first coefficient and the second coefficient, obtaining a third coefficient; The current correlation coefficient is obtained based on the third coefficient and the initial correlation coefficient.
6. The agricultural planting environment data processing method according to claim 5, characterized in that: Based on each first time series data line segment and each second time series data line segment, the calculation formula for obtaining the second coefficient is as follows: ; in, represents the second coefficient of the zth first time series data line segment and the zth second time series data line segment; X represents the minimum number of data points in the zth first time series data line segment and the zth second time series data line segment; represents the slope corresponding to the i-th data point in the z-th first time series data segment; represents the slope corresponding to the i-th data point in the z-th second time series data segment; Indicates taking the absolute value; Represents an exponential function with a natural constant as its base.
7. The agricultural planting environment data processing method according to claim 6, characterized in that: The calculation formula for obtaining the third coefficient based on the first coefficient and the second coefficient is as follows: ; Wherein, m represents the third coefficient; n represents the logarithm of the first time series data line segment and the second time series data line segment with equal time series; A first coefficient representing the zth first time series data line segment and the zth second time series data line segment; The second coefficient representing the zth first timing data segment and the zth second timing data segment.
8. The agricultural planting environment data processing method according to claim 5, characterized in that: Based on the third coefficient and the initial correlation coefficient, the calculation formula for obtaining the current correlation coefficient is as follows: ; Wherein, q represents the current correlation coefficient; m represents the third coefficient; represents the initial correlation coefficient; Represents a normalization function, which is used to map the values in the brackets to the range of [0, 1].
9. The agricultural planting environment data processing method according to any one of claims 1 to 8, characterized in that: The step of correcting the data value in the first time series data based on the current correlation coefficient includes: Based on the first time series data, a third data value is acquired; the third data value is a time series value of any time series in the first time series data; Based on the second time series data, a fourth data value and a plurality of fifth data values are acquired; the fourth data value is a data value in the second time series data having the same time series as the third data value; the fifth data value is a data value in the second time series data equal to the fourth data value; Based on the plurality of fifth data values, obtaining a plurality of historical correlation coefficients corresponding one-to-one to the plurality of fifth data values; Based on multiple historical correlation coefficients, obtain the average correlation coefficient; If the current correlation coefficient is less than the correlation coefficient average value, the third data value is corrected.
10. An agricultural planting environment data processing system, characterized in that: include: A reader for obtaining environmental data for agricultural planting; the environmental data at least includes time series data of soil pH, soil moisture content, air temperature, air humidity, wind speed, sunshine duration and precipitation; A server, configured to obtain first time series data and second time series data based on the environment data; the first time series data is any type of time series data in the environment data; The second time series data is any type of time series data in the environment data that is different from the first time series data; And, based on the first time series data and the second time series data, a current correlation coefficient is obtained; the current correlation coefficient is at least used to represent the influence of the data value in the second time series data on the size of the data value in the first time series data; And, based on the current correlation coefficient, the data value in the first time series data is corrected.
Citation Information
Patent Citations
Environment monitoring method and system
CN111414586A
Field environment control method and device based on Internet of Things
CN118348900A
Agricultural management system and method based on big data
CN118609338A
Industrial data priority calculation method based on correlation relation and sequence processing
CN118822237A
Data processing method and device, and computer-readable storage medium
WO2021238455A1