Intelligent agricultural data acquisition method and system based on smart country

By analyzing the historical time series data of crops and the time series data of the current growth stage, determining the abnormal time period and region, and adjusting the acquisition interval, the problem of unreasonable data collection in the existing technology is solved, and accurate analysis of crop growth status and resource Efficient use.

CN119046853AInactive Publication Date: 2024-11-29SHANDONG ZHENGTU INFORMATION POLYTRON TECH INC

Patent Information

Application Number
CN202411524239.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology cannot effectively obtain data from different crop growth stages, resulting in unreasonable data collection frequency, affecting crop yields, and causing waste of resources.

Method used

By obtaining the historical time sequence data of multiple growth stages of crops, calculate the historical abnormal time periods of each growth stage, and collect crop images at set intervals within the current growth stage, determine the abnormal areas, and obtain the agricultural data set of the abnormal areas. Cluster quality evaluation indicators and shadow coefficients confirm the abnormal areas and adjust the acquisition interval to obtain effective data.

Benefits of technology

It realizes timely and efficient acquisition of agricultural data at different growth stages, accurately analyzes crop growth status, avoids resource waste, and improves the accuracy and efficiency of data collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046853A_ABST
    Figure CN119046853A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of agricultural big data, in particular to an intelligent agricultural data acquisition method and system based on a smart country, and the method comprises the steps: obtaining historical time sequence data of a plurality of growth stages of crops; each data in the historical time series data comprises crop height, temperature and humidity; calculating a historical abnormal time period of the crop in each growth stage; determining an abnormal time period of crops in the current growth stage, and collecting crop images according to a set interval in the abnormal time period to obtain an agricultural data set of an abnormal region of the crop image collected each time; according to the scheme of the invention, agricultural data can be timely and effectively acquired.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural big data technology. More specifically, the present invention relates to an intelligent agricultural data collection method and system based on smart villages. Background Art

[0002] With the development of science and technology, the role of data collection and analysis in various industries has become increasingly prominent. Agriculture, as an important foundation of human society, is no exception. Agricultural data collection has played an irreplaceable role in modern agricultural management.

[0003] Smart agriculture is the use of modern information technology, such as the Internet of Things, big data, and artificial intelligence, to comprehensively upgrade agricultural production. Among them, agricultural data collection is a key step in achieving this goal. Through various sensors and monitoring equipment, real-time information such as soil moisture, temperature, pH value, and crop growth can be obtained in farmland, providing accurate data support for agricultural production.

[0004] In the related technology, such as the patent application document with application publication number CN118465868A, entitled A method and system for intelligent collection of agricultural meteorological data based on big data, it is disclosed that by analyzing the correlation between meteorological types and the growth status of different types of crops, the degree of influence of meteorological types on the growth of different crops is obtained, so as to adjust the sampling frequency and sampling interval of meteorological types for collecting different crops.

[0005] The above scheme does not take into account that when data is collected for the same crop at different growth stages (including germination, seedling, growth, flowering and pollination, and maturity), the growth status of the crops is also different. For example, in the flowering and pollination stage, some crops in the target area may be in an abnormal growth state. When the frequency of data collection is low, effective crop data cannot be obtained in time, and the crops cannot be effectively processed, affecting the subsequent yield of crops; while some crops are in a normal growth state, but are frequently collected, resulting in a waste of resources. Summary of the invention

[0006] The purpose of the present invention is to propose an intelligent agricultural data collection method and system based on smart villages, so as to solve the problem that agricultural data cannot be effectively obtained in the prior art, which affects crop yields and causes waste of resources; to this end, the present invention provides solutions in the following two aspects.

[0007] In a first aspect, the present invention provides an intelligent agricultural data collection method based on a smart village, comprising: Obtain historical time series data of multiple growth stages of crops in the target area; the historical time series data includes: crop height, temperature and humidity; Calculate the historical abnormal time periods of crops at various growth stages; determine the abnormal time periods of crops at the current growth stage, and collect crop images at set intervals within the abnormal time periods to obtain an agricultural data set of abnormal areas of each collected crop image; The historical abnormal time period is the time series between any two data whose Euclidean distance is greater than the mean distance in the historical time series data; the set interval is less than the sampling interval between two adjacent data in the time series; The agricultural data set is: the acquired crop image is divided into regions to obtain multiple regions; the first abnormality degree of each region is calculated; the first abnormality degree is positively correlated with the difference degree of the corresponding region and the difference between the regional uniformity of each region and its neighboring region; the regional uniformity is the inverse of the clustering quality evaluation index after clustering the pixels in the corresponding region; the difference degree is the difference change between the corresponding region and its neighboring region; the region with the first abnormality degree greater than or equal to the set threshold is recorded as an abnormal region, and an agricultural data set consisting of multiple abnormal regions is obtained.

