Training method of classification model, crop region type classification method and device

CN122156848APending Publication Date: 2026-06-05AEROSPACE INFORMATION RES INST CAS +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
AEROSPACE INFORMATION RES INST CAS
Filing Date
2026-02-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies have low accuracy and poor efficiency when using remote sensing images to identify crop areas such as orchards, especially in complex orchard environments where effective classification is difficult.

Method used

By acquiring training grayscale images, calculating vegetation index, moisture difference index and texture features, and combining topographic relief to generate a comprehensive crop index, a training dataset is constructed and trained using the initial classification model to generate a crop regional classification model.

Benefits of technology

It improves the classification accuracy and efficiency of crop regional classification models, especially in distinguishing orchards from other vegetation types with higher recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156848A_ABST
    Figure CN122156848A_ABST
Patent Text Reader

Abstract

The application provides a training method of a classification model, a crop region type classification method and equipment. The training method comprises: acquiring training grayscale images corresponding to different training periods of a to-be-processed region, wherein the training grayscale images are marked with type labels corresponding to different crop regions, and a first pixel value on the training grayscale images represents band parameters and ground reflectivity of different bands; for each training grayscale image, a feature set is generated according to a plurality of band parameters, wherein the feature set comprises a vegetation index, a water difference index and a plurality of texture features; a crop comprehensive index is generated according to the plurality of band parameters, the vegetation index, the water difference index and a relief degree of the to-be-processed region; a correlation combination operation is performed on the plurality of training grayscale images, the feature set and the crop comprehensive index to obtain a training data set; and an initial classification model is trained by using the training data set to obtain a trained crop region classification model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of neural network technology, and more specifically, to a training method for a crop region classification model, a crop region type classification method, a training device for a crop region classification model, a crop region type classification device, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] With the development of remote sensing satellite technology, remote sensing has gradually evolved into a powerful technical tool with multiple platforms, bands, and perspectives, providing objective, homogeneous, high-quality data that can be spatially and temporally registered for various fields. In fact, remote sensing has been widely used in precision agriculture due to its efficient and low-cost data acquisition methods and timely, large-scale monitoring capabilities.

[0003] The complexity and diversity of orchard landscapes, such as small, scattered orchards, young orchards, orchards with different tree species, and orchards with different planting densities, make large-scale orchard extraction more complex and difficult.

[0004] In the process of realizing the concept of this application, it was found that the relevant technology has low accuracy when using remote sensing images to identify crop areas such as orchards, and the efficiency is poor due to the large amount of data processed. Summary of the Invention

[0005] In view of this, this application provides a training method for a crop regional classification model, a crop regional type classification method, a training device for a crop regional classification model, a crop regional type classification device, an electronic device, a computer-readable storage medium, and a computer program product.

[0006] One aspect of this application provides a method for training a crop regional classification model, comprising:

[0007] Acquire training grayscale images of the area to be processed corresponding to different training periods. The training grayscale images are marked with type labels corresponding to different crop areas. The first pixel value on the training grayscale images represents the band parameters and surface reflectance of different spectral bands.

[0008] For each of the above-mentioned training grayscale images, a feature set is generated based on multiple of the above-mentioned band parameters, wherein the feature set includes vegetation index, moisture difference index and multiple texture features;

[0009] Based on the above-mentioned band parameters, vegetation index, moisture difference index, and topographic relief of the area to be processed, a comprehensive crop index is generated.

[0010] By performing association and combination operations on multiple training grayscale images, the feature set, and the comprehensive crop index, a training dataset is obtained.

[0011] The initial classification model was trained using the aforementioned training dataset to obtain a trained crop region classification model.

[0012] Another aspect of this application provides a method for classifying crop regional types, including:

[0013] Obtain the target dataset of the area to be predicted for the corresponding target time period and the reference grayscale image of the corresponding reference time period. The target dataset includes the target grayscale image, the feature set and the regional comprehensive index. The feature set includes the vegetation index, the moisture difference index and multiple texture features. The regional comprehensive index is generated based on the unprocessed band parameters of multiple band spectra in the target grayscale image, the feature set and the topographic relief of the area to be predicted.

[0014] Based on the spectral angle distance algorithm, the spectral angle information between the target grayscale image and the reference grayscale image is calculated;

[0015] If the above spectral angle information meets the preset spectral angle threshold, the above target dataset is input into the crop region classification model corresponding to the above reference grayscale image, and the predicted region type information of different regions in the above region to be predicted is output.

[0016] According to embodiments of this application, the crop regional type classification method further includes:

[0017] If the spectral angle information does not meet the preset spectral angle threshold, the above-mentioned crop region classification model is trained using the above-mentioned input dataset to obtain an updated crop region classification model.

[0018] Another aspect of this application provides a training apparatus for a crop regional classification model, comprising:

[0019] The first acquisition module is used to acquire training grayscale images of the area to be processed corresponding to different training periods. The training grayscale images are marked with type labels corresponding to different crop areas, and the first pixel value on the training grayscale images represents the band parameters and surface reflectance of different spectral bands.

[0020] The first generation module is used to generate a feature set for each of the training grayscale images based on multiple band parameters, wherein the feature set includes a vegetation index, a moisture difference index, and multiple texture features;

[0021] The second generation module is used to generate a comprehensive crop index based on multiple band parameters, the vegetation index, the moisture difference index, and the topographic relief of the area to be processed.

[0022] The module is used to perform association and combination operations on multiple training grayscale images, the feature set, and the comprehensive crop index to obtain a training dataset.

[0023] The training module is used to train the initial classification model using the training dataset to obtain a trained crop region classification model.

[0024] Another aspect of this application provides a crop regional type classification device, comprising:

[0025] The second acquisition module is used to acquire the target dataset of the area to be predicted for the corresponding target time period and the reference grayscale image for the corresponding reference time period. The target dataset includes the target grayscale image, a feature set, and a regional comprehensive index. The feature set includes a vegetation index, a moisture difference index, and multiple texture features. The regional comprehensive index is generated based on the unprocessed band parameters of multiple band spectra in the target grayscale image, the feature set, and the topographic relief of the area to be predicted.

