Fine classification method and device for crops and medium
通过结合决策树模型和样本迁移思想的农作物精细分类方法,解决了现有技术中农作物分类精度不高的问题,实现了更高的分类精度和更少的漏判误判,适用于大尺度应用场景。
Patent Information
- Application Number
- CN202510598929.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-05-09
AI Technical Summary
The prior art has low classification accuracy, missed judgment or misjudgment in crop classification, especially in crop classification under different regions and time conditions.
A crop fine classification method combining decision tree model and sample migration idea is adopted. By randomly uniformly extracting sample data sets from historical data sets and current data sets, a random forest machine learning algorithm is used to sort the importance of preselected elements, multiple preselected classifiers are generated, and finally the final classifier is generated through rules for classification.
It improves the accuracy and convenience of crop classification results, can be promoted in large-scale application scenarios, and reduces the situation of missed judgments and misjudgments.
Smart Images

Figure CN120126010A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crop classification, and more specifically, to a method, device and medium for fine classification of crops. Background Art
[0002] Remote sensing technology has the advantages of macroscopicity, timeliness and accuracy, and has become an important means of extracting agricultural information. Studies have shown that satellite spectral information can separate different crops. At present, the classification of crops, especially major food crops such as rice, wheat, and corn, and major oil crops such as peanuts and soybeans, usually adopts traditional machine learning classification methods. Due to the influence of geographical and temporal differences, not only is the classification accuracy of different crops limited, but the same crop may also be missed or misjudged due to the solidification of samples. Summary of the invention
[0003] In view of the deficiencies of the prior art, the present invention provides a method, device and medium for fine classification of crops.
[0004] According to one aspect of the present invention, a method for fine classification of crops is provided, comprising: A sample data set is randomly and uniformly extracted from the historical data set and the current data set of crops, wherein the sample data set includes: a source domain sample data set and a target domain sample data set, and the historical data set and the current data set are high-resolution satellite data; Using the random forest machine learning algorithm, the importance of pre-selected elements is sorted according to the source domain sample data set and the target domain sample data set to obtain the important element set; The sample data set is randomly sampled and grouped to generate M groups of sample data subsets, and the decision tree model is used to learn the M groups of sample data subsets and the target domain sample data set according to the important feature set to generate M+1 pre-selected classifiers; Generate a final classifier based on M+1 pre-selected classifiers using pre-set rules and important feature sets; The data to be classified is classified according to the final classifier to obtain the classification result of the current data set, where the data to be classified is the current data set minus the target domain sample data set.
[0005] Optionally, sample data sets are randomly and uniformly extracted from the historical data sets and current data sets of crops, including: Randomly and evenly extract historical sample data from the historical data set as the source domain sample data set; Randomly and uniformly extract the current data sample data set from the current data set as the target domain sample data set; A sample data set is determined according to a source domain sample data set and a target domain sample data set.
[0006] Optionally, the preselected elements include: band data, as well as vegetation and water indices, where The band data includes: red light band R, green light band G, blue light band B, and near-infrared band NIR; The vegetation and water indices include: normalized difference vegetation index NDVI, enhanced vegetation index EVI, soil-adjusted vegetation index SAVI, greenness index GI, difference vegetation index DVI, green vegetation index GVI, green normalized difference vegetation index GNDVI, and normalized difference water index NDWI.
[0007] Optionally, the M + 1 preselected classifiers include: preselected classifiers corresponding to M subsets of sample data and a preselected classifier corresponding to the target domain sample data set , and using preset rules and an important element set, a final classifier is generated according to the M + 1 preselected classifiers, including: Step 1: Calculate the classification accuracy of each preselected classifier in the M + 1 preselected classifiers D for the target domain sample data set and arrange them in descending order to obtain the sorted classification accuracy ; Step 2: Initialize parameters, where the initialized parameters include: accuracy threshold ; the first intermediate classifier ; the second intermediate classifier: ; m = 1, m ≤ M; Step 3: Perform iterative loop based on the initialized parameters and output the second intermediate classifier ; Step 4: Let the final classifier , the new prediction accuracy , reduce the last element in, to get the new , return to Step 1, if is greater than , update the final classifier and the new prediction accuracy , until the number of important elements in is less than 5 to end the iteration, and output the final classifier .
[0008] Optionally, Step 3: Perform iterative loop based on the initialized parameters and output the second intermediate classifier includes: Step 1): Update the parameter m = m + 1; Step 2): Update the first intermediate classifier ; Step 3): Use the first intermediate classifier to respectively predict the target domain sample dataset S t , and obtain multiple predicted classification results; Step 4): Use a voting method to determine the classification result according to multiple predicted classification results and calculate the voting prediction accuracy; Step 5): If the voting prediction accuracy , then update , ; Step 6): Return to Step 1) for iterative calculation. When m > M, end the loop and obtain the second intermediate classifier .
[0009] According to another aspect of the present invention, there is provided a fine classification device for crops, including: An extraction module, configured to randomly and uniformly extract a sample dataset from the historical dataset and the current dataset of crops, where the sample dataset includes: a source domain sample dataset and a target domain sample dataset, and the historical dataset and the current dataset are high-resolution satellite data; An acquisition module, configured to use the random forest machine learning algorithm to rank the importance of preselected features according to the source domain sample dataset and the target domain sample dataset, and obtain an important feature set; A first generation module, configured to randomly sample and group the sample dataset to generate M groups of sample data subsets, and use a decision tree model to respectively learn the M groups of sample data subsets and the target domain sample dataset according to the important feature set, and generate M + 1 preselected classifiers; A second generation module, configured to generate a final classifier according to the M + 1 preselected classifiers by using a preset rule and the important feature set; A classification module, configured to classify the data to be classified according to the final classifier to obtain the classification result of the current dataset, where the data to be classified is the current dataset excluding the target domain sample dataset.
[0010] According to still another aspect of the present invention, there is provided a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.
[0011] According to still another aspect of the present invention, there is provided an electronic device, where the electronic device includes: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.
[0012] Therefore, the present invention combines the decision tree model and the sample migration idea to construct a fine classification method for crops. First, historical data samples and current data samples are extracted; band data, vegetation, and water body index elements are selected, and all samples are used to rank the importance of the elements, and an important element set of more than 5% is selected; all samples of the important elements of more than 5% are randomly sampled and grouped, and multiple pre-classifiers are learned using the decision tree; for the multiple pre-classifiers that have been generated, the current data samples are used to generate the final classifier according to the rules; according to the final classifier, the current data is classified. Compared with the prior art, the present invention can not only improve the accuracy and convenience of the classification result, but also be promoted in large-scale application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The exemplary embodiments of the present invention can be more fully understood by referring to the following drawings: Figure 1 FIG. is a schematic flowchart of a fine classification method for crops provided by an exemplary embodiment of the present invention; Figure 2 FIG. is a schematic structural diagram of a fine classification device for crops provided by an exemplary embodiment of the present invention; Figure 3 FIG. is the structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0014] Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention. It should be understood that the present invention is not limited by the exemplary embodiments described herein.
[0015] It should be noted that: unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps described in these embodiments do not limit the scope of the present invention.
[0016] Those skilled in the art can understand that the terms "first", "second", etc. in the embodiments of the present invention are only used to distinguish different steps, devices, or modules, etc., and neither represent any specific technical meaning nor indicate an inevitable logical order between them.
[0017] It should also be understood that in the embodiments of the present invention, "a plurality" may refer to two or more, and "at least one" may refer to one, two, or more.
[0018] It should also be understood that for any component, data, or structure mentioned in the embodiments of the present invention, unless otherwise clearly defined or given a contrary indication in the context, it can generally be understood as one or more.
[0019] In addition, the term "and / or" in the present invention is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, both A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present invention generally represents an "or" relationship between the associated objects before and after.
[0020] It should also be understood that the description of each embodiment of the present invention emphasizes the differences between the embodiments. The same or similar parts can be referred to each other. For the sake of brevity, they will not be elaborated one by one.
[0021] Meanwhile, it should be understood that, for the sake of description convenience, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0022] The following description of at least one exemplary embodiment is actually merely illustrative and in no way restrictive of the present invention and its application or use.
[0023] Well-known technologies, methods, and devices for those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and devices should be regarded as part of the specification.
[0024] It should be noted that: like reference numerals and letters denote like items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further discussed in subsequent figures.
[0025] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate together with many other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, and so on.
[0026] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system-executable instructions (such as program modules) executed by a computer system. Generally, program modules can include routines, programs, target programs, components, logics, data structures, etc., which perform specific tasks or implement specific abstract data types. The computer system / server can be implemented in a distributed cloud computing environment where tasks are executed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0027] Exemplary method Figure 1 is a schematic flowchart of a method for fine classification of crops provided by an exemplary embodiment of the present invention. This embodiment can be applied to an electronic device, such as Figure 1 As shown, the method 100 for fine classification of crops includes the following steps: Step 101, randomly and uniformly extract a sample data set from the historical data set and the current data set of crops, where the sample data set includes: a source domain sample data set and a target domain sample data set, and the historical data set and the current data set are high-resolution satellite data; Step 102, use the random forest machine learning algorithm to rank the importance of preselected features according to the source domain sample data set and the target domain sample data set, and obtain an important feature set; Step 103, randomly sample and group the sample data set to generate M groups of sample data subsets, and use the decision tree model to learn from the M groups of sample data subsets and the target domain sample data set respectively according to the important feature set to generate M + 1 preselected classifiers; Step 104, use a preset rule to generate a final classifier according to the M + 1 preselected classifiers; Step 105, classify the data to be classified according to the final classifier to obtain the classification result of the current data set, where the data to be classified is the current data set excluding the target domain sample data set.
[0028] Specifically, in order to quickly, efficiently, and accurately classify crops and not be limited to the crop categories in the original sample data set, the present invention proposes the idea of combining the decision tree model of optimal features and sample migration to construct a set of methods for fine classification of crops.
[0029] To achieve the above object, the fine classification method of crops of the present invention requires the use of medium and high-resolution data (Landsat data). The specific steps are as follows: 1) First, extract historical data samples and current data samples; 2) Select band data, vegetation, and water body index elements, use all samples to rank the importance of the elements, and select elements above 5%; 3) Randomly sample and group all samples of elements above 5%, and use decision trees to learn multiple pre-classifiers; 4) For the multiple pre-classifiers that have been generated, use the current data samples to generate the final classifier according to the rules; 5) Classify the current data according to the final classifier. The specific implementation is as follows: 1) Using field survey data, historical satellite data combined with high-resolution Google Earth images, randomly and evenly extract the historical data sample dataset, that is, the source domain sample dataset: ; Using the current satellite data combined with high-resolution Google Earth images, randomly and evenly extract the current data sample dataset, that is, the target domain sample dataset: ; Compose the sample dataset ; 2) Select preset elements, including: band data, vegetation, and water body index elements , use the random forest machine learning algorithm, and use all samples to rank the importance of the elements, and select elements with more than 5% of the elements as the important element set ; Among them, the band data (4) includes the red light band (R), the green light band (G); the blue light band (B), the near-infrared wave (NIR); the vegetation and water body index (8) includes: the normalized difference vegetation index (NDVI), the enhanced vegetation index (EVI), the soil-adjusted vegetation index (SAVI), the greenness index (GI), the difference vegetation index (DVI), the green vegetation index (GVI), the green normalized difference vegetation index (GNDVI), the normalized difference water index (NDWI); define the formula: Normalized difference vegetation index (NDVI): ; Enhanced vegetation index (EVI): ; Soil-adjusted vegetation index (SAVI): ; Greenness index (GI): ; Difference vegetation index (DVI): ; Green vegetation index (GVI): ; Green normalized difference vegetation index (GNDVI): ; Normalized Difference Water Index (NDWI): .
[0030] 3) For the important feature set All samples Perform random sampling and grouping , and use the Decision Tree Model (DTM) to learn X respectively to generate M pre-classifiers ; Use the decision tree model to learn the target domain sample data set to generate a classifier ; Update ; 4) Based on the generated M + 1 pre-classifiers , use rules to generate the final classifier and prediction accuracy , the rules are as follows: (1) Use the in step 3) to calculate the classification accuracy of each pre-classifier in D for the target domain sample data set and sort them in descending order ; (2) Initialize the accuracy threshold: ; Intermediate classifier 1: ; Intermediate classifier 2: ; m = 1, m ≤ M; (3) Loop the following process : a, m = m + 1, m ≤ M; b, Update ; c, Use each classifier to predict the target domain sample data set S t d, Adopt a voting method to determine the classification result based on multiple prediction classification results and calculate the voting prediction accuracy ; e, If the voting prediction accuracy , then update , ; f, Return to a.
[0031] (4) After the loop ends, obtain the intermediate classifier 2 ; (5) , , reduce the last element in, to get the new , repeat (1)-(4), if Greater than , update and , until the number of elements is less than 5 to end all iterations.
[0032] 5) According to 4), the final classifier classifies the data outside the current sample data.
[0033] Therefore, the present invention combines a decision tree model and a sample transfer idea to construct a fine classification method for crops. First, historical data samples and current data samples are extracted; band data, vegetation, and water body index elements are selected, and all samples are used to rank the importance of the elements, and elements with more than 5% are selected; all samples of elements with more than 5% are randomly sampled and grouped, and a decision tree is used to learn multiple pre-classifiers; for the multiple pre-classifiers that have been generated, the current data samples are used to generate the final classifier according to the rules; according to the final classifier, the current data is classified. Compared with the prior art, the present invention can not only improve the accuracy and convenience of the classification results, but also be promoted in large-scale application scenarios.
[0034] Therefore, the present invention combines a decision tree model and a sample transfer idea to construct a fine classification method for crops. First, historical data samples and current data samples are extracted; band data, vegetation, and water body index elements are selected, and all samples are used to rank the importance of the elements, and elements with more than 5% are selected; all samples of elements with more than 5% are randomly sampled and grouped, and a decision tree is used to learn multiple pre-classifiers; for the multiple pre-classifiers that have been generated, the current data samples are used to generate the final classifier according to the rules; according to the final classifier, the current data is classified. Compared with the prior art, the present invention can not only improve the accuracy and convenience of the classification results, but also be promoted in large-scale application scenarios.
[0035] Exemplary device Figure 2 is a schematic structural diagram of a fine classification device for crops provided by an exemplary embodiment of the present invention. As Figure 2 shown, the device 200 includes: An extraction module 210, configured to randomly and uniformly extract a sample data set from a historical data set and a current data set of crops, where the sample data set includes: a source domain sample data set and a target domain sample data set, and the historical data set and the current data set are high-resolution satellite data; An acquisition module 220, configured to use a random forest machine learning algorithm to rank the importance of preselected elements according to the source domain sample data set and the target domain sample data set, and obtain an important element set; The first generation module 230 is configured to randomly sample and group the sample data set to generate M subsets of sample data, and use a decision tree model to learn from the M subsets of sample data and the target domain sample data set respectively according to the important feature set to generate M+1 pre-classifiers; The second generation module 240 is configured to generate a final classifier according to the M+1 pre-classifiers by using a preset rule and the important feature set; The classification module 250 is configured to classify the data to be classified according to the final classifier to obtain the classification result of the current data set, where the data to be classified is the current data set excluding the target domain sample data set.
[0036] Optionally, the extraction module 210 includes: The first extraction sub-module is configured to randomly and uniformly extract historical sample data from the historical data set as the source domain sample data set; The second extraction sub-module is configured to randomly and uniformly extract the current data sample data set from the current data set as the target domain sample data set; The determination sub-module is configured to determine the sample data set according to the source domain sample data set and the target domain sample data set.
[0037] Optionally, the preselected features include: band data and vegetation and water body indices, where The band data includes: red light band R, green light band G, blue light band B, and near-infrared band NIR; The vegetation and water body indices include: normalized difference vegetation index NDVI, enhanced vegetation index EVI, soil-adjusted vegetation index SAVI, greenness index GI, difference vegetation index DVI, green vegetation index GVI, green normalized difference vegetation index GNDVI, and normalized difference water index NDWI.
[0038] Optionally, the M+1 pre-classifiers include: the pre-classifiers corresponding to the M subsets of sample data and the pre-classifier corresponding to the target domain sample data set and The second generation module 240 includes: Step 1: Calculate the classification accuracy of each pre-classifier in the M+1 pre-classifiers D for the target domain sample data set and sort them in descending order to obtain the sorted classification accuracy ; Step 2: Initialize parameters, where the initialized parameters include: accuracy threshold ; the first intermediate classifier ; the second intermediate classifier: ; m = 1, m ≤ M; Step 3: Perform iterative loop based on the initialization parameters and output the second intermediate classifier ; Step 4: Let the final classifier and the new prediction accuracy Reduce the last element in to obtain a new Return to Step 1. If is greater than update the final classifier and the new prediction accuracy until the number of important elements in .
[0039] Optionally, Step 3: Perform iterative loop based on the initialization parameters and output the second intermediate classifier includes: Step 1): Update the parameter m = m + 1; Step 2): Update the first intermediate classifier ; Step 3): Use each preselected classifier in the first intermediate classifier to predict the target domain sample dataset S t respectively to obtain multiple prediction classification results; Step 4): Determine the classification result by voting according to multiple prediction classification results and calculate the voting prediction accuracy; Step 5): If the voting prediction accuracy then update , ; Step 6): Return to Step 1) for iterative calculation. When m > M, end the loop to obtain the second intermediate classifier .
[0040] Exemplary electronic device Figure 3 is the structure of the electronic device provided by an exemplary embodiment of the present invention. As Figure 3 shown, the electronic device 30 includes one or more processors 31 and a memory 32.
[0041] The processor 31 can be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device to perform desired functions.
[0042] The memory 32 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage media, and the processor 31 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may further include: an input device 33 and an output device 34, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0043] In addition, the input device 33 may further include, for example, a keyboard, a mouse, and the like.
[0044] The output device 34 may output various information to the outside. The output device 34 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, and the like.
[0045] Of course, for simplicity, Figure 3 only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application scenarios, the electronic device may further include any other appropriate components.
[0046] Exemplary computer program product and computer-readable storage medium In addition to the above methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, and when the computer program instructions are run by a processor, the processor is caused to execute the steps in the methods according to various embodiments of the present invention described in the "Exemplary Method" section above of this specification.
[0047] The computer program product may be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present invention. The programming languages include object-oriented programming languages, such as Java, C++, etc., and also include conventional procedural programming languages, such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0048] In addition, an embodiment of the present invention may also be a computer-readable storage medium storing computer program instructions, which, when run by a processor, cause the processor to execute the steps in the methods according to various embodiments of the present invention described in the "Exemplary Methods" section above of this specification.
[0049] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0050] The basic principles of the present invention have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present invention. In addition, the specific details disclosed above are only for illustrative and facilitating understanding purposes, rather than limitations. These details do not limit the present invention to necessarily adopt the above specific details for implementation.
[0051] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For system embodiments, since they basically correspond to method embodiments, they are described relatively simply. For relevant parts, reference can be made to the description in the method embodiments.
[0052] The block diagrams of devices, systems, equipment, and systems involved in the present invention are only illustrative examples and do not intend to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, systems, equipment, and systems can be connected, arranged, and configured in any way. Words such as "including", "comprising", "having", etc. are open-ended terms, meaning "including but not limited to", and can be used interchangeably with each other. The words "or" and "and" used here refer to the word "and / or", and can be used interchangeably with each other, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with each other.
[0053] The methods and systems of the present invention can be implemented in many ways. For example, the methods and systems of the present invention can be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of the steps for the method is for illustration only, and the steps of the method of the present invention are not limited to the specific order described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention can also be implemented as a program recorded in a recording medium, and these programs include machine-readable instructions for implementing the method according to the present invention. Therefore, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
[0054] It should also be noted that in the systems, devices, and methods of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present invention. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0055] The above description has been presented for purposes of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although several example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.
Claims
1. A method for fine classification of crops, characterized in that: include: A sample data set is randomly and uniformly extracted from a historical data set and a current data set of crops, wherein the sample data set includes: a source domain sample data set and a target domain sample data set, and the historical data set and the current data set are high-resolution satellite data; Using a random forest machine learning algorithm, the pre-selected elements are ranked by importance according to the source domain sample data set and the target domain sample data set to obtain an important element set; The sample data set is randomly sampled and grouped to generate M groups of sample data subsets, and a decision tree model is used to learn the M groups of sample data subsets and the target domain sample data set according to the important element set to generate M+1 pre-selected classifiers; Generate a final classifier based on the M+1 pre-selected classifiers using the preset rules and the important element set; The data to be classified is classified according to the final classifier to obtain a classification result of the current data set, wherein the data to be classified is the current data set excluding the target domain sample data set.
2. The method according to claim 1, characterized in that The sample data sets are randomly and uniformly extracted from the historical data sets and current data sets of crops, including: Randomly and evenly extracting historical sample data from the historical data set as a source domain sample data set; Randomly and uniformly extracting a current data sample data set from the current data set as a target domain sample data set; The sample data set is determined according to the source domain sample data set and the target domain sample data set.
3. The method according to claim 1, characterized in that The pre-selected elements include: band data and vegetation and water body index, where The band data includes: red light band R, green light band G, blue light band B and near infrared band NIR; The vegetation and water indexes include: normalized difference vegetation index NDVI, enhanced vegetation index EVI, soil adjusted vegetation index SAVI, greenness index GI, difference vegetation index DVI, green vegetation index GVI, green normalized vegetation index GNDVI and normalized difference water index NDWI.
4. The method according to claim 1, characterized in that: M+1 pre-selected classifiers Includes: Pre-selected classifiers corresponding to M groups of sample data subsets And the pre-selected classifier corresponding to the target domain sample dataset ,and Using the preset rules and the important element set, a final classifier is generated based on the M+1 pre-selected classifiers, including: Step 1: Calculate the classification accuracy of each of the M+1 pre-selected classifiers D for the target domain sample data set and sort them in descending order to obtain the sorted classification accuracy ; Step 2: Initialize parameters, including: accuracy threshold ; The first intermediate classifier ; Second intermediate classifier: ; m = 1, m ≤ M; Step 3: Iterate based on the initialization parameters and output the second intermediate classifier ; Step 4: Let the final classifier , the new prediction accuracy ,reduce The last element in the new , return to step 1, if Greater than , update the final classifier and the new prediction accuracy ,until The number of important features in is less than 5, and the iteration ends, and the final classifier is output. .
5. The method according to claim 4, characterized in that Step 3: Iterate based on the initialization parameters and output the second intermediate classifier ,include: Step 1): Update parameter m=m+1; Step 2): Update the first intermediate classifier ; Step 3): Using the first intermediate classifier Each pre-selected classifier predicts the target domain sample data set S t , obtain multiple prediction classification results; Step 4): Determine the classification result based on multiple predicted classification results by voting and calculate the voting prediction accuracy; Step 5): If the voting prediction accuracy , then update , ; Step 6): Return to step 1) for iterative calculation. When m>M, end the loop and obtain the second intermediate classifier. .
6. A fine classification device for crops, characterized in that: include: An extraction module is used to randomly and evenly extract a sample data set from a historical data set and a current data set of crops, wherein the sample data set includes: a source domain sample data set and a target domain sample data set, and the historical data set and the current data set are high-resolution satellite data; An acquisition module, configured to use a random forest machine learning algorithm to sort the importance of pre-selected elements according to the source domain sample data set and the target domain sample data set to acquire an important element set; A first generation module is used to randomly sample and group the sample data set to generate M groups of sample data subsets, and use a decision tree model to learn the M groups of sample data subsets and the target domain sample data set according to the important element set to generate M+1 pre-selected classifiers; A second generation module is used to generate a final classifier according to M+1 pre-selected classifiers using preset rules and the important element set; The classification module is used to classify the data to be classified according to the final classifier to obtain the classification result of the current data set, wherein the data to be classified is the current data set excluding the target domain sample data set.
7. The device according to claim 6, characterized in that Extraction modules, including: A first extraction submodule, used to randomly and uniformly extract historical sample data from the historical data set as a source domain sample data set; A second extraction submodule is used to randomly and uniformly extract a current data sample data set from the current data set as a target domain sample data set; The determination submodule is used to determine the sample data set according to the source domain sample data set and the target domain sample data set.
8. The device according to claim 6, characterized in that The pre-selected elements include: band data and vegetation and water body index, where The band data includes: red light band R, green light band G, blue light band B and near infrared band NIR; The vegetation and water indexes include: normalized difference vegetation index NDVI, enhanced vegetation index EVI, soil adjusted vegetation index SAVI, greenness index GI, difference vegetation index DVI, green vegetation index GVI, green normalized vegetation index GNDVI and normalized difference water index NDWI.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 5.
10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Optimized classification method and optimized classification device based on random forest algorithm
CN105844300A
High spatial resolution remote sensing image transfer learning classification method based on OpenStreetMap
CN110598564A
Visualization method and device of random forest model and storage medium
CN111783840A
Winter wheat remote sensing recognition analysis method and system based on random forest
CN114494882A
Hetao irrigation district planting structure identification method and system based on GEE and machine learning
CN114663780A