[0008] The above scheme can determine the historical abnormal time periods that may exist in the growth status of crops based on the historical time series data of the same crop in different growth stages, and determine the time periods when the growth status of currently growing crops may be abnormal based on historical experience, and collect the current crops at set intervals to avoid setting the interval too long, which will result in the inability to effectively obtain the data of the current crops; further, when collecting data, the crops in the target area are divided into abnormal areas, which can pay more attention to the abnormal situations of crops and obtain more effective agricultural data.

[0009] Optionally, determining the abnormal time period of crops in the current growth stage includes: calculating the matching degree of the time series data of the crops in the current growth stage and the local time series data corresponding to the historical abnormal time period, and taking the historical abnormal time period with a matching degree greater than a set value as the abnormal time period of the crops in the current growth stage.

[0010] Optionally, the first abnormality degree for: ; in, is the regional uniformity of the ith region, is the regional uniformity of the jth neighborhood area, J is the total number of neighborhood areas of the ith area, is the value for normalizing the deviation between the ith region and the jth neighboring region.

[0011] Optionally, the difference for: ; in, is the absolute value of the difference in the number of cluster centers between the ith region and the jth neighborhood region, is the minimum distance between any two cluster centers in the i-th region and the j-th neighborhood region, It is the difference in the number of pixels in the two clusters corresponding to the minimum distance.

[0012] The above scheme can determine the difference change between the current area and its neighboring area by comparing the difference of clustering of two areas.

[0013] Optionally, before obtaining the agricultural data set, the abnormal area is confirmed to obtain the final abnormal area, specifically: Divide all the neighborhood areas of each abnormal area to obtain a sub-image of each neighborhood area; Perform color space conversion on all sub-images in each neighborhood area to obtain the corresponding brightness image; Based on the threshold segmentation algorithm, each brightness image is threshold segmented to obtain the brightness area; Based on the acquired brightness area, the shadow coefficient of the corresponding neighborhood area is calculated; Retaining the neighborhood area whose shadow coefficient is less than the threshold; calculating the second abnormality degree of each abnormal area based on the remaining neighborhood area; the shadow coefficient represents the brightness change difference of the neighborhood area; The abnormal area whose second abnormality degree is greater than or equal to the set threshold is recorded as the final abnormal area.

[0014] The above scheme further analyzes the abnormal area and eliminates the neighboring area with a shadow coefficient greater than or equal to the threshold, which can improve the accuracy of the second abnormality level and make the subsequent abnormal analysis of the growth status of crops more accurate.

[0015] Optionally, when the color space is LAB color space or HSV color space, the shading coefficient is the average of the product of the area difference of the brightness areas of all sub-images in each neighborhood area and the gradient difference; the area difference is the difference between the area of ​​the brightness area of ​​each sub-image and the area average of the brightness areas of all sub-images; the gradient difference is the difference between the gradient standard deviation of the brightness area of ​​each sub-image and the average of the gradient standard deviations of the brightness areas of all sub-images.

[0016] The above scheme can determine the degree to which the neighborhood area of ​​the current area is affected by the shadow by determining the changes in the brightness area and edge features in each neighborhood area.

[0017] Optionally, when the color space is a LAB color space and an HSV color space, the shadow coefficient Q is a weighted sum of a first shadow coefficient and a second shadow coefficient, specifically: ; is the number of sub-images in the LAB color space, is the number of sub-images in the HSV color space, and They are the first shadow coefficient of the sub-image in the LAB color space and the second shadow coefficient of the sub-image in the HSV color space; and The sum is equal to the total number of sub-images in the neighborhood area; The first shadow coefficient is the average value of the product of the area difference and the gradient difference of the brightness area of ​​the sub-image in the LAB color space; the second shadow coefficient is the average value of the product of the area difference and the gradient difference of the brightness area of ​​the sub-image in the HSV color space.

[0018] The above scheme combines the shadow coefficients of the corresponding sub-images in two different color spaces, thereby ensuring the accuracy of the shadow coefficients of the neighborhood area.