[0026] The calculation module is used to calculate the spectral angle information between the target grayscale image and the reference grayscale image based on the spectral angle distance algorithm;

[0027] The prediction module is used to input the target dataset into the crop region classification model corresponding to the reference grayscale image when the spectral angle information meets the preset spectral angle threshold, and output the predicted region type information of different regions in the region to be predicted.

[0028] Another aspect of this application provides an electronic device comprising:

[0029] One or more processors;

[0030] Memory, used to store one or more programs.

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described above.

[0032] Another aspect of this application provides a computer-readable storage medium storing computer-executable instructions that, when executed, are used to implement the method described above.

[0033] Another aspect of this application provides a computer program product comprising computer-executable instructions which, when executed, are used to implement the method described above.

[0034] According to embodiments of this application, a crop regional classification model is obtained by calculating vegetation index, moisture difference index, and multiple texture features based on band parameters of different spectral bands in a training grayscale image, and by combining multiple band parameters and topographic relief to calculate a comprehensive crop index. The model is then trained using a training dataset obtained by associating and combining the training grayscale image, the feature set, and the comprehensive crop index. Since this embodiment of the application uses a comprehensive crop index calculated based on vegetation index, moisture difference index, texture features, band parameters, and topographic relief when training the crop regional classification model, the classification accuracy and efficiency of the crop regional classification model are improved. Attached Figure Description

[0035] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0036] Figure 1 An exemplary system architecture for training a crop region classification model and classifying crop region types according to embodiments of this application is shown.

[0037] Figure 2 A flowchart illustrating a training method for a crop regional classification model according to an embodiment of this application is shown;

[0038] Figure 3 A flowchart illustrating a training method for a crop regional classification model according to another embodiment of this application is shown;

[0039] Figure 4 The spectral band-reflectivity map of region A during different training periods according to an embodiment of this application is shown;

[0040] Figure 5 The spectral band-reflectivity maps of region B during different training periods according to an embodiment of this application are shown.

[0041] Figure 6 A flowchart of a crop region type classification method according to an embodiment of this application is shown;

[0042] Figure 7 A block diagram of a training apparatus for a crop regional classification model according to an embodiment of this application is shown;

[0043] Figure 8 A block diagram of a crop region type classification device according to an embodiment of this application is shown; and

[0044] Figure 9 A block diagram of an electronic device suitable for implementing the methods described above, according to an embodiment of this application, is shown. Detailed Implementation

[0045] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0046] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0047] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0048] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0049] One of the mainstream methods currently used is curve similarity methods, which classify pixels by comparing unknown time-series curves with standard time-series curves, such as dynamic time warping algorithms. However, obtaining high-quality standard curves is difficult; therefore, exploring the spectral differences between orchards and other vegetation, especially arbor forests, is crucial. Phenological characteristics are inseparable from the spectral differences between different vegetation types, including crops and natural vegetation, as well as between different crops. Reflectance curves and vegetation indices are important representations of phenological information, such as the Normalized Difference Vegetation Index (NDVI) and the Enhanced Vegetation Index (EVI). Furthermore, reflectance curves can be used to identify key periods and key feature bands with significant differences. In addition, the fusion of different image data and its temporal application is also one of the main methods for orchard extraction.

[0050] The use of temporal information has greatly improved the accuracy of orchard and other crop extraction. However, in scenarios where multiple crops coexist, there are still cases where the spectral information of the classification target is very similar to that of the surrounding plants. In addition to temporal information, the inventors discovered that spatial information is also an important feature to help distinguish orchards from other vegetation types. The most commonly used spatial information includes texture, elevation, and slope.

[0051] In view of this, embodiments of this application provide a method for training a classification model, a method and apparatus for classifying crop region types. The training method includes acquiring training grayscale images of the region to be processed corresponding to different training time periods, wherein the training grayscale images are marked with type labels corresponding to different crop regions, and the first pixel value on the training grayscale images represents the band parameters and surface reflectance of different spectral bands; for each training grayscale image, a feature set is generated based on multiple band parameters, wherein the feature set includes a vegetation index, a moisture difference index and multiple texture features; a comprehensive crop index is generated based on multiple band parameters, the vegetation index, the moisture difference index and the topographic relief of the region to be processed; multiple training grayscale images, the feature set and the comprehensive crop index are associated and combined to obtain a training dataset; and an initial classification model is trained using the training dataset to obtain a trained crop region classification model.

[0052] In the embodiments of this application, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.

[0053] Figure 1 An exemplary system architecture 100, according to embodiments of this application, is shown, in which a training method for a crop region classification model and a crop region type classification method can be applied. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this application, in order to help those skilled in the art understand the technical content of this application, but do not mean that the embodiments of this application cannot be used in other devices, systems, environments or scenarios.

[0054] like Figure 1As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0055] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social media platform software, etc. (for example only).

[0056] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0057] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0058] It should be noted that the training method and crop region type classification method of the crop region classification model provided in this application embodiment can generally be executed by server 105. Correspondingly, the training device and crop region type classification device of the crop region classification model provided in this application embodiment can generally be located in server 105. The training method and crop region type classification method of the crop region classification model provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the training device and crop region type classification device of the crop region classification model provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Alternatively, the training method for the crop region classification model and the crop region type classification method provided in this application embodiment can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the training device for the crop region classification model and the crop region type classification device provided in this application embodiment can also be disposed in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.

[0059] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0060] Figure 2 A flowchart is shown of a training method for a crop regional classification model according to an embodiment of this application.

[0061] like Figure 2 As shown, the training method for this crop regional classification model includes operations S201~S205.

[0062] In operation S201, training grayscale images of the area to be processed corresponding to different training time periods are acquired. The training grayscale images are marked with type labels corresponding to different crop areas, and the first pixel value on the training grayscale images represents the band parameters and surface reflectance of different spectral bands.

