A method and system for predicting cadmium content in rice
Through the method of dividing the remote sensing image, soil sample analysis, and target data correction method, the prediction of cadmium content caused by soil erosion is inaccurate, and the accuracy of the prediction is improved.
Patent Information
- Application Number
- CN202411534081.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-31
AI Technical Summary
During the cultivation of rice, soil erosion causes the sampled soil parameter data to be unreliable, affecting the accuracy of cadmium content prediction.
By obtaining the remote sensing image of the sampling area for area division, the soil sample component analysis and data sorting, the preset selection rules are selected for the target soil parameter data, and the correction and update based on these data To output cadmium content.
The accuracy of soil parameter values in soil erosion is improved, and the reliability of cadmium content prediction is enhanced.
Smart Images

Figure CN119202698B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of cadmium content prediction, and in particular relates to a method and system for predicting cadmium content in rice. Background Art
[0002] Excessive cadmium content in rice poses a major challenge to food security. If we can achieve forward-looking prediction of cadmium content in rice, we can accurately define and divide the risk areas of cadmium contamination in rice. This measure will undoubtedly provide valuable scientific basis and decision-making support for the formulation and implementation of preventive governance strategies and measures, thereby more effectively ensuring the safety and sustainability of food production.
[0003] However, since soil erosion may occur during rice cultivation, the sampled soil parameter data may be unreliable. Therefore, a method and system for predicting cadmium content in rice are urgently needed to improve the accuracy of the prediction results. Summary of the invention
[0004] The present invention provides a method and system for predicting the cadmium content in rice, which are used to solve the technical problem that soil erosion may occur during the cultivation of rice, thereby making the sampled soil parameter data possibly unreliable.
[0005] In a first aspect, the present invention provides a method for predicting cadmium content in rice, comprising:
[0006] Acquire a remote sensing image of a sampling area, and divide the remote sensing image into regions based on a preset division rule to determine at least one sampling sub-region within the sampling area;
[0007] Performing component analysis on soil samples at each sampling point in a certain sampling sub-area to obtain soil parameter data corresponding to each sampling point, and sorting each soil parameter data based on position information to obtain a soil parameter data sequence corresponding to the certain sampling sub-area;
[0008] Using a preset selection rule, at least one first target soil parameter data and at least one second target soil parameter data are selected from the soil parameter data sequence, wherein one first target soil parameter data corresponds to at least one second target soil parameter data;
[0009] Correcting each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data;
[0010] The soil parameter data sequence is updated according to the third target soil parameter data, and each soil parameter data in the updated soil parameter data sequence is input into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area.
[0011] In a second aspect, the present invention provides a rice cadmium content prediction system, comprising:
[0012] A division module is configured to obtain a remote sensing image of a sampling area, and divide the remote sensing image into regions based on a preset division rule to determine at least one sampling sub-region within the sampling area;
[0013] An analysis module is configured to perform component analysis on soil samples at each sampling point in a certain sampling sub-area to obtain soil parameter data corresponding to each sampling point, and sort each soil parameter data based on position information to obtain a soil parameter data sequence corresponding to the certain sampling sub-area;
[0014] A selection module is configured to select at least one first target soil parameter data and at least one second target soil parameter data from the soil parameter data sequence by using a preset selection rule, wherein one first target soil parameter data corresponds to at least one second target soil parameter data;
[0015] a correction module, configured to correct each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data;
[0016] The output module is configured to update the soil parameter data sequence according to the third target soil parameter data, and input each soil parameter data in the updated soil parameter data sequence into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area.
[0017] In a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the method for predicting the cadmium content in rice according to any embodiment of the present invention.
[0018] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor executes the steps of the method for predicting the cadmium content in rice of any embodiment of the present invention.
[0019] The rice cadmium content prediction method and system of the present application adopts a preset selection rule to select at least one first target soil parameter data and at least one second target soil parameter data in a certain soil parameter data sequence, and corrects each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data. A certain soil parameter data sequence is updated according to the third target soil parameter data, and the soil parameter value after soil erosion occurs can be predicted, thereby effectively improving the accuracy of the prediction result. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A flow chart of a method for predicting cadmium content in rice provided by one embodiment of the present invention;
[0022] Figure 2 A structural block diagram of a rice cadmium content prediction system provided by an embodiment of the present invention;
[0023] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] See also Figure 1 , which shows a flow chart of a method for predicting cadmium content in rice of the present application.
[0026] like Figure 1 As shown, the method for predicting the cadmium content in rice specifically includes the following steps:
[0027] Step S101, acquiring a remote sensing image of a sampling area, and dividing the remote sensing image into regions based on a preset division rule to determine at least one sampling sub-region within the sampling area.
[0028] In this step, in order to obtain the layout of the sampling area, remote sensing images of the area are collected for identification, and a regional recognition model is constructed through historical remote sensing image training. The regional recognition model is used to identify the real-time input remote sensing images and divide and label the various area types in the remote sensing images.
[0029] Furthermore, the remote sensing image of the sampling area is input into the regional recognition model, and the grayscale features and texture features in the remote sensing image are identified according to the regional recognition model; it is determined whether the grayscale features and texture features in the remote sensing image are successfully matched with the preset grayscale features and preset texture features of a certain area type respectively; if successful, the remote sensing image is divided into regions to obtain a regional layout map.
[0030] Step S102, performing component analysis on soil samples at each sampling point in a certain sampling sub-area to obtain soil parameter data corresponding to the respective sampling points, and sorting the respective soil parameter data based on the position information to obtain a soil parameter data sequence corresponding to the certain sampling sub-area.
[0031] In this step, the collected soil samples are pre-treated, such as drying, grinding, sieving, etc., to remove impurities and prepare samples suitable for analysis. The treated soil samples are analyzed for composition using selected analytical equipment, including atomic absorption spectroscopy, mass spectrometry, X-ray diffraction, etc., which are used to determine the element content, organic matter type and content, mineral composition, etc. in the soil. The data obtained during the analysis process are recorded, processed and analyzed. Statistical software can be used to organize and analyze the data to obtain accurate soil parameter values.
[0032] And the soil parameter data are sorted based on the location information to obtain a soil parameter data sequence corresponding to a certain sampling sub-area.
[0033] Step S103, using a preset selection rule, select at least one first target soil parameter data and at least one second target soil parameter data from the soil parameter data sequence, wherein one first target soil parameter data corresponds to at least one second target soil parameter data.
[0034] In this step, soil parameter data with soil parameter values greater than a preset threshold value are selected from a certain soil parameter data sequence as first target soil parameter data; target position information of each first target soil parameter data is obtained, and a circle is drawn with each target position information as the center and a preset distance as the radius to obtain each target area; other soil parameter data with position information within a certain target area are taken as second target soil parameter data corresponding to a certain first target soil parameter data, wherein the other soil parameter data are: all other soil parameter data with position information within a certain target area, excluding the soil parameter data after removing a certain first target soil parameter data.
[0035] Step S104: correct each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data.
[0036] In this step, a first position corresponding to a first target soil parameter data and a second position corresponding to a second target soil parameter data are obtained;
[0037] Determine other second target soil parameter data between the first position and the second position, and other positions corresponding to the other second target soil parameter data;
[0038] Calculate a first soil parameter difference between a first target soil parameter data and a second target soil parameter data, and calculate other soil parameter differences between other second target soil parameter data and a second target soil parameter data;
[0039] A second target soil parameter data is corrected according to the first position, the second position, the first soil parameter difference and the other soil parameter differences to obtain a third target soil parameter data corresponding to the second target soil parameter data, wherein the corrected expression is:
[0040] ,
[0041] In the formula, is the soil parameter value corresponding to a third target soil parameter data, is the soil parameter value corresponding to a first target soil parameter data, is the soil parameter value corresponding to a second target soil parameter data, is the distance between the first position and the second position, is the soil parameter value corresponding to the other second target soil parameter data, is the distance value between the other position and the second position.
[0042] It should be noted that there is a relatively obvious erosion process in the soil during the cultivation process. For example, when cultivating rice, it is necessary to deep-turn the soil, and the soil at different positions may have eroded during this process. Therefore, the distribution position of heavy metals in the soil has also changed. If the soil parameter value of the sampling point is directly input into the rice prediction model, the actual soil parameter value will change, causing the prediction result to be inaccurate. For example, the cadmium content at A is measured as a value, and the cadmium content at B is b value, but in the rice planting process, the soil may have soil erosion due to deep turning or other operations, and the cadmium content at B is actually c value. Therefore, it is necessary to correct the b value. In the prior art, the a value and the b value are averaged to show that the cadmium content in the soil has shifted from high to low, but it cannot be well in line with the phenomenon that the cadmium content part has shifted from high to low after the soil has eroded. Therefore, the correction method of the present application can be used to more accurately represent the above phenomenon, thereby effectively improving the accuracy of the prediction result.
[0043] Step S105, updating the soil parameter data sequence according to the third target soil parameter data, and inputting each soil parameter data in the updated soil parameter data sequence into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area.
[0044] In this step, the third target soil parameter data replaces the second target soil parameter data corresponding to the third target soil parameter data in a certain soil parameter data sequence to obtain an updated certain soil parameter data sequence, and each soil parameter data in the updated certain soil parameter data sequence is respectively input into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area. Specifically, the rice prediction model can be a model obtained by training a neural network.
[0045] In summary, the method of the present application adopts a preset selection rule to select at least one first target soil parameter data and at least one second target soil parameter data in a certain soil parameter data sequence, and corrects each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data. A certain soil parameter data sequence is updated according to the third target soil parameter data, and the soil parameter value after soil erosion occurs can be predicted, thereby effectively improving the accuracy of the prediction result.
[0046] See also Figure 2 , which shows a structural block diagram of a rice cadmium content prediction system of the present application.
[0047] like Figure 2 As shown, the rice cadmium content prediction system 200 includes a classification module 210, an analysis module 220, a selection module 230, a correction module 240 and an output module 250.
[0048] Among them, the division module 210 is configured to obtain a remote sensing image of a sampling area, and divide the remote sensing image into regions based on a preset division rule to determine at least one sampling sub-region within the sampling area; the analysis module 220 is configured to perform component analysis on soil samples at each sampling point in a certain sampling sub-region to obtain soil parameter data corresponding to each sampling point, and sort each soil parameter data based on position information to obtain a soil parameter data sequence corresponding to the certain sampling sub-region; the selection module 230 is configured to select at least one first target soil parameter data and at least one second target soil parameter data from the certain soil parameter data sequence using a preset selection rule. Target soil parameter data, wherein a first target soil parameter data corresponds to at least one second target soil parameter data; a correction module 240, configured to correct each second target soil parameter data according to the at least one first target soil parameter data, to obtain third target soil parameter data corresponding to each second target soil parameter data; an output module 250, configured to update the certain soil parameter data sequence according to the third target soil parameter data, and input each soil parameter data in the updated certain soil parameter data sequence into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area.
[0049] It should be understood that Figure 2 Modules and references documented in Figure 1 Therefore, the operations and features described above for the method and the corresponding technical effects are also applicable to Figure 2 The modules in it will not be described in detail here.
[0050] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor executes the rice cadmium content prediction method in any of the above method embodiments;
[0051] As an implementation mode, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:
[0052] Acquire a remote sensing image of a sampling area, and divide the remote sensing image into regions based on a preset division rule to determine at least one sampling sub-region within the sampling area;
[0053] Performing component analysis on soil samples at each sampling point in a certain sampling sub-area to obtain soil parameter data corresponding to each sampling point, and sorting each soil parameter data based on position information to obtain a soil parameter data sequence corresponding to the certain sampling sub-area;
[0054] Using a preset selection rule, at least one first target soil parameter data and at least one second target soil parameter data are selected from the soil parameter data sequence, wherein one first target soil parameter data corresponds to at least one second target soil parameter data;
[0055] Correcting each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data;
[0056] The soil parameter data sequence is updated according to the third target soil parameter data, and each soil parameter data in the updated soil parameter data sequence is input into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area.
[0057] The computer-readable storage medium may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to the use of the rice cadmium content prediction system, etc. In addition, the computer-readable storage medium may include a high-speed random access memory, and may also include a memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the rice cadmium content prediction system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0058] Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, the device includes: a processor 310 and a memory 320. The electronic device may also include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 3In the example, the bus connection is used. The memory 320 is the above-mentioned computer-readable storage medium. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, the rice cadmium content prediction method of the above-mentioned method embodiment is realized. The input device 330 can receive input digital or character information, and generate key signal input related to user settings and function control of the rice cadmium content prediction system. The output device 340 may include display devices such as display screens.
[0059] The electronic device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0060] As an implementation mode, the electronic device is applied to a rice cadmium content prediction system and is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
[0061] Acquire a remote sensing image of a sampling area, and divide the remote sensing image into regions based on a preset division rule to determine at least one sampling sub-region within the sampling area;
[0062] Performing component analysis on soil samples at each sampling point in a certain sampling sub-area to obtain soil parameter data corresponding to each sampling point, and sorting each soil parameter data based on position information to obtain a soil parameter data sequence corresponding to the certain sampling sub-area;
[0063] Using a preset selection rule, at least one first target soil parameter data and at least one second target soil parameter data are selected from the soil parameter data sequence, wherein one first target soil parameter data corresponds to at least one second target soil parameter data;
[0064] Correcting each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data;
[0065] The soil parameter data sequence is updated according to the third target soil parameter data, and each soil parameter data in the updated soil parameter data sequence is input into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area.
[0066] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting cadmium content in rice, characterized in that: include: Acquire a remote sensing image of a sampling area, and divide the remote sensing image into regions based on a preset division rule to determine at least one sampling sub-region within the sampling area; Performing component analysis on soil samples at each sampling point in a certain sampling sub-area to obtain soil parameter data corresponding to each sampling point, and sorting each soil parameter data based on position information to obtain a soil parameter data sequence corresponding to the certain sampling sub-area; Using a preset selection rule, at least one first target soil parameter data and at least one second target soil parameter data are selected from the soil parameter data sequence, wherein one first target soil parameter data corresponds to at least one second target soil parameter data; The respective second target soil parameter data are corrected according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to the respective second target soil parameter data, wherein the respective second target soil parameter data are corrected according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to the respective second target soil parameter data comprises: Acquire a first position corresponding to a first target soil parameter data, and a second position corresponding to a second target soil parameter data; Determine other second target soil parameter data between the first position and the second position, and other positions corresponding to the other second target soil parameter data; Calculating a first soil parameter difference between the certain first target soil parameter data and the certain second target soil parameter data, and other soil parameter differences between the other second target soil parameter data and the certain second target soil parameter data; The second target soil parameter data is corrected according to the first position, the second position, the first soil parameter difference and the other soil parameter differences to obtain third target soil parameter data corresponding to the second target soil parameter data, wherein the corrected expression is: , In the formula, is the soil parameter value corresponding to a third target soil parameter data, is the soil parameter value corresponding to a first target soil parameter data, is the soil parameter value corresponding to a second target soil parameter data, is the distance between the first position and the second position, is the soil parameter value corresponding to the other second target soil parameter data, is the distance value between the other positions and the second position; The soil parameter data sequence is updated according to the third target soil parameter data, and each soil parameter data in the updated soil parameter data sequence is input into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area.
2. A method for predicting cadmium content in rice according to claim 1, characterized in that: The performing region division on the remote sensing image based on a preset division rule to determine at least one sampling sub-region within the sampling region comprises: The remote sensing image is input into a preset region recognition model, and the region recognition model outputs a region distribution map, wherein the region distribution map includes at least one sampling sub-region.
3. The method for predicting cadmium content in rice according to claim 1, characterized in that: The method of adopting a preset selection rule to select at least one first target soil parameter data and at least one second target soil parameter data from the soil parameter data sequence includes: Selecting soil parameter data whose soil parameter value is greater than a preset threshold value from the certain soil parameter data sequence as first target soil parameter data; Obtain target position information of each of the first target soil parameter data, draw a circle with each of the target position information as the center and a preset distance as the radius, and obtain each target area; Other soil parameter data with location information within a target area are used as second target soil parameter data corresponding to a first target soil parameter data, wherein the other soil parameter data are: all other soil parameter data with location information within a target area, excluding the first target soil parameter data.
4. The method for predicting cadmium content in rice according to claim 1, characterized in that: The updating of the soil parameter data sequence according to the third target soil parameter data comprises: The third target soil parameter data replaces the second target soil parameter data corresponding to the third target soil parameter data in the certain soil parameter data sequence to obtain an updated certain soil parameter data sequence.
5. A rice cadmium content prediction system, characterized in that: include: A division module is configured to obtain a remote sensing image of a sampling area, and divide the remote sensing image into regions based on a preset division rule to determine at least one sampling sub-region within the sampling area; An analysis module is configured to perform component analysis on soil samples at each sampling point in a certain sampling sub-area to obtain soil parameter data corresponding to each sampling point, and sort each soil parameter data based on position information to obtain a soil parameter data sequence corresponding to the certain sampling sub-area; A selection module is configured to select at least one first target soil parameter data and at least one second target soil parameter data from the soil parameter data sequence by using a preset selection rule, wherein one first target soil parameter data corresponds to at least one second target soil parameter data; A correction module is configured to correct each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data, wherein the correction of each second target soil parameter data according to the at least one first target soil parameter data to obtain third target soil parameter data corresponding to each second target soil parameter data includes: Acquire a first position corresponding to a first target soil parameter data, and a second position corresponding to a second target soil parameter data; Determine other second target soil parameter data between the first position and the second position, and other positions corresponding to the other second target soil parameter data; Calculating a first soil parameter difference between the certain first target soil parameter data and the certain second target soil parameter data, and other soil parameter differences between the other second target soil parameter data and the certain second target soil parameter data; The second target soil parameter data is corrected according to the first position, the second position, the first soil parameter difference and the other soil parameter differences to obtain third target soil parameter data corresponding to the second target soil parameter data, wherein the corrected expression is: , In the formula, is the soil parameter value corresponding to a third target soil parameter data, is the soil parameter value corresponding to a first target soil parameter data, is the soil parameter value corresponding to a second target soil parameter data, is the distance between the first position and the second position, is the soil parameter value corresponding to the other second target soil parameter data, is the distance value between the other positions and the second position; The output module is configured to update the soil parameter data sequence according to the third target soil parameter data, and input each soil parameter data in the updated soil parameter data sequence into a pre-constructed rice prediction model, and the rice prediction model outputs the cadmium content of rice at each sampling point in the sampling area.
6. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Remote intelligent control system for irrigation
CN108566808A
Soil environment quality monitoring method and system and readable storage medium
CN116500240A