[0019] Optionally, the process of obtaining the number of sub-images in the LAB color space and the number of sub-images in the HSV color space is as follows: respectively calculate the brightness conversion scores of the same sub-image in the LAB color space and the HSV color space, determine the sub-image corresponding to the color space when the brightness conversion score is the largest, and obtain the number of sub-images in the LAB color space and the number of sub-images in the HSV color space; wherein the brightness conversion score is the product of the color difference mean and the brightness value difference of the corresponding sub-image in the color space u; the brightness value difference is the square root of the sum of the target differences of all pixels in the corresponding sub-image, and the target difference is the square of the difference between the brightness value of each pixel and the brightness mean; wherein the color space u is the LAB color space or the HSV color space.

[0020] The above scheme can screen out the best color space by comparing the advantages and disadvantages of two different color spaces, thereby ensuring that the brightness difference of the sub-images can be clearly obtained in the best color space.

[0021] Optionally, the clustering quality evaluation index is a CH index or a DB index.

[0022] In a second aspect, an intelligent agricultural data collection system based on a smart village includes: processor; A memory stores a computer instruction for intelligent collection of agricultural data based on a smart village. When the computer instruction is executed by the processor, the system executes the above-mentioned method for intelligent collection of agricultural data based on a smart village.

[0023] The beneficial effects of the present invention are: The solution of the present invention can determine that the growth status of crops at different growth stages in different growth environments may be abnormal through analysis of historical data, and then use historical experience to adjust the set interval for current crop sampling to collect data on abnormal areas in abnormal time periods where the current crops may exist. This can timely and effectively obtain agricultural data, accurately analyze the growth status of crops, and avoid waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 A flowchart of a method for intelligently collecting agricultural data based on a smart village in this embodiment is schematically shown; Figure 2 Schematic diagrams of multiple regional images of crop images are schematically shown; Figure 3 The structural block diagram of an intelligent agricultural data collection system based on a smart village in this embodiment is schematically shown. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] like Figure 1 As shown, an intelligent agricultural data collection method based on a smart village in this embodiment includes the following steps: Step S1, obtaining historical time series data of multiple growth stages of crops, wherein the historical time series data includes the growth stage duration, crop height, temperature and humidity of crops at different growth stages in different regions.

[0027] In one embodiment, a temperature sensor and a humidity sensor are used to measure the temperature and humidity during different growth states, and the collected data are denoised. The humidity and temperature data are removed from the data that have large differences in temperature and humidity from the season in which the data was collected. For example, the temperatures of wheat collected in winter are 3°C, 7°C, 5°C, -1°C, -2°C, 1°C, 45°C, and 23°C, among which 45°C and 23°C are unreasonable data.

[0028] Step S2, calculating the historical abnormal time periods of crops at each growth stage.

[0029] In one embodiment, a time series data set is constructed based on crop height, temperature, and humidity, and the Euclidean distance between any two data in the time series data is calculated as the similarity difference between any two data. The time series with a similarity difference greater than the average value of the similarity difference (mean distance) is divided into abnormal time periods, and the rest are divided into normal time periods, where the moments corresponding to any two data are the starting moment and the ending moment of the time series.

[0030] It should be noted that there may be multiple data in the time series, and the sampling intervals of two adjacent data are equal; or there may be only data at two moments.

[0031] As another implementation, the crop maturity growth rate (maturity change / time change) in the local time period within the abnormal time period can also be calculated, and the time series with a growth rate greater than 0 in the abnormal time period can be deleted from the abnormal time period to obtain the final abnormal time period.

[0032] Step S3, determining an abnormal time period of crops in the current growth stage in the target area, and collecting crop images at set intervals within the abnormal time period.

[0033] In this embodiment, the set interval for collecting crop images is smaller than the sampling interval. By reducing the set interval for collecting crop images, more data can be collected in an abnormal time period to avoid missing valid data.

[0034] In one embodiment, the time series data of crops in the current growth stage can be matched with the historical time series data corresponding to the historical abnormal time periods of each historical growth stage to obtain the same or similar historical abnormal time period with a matching degree greater than a set value, and the historical abnormal time period can be used as the abnormal time period of the current growth stage.

[0035] When matching, the time series data used include crop height, temperature and humidity. The matching above can be performed using cosine similarity and Euclidean distance methods.

[0036] The above setting value may be 0.7. As other implementations, it may also be determined according to actual conditions.