[0063] In operation S202, for each training grayscale image, a feature set is generated based on multiple band parameters. The feature set includes vegetation index, moisture difference index and multiple texture features.

[0064] In operation S203, a comprehensive crop index is generated based on multiple band parameters, vegetation index, moisture difference index, and topographic relief of the area to be processed.

[0065] In operation S204, multiple training grayscale images, feature sets, and crop comprehensive indices are associated and combined to obtain the training dataset.

[0066] In operation S205, the initial classification model is trained using the training dataset to obtain a trained crop region classification model.

[0067] According to embodiments of this application, the area to be processed can be a planting area for different crops. The training period can refer to a historical time period, such as several months of a previous year. The type marker can refer to orchard markers, farmland markers, etc., wherein the surface reflectance values ​​are different within the areas marked by different types of markers. The band parameters can refer to the spectral values ​​of different spectral bands.

[0068] According to embodiments of this application, for each training grayscale image, the Normalized Difference Vegetation Index (NDVI) and the Normalized Difference Water Index (NDMI), i.e., the vegetation index and the water difference index, are calculated based on multiple band parameters in the training grayscale image. At the same time, multiple texture features, such as homogeneity, contrast, dissimilarity, and mean, are calculated based on multiple band parameters.

[0069] According to an embodiment of this application, topographic relief refers to the difference between the elevation of the highest point and the elevation of the lowest point within a specific area. It is a macroscopic indicator describing the topographic features of a region. The model of the area to be processed can be obtained from a published Digital Elevation Model (DEM), and the topographic relief of the area to be processed can be calculated using formula (1). :

[0070] (1)

[0071] Where Hi is the elevation of the i-th sampling point, Hmean is the average elevation of all sampling points in the region to be processed, and N is the number of sampling points in the region to be processed.

[0072] According to an embodiment of this application, a comprehensive crop index (OCI) is generated based on multiple band parameters, vegetation index, moisture difference index, and topographic relief of the area to be processed. The OCI describes the differences between different types of crops in different spectral bands. Multiple training grayscale images of the area to be processed, feature sets, and the OCI are then correlated and combined to obtain a training dataset. This correlation and combination operation can refer to constructing a tuple based on different types of parameters, for example, {training grayscale image 1, training grayscale image 2, ..., training grayscale image n, feature set, OCI}.

[0073] According to an embodiment of this application, when training an initial classification model using the training dataset, the regional comprehensive index is used as the main feature, while the vegetation index, moisture difference index, and multiple texture features are used as secondary features that provide auxiliary assistance. After the above iterative training, a trained crop regional classification model can be obtained. The initial classification model can be a support vector machine (SVM) or a decision tree model.

[0074] According to embodiments of this application, a crop regional classification model is obtained by calculating vegetation index, moisture difference index, and multiple texture features based on band parameters of different spectral bands in a training grayscale image, and by combining multiple band parameters and topographic relief to calculate a comprehensive crop index. The model is then trained using a training dataset obtained by associating and combining the training grayscale image, feature set, and comprehensive crop index. Since this embodiment of the application uses a comprehensive crop index calculated based on vegetation index, moisture difference index, texture features, band parameters, and topographic relief when training the crop regional classification model, the classification accuracy of the crop regional classification model is improved.

[0075] According to an embodiment of this application, obtaining training grayscale images of the region to be processed corresponding to different training time periods includes: for each historical time period, removing cloud shadows from multiple initial spectral images within the historical time period to obtain multiple intermediate spectral images; stitching the multiple intermediate spectral images according to the spatial information of the region to be processed to obtain the spectral images of the historical time period; and determining training grayscale images of multiple training time periods based on the spectral images of multiple historical time periods.

[0076] According to an embodiment of this application, historical time periods can be divided by month.

[0077] According to embodiments of this application, multiple initial spectral images in each historical time period can be images with low cloud cover, such as less than 5%, which can be Sentinel-2 multispectral images downloaded from a published website. For each initial spectral image, cloud shadow removal can also be performed using the QA60 quality assessment band. It should be noted that the initial spectral image is a grayscale image, and the cloud shadows on this grayscale image have grayscale values; cloud shadow removal can be achieved based on these grayscale values.

[0078] According to an embodiment of this application, the surface reflectance in the initial spectral image is calculated based on the processing baseline information (including scaling factor and negative offset) in the metafile corresponding to the multispectral image downloaded from the published website. The true value of the surface reflectance is calculated and outliers are removed, thereby obtaining the effective value of the surface reflectance.

[0079] According to an embodiment of this application, multiple intermediate spectral images after removing cloud shadows can be stitched together according to the spatial information of the area to be processed to obtain a spectral image of a historical time period. For example, if there are 5 intermediate spectral images, namely image 1, image 2... image 5, image 1 only contains regions A and B of the area to be processed but not region C, while image 2 contains region B but not regions A and C, image 3 contains region C, image 4 contains regions A and B but not region C, and image 5 contains regions A, B, and C, then they can be stitched together as follows: {image 1 + image 3 + image 2 + image 5 + image 4}. The purpose of the above stitching method is to obtain a complete image of the area to be processed after stitching together 2 or n adjacent images as much as possible.

[0080] According to the embodiments of this application, if multiple complete images are obtained during the stitching process, the average value of the multiple complete images can be processed to obtain the final spectral image of the historical period. For example, image 1 + image 3 = complete image 1, image 2 + image 5 = complete image 2. At this time, the average value of each pixel in complete image 1 and complete image 2 can be calculated to obtain the spectral image of the historical period.

[0081] In another specific embodiment, in order to reduce the complexity of stitching, the images can be stitched directly according to their shooting time.

[0082] According to the embodiments of this application, for spectral images obtained from different historical periods, such as spectral images of 12 months of a certain year, spectral images of some months can be determined from these 12 months of spectral images as training grayscale images for training periods.

