An end-cloud collaborative farmland condition image acquisition system based on 5G communication and machine learning
By leveraging an edge-cloud collaborative architecture combining 5G communication and machine learning, real-time acquisition and analysis of multispectral image data from farmland solves the high latency and data security issues of traditional agricultural monitoring systems, enabling efficient and secure agricultural monitoring and decision support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional agricultural monitoring systems suffer from high bandwidth requirements, transmission delays, data security and privacy issues, and existing machine learning algorithms lack generalization capabilities and cannot adapt to changes in different agricultural scenarios and crop types.
Adopting an edge-cloud collaborative architecture based on 5G communication and machine learning, multispectral image data is collected in real time through the data acquisition terminal, compressed and preprocessed, and feature extracted. The random forest algorithm is used for agricultural condition analysis, and a visual dashboard is generated on the cloud server.
It enables real-time transmission and efficient analysis of multispectral image data of farmland, improves the real-time performance and accuracy of agricultural monitoring, reduces dependence on the cloud, and enhances data security and system flexibility.
Smart Images

Figure CN119600245B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of end-cloud collaboration of 5G communication and machine learning, in particular to an end-cloud collaborative farmland condition image acquisition system based on 5G communication and machine learning. BACKGROUND
[0002] In traditional agricultural monitoring systems, the acquisition and processing of farmland condition images mainly rely on centralized cloud computing architecture. Farmers and agricultural managers usually obtain the growth status of crops in farmland through manual methods or simple sensors, and then upload these data to the cloud for processing and analysis. However, with the expansion of farmland scale and the application of multi-spectral image acquisition technology, traditional systems face high bandwidth demand and transmission delay problems, which make it difficult to meet the real-time monitoring needs through existing system architecture, especially in the case of crop disease monitoring and climate change that require rapid response. In addition, the centralized transmission of large amounts of data also brings data privacy and security risks, especially in large-scale agriculture. How to ensure the security of data during transmission and guarantee the processing efficiency has become a major bottleneck in agricultural monitoring technology.
[0003] Modern agriculture requires real-time and accurate data, but traditional centralized cloud computing architecture cannot meet these needs. The end-cloud collaborative architecture based on 5G communication and machine learning has become a new solution for farmland condition image acquisition and analysis. This solution uses a data processing module for preliminary data processing and transfers complex computing tasks to the cloud for analysis, thereby improving processing efficiency and feedback speed. The high bandwidth, low latency, and high reliability of 5G communication ensure real-time data transmission, making it suitable for rapid response needs in large-scale production. Meanwhile, the machine learning technology on the cloud can improve the scientificity and accuracy of prediction and decision-making, helping farmers optimize production management.
[0004] Although existing technologies have made some progress in the field of agricultural monitoring, there are still obvious shortcomings. Traditional image acquisition and analysis methods cannot meet the needs of rapidly changing agricultural environments and real-time decision-making. Data delay and processing speed are difficult to improve simultaneously, and the lack of effective end-cloud collaboration mechanism causes loose connection between data acquisition and analysis, resulting in inefficient data integration. In addition, existing machine learning algorithms are often trained for specific environments or data sets, lacking sufficient generalization ability and unable to adapt to changes in different agricultural scenarios and crop types.
[0005] The present application aims to effectively solve the above-mentioned deficiencies of the prior art through a 5G and machine learning based end-cloud collaborative architecture, which can reduce the delay and bandwidth requirement of data transmission, upload only key data to enhance data security and privacy protection, thereby reducing the dependence on the cloud and optimizing resource utilization, while improving the flexibility and scalability of the system. The present application provides a more efficient, intelligent and secure solution in the scenarios of vegetation index, crop type, coverage, biomass estimation and growth of agricultural conditions, providing strong support for the intelligent and precise development of modern agriculture.
[0006] The above information disclosed in the background section is only intended to strengthen the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0007] The present application aims to provide an end-cloud collaborative agricultural condition image acquisition system based on 5G communication and machine learning to solve the problems raised in the background.
[0008] To achieve the above-mentioned purpose, the present application provides the following technical solutions:
[0009] An end-cloud collaborative agricultural condition image acquisition system based on 5G communication and machine learning, comprising:
[0010] A data acquisition end for real-time acquisition of multispectral image data covering the farmland to be observed, and acquisition of historical farmland multispectral image data, compression preprocessing of the multispectral image, and transmission of the compressed multispectral image to a data processing module;
[0011] A data processing module for denoising and feature extraction processing of the preprocessed multispectral image data, obtaining different wavebands and peak intensities, constructing a feature data vector combining the two, and transmitting the feature data vector to a cloud server;
[0012] A model construction module for using a random forest algorithm, inputting the historical farmland multispectral image data as a training set and its corresponding different agricultural condition data as labels into the random forest algorithm for training;
[0013] A cloud server for inputting the received feature data vector into the trained random forest algorithm model, obtaining each agricultural condition, and returning each agricultural condition to a data display module;
[0014] A data display module for receiving each agricultural condition of the cloud server, using Flask to generate a dashboard to display the agricultural condition data.
[0015] Further, using a multispectral camera, collect multispectral image data in the wavelength range of 100-200 nm, 200-400 nm, 400-700 nm, and 700-1100 nm for each time period of image acquisition;
[0016] Obtain historical multispectral images from existing databases, satellite image archives, or ground sensors, and perform appropriate data cleaning and format conversion to ensure that the historical data and real-time data have the same format and characteristics;
[0017] Compress the collected multispectral images in JPEG2000 format without loss, set the compression ratio to 1:10, and package the compressed image data in TIFF format. Through 5G communication, transmit the data to the data processing module.
[0018] Further, after receiving the data, the data processing module performs wavelet transform on each image, decomposing it into low-frequency and high-frequency parts, and sets Let the signal to be processed be denoted as:
[0019] ;
[0020] In the formula, denotes the scale parameter, which controls the width of the wavelet, denotes the translation parameter, which controls the position of the wavelet, denotes the mother wavelet function, which is used to generate the wavelet, denotes the wavelet transform coefficient of the signal to be processed in the jth wavelength range of the ith acquisition at different scales and positions , and is the signal to be processed in the jth wavelength range of the ith acquisition, and j takes values from 1 to 4, denoting multispectral image data in the wavelength range of 100-200 nm, 200-400 nm, 400-700 nm, and 700-1100 nm;
[0021] Use threshold method to process the high-frequency part, and set the denoising threshold value through the following formula:
[0022] ;
[0023] In the formula, denotes the standard deviation of the wavelet coefficient, reflecting the noise level, is the number of wavelet coefficients, denotes the denoising threshold value, which is used to determine the wavelet coefficients to be retained during the denoising process;
[0024] Perform soft thresholding on the high-frequency part to reduce the wavelet coefficients through the threshold value, retaining the signal characteristics while removing noise:
[0025] ;
[0026] wherein, is the original wavelet coefficient, is the denoised wavelet coefficient, denotes the sign of 1 if -1 if 0 if
[0027] The denoised wavelet coefficients are reconstructed into a clean signal using the inverse wavelet transform:
[0028] ;
[0029] wherein, is the reconstructed signal, which is the clean image or data after denoising, is the denoised wavelet coefficient, is the mother wavelet function used to reconstruct the signal.
[0030] Further, the intensity value of each waveband is obtained by analyzing the denoised signal. For each waveband j (covering the waveband ranges of 100-200 nm, 200-400 nm, 400-700 nm, and 700-1100 nm), denotes the intensity value of a specific waveband, which refers to the average reflection intensity of the pixels within a certain waveband:
[0031] ;
[0032] wherein, is the total number of pixels in the selected region , and is the pixel region corresponding to the jth waveband.
[0033] A pixel is considered a local maximum when its intensity value is greater than that of all its surrounding neighboring pixels, which is expressed by the following inequality:
[0034] ;
[0035] wherein, is a 3x3 neighborhood, which indicates the inspection of the 8 surrounding neighboring pixels;
[0036] To find the local maximum, the first derivative (gradient) of the signal intensity is calculated, which represents the rate of change of intensity, and is set to Let I(x, y) denote the intensity value of a pixel, then the first derivative can be expressed as, in the horizontal direction:
[0037] ;
[0038] in the vertical direction:
[0039] ;
[0040] A pixel is a local maximum if its first derivative changes sign at that point, i.e.:
[0041] ;
[0042] and changes from positive to negative in the vicinity of or changes from positive to negative in the vicinity of ;
[0043] After determining the local maximum, for all identified local maxima the corresponding intensity value can be calculated:
[0044] ;
[0045] wherein represents the index of all found local maxima.
[0046] Further, the feature data vector is obtained by combining the band intensity and the peak intensity , and a more comprehensive feature data vector is obtained by combining :
[0047] ;
[0048] wherein are the band and peak intensity values of the jth band value, respectively, j represents the coverage band range in 100-200 nanometers, 200-400 nanometers, 400-700 nanometers, and 700-1100 nanometers;
[0049] wherein :
[0050] ;
[0051] wherein represents the reflectance in the near-infrared band (700 nanometers to 1100 nanometers), represents the reflectance in the red light band (400 nanometers to 700 nanometers);
[0052] The band intensity is normalized to obtain reflectance
[0053]
[0054] wherein is the maximum reflectance intensity in all bands, ensuring the value is between 0 and 1.
[0055] Further, the collected historical multi-spectral image data of farmland, including reflectance data of different bands, is processed to obtain historical feature data vector and the corresponding crop label are input into the random forest respectively to construct a training set:
[0056]
[0057] wherein is the training set, is the total number of samples, represents the feature data vector of the u-th sample in the historical data, represents the crop label corresponding to the u-th sample in the historical data.
[0058] The random forest is composed of M decision trees, and the construction process is as follows:
[0059] Randomly select samples from the training set to form the training set of the m-th tree:
[0060]
[0061] wherein is the number of samples for each tree (less than the total number of samples ), is the sampling index, represents the feature vector of the v-th sample in the history, represents the label of the v-th sample in the history.
[0062] When each node is split, randomly select m try features from the total features for the best split, use the selected features to construct a decision tree, until the preset stopping condition (maximum depth or minimum sample split number) is reached, and for each tree , input the feature vector for classification:
[0063] ;
[0064] where, is the prediction result of the mth tree, and is the classification output through the tree, is the model of the mth tree, and is the feature vector to perform classification.
[0065] For each sample , the final prediction result of the random forest is generated by voting all trees:
[0066] ;
[0067] where, is the final prediction result of the random forest, generated by voting all trees, is the prediction result of each tree, is the mode function, which selects the crop category with the most occurrences.
[0068] Further, the received feature data vector is input into the trained random forest algorithm model to predict the crop condition:
[0069] ;
[0070] where, is the prediction result of the feature data by the random forest model; refers to different crop conditions, and the goal of the model is classification, then represents the predicted crop category; the goal of the model is regression (estimating biomass or coverage), then represents the corresponding continuous value;
[0071] It can be crop category, vegetation coverage, biomass, growth condition, and for crop vegetation coverage: ;
[0072] where, is an improvement on :
[0073] ;
[0074] where, represents the blue band reflectance, mainly used to reduce the influence of soil background;
[0075] aims to provide more accurate vegetation coverage evaluation by adjusting the influence of soil reflection:
[0076] ;
[0077] In the formula, is a soil adjustment factor, usually taking a value of 0.5;
[0078] Biomass estimation, biomass can be calculated by , temperature, precipitation and other factors:
[0079] ;
[0080] In the formula, represents the estimated biomass (kg per hectare), is the temperature (℃), is the precipitation (mm), is a parameter fitted according to historical data, reflecting , temperature and precipitation contribution to biomass;
[0081] Growth situation, growth data can be obtained by monitoring change:
[0082] ;
[0083] In the formula, represents the current time value, represents the previous time value, is the period length (1 day or 7 days) for calculating growth change;
[0084] The analysis results are sorted and returned to the data display module to create a result data structure containing the following information: crop type , coverage: vegetation coverage derived and evaluated by value, biomass: estimated biomass, growth data: time series change.
[0085] Further, through the data returned by the cloud server in the Flask application, the obtained data is parsed into a format suitable for front-end display, and a layout of the dashboard is designed, including title: showing the name of the dashboard, "crop monitoring dashboard", crop type: showing the classification result, using charts or tables, curve: show trend chart over time, coverage: use heat map or pie chart to show the coverage of different areas, biomass estimation: show by bar chart or other charts, growth data: show growth trend, represented by line chart.
[0086] Compared with the prior art, the beneficial effects of the present application are:
[0087] The present application significantly improves the high delay, bandwidth pressure and data security problems existing in traditional agricultural monitoring systems by introducing an end-cloud collaborative architecture combined with 5G communication technology. The high bandwidth and low delay characteristics of 5G technology ensure real-time transmission of agricultural multispectral image data, enabling the system to provide timely monitoring and feedback in situations requiring rapid response such as crop disease and climate change, which significantly reduces the response delay problem caused by high bandwidth demand and transmission delay in traditional systems.
[0088] The present application significantly improves multiple technical problems in traditional agricultural monitoring systems through the collaborative work of the data acquisition end, data processing module, model construction module, cloud server and data display module. The data acquisition end uses advanced multispectral sensors to collect high-quality image data in real time, and reduces data volume through compression preprocessing, thereby reducing bandwidth demand and transmission delay and improving data transmission efficiency. The data processing module performs denoising and feature extraction to ensure data quality and provide a reliable foundation for subsequent analysis.
[0089] In the cloud, the random forest algorithm efficiently analyzes the feature data vector, enabling rapid and accurate judgment of crop species and health status, solving the problem of insufficient adaptability of existing machine learning algorithms. Meanwhile, the data display module generates a visual dashboard through Flask to intuitively present the analysis results, helping agricultural managers make quick decisions. In summary, the present application not only improves the real-time and accuracy of agricultural monitoring, but also provides an efficient and secure monitoring solution for modern agriculture, promoting the intelligent development of agriculture. BRIEF DESCRIPTION OF DRAWINGS
[0090] Figure 1 The figure is a schematic diagram of the overall system module of the present application. DETAILED DESCRIPTION
[0091] To make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below with specific examples.
[0092] It should be noted that the technical terms or scientific terms used in the present application should be understood as the general meaning understood by those skilled in the art to which the present application belongs, unless otherwise defined. The "first", "second" and similar words used in the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Include" or "contain" and similar words mean that the elements or objects before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connected" or "connected" and similar words are not limited to physical or mechanical connection, but can include electrical connection, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent the relative positional relationship, when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0093] Embodiments:
[0094] Referring to the accompanying drawings, the present application provides a technical solution:
[0095] A terminal cloud collaborative farmland image acquisition system based on 5G communication and machine learning, comprising:
[0096] A data acquisition terminal is used for real-time acquisition of multispectral image data covering the farmland to be observed, and acquisition of historical farmland multispectral image data, compression preprocessing of the multispectral image, and sending of the compressed multispectral image to a data processing module;
[0097] A high-resolution MicaSense RedEdge (multispectral camera) is selected, which covers a wavelength range of 100-200 nm, 200-400 nm, 400-700 nm and 700-1100 nm, has multispectral imaging capability required for farmland monitoring, sets camera shooting parameters including shutter speed, aperture and ISO, etc. to adapt to the best light conditions, and acquires multispectral images of the farmland under the best light conditions; connect MicaSense RedEdge to a remote control device (such as a remote control or a smartphone application), set the time interval of the remote control device, so as to regularly acquire images at different growth stages, which can be selected every 1 hour, 2 hours or fixed time every day, use the remote control device to activate the camera to shoot at the set time period, which can be single shooting or set to continuous shooting mode, to ensure that multiple images are captured in a dynamically changing environment to obtain dynamic information at different growth stages;
[0098] The camera has a waveband reflection intensity recording function inside, which is enabled in the shooting settings to ensure that the reflection intensity data of each waveband is automatically recorded after shooting is completed. Each time image acquisition is performed, the system will automatically generate the reflection intensity value of each waveband and associate it with the corresponding image file, ensuring that the image and data file are saved synchronously.
[0099] Collect past multispectral image data for model training, verification, and trend analysis. Obtain historical multispectral images from existing databases, satellite image archives, or ground sensors, and perform appropriate data cleaning and format conversion to ensure that historical data and real-time data have the same format and characteristics.
[0100] Import the collected multispectral images into image processing software and perform lossless compression on the collected multispectral images in JPEG2000 format. The compression ratio is set to 1:10, and the image compression process is started. The software will generate compressed image files to ensure that the original data is not changed.
[0101] In the image processing software, import the compressed JPEG2000 image files, select the "Export" or "Save as" function, and select TIFF format to ensure that all compressed images are packaged into a TIFF file. Save the operation to ensure the integrity and accessibility of all data. Use data transmission tools (such as FTP, HTTP, etc.) to transmit the packaged TIFF format image data to the data processing module through 5G communication to ensure the integrity and security of the data during the process.
[0102] The data processing module is used to denoise and feature extraction of preprocessed multispectral image data, to obtain different wavebands and peak intensities, to construct a feature data vector combining the two, and to pass the feature data vector to the cloud server.
[0103] After receiving the data, the data processing module performs wavelet transform on each image, decomposing it into low-frequency and high-frequency parts, setting Let the signal to be processed be represented as:
[0104] ;
[0105] In the formula, is the scale parameter, which controls the width of the wavelet, is the translation parameter, which controls the position of the wavelet, is the mother wavelet function used to generate the wavelet, is the wavelet transform coefficient of the signal to be processed at different scales and positions of the jth waveband collected the ith time, The signal to be processed of the jth range of the ith acquisition, and j ranges from 1 to 4, represents multispectral image data covering the wavelength ranges of 100-200 nm, 200-400 nm, 400-700 nm, and 700-1100 nm;
[0106] wherein the scale parameter controls the width of the wavelet: the larger the scale, the wider the wavelet, and the smoother the signal features captured; the smaller the scale, the narrower the wavelet, and the more details can be captured; the translation parameter controls the position of the wavelet, and changes the position of the wavelet on the time axis; represents the wavelet transform coefficient of the signal to be processed of the jth wavelength range of the ith acquisition at different scales and positions ; by selecting different and , the feature information of the signal at multiple scales and positions can be obtained; the wavelet transform is a signal processing technique for analyzing the features of a signal at different scales and time positions, and through the transform, a complex signal can be decomposed into low-frequency and high-frequency components, so as to extract the main features and details of the signal;
[0107] The signal is decomposed into multiple levels using the wavelet transform to obtain low-frequency parts (approximations) and high-frequency parts (details); in the high-frequency level, a denoising technique is applied:
[0108] The threshold method is used to process the high-frequency part, and the denoising threshold is set by the following formula:
[0109] ;
[0110] In the formula, represents the standard deviation of the wavelet coefficient, reflecting the noise level, is the number of wavelet coefficients, represents the denoising threshold, which is used to determine the wavelet coefficients to be retained in the denoising process;
[0111] The formula is used to set the threshold for denoising , wherein represents the standard deviation of the wavelet coefficient, reflecting the noise level; is the number of wavelet coefficients, and this threshold is used to determine which wavelet coefficients should be considered as noise and removed in subsequent processing; the standard deviation of the wavelet coefficient , the higher the noise level, , the larger the threshold means that more noise components need to be removed; the number of wavelet coefficients , the more the number, With the increase, means that in the larger data set on the processing, the noise factor to be considered will also increase; denoising threshold denotes the denoising standard selected in wavelet denoising, reflecting the size of the noise level;
[0112] The soft threshold value is processed to the high frequency part, and the wavelet coefficient is reduced through the threshold value, and the signal characteristics are retained while the noise is removed:
[0113] ;
[0114] In the formula, is the original wavelet coefficient, is the wavelet coefficient after denoising, denotes the sign, if is 1, if is -1, if is 0, which is used to maintain the direction of the original wavelet coefficient;
[0115] This formula is used for denoising the high frequency wavelet coefficient , which can effectively reduce the noise in the wavelet coefficient through the soft threshold method, while retaining the characteristics of the signal; the original wavelet coefficient , the greater its absolute value, the more signal characteristics retained after threshold processing; the denoising threshold , the greater the threshold value, the more high frequency components will be removed; the wavelet coefficient after denoising , through processing, the noise is reduced and the important signal characteristics are retained;
[0116] The inverse wavelet transform is used to reconstruct the denoised wavelet coefficient into a clear signal:
[0117] ;
[0118] In the formula, is the reconstructed signal, which is a clear image or data after denoising processing, is the wavelet coefficient after denoising processing, is the mother wavelet function used to reconstruct the signal;
[0119] The inverse wavelet transform reconstructs the denoised wavelet coefficient into a clear signal , which restores the useful features of the original signal from the denoised information; the wavelet coefficient after denoising , its value affects the quality and characteristics of the final reconstructed signal; the reconstructed signal , its clarity and accuracy depend on the processing effect of the wavelet coefficient;
[0120] The intensity value of each band is obtained by analyzing the denoised signal. For each band j, the band range is 100-200 nm, 200-400 nm, 400-700 nm, and 700-1100 nm. The intensity value of a specific band represents the average reflection intensity of a pixel within a certain band:
[0121] ;
[0122] In the formula, is the total number of pixels in the selected region , which represents the total number of pixels in the band, is the pixel region corresponding to the jth band, which is usually the region in the image corresponding to the wavelength range of the band, represents the average reflection intensity value of the jth band, which represents the average reflection intensity of all pixels within a specific band, represents the pixel reflection intensity value at position , which represents the signal intensity after denoising, when the pixel reflection intensity of the selected region increases, the average reflection intensity will increase;
[0123] A local maximum is defined as a pixel whose intensity value is greater than the intensity values of all its neighboring pixels, which is represented by the following inequality:
[0124] ;
[0125] In the formula, is a 3x3 neighborhood, which means checking the 8 adjacent pixels, specifically, contains 8 pixels centered on (left, right, up, down, and four diagonal directions);
[0126] A local maximum refers to a pixel whose intensity value is greater than the intensity values of its 8 adjacent pixels, i.e., the intensity of the point is the highest in its surroundings. If is a local maximum, its intensity is higher than its adjacent pixels, indicating that in this region, this pixel is the most prominent feature point;
[0127] To find the local maximum, calculate the first derivative (gradient) of the signal intensity, which represents the rate of change of intensity. Let represent the intensity value of the pixel, and The intensity value of a pixel, usually refers to the signal value after denoising, the first derivative represents the rate of intensity change, i.e. the change of pixel intensity in the horizontal direction and the vertical direction, the horizontal direction:
[0128] ;
[0129] The vertical direction:
[0130] ;
[0131] If the derivative in a certain direction becomes larger (for example is positive), it means that the intensity is increasing; if the derivative becomes smaller (negative), it means that the intensity is decreasing, which means that the sign change of the first derivative reflects the increase or decrease of the intensity;
[0132] A pixel is a wave crest if its first derivative changes sign at that point, i.e.
[0133] ;
[0134] And near from positive to negative or near from positive to negative;
[0135] The condition for a wave crest is that the intensity value of a pixel shows a certain change in the horizontal direction and the vertical direction (i.e. the first derivative changes sign at that point), when and satisfy the condition at the same time, it means that the pixel point is a local maximum value, so it can be considered as a feature point (wave crest) in the image;
[0136] After determining the local maximum value, for all identified local peaks , the corresponding intensity value can be calculated:
[0137] ;
[0138] In the formula, represents the index of all local peaks found, represents the local peak intensity of the jth wave band, and represents the maximum intensity value in all local peak pixels found; is the maximum value of the intensity values of all local peaks found, so it is directly related to the size of the local peak intensity , when a local peak intensity increases, may also increase;
[0139] The feature data vector is obtained by combining the band intensity and the peak intensity of each band, and by combining the band intensity and the peak intensity of each band, a more comprehensive feature data vector is obtained
[0140] : ;
[0141] wherein are the band and peak intensity values of the jth band, j represents the band range of 100-200 nm, 200-400 nm, 400-700 nm, and 700-1100 nm; the feature vector is used for subsequent classification algorithms, which can provide a comprehensive analysis of the crop state; the changes in the intensity values of each band and peak reflect the response of different bands to the health status of the crop; the feature vector , whose dimension and content directly affect the input effect of the classification algorithm, reflects the spectral characteristics of the crop in different bands, is the normalized difference vegetation index; is the independent variable, reflecting the spectral characteristics of different bands and the health status of the vegetation;
[0142] wherein is:
[0143] ;
[0144] wherein represents the reflectance in the near-infrared band (700 nm to 1100 nm), which is usually used to evaluate the health status of plants, as healthy plants usually have higher reflectance in this band, represents the reflectance in the red light band (400 nm to 700 nm), and healthy plants usually have lower reflectance in this band, as they absorb a lot of red light for photosynthesis;
[0145] Generally, the value ranges from -1 to +1, and a value close to 1 indicates good vegetation coverage, a value close to 0 indicates no vegetation (such as urban areas or bare soil), and a negative value usually indicates water or other non-vegetation coverage; further, as increases or decreases, the value usually increases, indicating an improvement in the health status of the vegetation;
[0146] The band intensity is normalized to obtain the reflectance :
[0147] ;
[0148] In the formula, It is the maximum reflection intensity across all bands, serving a normalization function to ensure... The value is between 0 and 1. represents the reflectivity of the j-th band, and represents the normalized intensity value, ranging from 0 to 1;
[0149] This formula calculates the reflectivity for each band. It is used to analyze the light reflection characteristics of different wavelengths. Reflectivity is an important indicator for assessing crop health and soil quality. The higher the value, the higher the reflectivity;
[0150] The data processing module is used to denoise and extract features from the preprocessed multispectral image data, obtain different bands and peak intensities, combine the two to construct a feature data vector, and transmit the feature data vector to the cloud server.
[0151] The collected multispectral image data of historical farmland, including reflectance data in different bands, is used to calculate historical feature data vectors. Label the corresponding crop The inputs are fed into a random forest to construct a training set:
[0152] ;
[0153] In the formula, The training set contains multiple samples, each consisting of a feature vector and a label. is the total number of samples, representing the number of samples included in the training set. This represents the feature data vector of the u-th sample in historical data, reflecting the band reflection intensity, peak intensity, and peak intensity of that sample. Information, This represents the crop label corresponding to the u-th sample in the historical data, and indicates the actual crop type of that sample.
[0154] A random forest consists of M decision trees, and its construction process is as follows:
[0155] From the training set Randomly selected The m-th tree is formed from a set of samples. :
[0156] ;
[0157] In the formula, The number of samples per tree (less than the total number of samples) ), The index for sampling. This represents the feature vector of the v-th historical sample. This represents the label of the v-th historical sample. Let m be the training set of the m-th tree, containing One sample; from the training set Randomly selected A sub-training set formed by samples This random sampling method helps improve the model's generalization ability, and smaller... It can improve the randomness of the model and prevent overfitting;
[0158] When splitting at each node, from the total features Randomly select m try Perform optimal segmentation on each feature, m try The number of features selected at each node split is typically less than the total number of features to increase tree diversity. Decision trees are constructed using the selected features, ensuring diversity in each tree and reducing the risk of overfitting, until a pre-defined stopping condition (maximum depth or minimum number of sample splits) is reached. Input feature vector Row Classification:
[0159] ;
[0160] In the formula, This represents the prediction result of the m-th tree, indicating the prediction of the feature vector through this tree. The output is classified. The model representing the m-th tree is derived using feature vectors. Classification; Feature vector Different values will directly affect the prediction results for each tree. ;
[0161] For each sample The final prediction results of random forest Generated by voting on all trees:
[0162] ;
[0163] In the formula, The final prediction result of the random forest is generated through voting by all trees, reflecting the comprehensive judgment of multiple trees, and is usually the classification result that appears most frequently. For each tree's prediction results, combining different trees can improve the robustness of the classification. It is the mode function, which selects the crop category that appears most frequently.
[0164] Through the calculation of feature importance score, the decision mechanism inside the random forest model can be understood more deeply, and the features that have the greatest impact on the classification result can be identified. Random forest can evaluate which features have the greatest impact on the classification result by calculating the importance of the features. The common method is based on the reduced Gini coefficient or information gain. Let the importance score of feature be
[0165] ;
[0166] wherein, is the importance score of feature , indicating the contribution of the feature to the prediction performance of the model, is the total number of decision trees, is the reduced Gini coefficient in the mth tree using feature for splitting, and the Gini coefficient is an index for measuring the purity of a node. The greater the reduced value, the greater the contribution of the feature to the classification effect.
[0167] The formula calculates the importance score of feature , which reflects the influence of the feature on the classification result in the random forest model. Feature importance evaluation helps to understand the decision-making process of the model and can be used for feature selection, helping to simplify the model and reduce overfitting. The Gini coefficient indicates the reduced Gini coefficient in the mth tree using feature for splitting. The Gini coefficient is an index for measuring the purity of a node. The smaller the Gini coefficient, the higher the purity of the node. By evaluating the importance of the feature through the reduced Gini coefficient, the contribution of the feature to the classification ability of the model can be quantified.
[0168] The total number of decision trees indicates the number of trees applied in the model. The more the number of trees, the more accurate the overall average value calculated. The reduced Gini coefficient in each tree using feature for splitting is the difference between the Gini coefficients before and after splitting the node. If feature is used for splitting multiple times in the decision tree and the reduced Gini coefficient is large, it indicates that the feature has high importance. is the importance score of feature , and the higher the score, the greater the contribution of feature to the prediction performance of the model, reflecting the effectiveness of the feature in the decision-making process.
[0169] The Gini coefficient is an index for measuring the purity of a dataset, with a value range of , where 0 represents perfect purity (all samples belong to the same class), 1 represents complete impurity (samples are uniformly distributed in all classes), the Gini coefficient decreases when the feature is used for splitting, indicating that the purity of each child node after splitting is higher; if the feature The frequent reduction of Gini coefficient in multiple trees indicates that the feature has a significant contribution to the classification task;
[0170] Features with high importance scores indicate that the feature plays a key role in the classification process, and the decision tree model relies on the feature to make classification decisions. If the values of some features are low, it means that these features have less contribution to the model and may have little impact on the prediction performance of the model, and can be considered for removal.
[0171] The cloud server is configured to input the received feature data vector into the trained random forest algorithm model to obtain each agricultural condition, and return each agricultural condition to the data display module;
[0172] The received feature data vector is input into the trained random forest algorithm model to predict the agricultural condition:
[0173] ;
[0174] In the formula, is the prediction result of the feature data by the random forest model; refers to different agricultural conditions, and the goal of the model is classification, so represents the predicted crop type; the goal of the model is regression (estimating biomass or coverage), so represents the corresponding continuous value;
[0175] It can be crop type, vegetation coverage, biomass, growth condition, and for crop vegetation coverage: ;
[0176] where, is an improvement on :
[0177] ;
[0178] In the formula, represents the reflectivity of the blue band, mainly used to reduce the influence of soil background; generally, as the vegetation health improves, increases, decreases, ultimately leading to increases;
[0179] The soil adjustment factor is used to adjust the impact of soil reflectance, and provide more accurate vegetation coverage assessment:
[0180] ;
[0181] wherein, is the soil adjustment factor, usually taking the value of 0.5, used to adjust the impact of soil reflectance, increased vegetation reflectance will increase the value of , reflecting higher vegetation coverage;
[0182] Biomass estimation, biomass can be calculated by , temperature, precipitation and other factors:
[0183] ;
[0184] wherein, represents the estimated biomass (kg per hectare), is the temperature (℃), is the precipitation (mm), is a parameter fitted according to historical data, reflecting the contribution of , temperature and precipitation to biomass, usually, increased value will lead to increased biomass, because it reflects a healthier vegetation condition, and the increase of temperature and precipitation will also have a positive impact on biomass;
[0185] Vegetation index , the higher usually indicates the greater biomass; estimated biomass , usually in kg per hectare, which increases with ;
[0186] Vigor condition, vigor data can be obtained by monitoring the change of :
[0187] ;
[0188] wherein, represents the current time value, represents the value of of the previous n times, represents the value of of the previous time, is the period length (1 day or 7 days) for calculating the change of vigor, usually, if the current value is higher than the previous time, the vigor increases, otherwise decreases;
[0189] Growth rate , by calculating the growth change of vegetation, the greater the value, the faster the growth rate; the formula calculates the growth rate of vegetation, reflects the change of vegetation state over time, positive value indicates that the growth state of vegetation is improved, negative value indicates that the growth state is deteriorated;
[0190] The analysis results are sorted and returned to the data display module, the analysis results are sorted and returned to the data display module, providing comprehensive information of crop conditions, this data structure will be used for subsequent decision support and visualization; create a result data structure, containing the following information: crop type , , coverage: vegetation coverage derived and evaluated by , biomass: estimated biomass, growth data: time series change.
[0191] Data display module, used to receive various crop conditions from cloud server, use Flask to generate dashboard to display crop data;
[0192] The data returned by the cloud server in the Flask application will parse the data into a format suitable for front-end display, create appropriate folders in the project directory, / static: used to store static resources such as CSS stylesheets and JavaScript scripts, / templates: used to store HTML template files to facilitate dynamic generation of web page content, design a layout for the dashboard, including title: display the name of the dashboard, "crop monitoring dashboard";
[0193] Create an area to display the classification results of crop types: use charts (such as pie charts or bar charts) to visually display the classification results of each crop type, you can also choose to use tables, list the crop names and corresponding quantities;
[0194] Design an area to show the trend of value change: curve: show the trend chart of over time, or use a line chart, X axis represents time, Y axis represents value, ensure that the chart can clearly show the trend of over time, so that users can see the change of vegetation health;
[0195] Set an area to display the coverage of different areas: coverage: use heat map (heat map) to display the vegetation coverage of different areas, the color depth represents the coverage degree, you can also use pie chart to show the overall coverage, each part represents the coverage proportion of different areas;
[0196] Create a section to display the biomass estimation results: Biomass Estimation: Use a bar chart to display the biomass estimation values of different crops or regions, with the X-axis representing crop types or regions and the Y-axis representing biomass values. Ensure that the bar chart is clear and easy to read, making it convenient for users to compare the biomass of different crops.
[0197] Set up a section to display the growth data of crops: Growth Data: Use a line chart to display the growth trend, with the X-axis representing time and the Y-axis representing growth indicators (such as biomass or
[0198] In the / static / css and / static / js directories, create style sheets and script files respectively: CSS is used to design the appearance of the dashboard, including fonts, colors, chart styles, layout, etc.; JavaScript is used to handle the dynamic generation and interactive effects of charts, and chart libraries (such as Chart.js or D3.js) can be used to render charts; finally, all parts are combined to form a consistent dashboard interface, and ensure that each chart and data display part is reasonably laid out, so that users can easily browse and understand the data.
[0199] The above formulas are dimensionless values calculated, and the formulas are obtained by software simulation of a large amount of data to obtain a formula of the latest real situation, and the preset parameters in the formula are set by a person skilled in the art according to the actual situation.
[0200] The above embodiments can be realized wholly or partially by software, hardware, firmware, or any combination thereof. When realized by software, the above embodiments can be realized wholly or partially in the form of a computer program product. Those skilled in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed by hardware or software methods depends on the specific application and design constraints of the technical solutions.
[0201] The units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, which can be located in one place or distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiments according to actual needs.
[0202] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.
Claims
1. A cloud-edge collaborative agricultural image acquisition system based on 5G communication and machine learning, characterized in that, include: The data acquisition terminal is used to collect multispectral image data covering the farmland to be observed in real time, as well as multispectral image data of historical farmland. It performs compression preprocessing on the multispectral images and sends the compressed multispectral images to the data processing module via 5G communication. The data processing module is used to denoise and extract features from the preprocessed multispectral image data, obtain different bands and peak intensities, combine the two to construct a feature data vector, and transmit the feature data vector to the cloud server. After receiving the data, the data processing module performs wavelet transform on each image, decomposing it into low-frequency and high-frequency components. The signal to be processed can be represented using wavelet transform as follows: ; In the formula, This represents the scaling parameter, which controls the width of the wavelet. This represents the translation parameter, which controls the position of the wavelet. This represents the mother wavelet function, used to generate wavelets. This represents the signal to be processed in the j-th band of the i-th acquisition at different scales. and location The wavelet transform coefficients are as follows: The signal to be processed is the j-th range of the i-th acquisition, and the value of j ranges from 1 to 4, representing multispectral image data covering the band ranges of 100-200 nm, 200-400 nm, 400-700 nm and 700-1100 nm. The high-frequency components are processed using a thresholding method, and the noise reduction threshold is set using the following formula: ; In the formula, The standard deviation of the wavelet coefficients reflects the noise level. The number of wavelet coefficients, This represents the denoising threshold, used to determine the wavelet coefficients to be retained during the denoising process; Soft thresholding is applied to the high-frequency components to reduce wavelet coefficients, preserving signal characteristics while removing noise. ; In the formula, These are the original wavelet coefficients. These are the denoised wavelet coefficients. express The symbol, if Then it is 1, if Then it is -1, if Then it is 0, which is used to preserve the direction of the original wavelet coefficients; The inverse wavelet transform is used to reconstruct the denoised wavelet coefficients into a clear signal: ; In the formula, The reconstructed signal is a clear image or data that has undergone noise reduction processing. These are the denoised wavelet coefficients. This is the mother wavelet function, used to reconstruct the signal; The intensity value of each band is obtained by analyzing the denoised signal. For each band j, the band range covered is 100-200 nm, 200-400 nm, 400-700 nm, and 700-1100 nm. Indicating the intensity value for a specific wavelength band, it refers to the average reflectance intensity of a pixel within that band. ; In the formula, Selected area The total number of pixels, It is the pixel region corresponding to the j-th band; Define a local maximum value, one pixel. A local maximum is defined as an intensity value that is greater than the intensity values of all its surrounding pixels, and is represented by the following inequality: ; In the formula, It is a 3x3 neighborhood, which means checking the 8 surrounding adjacent pixels; To find a local maximum, calculate the first derivative of the signal intensity, which represents the rate of change of intensity, and let... Representing the intensity value of a pixel, the first derivative can be expressed as follows, in the horizontal direction: ; Vertical direction: ; One pixel The condition for a wave to be a peak is that its first derivative changes sign at that point, that is: ; and exist The vicinity changes from positive to negative or exist The value near the digit changes from positive to negative; After determining the local maximum, for all identified local peaks The corresponding strength value can be calculated. : ; In the formula, This represents the index of all the local peaks found. The model building module is used to use the random forest algorithm, taking the multispectral image data of historical farmland as the training set and the corresponding different agricultural data as labels, and inputting them into the random forest algorithm for training. The cloud server is used to input the received feature data vectors into the trained random forest algorithm model, obtain various agricultural conditions, and return the agricultural conditions to the data display module. The data display module receives agricultural information from the cloud server and uses Flask to generate dashboards to display the agricultural data.
2. The edge-cloud collaborative agricultural image acquisition system based on 5G communication and machine learning according to claim 1, characterized in that: Using a multispectral camera, multispectral image data of farmland coverage in the band ranges of 100-200 nm, 200-400 nm, 400-700 nm and 700-1100 nm were acquired, and images were acquired for each time period. Historical multispectral images are acquired from existing databases, satellite image archives, or ground sensors, and appropriate data cleaning and format conversion are performed to ensure that historical data and real-time data have the same format and characteristics. The acquired multispectral images were losslessly compressed using the JPEG2000 format with a compression ratio of 1:
10. The compressed image data was then packaged into TIFF format and transmitted to the data processing module via 5G communication.
3. The edge-cloud collaborative agricultural image acquisition system based on 5G communication and machine learning according to claim 2, characterized in that: Feature data Vectors are determined by band intensity and peak intensity Obtained by combination, and through combination Obtain a more comprehensive feature data vector for: ; In the formula, These are the band and peak intensity values for the j-th band, respectively, where j represents the band coverage range of 100-200 nm, 200-400 nm, 400-700 nm, and 700-1100 nm. in, for: ; In the formula, This indicates the reflectivity in the near-infrared band, from 700 nm to 1100 nm. This indicates the reflectivity in the red light band from 400 nanometers to 700 nanometers. Band intensity Normalization to obtain reflectivity : ; In the formula, It is the maximum reflection intensity across all bands, ensuring The value is between 0 and 1.
4. The edge-cloud collaborative agricultural image acquisition system based on 5G communication and machine learning according to claim 3, characterized in that: The collected multispectral image data of historical farmland, including reflectance data in different bands, is used to calculate historical feature data vectors. Label the corresponding crop The inputs are fed into a random forest to construct a training set: ; In the formula, For the training set, The total number of samples, This represents the feature data vector of the u-th sample in the historical data. This represents the crop label corresponding to the u-th sample in the historical data; A random forest consists of M decision trees, and its construction process is as follows: From the training set Randomly selected The m-th tree is formed from a set of samples. : ; In the formula, The number of samples per tree is less than the total number of samples. , The index for sampling. This represents the feature vector of the v-th historical sample. The label represents the v-th historical sample; When splitting at each node, from the total features Randomly select m try Optimal splitting is performed on each feature, and a decision tree is constructed using the selected features until a preset stopping condition is reached: maximum depth or minimum number of sample splits; for each tree... Input feature vector Row Classification: ; In the formula, Let represent the prediction result of the m-th tree, and represent the classification output through this tree. The model representing the m-th tree is derived using feature vectors. Classify; For each sample The final prediction results of random forest Generated by voting on all trees: ; In the formula, The final prediction result of the random forest is generated through voting by all trees. For the prediction results of each tree, It is the mode function, which selects the crop category that appears most frequently.
5. The edge-cloud collaborative agricultural image acquisition system based on 5G communication and machine learning according to claim 4, characterized in that: The received feature data vector is input into the trained random forest algorithm model to predict agricultural conditions. ; In the formula, The feature data is processed using a random forest model. The prediction results; Referring to different agricultural conditions, the model's goal is classification. Indicates the predicted crop type; The goal of the model is regression, that is, to estimate biomass or cover. Represents the corresponding continuous values; This could include crop type, vegetation cover, biomass, and growth status. Regarding crop vegetation cover: ; in, Yes An improvement: ; In the formula, This indicates the reflectivity in the blue light band, primarily used to reduce the impact of soil background. The aim is to provide a more accurate assessment of vegetation cover by adjusting for the effects of soil reflection. ; In the formula, It is a soil conditioner, typically with a value of 0.5; Biomass estimation, biomass can be obtained through... A comprehensive calculation considering multiple factors including temperature and precipitation: ; In the formula, This represents the estimated biomass, expressed in kilograms per hectare. It's temperature. It refers to precipitation, and its unit is mm. These parameters are obtained by fitting historical data and reflect... The contributions of temperature and precipitation to biomass; Growth status; growth data can be obtained through monitoring. The changes are used to obtain: ; In the formula, Indicates the current time value, Indicates the previous moment value, The period for calculating growth changes is either 1 day or 7 days. The analysis results are organized and returned to the data display module, creating a results data structure containing the following information: crop type. Coverage status: via The value is used to derive and evaluate vegetation cover; Biomass: Estimated biomass; Growth data: The time series changes.
6. The edge-cloud collaborative agricultural image acquisition system based on 5G communication and machine learning according to claim 5, characterized in that: The data returned from the cloud server is parsed in the Flask application into a format suitable for front-end display. A dashboard layout is designed, including a title (displaying the dashboard name, "Agricultural Monitoring Dashboard"), a crop category (displaying the classification results), and charts or tables. Curves: Display Trend charts over time; Coverage: Use heatmaps or pie charts to show the coverage of different areas; Biomass estimation: Displayed through bar charts or other graphs; Growth data: Show growth trends, represented by line graphs.
Citation Information
Patent Citations
Point location data and remote sensing image data-based regional farmland quality monitoring method
CN102073869A
Crop growth state monitoring method based on remote sensing inversion
CN110398466A