[0037] In another embodiment, the historical abnormal time periods of different growth stages can be curve-fitted with the historical time series data to obtain a curve, and then the abnormal time period of the crop in the current growth stage can be obtained based on the obtained curve. The curve fitting can use the least squares method.

[0038] In this embodiment, a drone equipped with a fixed high-resolution camera is used to capture images of a target area at different growth stages, and images with blur and tilted shooting angles are removed to obtain images of crops, wherein the crops may be wheat, soybeans, corn, sweet potatoes or tobacco leaves.

[0039] Step S4, obtaining an agricultural data set of abnormal areas of each collected crop image.

[0040] In this embodiment, the process of acquiring the agricultural data set of the abnormal area of ​​the crop image is as follows: Step S41, dividing each crop image into regions to obtain a plurality of regions. Specifically, capturing images of crops in a target region to obtain crop images, and dividing the crop images into A×B region images.

[0041] As another implementation method, since the shooting range of a drone equipped with a fixed high-resolution camera is inversely proportional to the image clarity, the target area to be collected can be divided into A×B collection areas of equal area according to the area of ​​the area to be collected and the shooting clarity of the drone. The drone collects multiple collection areas in sequence, and finally traverses all collection areas to obtain images corresponding to all collection areas.

[0042] Taking wheat as an example, a drone equipped with a fixed high-resolution camera was used to capture and collect wheat images in multiple collection areas.

[0043] Step S42, calculating the first abnormality degree of each area; recording the area with the first abnormality degree greater than or equal to the set threshold as an abnormal area; recording the area with the first abnormality degree less than the set threshold as a normal area.

[0044] In one embodiment, when collecting image data such as the state of crop leaves and the state of crop growth, due to the influence of environmental factors, drone scheduling, and different growth states of crops, it is necessary to distinguish between abnormal and normal agricultural data collected, so as to better identify the growth state of crops in the future. However, due to the inaccuracy of distinguishing between abnormal data and normal data due to environmental factors, it not only affects the acquisition of valid data, but also affects the identification of the growth state of crops. Therefore, in this embodiment, the degree of abnormality of the corresponding collection area is analyzed according to the regional uniformity and deviation of the collection area, and the abnormal area and the normal area are divided according to the degree of abnormality.

[0045] The neighborhood area of ​​any area in this embodiment can be an area in four neighborhoods or an area in eight neighborhoods. Figure 2 As shown, taking eight neighborhoods as an example, the neighborhood area set of the target area A0 is .

[0046] The process of obtaining the first abnormality level of any area in this embodiment is as follows: First, the regional uniformity of any region and its neighboring regions is calculated respectively.

[0047] In one embodiment, since shadows and abnormal crop growth states appear as different pixel values ​​in the captured images, in this embodiment, K-means clustering is performed on the pixel values ​​of all pixels in each area to obtain multiple clusters, and the clustering results are evaluated to obtain a clustering quality evaluation index. The clustering quality evaluation index in this embodiment is the CH (Calinski-Harabasz) index.

[0048] As another implementation, the clustering quality evaluation index may also adopt the Davies-Bouldin index (DB index).

[0049] In this embodiment, the reciprocal of the CH index is used as the regional uniformity. Specifically, the regional uniformity The calculation formula is as follows: ;in is the inter-cluster variance of the ith region, is the intra-cluster variance of the ith region, k is the number of clusters, n is the number of pixels in the ith region, is the clustering quality evaluation index of the i-th region. The larger the value of , the greater the separation between clusters, the smaller the compactness within the cluster, and the smaller the regional uniformity of the i-th region.

[0050] The greater the difference between clusters, the greater the difference between different clusters; the smaller the difference within a cluster, the more stable the change of pixels within the corresponding cluster; the more clusters there are, the more pixels with differences there are in the region.

[0051] In another embodiment, the CH (Calinski-Harabasz) index of the clustering results corresponding to different k values ​​may be calculated, and the reciprocal of the maximum CH index may be selected as the regional uniformity.

[0052] So far, this embodiment can obtain the uniformity of all regions and their corresponding neighboring regions.

[0053] The purpose of the regional uniformity calculated above is to accurately describe the stability of the pixels in the region through the relationship between the inter-cluster difference, the intra-cluster difference and the number of clusters in the region.

[0054] Next, the deviation of any region is calculated.

[0055] Specifically, the deviation of the i-th region is for: ; in, is the absolute value of the difference in the number of cluster centers between the ith region and the jth neighborhood region, is the minimum distance between any two cluster centers in the i-th region and the j-th neighborhood region, It is the difference in the number of pixels in the two clusters corresponding to the minimum distance.