[0083] Figure 3 A flowchart is shown of a training method for a crop regional classification model according to another embodiment of this application. Figure 4The spectral band-reflectivity map of region A during different training periods according to an embodiment of this application is shown. Figure 5 The spectral band-reflectivity map of region B during different training periods according to an embodiment of this application is shown.

[0084] According to an embodiment of this application, determining training grayscale images for multiple training periods based on spectral images from multiple historical periods includes: resampling each spectral image to obtain a sampled spectral image, wherein the sampled spectral image includes multiple second pixel values, the second pixel values ​​representing the surface reflectance in different spectral bands; for each historical period, constructing a spectral band-reflectance map based on the multiple second pixel values, wherein the spectral band-reflectance map includes reflectance curves corresponding to different crop areas; and when the mean value of each set of reflectance curves meets a preset threshold, determining the historical period as the training period, and determining the sampled spectral image corresponding to the training period as the training grayscale image.

[0085] According to an embodiment of this application, since the spatial resolution of the current spectral image is low, for example, 50m, the spectral image can be resampled to increase the spatial resolution to a preset resolution, for example, 10m, thereby obtaining a sampled spectral image, such as... Figure 3 As shown.

[0086] According to an embodiment of this application, a spectral band-reflectance map of the spectral image is drawn based on the surface reflectance of different spectral bands in the sampled spectral image. In the spectral band-reflectance map, the horizontal axis represents different spectral bands, and the vertical axis represents surface reflectance. For this spectral band-reflectance map, the mean value of the reflectance curves of different crop areas in the map can be calculated. If the difference between the mean values ​​of different crop areas is greater than a preset threshold (e.g., 0.05), the historical time period corresponding to this spectral band-reflectance map can be determined as the training time period, and the sampled spectral image corresponding to the training time period can be determined as the training grayscale image.