[0056] For example, when the cluster center of the i-th region is , the cluster center of the jth neighborhood area is , at this time, the absolute value of the difference in the number of cluster centers between the i-th region and the j-th neighborhood region is is 1.

[0057] Then, according to the regional uniformity and deviation, the first abnormality degree of any region is obtained.

[0058] Specifically, the first abnormality degree of the i-th region It is expressed as: ;in, is the regional uniformity of the ith region, is the regional uniformity of the jth neighborhood area, J is the total number of neighborhood areas of the ith area, is the value for normalizing the deviation between the ith region and the jth neighboring region.

[0059] The value of J can be 4 or 8. When J=4, the neighborhood area is the area in the four neighborhoods of the i-th area. When J=8, the neighborhood area is the area in the eight neighborhoods of the i-th area.

[0060] The normalized value for: ; is the deviation between the ith region and the jth neighboring region.

[0061] As other implementations, the above normalization method may also adopt a maximum and minimum value normalization method, a Z-Score normalization method, and the like.

[0062] In this embodiment, the regions are divided according to the first abnormality degree of each region to obtain abnormal regions and normal regions. Specifically, before the division, this embodiment also includes a step of normalizing the abnormality degree of all regions, comparing the normalized first abnormality degree with a set threshold, and when the normalized first abnormality degree is less than the set threshold, the corresponding region is recorded as a normal region; when the normalized first abnormality degree is greater than or equal to the set threshold, the corresponding region is recorded as an abnormal region.

[0063] The above method for normalizing the first abnormality degree is the same as the above method for normalizing the deviation degree, and will not be described in detail here.

[0064] The threshold value is set as 0.3 in the above description; of course, as other implementations, the threshold value can also be set according to actual conditions.

[0065] Furthermore, this embodiment also takes into account that due to the influence of light at different collection times, some areas will be covered by shadows of the drone, the environment, etc. when the drone collects data, and shadows will be generated on the collected images, resulting in misjudgment of the collection area, so that the acquired agricultural data has the problem of misclassification (such as including data of non-abnormal areas affected by the environment when acquiring data sets of abnormal areas), affecting the subsequent analysis of the growth status of crops (such as the user's fertilization, watering, pest control, weeding, etc.), resulting in immeasurable changes in the growth status of crops or death. Therefore, it is necessary to further confirm whether each abnormal area is the final abnormal area.

[0066] Specifically, in this embodiment, it is also necessary to screen the neighboring areas of the abnormal area to obtain the remaining neighboring areas, and calculate the second abnormality degree of each abnormal area.

[0067] Among them, the specific process of screening the neighborhood area of ​​the abnormal area to obtain the remaining neighborhood area is: First, each abnormal region and its neighboring region are divided into a number of sub-images. For example, the neighboring region of each abnormal region is divided into M sub-images, that is, one region corresponds to M sub-images.

[0068] Secondly, the shadow coefficients of each neighborhood area of ​​each abnormal area are calculated.

[0069] In one embodiment, the process of obtaining the shadow coefficient of each neighborhood area is as follows: Convert the sub-images in each neighborhood area into the Lab color space to obtain the corresponding brightness image; Based on the threshold segmentation algorithm, each brightness image is segmented into brightness area and background area to obtain the brightness area; Based on the brightness area of ​​each brightness region and the gradient of each pixel in the brightness region, a shadow coefficient of the corresponding neighborhood region is determined.

[0070] Specifically, the shadow coefficient The calculation method is: ; in, is the total number of sub-images in the neighborhood, is the standard deviation of the gradients of all pixels in the brightness region of the mth sub-image in the LAB color space, is the mean standard deviation of the gradients of the brightness area of ​​all sub-images in the LAB color space, Represents the area of ​​the brightness region of the mth sub-image in the LAB color space, Represents the average area of ​​the brightness region of all sub-images in the LAB color space.

[0071] in, The smaller it is, the more stable the brightness change trend of the brightness area of ​​the mth sub-image is. The smaller it is, the more similar the brightness change trends between sub-images are and the less affected by shadows. The smaller it is, the smaller the difference in brightness between sub-images is and the less affected by shadows.

[0072] The above threshold segmentation algorithm may be a global threshold method, an Otsu threshold method, an adaptive threshold method, a multi-threshold segmentation method, etc. Since the above methods are all prior arts, they will not be described in detail here.

[0073] Furthermore, when performing threshold segmentation, multiple segmentation thresholds can be set, that is, segmentation thresholds are traversed, and the traversal range is from 1 to the maximum brightness value in the sub-image. At this time, there are L segmentation thresholds, and the sum of the shadow coefficients under all segmentation thresholds is calculated as the final shadow coefficient. It should be noted that the reason for traversal is that each sub-image is affected by the shadow to a different extent, and the brightness difference in the brightness area divided under different segmentation thresholds may be different.

[0074] In another embodiment, each sub-image can also be converted into the HSV color space to obtain the corresponding brightness area, and then obtain the shadow coefficient in the HSV color space. , specifically: ; Where M is the total number of sub-images in the neighborhood area, is the standard deviation of the gradients of all pixels in the brightness area of ​​the mth sub-image in the HSV color space, is the mean standard deviation of the gradients of the brightness area of ​​all sub-images in the HSV color space, Represents the area of ​​the brightness region of the mth sub-image in the HSV color space, Represents the average area of ​​the brightness region of all sub-images in the HSV color space.

[0075] It should be noted that the shadow coefficient in the HSV color space is calculated The same way as the shadow coefficient in the above The method is the same, so I will not go into details here.

[0076] As the most preferred implementation mode, in this embodiment, the brightness conversion score of each sub-image in the LAB color space and the HSV color space can also be calculated, and the color space corresponding to the maximum brightness conversion score is used as the optimal color space of the corresponding sub-image. The sub-image is converted based on the optimal color space of each sub-image, and the shadow coefficient of the neighborhood area is calculated.

[0077] Since the image brightness of crops is affected by factors such as saturation, color, and vision, some sub-images cannot effectively reflect the brightness differences within the area in the LAB color space or HSV color space. Therefore, it is necessary to determine the optimal color space that can accurately reflect the brightness differences of each sub-image.

[0078] Specifically, the brightness conversion scores of the same sub-image in the LAB color space and the HSV color space are calculated respectively, and the color space with the maximum brightness conversion score is determined as the optimal color space.

[0079] For example, in the LAB color space, for the mth sub-image, its brightness conversion score is The calculation method is: ; in, is the mean color difference of the mth sub-image in the LAB color space, is the number of pixels in the mth sub-image, It is The brightness value corresponding to each pixel is is the average brightness value corresponding to all pixels in the mth sub-image. The larger the value, the better it is at capturing brightness differences.

[0080] The above color difference mean is obtained by calculating the color difference of each point in the brightness image under the LAB color space; the color difference is the difference between two colors (the current point color and the target color) described by the numerical changes of three dimensions (brightness L, two chromaticities a and b), that is, the distance between two color points in the color space. Since the calculation of color difference is an existing technology, it will not be repeated here. The target color can be selected as full white.

[0081] In the HSV color space, for the mth sub-image, calculate the brightness conversion score of the mth sub-image ,in The calculation method of It should be noted that the color difference mean in the HSV color space is obtained by calculating the color difference of each pixel in the HSV color space, where the color difference can be expressed as the Euclidean distance between two color points (the current point color and the target color) in three dimensions (hue H, saturation S, and lightness V).

[0082] In this embodiment, by comparing and The size of , select the color space corresponding to the larger one as the optimal color space of the mth sub-image. So far, the number of sub-images in the LAB color space and the number of sub-images in the HSV color space can be obtained.

[0083] In this embodiment, the shadow coefficient Q can be obtained by combining the sub-image in the LAB color space and the sub-image in the HSV color space, which is specifically: ; in, is the number of sub-images in the LAB color space, is the number of sub-images in the HSV color space, and They are the first shadow coefficient of the sub-image in the LAB color space and the second shadow coefficient of the sub-image in the HSV color space; and The sum is equal to the total number of sub-images in the neighborhood area.

[0084] and The calculation method is the same as above. and The calculation method of is the same, the only difference lies in the sub-image and the number of sub-images.

[0085] Before calculating the shadow coefficient Q, the first shadow coefficient and the second shadow coefficient are normalized.

[0086] Of course, as another implementation method, it is also possible to directly use LAB color space for some sub-images based on experience, and use HSV color space for the remaining sub-images. Then, in response to the shadow coefficient being greater than or equal to the threshold, the corresponding neighborhood area is removed to obtain the remaining neighborhood area. The threshold value can be 0.4; of course, the specific value can also be set according to the actual situation.

[0087] In this embodiment, by analyzing the shadow coefficient of the collected area, the collection efficiency is significantly improved compared to the prior art of repeatedly collecting agricultural data in the same area.

[0088] Furthermore, based on the remaining neighborhood area, the second abnormality degree of the corresponding abnormal area is calculated, and the abnormal area corresponding to the second abnormality degree greater than or equal to the set threshold is recorded as the final area; the abnormal area corresponding to the second abnormality degree less than the set threshold is recorded as the normal area.

[0089] Among them, the second abnormality for: ; in, is the regional uniformity of the bth abnormal region, is the regional uniformity of the a-th neighborhood area, A is the total number of neighborhood areas of the b-th abnormal area, is the value for normalizing the deviation of the a-th neighborhood area.

[0090] The above-mentioned regional uniformity and deviation have been obtained when calculating the first abnormality degree, and will not be repeated here.

[0091] The above solution can avoid the problem of incorrect division of abnormal data and normal data due to the influence of light shadows by further analyzing the brightness of the abnormal area.

[0092] After the second abnormality degree is obtained, the second abnormality degree is also normalized.

[0093] The above scheme calculates the shadow coefficient of the neighborhood area according to the area and edge features (gradient) of the brightness area. It can screen out the neighborhood area less affected by the shadow according to the shadow coefficient of the neighborhood area of ​​the abnormal area, calculate the abnormality degree of the abnormal area according to the neighborhood area less affected by the shadow, and perform accurate abnormal area division.

[0094] At this point, all the final abnormal areas constitute an agricultural data set. In this embodiment, the obtained agricultural data set of abnormal areas is stored in a database for analyzing the growth status of crops and reminding users to perform subsequent fertilization, watering, pest control or weeding in a timely manner.

[0095] The solution of the present invention analyzes historical data and can determine that the growth status of crops at different growth stages in different growth environments may be abnormal, and then use historical experience to adjust the set sampling interval, and collect data on abnormal areas in abnormal time periods where the current crops may exist. This can timely and effectively obtain agricultural data, accurately analyze the growth status of crops, and avoid waste of resources.

[0096] The present invention also provides an intelligent agricultural data collection system based on smart villages. Figure 3As shown, the system includes a processor and a memory, and the memory stores computer program instructions. When the computer program instructions are executed by the processor, the above-mentioned method for intelligent collection of agricultural data based on smart villages according to the present invention is implemented.

[0097] The system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose configuration and functions are known in the art and thus will not be described in detail here.

[0098] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

[0099] In the description of this specification, “plurality” means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0100] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A method for intelligent collection of agricultural data based on smart villages, characterized in that: include: Obtain historical time series data of multiple growth stages of crops in the target area; The data in the historical time series data include: crop height, temperature and humidity; Calculate the historical abnormal time periods of crops at various growth stages; determine the abnormal time periods of crops at the current growth stage, and collect crop images at set intervals within the abnormal time periods to obtain an agricultural data set of abnormal areas of each collected crop image; The historical abnormal time period is the time series between any two data whose Euclidean distance is greater than the mean distance in the historical time series data; the set interval is less than the sampling interval between two adjacent data in the time series; The agricultural data set is: the acquired crop image is divided into regions to obtain multiple regions; the first abnormality degree of each region is calculated; the first abnormality degree is positively correlated with the difference degree of the corresponding region and the difference between the regional uniformity of each region and its neighboring region; the regional uniformity is the inverse of the clustering quality evaluation index after clustering the pixels in the corresponding region; the difference degree is the difference change between the corresponding region and its neighboring region; the region with the first abnormality degree greater than or equal to the set threshold is recorded as an abnormal region, and an agricultural data set consisting of multiple abnormal regions is obtained.