[0087] In one specific embodiment, by targeting region A (e.g. Figure 4 (as shown) and region B (as shown) Figure 5 The spectral images of the 12 months (as shown) are used to construct corresponding spectral band-reflectance maps. The spectral band-reflectance map contains three types of crop areas: orchards, other woodlands, and arbor forests. Based on the mean of the reflectance curves, February, June, and November are determined as training periods, and the sampled spectral images of February, June, and November are determined as training grayscale images.

[0088] According to an embodiment of this application, generating a feature set based on multiple band parameters includes: determining first band parameters of multiple first target bands from the multiple band parameters; calculating a vegetation index and a moisture difference index based on the first band parameters of a portion of the first target bands; calculating a gray-level co-occurrence matrix based on the first band parameters of a portion of the first target bands; and performing texture feature calculation on the gray-level co-occurrence matrix to obtain multiple texture features, wherein the multiple texture features include at least one of uniformity, contrast, dissimilarity, mean, variance, entropy, second moment of angle, and correlation.

[0089] According to embodiments of this application, some band parameters of the spectral band are shown in Table 1:

[0090] Table 1

[0091]

[0092] According to an embodiment of this application, multiple first target bands are determined by the difference in band parameters of different spectral bands in the spectral image as shown in Table 1, for example, by filtering the first target bands using a parameter difference threshold. The first target bands may refer to spectral bands such as B2, B3, B4, B8, B8A, and B11.

[0093] According to the embodiments of this application, referring to Figure 3 The vegetation index is calculated based on the first band parameters of a portion of the first target band. and moisture difference index As shown in formulas (1) and (2):

[0094] (2)

[0095] (3)

[0096] in, , SWIR and R represent the near-infrared band, respectively. The shortwave infrared band (SWIR) and the red band (R) correspond to the near-infrared band of Band 8 in the first target band, respectively. Near-infrared band of Band 8A The band consists of the shortwave infrared band SWIR (Band 11) and the red band R (Band 4). Band can be represented by the letter B.

[0097] According to an embodiment of this application, a gray-level co-occurrence matrix (GLCM) is calculated based on bands with a spatial resolution of 10m in the first target band (e.g., bands B2, B3, B4, and B8). Texture features are calculated on the gray-level co-occurrence matrix to obtain multiple texture features, wherein the multiple texture features include at least one of uniformity, contrast, dissimilarity, mean, variance, entropy, second moment of angle, and correlation.

[0098] According to embodiments of this application, the training period includes a first period, a second period, and a third period.

[0099] According to an embodiment of this application, a comprehensive crop index is generated based on multiple band parameters, vegetation index, moisture difference index, and topographic relief of the area to be treated. This includes: selecting second band parameters from multiple band parameters corresponding to multiple second target bands in a first time period, third band parameters from multiple third target bands corresponding to the second time period, and fourth band parameters from multiple fourth target bands corresponding to the third time period; calculating a first value based on the multiple second band parameters, multiple third band parameters, and multiple fourth band parameters; and generating the comprehensive crop index based on the first value, vegetation index, moisture difference index, and topographic relief.

[0100] According to embodiments of this application, in order to improve the accuracy of distinguishing orchards from easily confused woodlands and other woodland types, embodiments of this application calculate a comprehensive crop index. Using the comprehensive crop index to train the model can improve the accuracy of orchard type identification.

[0101] According to embodiments of this application, based on the specific embodiments shown above, the first time period, the second time period, and the third time period can refer to February, June, and November, respectively. In one specific embodiment, the comprehensive crop index can refer to the comprehensive orchard index.

[0102] According to an embodiment of this application, the second band parameter can be February. and The band parameters for the third band can be June's parameters. and The band parameters for the fourth band can be November. and Band parameters of the band.

[0103] According to the embodiments of this application, referring to Figure 3 A comprehensive crop index is generated based on the first value, vegetation index, moisture difference index, and topographic relief.

[0104] According to an embodiment of this application, a comprehensive crop index is generated based on a first value, a vegetation index, a moisture difference index, and topographic relief. This includes: determining a vegetation index and a moisture difference index corresponding to a fourth time period and a fifth time period, respectively, from multiple feature sets; calculating a second value based on the vegetation index and moisture difference index of any training time period in the fourth or fifth time period, so as to generate a third value based on multiple second values; and generating a comprehensive crop index based on the first value, the third value, and topographic relief.

[0105] According to embodiments of this application, the fourth and fifth time periods may refer to June and September.

[0106] According to embodiments of this application, the comprehensive crop index As shown in formula (4):

[0107] (4)

[0108] Among them, Bi j This indicates the Bi band for month j, such as B86 representing the B8 band for June; NDMI j and NDVI j These represent the monthly average NDMI and NDVI for month j, respectively; RDLS represents the topographic relief. Indicates the first value. and All are the second value. This represents the third numerical value.

[0109] According to an embodiment of this application, training an initial classification model using a training dataset to obtain a trained crop region classification model includes: iteratively performing the following operations: inputting the training dataset into the initial classification model and outputting the prediction type corresponding to different crop regions; calculating the prediction accuracy value based on multiple prediction types and multiple type labels; if the prediction accuracy value does not meet a preset accuracy threshold, adjusting the model parameters of the initial classification model based on the prediction accuracy value and inputting the training dataset into the adjusted initial classification model; if the prediction accuracy value meets the preset accuracy threshold, determining the initial classification model corresponding to the prediction accuracy value as the crop region classification model.

[0110] In one specific embodiment, a support vector machine is used as the initial classification model for illustrative purposes. The preset accuracy threshold can be set according to actual needs, for example, it could be 0.8.

[0111] According to an embodiment of this application, the training dataset is input into the initial classification model, and the predicted type corresponding to different crop areas is output. For example, on the training grayscale image, it can be marked which areas are orchards and which areas are woodlands.

[0112] In one specific embodiment, the basic model of a Support Vector Machine (SVM) is a linear classifier whose goal is to find a hyperplane with the largest margin in the feature space. Specifically, given a training dataset (x, y), where x represents sample features (e.g., {training grayscale image 1, training grayscale image 2, ..., training grayscale image n, feature set, OCI} as described above), and y represents the region type (y∈{-1,1}), where different values ​​can represent different region types, SVM solves for the hyperplane through the following optimization problem:

[0113]

[0114] Where w is the normal vector of the hyperplane, b is the intercept, and α is the Lagrange multiplier. xi represents the i-th sample feature among n sample features, yi is the region type to which the i-th sample feature belongs, and T denotes the transpose. Solving the above optimization problem yields the optimal hyperplane, thus enabling the classification of crop regions.

[0115] According to the embodiments of this application, a prediction accuracy value is calculated based on multiple prediction types and multiple type labels. The prediction accuracy value can be any one of overall accuracy (OA), user accuracy (UA), producer accuracy (PA), and F1 score, as shown in formulas (5) to (8):

[0116] (5)

[0117] (6)

[0118] (7)

[0119] (8)

[0120] Wherein, TP (True Positive, TP) represents the number of pixels that actually belong to an orchard and are correctly identified as an orchard by the classification model; FP (False Positive, FP) represents the number of pixels that actually belong to a non-orchard but are incorrectly identified as an orchard by the model; FN (False Negative, FN) represents the number of pixels that actually belong to an orchard but are incorrectly identified as a non-orchard by the classification model; and TN (True Negative, TN) represents the number of pixels that actually belong to a non-orchard and are correctly identified as a non-orchard by the classification model.

[0121] According to an embodiment of this application, if the prediction accuracy value does not meet the preset accuracy threshold, the model parameters of the initial classification model are adjusted according to the prediction accuracy value, and the training dataset is input into the adjusted initial classification model; if the prediction accuracy value meets the preset accuracy threshold, the initial classification model corresponding to the prediction accuracy value is determined as the crop region classification model.

[0122] In one specific embodiment, to fully verify the effect of the Crops Comprehensive Index (OCI) on orchard extraction, this embodiment set up 5 sets of experiments. By inputting different feature combinations, using the same training method and classification method, the effect of the OCI index was compared and illustrated. The input features for the 5 sets of experiments are as follows:

[0123] (1) OCI index + GLCM texture;

[0124] (2) OCI index + GLCM texture + April B2 / B3 / B4 / B11 + September B6 / B7 / B8 / B8A;

[0125] (3) OCI index + GLCM texture + April B2 / B3 / B4 / B11 + September B6 / B7 / B8A + February B2 / B3 / B4 / B5 / B6 / B7 / B8 / B8A / B11 + June B2 / B3 / B4 / B11 / B6 / B7 / B8A / B11 / B12 + November B2 / B3 / B4 / B5 / B6 / B7 / B8 / B8A / B11 + NDVI and NDMI for months other than June and September;

[0126] (4) GLCM+April B2 / B3 / B4 / B11+September B6 / B7 / B8A+February, June, November B2 / B3 / B4 / B5 / B6 / B7 / B8 / B8A / B11 / B12+January-December NDVI / NDMI+RDLS;

[0127] (5) GLCM+April B2 / B3 / B4 / B11+September B6 / B7 / B8 / B8A.

[0128] The addition of GLCM texture features in group (1) is due to the fact that the OCI index was constructed based only on the differences between orchards and woodlands, and other woodlands, and the distinction between orchards and cultivated land, water bodies, etc. was not significant. Therefore, by adding GLCM information, the orchards and cultivated land categories were distinguished. The comparison of experiments in groups (1) to (5) shows that the OCI index has a relatively accurate recognition effect on orchard extraction under different input information levels.

[0129] In one specific embodiment, to further improve the accuracy of the model, irrelevant land types, such as houses and infrastructure, can be removed from the training grayscale images. At the same time, the training grayscale images can be adjusted during the training process. Specifically, if the predicted type for a certain crop area is inconsistent with the actual type label, the surface emissivity and type label can be appropriately reduced in the training grayscale images. For areas that should be predicted but for which the model does not have a corresponding predicted type, the type label and surface reflectivity of the area can be appropriately increased in the training grayscale images, thereby improving the prediction accuracy of the model.

[0130] Figure 6 A flowchart of a crop region type classification method according to an embodiment of this application is shown.

[0131] like Figure 6 As shown, the crop regional type classification method includes operations S601 to S603:

[0132] In operation S601, the target dataset of the area to be predicted for the corresponding target time period and the reference grayscale image of the corresponding reference time period are obtained. The target dataset includes the target grayscale image, the feature set and the regional comprehensive index. The feature set includes the main regional comprehensive index as well as the auxiliary vegetation index, moisture difference index and multiple texture features. The regional comprehensive index is generated based on the unprocessed band parameters of multiple band spectra in the target grayscale image, the feature set and the topographic relief of the area to be predicted.

[0133] In operation S602, the spectral angle information between the target grayscale image and the reference grayscale image is calculated based on the spectral angle distance algorithm.

[0134] In operation S603, if the spectral angle information meets the preset spectral angle threshold, the target dataset is input into the crop region classification model corresponding to the reference grayscale image, and the predicted region type information of different regions in the region to be predicted is output.

[0135] According to embodiments of this application, a feature set and a regional comprehensive index are calculated using the same computational method as the training method, thereby obtaining the target dataset for the region to be predicted. The preset spectral angle threshold can be set according to specific circumstances, for example, 0.3.

[0136] According to an embodiment of this application, based on a spectral angle distance algorithm, the spectral angle information between the target grayscale image and the reference grayscale image is calculated. If the spectral angle information meets a preset spectral angle threshold, the target dataset is input into a crop region classification model corresponding to the reference grayscale image, and the predicted region type information for different regions in the region to be predicted is output. The spectral angle information... Calculations are performed using formula (9):

[0137] (9)

[0138] Where A represents the reference grayscale image of the reference time period, B represents the target grayscale image of the target time period, n is the number of pixels in the reference grayscale image or the target grayscale image, and the number of pixels in the two are equal, and As and Bs are the s-th pixel of the reference time period and the s-th pixel of the target time period, respectively.

[0139] According to an embodiment of this application, when the spectral angle information is less than a preset spectral angle threshold, the target dataset is input into a crop region classification model corresponding to a reference grayscale image. When the crop region classification model processes the target dataset, it uses the regional comprehensive index as the most important feature. For example, when classifying, the regional comprehensive index is used as the main feature, while the vegetation index, moisture difference index, and multiple texture features are only used as some secondary features that provide auxiliary assistance. This makes the predicted region type information of different regions in the region to be predicted output by the crop region classification model more accurate.

[0140] According to embodiments of this application, a crop regional classification model is obtained by calculating vegetation index, moisture difference index, and multiple texture features based on band parameters of different spectral bands in a training grayscale image, and by combining multiple band parameters and topographic relief to calculate a comprehensive crop index. The model is then trained using a training dataset obtained by associating and combining the training grayscale image, feature set, and comprehensive crop index. Since this embodiment of the application uses a comprehensive crop index calculated based on vegetation index, moisture difference index, texture features, band parameters, and topographic relief when training the crop regional classification model, the classification accuracy of the crop regional classification model is improved.

[0141] According to an embodiment of this application, the crop region type classification method further includes: when the spectral angle information does not meet the preset spectral angle threshold, using the input dataset to train the crop region classification model to obtain an updated crop region classification model.

[0142] According to an embodiment of this application, if the spectral angle information does not meet the preset spectral angle threshold, it indicates that the crop region classification model is not suitable for predicting the region to be predicted. In this case, the crop region classification model can be trained based on the training dataset of the region to be predicted to obtain an updated crop region classification model.

[0143] Figure 7 A block diagram of a training apparatus for a crop regional classification model according to an embodiment of this application is shown.

[0144] like Figure 7As shown, the training device 700 for the crop regional classification model includes a first acquisition module 710, a first generation module 720, a second generation module 730, an acquisition module 740, and a training module 750.

[0145] The first acquisition module 710 is used to acquire training grayscale images of the area to be processed corresponding to different training periods. The training grayscale images are marked with type labels corresponding to different crop areas, and the first pixel value on the training grayscale images represents the band parameters and surface reflectance of different spectral bands.

[0146] The first generation module 720 is used to generate a feature set for each training grayscale image based on multiple band parameters. The feature set includes vegetation index, moisture difference index and multiple texture features.

[0147] The second generation module 730 is used to generate a comprehensive crop index based on multiple band parameters, vegetation index, moisture difference index and topographic relief of the area to be processed.

[0148] The module 740 is used to perform association and combination operations on multiple training grayscale images, feature sets, and crop comprehensive indices to obtain a training dataset.

[0149] The training module 750 is used to train the initial classification model using the training dataset to obtain a trained crop region classification model.

[0150] According to embodiments of this application, a crop regional classification model is obtained by calculating vegetation index, moisture difference index, and multiple texture features based on band parameters of different spectral bands in a training grayscale image, and by combining multiple band parameters and topographic relief to calculate a comprehensive crop index. The model is then trained using a training dataset obtained by associating and combining the training grayscale image, the feature set, and the comprehensive crop index. Since this embodiment of the application uses a comprehensive crop index calculated based on vegetation index, moisture difference index, texture features, band parameters, and topographic relief when training the crop regional classification model, the classification accuracy and efficiency of the crop regional classification model are improved.

[0151] According to an embodiment of this application, the first acquisition module 710 includes a removal unit, a splicing unit, and a first determination unit.

[0152] The removal unit is used to remove cloud shadows from multiple initial spectral images within each historical period to obtain multiple intermediate spectral images.

[0153] The stitching unit is used to stitch together multiple intermediate spectral images according to the spatial information of the area to be processed, so as to obtain spectral images of historical time periods.

[0154] The first determining unit is used to determine the training grayscale images for multiple training periods based on the spectral images of multiple historical periods.

[0155] According to an embodiment of this application, the determining unit includes a sampling subunit, a construction subunit, and a first determining subunit.

[0156] The sampling subunit is used to resample each spectral image to obtain a sampled spectral image, wherein the sampled spectral image includes multiple second pixel values, which represent the surface reflectance in different spectral bands.

[0157] The sub-unit is used to construct a spectral band-reflectance map for each historical time period based on multiple second pixel values. The spectral band-reflectance map includes reflectance curves corresponding to different crop regions.

[0158] The first determining subunit is used to determine the historical time period as the training time period when the mean value of each set of reflectance curves meets the preset threshold, and to determine the sampled spectral image corresponding to the training time period as the training grayscale image.

[0159] According to an embodiment of this application, the first generation module 720 includes a second determining unit, a first calculation unit, a second calculation unit, and a third calculation unit.

[0160] The second determining unit is used to determine the first band parameters of multiple first target bands from multiple band parameters.

[0161] The first calculation unit is used to calculate the vegetation index and the moisture difference index based on the first band parameters of a portion of the first target band.

[0162] The second calculation unit is used to calculate the gray-level co-occurrence matrix based on the first band parameters of a portion of the first target band.

[0163] The third computational unit is used to perform texture feature calculation on the gray-level co-occurrence matrix to obtain multiple texture features, which include at least one of uniformity, contrast, dissimilarity, mean, variance, entropy, second moment of angle and correlation.

[0164] According to embodiments of this application, the training period includes a first period, a second period, and a third period;

[0165] According to an embodiment of this application, the second generation module 730 includes a filtering unit, a fourth calculation unit, and a generation unit.

[0166] The filtering unit is used to filter from multiple band parameters the second band parameters of multiple second target bands corresponding to the first time period, the third band parameters of multiple third target bands corresponding to the second time period, and the fourth band parameters of multiple fourth target bands corresponding to the third time period.

[0167] The fourth calculation unit is used to calculate the first value based on multiple second-band parameters, multiple third-band parameters, and multiple fourth-band parameters.

[0168] The generation unit is used to generate a comprehensive crop index based on the first value, vegetation index, moisture difference index, and topographic relief.

[0169] According to an embodiment of this application, the generation unit includes a second determining subunit, a calculation subunit, and a generation subunit.

[0170] The second determining subunit is used to determine the vegetation index and moisture difference index corresponding to the fourth and fifth time periods, respectively, from multiple feature sets.

[0171] The calculation subunit is used to calculate a second value based on the vegetation index and moisture difference index of any training period in the fourth or fifth time period, so as to generate a third value based on multiple second values.

[0172] The generating sub-unit is used to generate a comprehensive crop index based on the first value, the third value, and the terrain relief.

[0173] According to an embodiment of this application, the training module 750 includes a prediction unit, a fifth calculation unit, an adjustment unit, and a third determination unit.

[0174] The prediction unit is used to input the training dataset into the initial classification model and output the prediction type corresponding to different crop regions.

[0175] The fifth calculation unit is used to calculate the prediction accuracy value based on multiple prediction types and multiple type labels.

[0176] The adjustment unit is used to adjust the model parameters of the initial classification model according to the prediction accuracy value when the prediction accuracy value does not meet the preset accuracy threshold, and input the training dataset into the adjusted initial classification model.

[0177] The third determining unit is used to determine the initial classification model corresponding to the prediction accuracy value as the crop regional classification model when the prediction accuracy value meets the preset accuracy threshold.

[0178] Figure 8 A block diagram of a crop region type classification device according to an embodiment of this application is shown.

[0179] like Figure 8 As shown, the crop region type classification device 800 includes a second acquisition module 810, a calculation module 820, and a prediction module 830.

[0180] The second acquisition module 810 is used to acquire the target dataset of the area to be predicted for the corresponding target time period and the reference grayscale image of the corresponding reference time period. The target dataset includes the target grayscale image, the feature set and the regional comprehensive index. The feature set includes the vegetation index, the moisture difference index and multiple texture features. The regional comprehensive index is generated based on the unprocessed band parameters of multiple band spectra in the target grayscale image, the feature set and the topographic relief of the area to be predicted.

[0181] The calculation module 820 is used to calculate the spectral angle information between the target grayscale image and the reference grayscale image based on the spectral angle distance algorithm.

[0182] The prediction module 830 is used to input the target dataset into the crop region classification model corresponding to the reference grayscale image when the spectral angle information meets the preset spectral angle threshold, and output the predicted region type information of different regions in the region to be predicted.

[0183] According to embodiments of this application, a crop regional classification model is obtained by calculating vegetation index, moisture difference index, and multiple texture features based on band parameters of different spectral bands in a training grayscale image, and by combining multiple band parameters and topographic relief to calculate a comprehensive crop index. The model is then trained using a training dataset obtained by associating and combining the training grayscale image, the feature set, and the comprehensive crop index. Since this embodiment of the application uses a comprehensive crop index calculated based on vegetation index, moisture difference index, texture features, band parameters, and topographic relief when training the crop regional classification model, the classification accuracy and efficiency of the crop regional classification model are improved.

[0184] According to an embodiment of this application, the crop region type classification device 800 further includes a retraining module.

[0185] The retraining module is used to train the crop region classification model using the input dataset when the spectral angle information does not meet the preset spectral angle threshold, so as to obtain an updated crop region classification model.

[0186] Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be at least partially implemented as hardware circuits, such as field-programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits (ASICs), or implemented by hardware or firmware in any other reasonable manner by integrating or packaging circuits, or implemented in any one of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, one or more of the modules, submodules, units, and subunits according to the embodiments of this application can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.

[0187] It should be noted that the training device and crop region type classification device of the crop region classification model in the embodiments of this application correspond to the training method and crop region type classification method of the crop region classification model in the embodiments of this application. For a detailed description of the training device and crop region type classification device of the crop region classification model, please refer to the training method and crop region type classification method of the crop region classification model, which will not be repeated here.

[0188] Figure 9 A block diagram of an electronic device suitable for implementing the methods described above, according to an embodiment of this application, is shown. Figure 9 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0189] like Figure 9 As shown, an electronic device 900 according to an embodiment of this application includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.

[0190] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 902 and / or RAM 903. It should be noted that the programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.

[0191] According to embodiments of this application, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.

[0192] According to embodiments of this application, the method flow according to embodiments of this application can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by processor 901, it performs the functions defined in the system of embodiments of this application. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0193] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.

[0194] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0195] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this application. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the methods provided in the embodiments of this application.

[0196] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0197] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0198] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0199] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. This application does not depart from its scope, and those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.

Claims

1. A training method for a crop regional classification model, characterized in that, include: Acquire training grayscale images of the area to be processed corresponding to different training time periods, wherein the training grayscale images are marked with type labels corresponding to different crop areas, and the first pixel value on the training grayscale images represents the band parameters and surface reflectance of different spectral bands; For each of the training grayscale images, a feature set is generated based on multiple band parameters, wherein the feature set includes vegetation index, moisture difference index and multiple texture features; A comprehensive crop index is generated based on multiple band parameters, the vegetation index, the moisture difference index, and the topographic relief of the area to be processed. A training dataset is obtained by performing association and combination operations on multiple training grayscale images, the feature set, and the comprehensive crop index. The initial classification model is trained using the training dataset to obtain a trained crop regional classification model.

2. The method according to claim 1, characterized in that, Obtain training grayscale images of the region to be processed corresponding to different training time periods, including: For each historical time period, cloud shadows are removed from multiple initial spectral images within that historical time period to obtain multiple intermediate spectral images; Multiple intermediate spectral images are stitched together according to the spatial information of the area to be processed to obtain the spectral image of the historical time period. Training grayscale images for multiple training periods are determined based on spectral images of multiple historical periods.