2. According to claim 1, the method for intelligent collection of agricultural data based on smart villages is characterized in that: The determining of the abnormal time period of the crops in the current growth stage includes: calculating the matching degree of the time series data of the crops in the current growth stage and the local time series data corresponding to the historical abnormal time period, and taking the historical abnormal time period with a matching degree greater than a set value as the abnormal time period of the crops in the current growth stage.

3. The method for intelligently collecting agricultural data based on smart villages according to claim 1 is characterized in that: The first abnormality level for: ; in, is the regional uniformity of the ith region, is the regional uniformity of the jth neighborhood area, J is the total number of neighborhood areas of the ith area, is the value for normalizing the deviation between the ith region and the jth neighboring region.

4. The method for intelligently collecting agricultural data based on smart villages according to claim 2 is characterized in that: The difference for: ; in, is the absolute value of the difference in the number of cluster centers between the ith region and the jth neighborhood region, is the minimum distance between any two cluster centers in the i-th region and the j-th neighborhood region, It is the difference in the number of pixels in the two clusters corresponding to the minimum distance.

5. According to the method for intelligent collection of agricultural data based on smart villages in claim 1, before obtaining the agricultural data set, it also includes the step of confirming the abnormal area to obtain the final abnormal area, specifically: Divide all the neighborhood areas of each abnormal area to obtain a sub-image of each neighborhood area; Convert all sub-images in each neighborhood area into color space to obtain corresponding brightness images; Based on the threshold segmentation algorithm, each brightness image is threshold segmented to obtain the brightness area; Based on the acquired brightness area, the shadow coefficient of the corresponding neighborhood area is calculated; The neighborhood area with shadow coefficient less than the threshold is retained; Based on the remaining neighborhood areas, the second abnormality degree of each abnormal area is calculated; the shadow coefficient represents the brightness change difference of the neighborhood area; The abnormal area whose second abnormality degree is greater than or equal to the set threshold is recorded as the final abnormal area.