3. The method according to claim 2, characterized in that, Determining training grayscale images for multiple training periods based on spectral images from multiple historical time periods includes: Each of the spectral images is resampled to obtain a sampled spectral image, wherein the sampled spectral image includes multiple second pixel values, and the second pixel values ​​represent the surface reflectance in different spectral bands; For each historical time period, a spectral band-reflectance map is constructed based on multiple second pixel values, wherein the spectral band-reflectance map includes reflectance curves corresponding to different crop regions; If the mean value of each set of reflectance curves meets the preset threshold, the historical time period is determined as the training time period, and the sampled spectral image corresponding to the training time period is determined as the training grayscale image.

4. The method according to claim 1, characterized in that, Based on multiple band parameters, a feature set is generated, including: First band parameters of multiple first target bands are determined from multiple band parameters; The vegetation index and the moisture difference index are calculated based on the first band parameters of a portion of the first target band. Calculate the gray-level co-occurrence matrix based on the first band parameters of a portion of the first target band; Texture features are calculated on the gray-level co-occurrence matrix to obtain multiple texture features, wherein the multiple texture features include at least one of uniformity, contrast, dissimilarity, mean, variance, entropy, second moment of angle and correlation.

5. The method according to claim 1 or 4, characterized in that, The training periods include a first period, a second period, and a third period; The comprehensive crop index is generated based on multiple band parameters, the vegetation index, the moisture difference index, and the topographic relief of the area to be processed, including: Select from the multiple band parameters the second band parameters of multiple second target bands corresponding to the first time period, the third band parameters of multiple third target bands corresponding to the second time period, and the fourth band parameters of multiple fourth target bands corresponding to the third time period; The first value is calculated based on a plurality of second band parameters, a plurality of third band parameters, and a plurality of fourth band parameters; The comprehensive crop index is generated based on the first value, the vegetation index, the moisture difference index, and the topographic relief.