6. The method for intelligently collecting agricultural data based on smart villages according to claim 5 is characterized in that: When the color space is LAB color space or HSV color space, the shadow coefficient is the average of the product of the area difference of the brightness area of ​​all sub-images in each neighborhood area and the gradient difference; the area difference is the difference between the area of ​​the brightness area of ​​each sub-image and the average of the area of ​​the brightness areas of all sub-images; The gradient difference is the difference between the gradient standard deviation of the brightness area of ​​each sub-image and the mean value of the gradient standard deviation of the brightness areas of all sub-images.

7. The method for intelligently collecting agricultural data based on smart villages according to claim 5 is characterized in that: When the color space is the LAB color space and the HSV color space, the shadow coefficient Q is a weighted sum of the first shadow coefficient and the second shadow coefficient, specifically: ; is the number of sub-images in the LAB color space, is the number of sub-images in the HSV color space, and They are the first shadow coefficient of the sub-image in the LAB color space and the second shadow coefficient of the sub-image in the HSV color space; and The sum is equal to the total number of sub-images in the neighborhood area; The first shadow coefficient is the average value of the product of the area difference and the gradient difference of the brightness area of ​​the sub-image in the LAB color space; the second shadow coefficient is the average value of the product of the area difference and the gradient difference of the brightness area of ​​the sub-image in the HSV color space.

8. The method for intelligently collecting agricultural data based on smart villages according to claim 7 is characterized in that: The process of obtaining the number of sub-images in the LAB color space and the number of sub-images in the HSV color space is as follows: Calculate the brightness conversion scores of the same sub-image in the LAB color space and the HSV color space respectively, determine the sub-image corresponding to the color space when the brightness conversion score is the largest, and obtain the number of sub-images in the LAB color space and the number of sub-images in the HSV color space; Among them, the brightness conversion score is the product of the color difference mean and the brightness value difference of the corresponding sub-image in the color space u; the brightness value difference is the square root of the sum of the target differences of all pixels in the corresponding sub-image, and the target difference is the square of the difference between the brightness value of each pixel and the brightness mean; and the color space u is the LAB color space or the HSV color space.

9. The method for intelligently collecting agricultural data based on smart villages according to claim 1 is characterized in that: The clustering quality evaluation index is the CH index or the DB index.

10. An intelligent agricultural data collection system based on smart villages, characterized in that: include: processor; A memory storing a computer instruction for intelligent collection of agricultural data based on a smart village. When the computer instruction is executed by the processor, the system executes a method for intelligent collection of agricultural data based on a smart village according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Seawater pollution area identification method and device based on high-resolution remote sensing image

    CN110765941A

  • Intelligent agricultural trade place behavior monitoring method and system and readable storage medium

    CN115204753A

  • Agricultural information intelligent management method and system based on big data

    CN116993302A

  • Smart community data analysis method and system based on big data

    CN118378193A

  • Method for recognizing seawater polluted area based on high-resolution remote sensing image and device

    US20220383633A1

Cited By

  • Park safety risk early warning method and system based on multi-modal time series data

    CN121258213A

  • Methods and systems for creating and using time series image data in agriculture.

    WO2026080892A1