6. The method according to claim 5, characterized in that, Based on the first value, the vegetation index, the moisture difference index, and the topographic relief, the comprehensive crop index is generated, including: The vegetation index and moisture difference index corresponding to the fourth and fifth time periods are determined from multiple feature sets, respectively; For any training period in the fourth or fifth time period, a second value is calculated based on the vegetation index and moisture difference index of the training period, and a third value is generated based on multiple second values. The comprehensive crop index is generated based on the first value, the third value, and the terrain undulation.

7. The method according to claim 1, characterized in that, The initial classification model is trained using the training dataset to obtain a trained crop region classification model, including: Perform the following operations iteratively: The training dataset is input into the initial classification model, which outputs the prediction type corresponding to different crop regions. Calculate the prediction accuracy value based on the multiple prediction types and the multiple type labels; If the prediction accuracy value does not meet the preset accuracy threshold, the model parameters of the initial classification model are adjusted according to the prediction accuracy value, and the training dataset is input into the adjusted initial classification model. If the prediction accuracy value meets the preset accuracy threshold, the initial classification model corresponding to the prediction accuracy value is determined as the crop regional classification model.

8. A method for classifying regional types of crops, characterized in that, include: Obtain the target dataset of the region to be predicted for the corresponding target time period and the reference grayscale image of the corresponding reference time period. The target dataset includes the target grayscale image, the feature set, and the regional comprehensive index. The feature set includes the vegetation index, the moisture difference index, and multiple texture features. The regional comprehensive index is generated based on the unprocessed band parameters of multiple band spectra in the target grayscale image, the feature set, and the topographic relief of the region to be predicted. Based on the spectral angle distance algorithm, the spectral angle information between the target grayscale image and the reference grayscale image is calculated; When the spectral angle information meets the preset spectral angle threshold, the target dataset is input into the crop region classification model corresponding to the reference grayscale image, and the predicted region type information of different regions in the region to be predicted is output, wherein the crop region classification model is trained by the method according to any one of claims 1 to 7.

9. The method according to claim 8, characterized in that, Also includes: If the spectral angle information does not meet the preset spectral angle threshold, the crop region classification model is trained using the input dataset to obtain an updated crop region classification model.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 9.